/* ============================================================
   Psique Profunda, sistema visual
   serifada, azul → branco → verde, cards com neon
   ============================================================ */

:root {
  --ink: #0d1b2a;
  --ink-soft: #24384d;
  --muted: #5d7186;
  --line: rgba(13, 27, 42, 0.09);
  --line-strong: rgba(13, 27, 42, 0.16);

  --blue: #2f6fed;
  --blue-deep: #1b3f8f;
  --teal: #0f9a9a;
  --green: #12b886;

  --neon-cyan: rgba(34, 211, 238, 0.55);
  --neon-green: rgba(52, 211, 153, 0.5);
  --neon-blue: rgba(59, 130, 246, 0.35);

  --card: rgba(255, 255, 255, 0.82);
  --radius: 22px;
  --shadow-soft: 0 1px 2px rgba(13, 27, 42, 0.04), 0 12px 32px -12px rgba(13, 27, 42, 0.16);
  --shadow-lift: 0 2px 4px rgba(13, 27, 42, 0.05), 0 26px 60px -24px rgba(13, 27, 42, 0.28);

  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Spectral", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.62;
  background: #f7fafb;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* fundo: gradiente azul → branco → verde, com halos suaves */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(47, 111, 237, 0.20), transparent 62%),
    radial-gradient(900px 540px at 92% 6%, rgba(18, 184, 134, 0.16), transparent 60%),
    radial-gradient(760px 520px at 78% 104%, rgba(15, 154, 154, 0.14), transparent 62%),
    linear-gradient(168deg, #eef4ff 0%, #ffffff 44%, #f0fbf6 76%, #eaf7f2 100%);
}

/* halos de neon */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(520px 320px at 20% 12%, rgba(34, 211, 238, 0.10), transparent 70%),
    radial-gradient(480px 300px at 84% 78%, rgba(52, 211, 153, 0.12), transparent 72%);
}

/* textura fina, quase imperceptível */
.grain::before {
  background-image:
    radial-gradient(1100px 620px at 12% -8%, rgba(47, 111, 237, 0.20), transparent 62%),
    radial-gradient(900px 540px at 92% 6%, rgba(18, 184, 134, 0.16), transparent 60%),
    radial-gradient(760px 520px at 78% 104%, rgba(15, 154, 154, 0.14), transparent 62%),
    linear-gradient(168deg, #eef4ff 0%, #ffffff 44%, #f0fbf6 76%, #eaf7f2 100%);
}

/* ---------- tipografia ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.06;
  margin: 0;
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ---------- estrutura ---------- */

.shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px) clamp(18px, 4vw, 32px) 96px;
}

.shell--wide { max-width: 1180px; }

/* ---------- marca ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: clamp(28px, 6vw, 56px);
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--blue), var(--teal), var(--green), var(--blue));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 0 18px rgba(34, 211, 238, 0.5);
}

/* ---------- card ---------- */

.card {
  position: relative;
  background: var(--card);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* fio de neon no topo do card */
.card--neon::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, var(--neon-blue) 12%, var(--neon-cyan) 38%, var(--neon-green) 68%, transparent 94%);
  opacity: 0.9;
}

.card--neon {
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(34, 211, 238, 0.10), 0 24px 70px -40px rgba(15, 154, 154, 0.55);
}

/* ---------- telas / transições ---------- */

.screen {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

.screen.is-active {
  opacity: 1;
  transform: none;
}

.screen.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

/* ---------- intro ---------- */

.intro {
  padding: clamp(30px, 5vw, 54px);
}

.intro h1 {
  font-size: clamp(34px, 6.2vw, 58px);
  margin-bottom: 20px;
}

.intro h1 em {
  font-style: italic;
  background: linear-gradient(100deg, var(--blue-deep), var(--teal) 55%, var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(16px, 2.1vw, 18.5px);
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 30px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
}

.meta-row li {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.6);
}

/* ---------- aviso de privacidade ---------- */

.privacy {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 15px 18px;
  border-radius: 14px;
  border: 1px solid rgba(15, 154, 154, 0.22);
  background: linear-gradient(120deg, rgba(47, 111, 237, 0.055), rgba(18, 184, 134, 0.075));
  font-size: 14.2px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 32px;
}

.privacy svg { flex: none; margin-top: 2px; }
.privacy strong { font-weight: 500; }

/* ---------- botões ---------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  padding: 15px 34px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #fff;
  background: linear-gradient(105deg, var(--blue-deep), var(--blue) 42%, var(--teal) 78%, var(--green));
  box-shadow: 0 1px 2px rgba(13, 27, 42, 0.18), 0 14px 34px -14px rgba(47, 111, 237, 0.7), 0 0 24px -6px rgba(52, 211, 153, 0.5);
  transition: transform 0.25s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow: 0 2px 4px rgba(13, 27, 42, 0.2), 0 20px 42px -14px rgba(47, 111, 237, 0.8), 0 0 34px -4px rgba(52, 211, 153, 0.6);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; }

.btn-ghost {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 9px 18px;
  font-family: var(--font-body);
  font-size: 13.5px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}

.btn-ghost:hover { border-color: rgba(15, 154, 154, 0.45); color: var(--ink); }

/* ---------- pergunta ---------- */

.question-card {
  padding: clamp(26px, 4.4vw, 46px);
}

.progress {
  height: 2px;
  width: 100%;
  background: rgba(13, 27, 42, 0.07);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 0 26px;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--teal) 58%, var(--green));
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.65);
  transition: width 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.q-counter {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.q-counter b {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.q-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(23px, 3.6vw, 32px);
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin: 0 0 30px;
  color: var(--ink);
  min-height: 2.4em;
}

.options {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.option {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 15px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.28s ease, background 0.28s ease, box-shadow 0.34s ease,
    transform 0.28s ease, color 0.28s ease;
}

.option:hover {
  border-color: rgba(34, 211, 238, 0.5);
  background: #fff;
  transform: translateX(2px);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.16), 0 12px 28px -18px rgba(15, 154, 154, 0.9);
}

.option:focus-visible {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.22);
}

.option-dot {
  flex: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #fff;
  position: relative;
  transition: border-color 0.28s, box-shadow 0.34s, background 0.28s;
}

.option.is-selected {
  border-color: rgba(18, 184, 134, 0.6);
  background: linear-gradient(100deg, rgba(47, 111, 237, 0.07), rgba(18, 184, 134, 0.12));
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.3), 0 0 30px -6px rgba(52, 211, 153, 0.75),
    0 16px 34px -22px rgba(15, 154, 154, 0.9);
}

.option.is-selected .option-dot {
  border-color: var(--green);
  background: radial-gradient(circle, var(--green) 0 40%, #fff 42%);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.9);
}

.option.is-dimmed { opacity: 0.4; }

/* ---------- final ---------- */

.final {
  padding: clamp(28px, 4.6vw, 50px);
  text-align: left;
}

.final h2 {
  font-size: clamp(28px, 4.6vw, 42px);
  margin-bottom: 14px;
}

.summary-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px dashed rgba(15, 154, 154, 0.32);
  background: rgba(255, 255, 255, 0.55);
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 26px;
}

.support {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13.6px;
  color: var(--muted);
  line-height: 1.6;
}

.support strong { color: var(--ink-soft); font-weight: 500; }

.check {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(47, 111, 237, 0.12), rgba(18, 184, 134, 0.18));
  border: 1px solid rgba(52, 211, 153, 0.4);
  box-shadow: 0 0 26px -8px rgba(52, 211, 153, 0.8);
  color: var(--green);
}

/* ---------- rodapé ---------- */

.foot {
  margin-top: 38px;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-align: center;
}

.foot a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-strong); }

/* ---------- login ---------- */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 40px 38px 44px;
}

.auth-card h1 { font-size: 40px; margin-bottom: 26px; }

.field { display: block; margin-bottom: 22px; }

.field span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.field input:focus {
  outline: none;
  border-color: rgba(15, 154, 154, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.form-error {
  color: #b4341f;
  font-size: 14px;
  margin: 0 0 18px;
}

/* ============================================================
   PAINEL
   ============================================================ */

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.admin-head h1 { font-size: clamp(34px, 5vw, 50px); }

.admin-head p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.kpi {
  padding: 22px 22px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.kpi::after {
  content: "";
  position: absolute;
  inset: auto -30% -70% auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.24), transparent 68%);
  pointer-events: none;
}

.kpi-label {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.kpi-sub { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 880px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.panel {
  padding: 26px 26px 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.panel h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 2px;
  letter-spacing: -0.005em;
}

.panel .panel-sub {
  margin: 0 0 20px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.pie-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.pie {
  flex: none;
  width: 168px;
  height: 168px;
  filter: drop-shadow(0 6px 18px rgba(15, 154, 154, 0.22));
}

.legend { flex: 1; min-width: 150px; margin: 0; padding: 0; list-style: none; }

.legend li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 4px 0;
}

.legend .swatch {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 3px;
  box-shadow: 0 0 8px currentColor;
}

.legend .val { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

.empty {
  padding: 30px 4px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

table.recent {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.recent th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

table.recent td {
  padding: 11px 0;
  border-bottom: 1px solid rgba(13, 27, 42, 0.05);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

table.recent tr:last-child td { border-bottom: 0; }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.pill--low { background: rgba(18, 184, 134, 0.12); color: #0b7a5a; border-color: rgba(18, 184, 134, 0.28); }
.pill--mid { background: rgba(47, 111, 237, 0.10); color: #1b3f8f; border-color: rgba(47, 111, 237, 0.24); }
.pill--high { background: rgba(15, 154, 154, 0.14); color: #08696b; border-color: rgba(15, 154, 154, 0.3); }
.pill--max { background: rgba(214, 158, 46, 0.14); color: #8a6110; border-color: rgba(214, 158, 46, 0.3); }

.qbars { margin: 0; padding: 0; list-style: none; }

.qbars li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 5px 0;
}

.qbars .n { width: 22px; flex: none; font-variant-numeric: tabular-nums; color: var(--ink-soft); }

.qbars .track {
  display: block;
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(13, 27, 42, 0.06);
  overflow: hidden;
}

.qbars .fill {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--green));
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

.qbars .v { width: 30px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }

/* ---------- mini tendência diária ---------- */

.trend {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 118px;
  padding-top: 6px;
}

.trend-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 84px;
  width: 100%;
  justify-content: center;
}

.trend-bars i {
  display: block;
  width: 42%;
  max-width: 14px;
  min-height: 2px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, rgba(47, 111, 237, 0.85), rgba(47, 111, 237, 0.45));
}

.trend-bars i.resp {
  background: linear-gradient(180deg, rgba(18, 184, 134, 0.9), rgba(15, 154, 154, 0.45));
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
}

.trend-day span {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trend-legend {
  display: flex;
  gap: 16px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}

.trend-legend li { display: flex; align-items: center; gap: 7px; }

.trend-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: block;
}

/* ---------- responsivo ---------- */

@media (max-width: 560px) {
  body { font-size: 16px; }
  .intro, .question-card, .final { padding: 24px 20px 28px; }
  .option { padding: 14px 16px; font-size: 15.5px; }
  .kpi-value { font-size: 33px; }
  .pie { width: 148px; height: 148px; }
  .panel { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .screen { opacity: 1; transform: none; }
}
