/* ===== Identidade visual Nord ===== */
:root {
  --nord-primary: #f5821f;
  --nord-primary-dark: #d96a0d;
  --nord-primary-light: #fff1e0;
  --nord-bg: #f7f7f8;
  --nord-surface: #ffffff;
  --nord-text: #1f2430;
  --nord-text-muted: #6b7280;
  --nord-border: #e8e8ec;

  --nord-radius-lg: 20px;
  --nord-radius: 14px;
  --nord-radius-sm: 8px;
  --nord-shadow: 0 2px 10px rgba(20, 20, 30, 0.06);

  --nord-font: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--nord-font);
  background: var(--nord-bg);
  color: var(--nord-text);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

/* ===== Cabeçalho ===== */
.page-header { margin-bottom: 1.5rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--nord-primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand-name { font-size: 1.05rem; font-weight: 500; }
.brand-name strong { font-weight: 800; }

.page-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.9rem;
  font-weight: 800;
}

.page-header p {
  margin: 0;
  color: var(--nord-text-muted);
  font-size: 0.95rem;
}

/* ===== Cartão / tabela ===== */
.card {
  background: var(--nord-surface);
  border-radius: var(--nord-radius-lg);
  box-shadow: var(--nord-shadow);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--nord-border);
}

table.nord-table {
  width: 100%;
  border-collapse: collapse;
}

.nord-table th,
.nord-table td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--nord-border);
  font-size: 0.95rem;
}

.nord-table th {
  background: var(--nord-bg);
  color: var(--nord-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.nord-table tr:last-child td { border-bottom: none; }

.col-pos { width: 68px; text-align: center; }
.nord-table th.col-pos { text-align: center; }
.col-pts { width: 110px; text-align: right; }
.nord-table th.col-pts { text-align: right; }

.col-pts strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--nord-text);
}

/* ===== Posição / medalhas ===== */
.pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.medal { font-size: 1.15rem; line-height: 1; }

.pos-num {
  font-weight: 700;
  color: var(--nord-text-muted);
  min-width: 1.1ch;
  text-align: center;
}

.top-1 .pos-num,
.top-2 .pos-num,
.top-3 .pos-num { display: none; }

.top td { background: var(--nord-primary-light); }
.top-1 td { background: #ffe9cc; }

/* ===== Aluno / turma ===== */
.col-aluno { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

.aluno-nome { font-weight: 600; }

.turma {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.turma-8hrs  { background: #e8f1ff; color: #1d4ed8; border-color: #cfe0ff; }
.turma-15hrs { background: #eafbf1; color: #15803d; border-color: #cdefda; }
.turma-10hrs { background: #f3ecff; color: #7c3aed; border-color: #e2d5ff; }

/* ===== Rodapé ===== */
.foot {
  margin-top: 1rem;
  text-align: center;
  color: var(--nord-text-muted);
  font-size: 0.82rem;
}

.legend { display: inline-flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; justify-content: center; }
.legend .medal { font-size: 0.95rem; }

@media (max-width: 480px) {
  .container { padding: 1.75rem 0.85rem 2.5rem; }
  .page-header h1 { font-size: 1.55rem; }
  .nord-table th,
  .nord-table td { padding: 0.7rem 0.75rem; }
}
