@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --azul:       #003087;
  --azul-esc:   #001A52;
  --azul-med:   #006ED2;
  --azul-cl:    #E8EFF8;
  --vermelho:   #CC0000;
  --cinza:      #F5F6FA;
  --borda:      #E0E4ED;
  --texto:      #1A1A2E;
  --sec:        #5A6478;
  --sombra:     0 2px 16px rgba(0,48,135,0.09);
  --raio:       10px;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--texto);
  background: var(--cinza);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── HEADER ─────────────────────────────────── */
.header {
  background: var(--azul);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo { color: #fff; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.logo span { color: #6EA8FE; }
.header-tag { color: rgba(255,255,255,.55); font-size: .8rem; }

/* ── HERO ────────────────────────────────────── */
.hero {
  background: linear-gradient(140deg, var(--azul-esc) 0%, var(--azul) 60%, var(--azul-med) 100%);
  color: #fff;
  padding: 5rem 2rem 4rem;
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: #6EA8FE;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -.03em;
}
.hero h1 em { color: #6EA8FE; font-style: normal; }
.hero p { font-size: 1.1rem; opacity: .82; max-width: 540px; margin: 0 auto 2rem; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.hero-stat strong { display: block; font-size: 1.6rem; font-weight: 800; color: #fff; }
.hero-stat span   { font-size: .8rem; color: rgba(255,255,255,.6); }

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .875rem 2rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}
.btn-primary   { background: var(--vermelho); color: #fff; }
.btn-primary:hover { background: #AA0000; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(204,0,0,.35); }
.btn-outline   { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-azul      { background: var(--azul); color: #fff; }
.btn-azul:hover { background: var(--azul-esc); transform: translateY(-1px); }
.btn-ghost     { background: transparent; color: var(--sec); border: 1.5px solid var(--borda); }
.btn-ghost:hover { border-color: var(--azul); color: var(--azul); }
.btn-block     { width: 100%; text-align: center; }
.btn:disabled  { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ── CONTAINER ───────────────────────────────── */
.container { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 600px; margin: 0 auto; padding: 0 1.5rem; }

/* ── CARD ────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.card-title { font-size: 1.1rem; font-weight: 700; color: var(--azul); margin-bottom: 1.25rem; }

/* ── SEÇÃO DE DOMÍNIOS ───────────────────────── */
.section-label {
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
}
.section-label h2 { font-size: 1.5rem; font-weight: 800; color: var(--azul); }
.section-label p  { color: var(--sec); margin-top: .5rem; max-width: 500px; margin-inline: auto; }

.dominios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  padding: 0 1.5rem 3rem;
  max-width: 860px;
  margin: 0 auto;
}
.dominio-card {
  background: #fff;
  border-radius: var(--raio);
  padding: 1.5rem;
  box-shadow: var(--sombra);
  border-top: 3px solid var(--azul);
  transition: transform .2s, box-shadow .2s;
}
.dominio-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,48,135,.13); }
.dominio-icon { font-size: 1.75rem; margin-bottom: .6rem; }
.dominio-card h3 { font-size: .9rem; font-weight: 700; color: var(--azul); margin-bottom: .35rem; }
.dominio-card p  { font-size: .82rem; color: var(--sec); line-height: 1.5; }

/* ── FORMULÁRIO ──────────────────────────────── */
.form-section {
  background: #fff;
  border-top: 1px solid var(--borda);
  padding: 3rem 1.5rem;
}
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: .35rem;
  color: var(--texto);
}
.obrig { color: var(--vermelho); }
.form-group input {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--borda);
  border-radius: 6px;
  font-size: .92rem;
  font-family: 'Inter', sans-serif;
  transition: border-color .2s, box-shadow .2s;
  color: var(--texto);
  background: #fff;
}
.form-group input:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(0,48,135,.08);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-note { font-size: .78rem; color: var(--sec); margin-top: .4rem; }
.alert {
  padding: .8rem 1rem;
  border-radius: 6px;
  font-size: .85rem;
  margin-bottom: 1rem;
}
.alert-err { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }

/* ── PROGRESS BAR ────────────────────────────── */
.progress-wrap {
  background: var(--azul);
  padding: .875rem 2rem;
  color: #fff;
  position: sticky;
  top: 64px;
  z-index: 90;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  margin-bottom: .45rem;
  opacity: .9;
}
.progress-bg { height: 5px; background: rgba(255,255,255,.22); border-radius: 3px; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: #6EA8FE;
  border-radius: 3px;
  transition: width .4s ease;
}

/* ── QUESTION CARD ───────────────────────────── */
.q-wrap { padding: 2rem 1.5rem 3rem; }
.q-card {
  background: #fff;
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 2.25rem;
  max-width: 680px;
  margin: 0 auto;
}
.dominio-badge {
  display: inline-block;
  background: var(--azul-cl);
  color: var(--azul);
  font-size: .7rem;
  font-weight: 700;
  padding: .3rem .75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.q-text {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.55;
  margin-bottom: 1.75rem;
  color: var(--texto);
}
.scale-opts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .6rem;
  margin-bottom: 1.75rem;
}
.scale-btn {
  padding: .9rem .3rem .7rem;
  border: 2px solid var(--borda);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  font-family: 'Inter', sans-serif;
}
.scale-btn .num  { font-size: 1.35rem; font-weight: 800; display: block; color: var(--sec); transition: color .2s; }
.scale-btn .lbl  { font-size: .62rem; color: var(--sec); display: block; margin-top: .2rem; line-height: 1.3; }
.scale-btn:hover { border-color: var(--azul-med); background: var(--azul-cl); }
.scale-btn:hover .num { color: var(--azul-med); }
.scale-btn.ativo { border-color: var(--azul); background: var(--azul-cl); box-shadow: 0 0 0 3px rgba(0,48,135,.1); }
.scale-btn.ativo .num { color: var(--azul); }
.nav-row { display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; }
.nav-row .btn { min-width: 120px; text-align: center; }
.q-counter { font-size: .8rem; color: var(--sec); }

/* ── RESULTADO HEADER ────────────────────────── */
.result-hero {
  background: linear-gradient(140deg, var(--azul-esc), var(--azul));
  color: #fff;
  text-align: center;
  padding: 3rem 2rem 2.5rem;
}
.result-hero .user-name { font-size: 1.6rem; font-weight: 800; margin-bottom: .25rem; }
.result-hero .user-info { font-size: .9rem; opacity: .7; margin-bottom: 1.5rem; }
.result-hero .media-geral {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: .75rem 2rem;
}
.result-hero .media-num { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.result-hero .media-lbl { font-size: .75rem; opacity: .7; margin-top: .2rem; }

/* ── SCORES TABLE ────────────────────────────── */
.scores-table { width: 100%; border-collapse: collapse; }
.scores-table th {
  background: var(--azul);
  color: #fff;
  padding: .7rem 1rem;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: left;
}
.scores-table td {
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--borda);
  font-size: .88rem;
  vertical-align: middle;
}
.scores-table tr:last-child td { border-bottom: none; }
.scores-table .icon { font-size: 1.1rem; margin-right: .4rem; }

.nivel-badge {
  display: inline-block;
  padding: .22rem .7rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.n1 { background: #FEE2E2; color: #991B1B; }
.n2 { background: #FEF3C7; color: #92400E; }
.n3 { background: #DBEAFE; color: #1E40AF; }
.n4 { background: #D1FAE5; color: #065F46; }
.n5 { background: #EDE9FE; color: #5B21B6; }

.bar-bg { height: 7px; background: var(--cinza); border-radius: 4px; overflow: hidden; width: 100px; }
.bar-fill { height: 100%; background: var(--azul); border-radius: 4px; }

/* ── CHART ───────────────────────────────────── */
.chart-wrap { max-width: 380px; margin: 0 auto; padding: .5rem; }

/* ── INTERPRETAÇÃO ───────────────────────────── */
.interp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.interp-item {
  background: var(--cinza);
  border-radius: 8px;
  padding: 1rem;
  border-left: 3px solid var(--azul);
}
.interp-item h4 { font-size: .82rem; font-weight: 700; color: var(--azul); margin-bottom: .3rem; }
.interp-item p  { font-size: .78rem; color: var(--sec); line-height: 1.5; }

/* ── FOOTER ──────────────────────────────────── */
footer {
  background: var(--azul-esc);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 2rem;
  font-size: .82rem;
  margin-top: 3rem;
}
footer strong { color: #fff; }
footer a { color: #6EA8FE; text-decoration: none; }

/* ── ADMIN ───────────────────────────────────── */
.admin-header {
  background: var(--azul-esc);
  color: #fff;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-header h1 { font-size: 1.1rem; font-weight: 700; }
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}
.stat-card {
  background: #fff;
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 1.25rem 1.5rem;
  border-top: 3px solid var(--azul);
}
.stat-card .val { font-size: 2rem; font-weight: 800; color: var(--azul); }
.stat-card .lbl { font-size: .78rem; color: var(--sec); margin-top: .15rem; }
.table-wrap { overflow-x: auto; padding: 0 1.5rem 2rem; max-width: 1000px; margin: 0 auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .83rem; background: #fff; border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra); }
.admin-table th { background: var(--azul); color: #fff; padding: .7rem .9rem; text-align: left; white-space: nowrap; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.admin-table td { padding: .75rem .9rem; border-bottom: 1px solid var(--borda); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--cinza); }
.login-box { max-width: 340px; margin: 8rem auto; padding: 0 1.5rem; }

/* ── RESPONSIVO ──────────────────────────────── */
@media (max-width: 600px) {
  .form-grid  { grid-template-columns: 1fr; }
  .scale-opts { gap: .35rem; }
  .scale-btn .lbl { display: none; }
  .scale-btn { padding: .8rem .2rem .6rem; }
  .q-card { padding: 1.5rem; }
  .dominios-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 1.5rem; }
  .chart-wrap { max-width: 300px; }
}
