/* ==========================================================================
   DESIGN TOKENS — fonte única de verdade para cores, tipografia,
   espaçamento, raio e sombra. Nenhum outro arquivo CSS ou JS deve
   redefinir estas variáveis — só consumir via var(--nome).
   ========================================================================== */

:root {
  /* ---------- Cores base (tema DARK — padrão) ---------- */
  --bg:        #07111f;
  --bg2:       #0b1628;
  --panel:     #111c2e;
  --panel2:    #0d1727;
  --line:      #243247;
  --text:      #f8fafc;
  --muted:     #94a3b8;

  /* ---------- Cores de marca / semânticas (iguais nos 2 temas) ---------- */
  --green:     #22c55e;
  --green2:    #16a34a;
  --blue:      #38bdf8;
  --danger:    #ef4444;
  --danger2:   #dc2626;
  --warn:      #f59e0b;
  --warn2:     #d97706;
  --info:      #3b82f6;
  --purple:    #8b5cf6;
  /* Cores utilitárias (Fase E — antes hardcoded em style inline) */
  --white:        #fff;
  --on-primary:   #04140a;                 /* texto sobre botão verde */
  --purple-light: #a78bfa;
  --overlay:      rgba(0,0,0,.7);          /* fundo de modal/lightbox */
  --green-soft:   rgba(34,197,94,.15);
  --blue-soft:    rgba(56,189,248,.15);
  --purple-soft:  rgba(139,92,246,.15);
  --danger-soft:  #ef444422;
  --grad-green:   linear-gradient(135deg, var(--green), var(--green2));


  /* Aliases semânticos (usar estes nos componentes, não os nomes de cor crua) */
  --primary:        var(--green);
  --primary-hover:  var(--green2);
  --surface:        var(--panel);
  --surface-alt:    var(--panel2);
  --border:         var(--line);
  --text-primary:   var(--text);
  --text-secondary: var(--muted);

  /* ---------- Sombra / raio ---------- */
  --shadow: 0 18px 60px rgba(0,0,0,.32);
  --radius: 18px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* Fundo de campos de formulário (input/select/textarea) — mais escuro que
     --panel no dark, e branco puro no light (não pode ser igual ao --panel,
     senão o campo "some" dentro do card) */
  --field-bg: rgba(15, 23, 42, .62);

  /* Painel decorativo das telas de login/signup/reset (lado direito) */
  --hero-bg-1: #0f1419;
  --hero-bg-2: #1a1f27;

  /* ---------- Tipografia — escala única do projeto ---------- */
  --font-family: 'Inter', system-ui, sans-serif;

  /* Escala fina (legado — Fase E, 17/07/2026): valores que o código já
     usava e não tinham token. Mesmos pixels de antes; consolidar no futuro. */
  --text-3xs:  10px;
  --text-10-5: 10.5px;
  --text-2xs:  11px;
  --text-11-5: 11.5px;
  --text-12-5: 12.5px;
  --text-xs:   12px;  /* badges, legendas, notas de rodapé de campo */
  --text-sm:   13px;  /* texto secundário, labels de formulário */
  --text-base: 14px;  /* corpo de texto padrão, botões */
  --text-md:   16px;  /* destaque leve, subtítulo de card */
  --text-lg:   18px;  /* subtítulo de seção */
  --text-xl:   20px;  /* título de card/modal */
  --text-2xl:  24px;  /* título de página (mobile) */
  --text-3xl:  28px;  /* título de página (desktop) */
  --text-4xl:  32px;  /* título de tela de auth (login/signup) */
  --text-5xl:  48px;  /* números de destaque (dashboard cards) */

  --font-normal:   400;
  --font-medium:   500;
  --font-semibold: 600;
  --font-bold:     700;
  --font-extrabold: 800;

  /* ---------- Espaçamento — escala única (múltiplos de 4px) ---------- */
  --space-0-5: 2px;   /* Fase E: meios-passos que o código já usava */
  --space-1-5: 6px;
  --space-2-5: 10px;
  --space-3-5: 14px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* ---------- Transições ---------- */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ---------- Tema LIGHT — sobrescreve só as cores de superfície/texto ---------- */
[data-theme="light"] {
  --bg:     #f3f6fb;
  --bg2:    #eaf0f8;
  --panel:  #ffffff;
  --panel2: #f8fafc;
  --line:   #d9e2ef;
  --text:   #0f172a;
  --muted:  #64748b;
  --shadow: 0 12px 30px rgba(15,23,42,.08);
  --field-bg: #ffffff;
  --hero-bg-1: #eef1f5;
  --hero-bg-2: #e2e6ec;
}

/* ==========================================================================
   RESET / BASE
   ========================================================================== */
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top right, #14345c 0, var(--bg) 40%, var(--bg) 100%);
  color: var(--text);
  font-family: var(--font-family);
  font-size: var(--text-base);
  transition: background var(--transition-slow), color var(--transition-slow);
}

button, input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }
a { color: inherit; }
.muted { color: var(--muted); }

/* Tema light: fundo branco liso, sem o degradê azul (que só faz
   sentido visualmente no dark) */
[data-theme="light"] body {
  background: var(--bg);
}
/* ==========================================================================
   TIPOGRAFIA — classes utilitárias
   ========================================================================== */
.title       { font-size: var(--text-3xl); font-weight: var(--font-bold); color: var(--text); margin: 0; }
.subtitle    { font-size: var(--text-base); font-weight: var(--font-normal); color: var(--muted); margin: 0; }
.section-title { font-size: var(--text-xl); font-weight: var(--font-semibold); color: var(--text); margin: 0; }
.label       { font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--text); }
.text-sm     { font-size: var(--text-sm); }
.text-xs     { font-size: var(--text-xs); }
.text-bold   { font-weight: var(--font-bold); }
.text-semibold { font-weight: var(--font-semibold); }
.text-muted  { color: var(--muted); }
.uppercase   { text-transform: uppercase; letter-spacing: 0.02em; }
.lowercase   { text-transform: lowercase; }
.capitalize  { text-transform: capitalize; }
