/* ============================================================
   NiceHair — Pesquisa de Mercado
   Tokens de marca: fonte Gontserrat/Montserrat, paleta institucional
   e cores das 4 linhas (claro/principal/profundo), já fechadas no
   handbook (07_Identidade_Visual/Identidade_Visual.md, seção 10.5/10.6).
   ============================================================ */

@font-face {
  font-family: "Gontserrat";
  src: url("../fonts/Gontserrat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gontserrat";
  src: url("../fonts/Gontserrat-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gontserrat";
  src: url("../fonts/Gontserrat-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gontserrat";
  src: url("../fonts/Gontserrat-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gontserrat";
  src: url("../fonts/Gontserrat-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* institucional */
  --branco: #ffffff;
  --preto-suave: #141210;
  --neutro-claro: #d8d6d2;
  --neutro-medio: #8c8a85;
  --gold: #b5933d;

  /* linhas — claro / principal / profundo */
  --reconstrucao-claro: #e8c4ba;
  --reconstrucao: #c57d6a;
  --reconstrucao-escuro: #854c3e;

  --hidratacao-claro: #bcd0e1;
  --hidratacao: #5286b0;
  --hidratacao-escuro: #2c587c;

  --anticaspa-claro: #bde0ba;
  --anticaspa: #4ca846;
  --anticaspa-escuro: #286c25;

  --antiqueda-claro: #e5a6aa;
  --antiqueda: #a81420;
  --antiqueda-escuro: #690c14;

  /* padrão até o usuário escolher a etapa (a cor de destaque muda por etapa) */
  --accent: var(--preto-suave);
  --accent-soft: var(--neutro-claro);

  --radius: 10px;
  --shadow: 0 2px 10px rgba(20, 18, 16, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--branco);
  color: var(--preto-suave);
  font-family: "Gontserrat", "Montserrat", -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

p {
  margin: 0 0 14px;
}

strong {
  font-weight: 600;
}

/* ---------------- layout geral ---------------- */

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 18px 48px;
}

.logo {
  width: 132px;
  margin: 8px 0 28px;
}

.card {
  width: 100%;
  max-width: 560px;
  background: var(--branco);
}

/* ---------------- barra de progresso ---------------- */

.progress-track {
  width: 100%;
  max-width: 560px;
  height: 6px;
  border-radius: 100px;
  background: var(--neutro-claro);
  overflow: hidden;
  margin-bottom: 30px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.35s ease, background 0.35s ease;
}

/* ---------------- steps ---------------- */

.step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.step h2 {
  font-size: 22px;
}

.step .lead {
  color: #3a3532;
  font-size: 15.5px;
}

.pill-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--preto-suave);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* ---------------- perguntas ---------------- */

.question {
  margin: 26px 0;
}

.question .q-label {
  display: block;
  font-weight: 600;
  font-size: 15.5px;
  margin-bottom: 12px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option {
  position: relative;
}

.option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.option label {
  display: block;
  padding: 13px 16px;
  border: 1.5px solid var(--neutro-claro);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14.5px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option input:checked + label {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.option input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.text-input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--neutro-claro);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--preto-suave);
  background: var(--branco);
}

.text-input:focus {
  outline: none;
  border-color: var(--accent);
}

textarea.text-input {
  resize: vertical;
  min-height: 90px;
}

.hint {
  font-size: 12.5px;
  color: var(--neutro-medio);
  margin-top: 6px;
}

/* ---------------- navegação ---------------- */

.nav-row {
  display: flex;
  gap: 10px;
  margin-top: 32px;
}

.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  flex: 1;
  background: var(--accent);
  color: var(--branco);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--preto-suave);
  border: 1.5px solid var(--neutro-claro);
}

.error-msg {
  color: #a81420;
  font-size: 13px;
  margin-top: 10px;
  display: none;
}

.error-msg.show {
  display: block;
}

/* ---------------- tela de agradecimento ---------------- */

.thanks {
  text-align: center;
}

.coupon-box {
  margin: 22px 0;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--preto-suave);
  color: var(--branco);
}

.coupon-code {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-top: 6px;
}

/* ============================================================
   Dashboard
   ============================================================ */

.dash-body {
  background: #faf9f8;
  align-items: stretch;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto 28px;
}

.dash-header img {
  width: 110px;
}

.dash-wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.login-card {
  max-width: 380px;
  margin: 12vh auto 0;
  padding: 32px;
  border: 1.5px solid var(--neutro-claro);
  border-radius: var(--radius);
  background: var(--branco);
}

.login-card h1 {
  font-size: 20px;
}

.login-card .text-input {
  margin-bottom: 12px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--branco);
  border: 1.5px solid var(--neutro-claro);
  border-radius: var(--radius);
  padding: 18px;
}

.stat-card .num {
  font-size: 28px;
  font-weight: 900;
}

.stat-card .label {
  font-size: 12.5px;
  color: var(--neutro-medio);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.panel {
  background: var(--branco);
  border: 1.5px solid var(--neutro-claro);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}

.panel h3 {
  font-size: 15.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.line-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.chart-box {
  position: relative;
  height: 220px;
}

table.resp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.resp-table th,
table.resp-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--neutro-claro);
  white-space: nowrap;
}

table.resp-table th {
  color: var(--neutro-medio);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.03em;
  position: sticky;
  top: 0;
  background: var(--branco);
}

.table-scroll {
  overflow-x: auto;
  max-height: 480px;
  overflow-y: auto;
  border-radius: var(--radius);
  border: 1.5px solid var(--neutro-claro);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--anticaspa);
  display: inline-block;
  margin-right: 6px;
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.logout-link {
  font-size: 13px;
  color: var(--neutro-medio);
  cursor: pointer;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .login-card {
    margin-top: 6vh;
  }
}
