/* ==========================================================================
   urnalytics — Design Tokens (navy + dourado)
   Arquivo único de tokens em CSS custom properties.
   Uso: adicione ao <head> de cada página, ANTES dos estilos da página:
     <link rel="preconnect" href="https://fonts.googleapis.com">
     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
     <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap" rel="stylesheet">
     <link rel="stylesheet" href="/theme.css">
   Dark mode: adicione data-theme="dark" no <html> (ou classe .dark).
   Em React inline styles: style={{ color: 'var(--text)', background: 'var(--brand)' }}
   ========================================================================== */

:root {
  /* ----- Marca: NAVY (primária) ----- */
  --navy-950: #05103a;   /* fundo profundo (topbars, painéis escuros) */
  --navy-900: #0a1b52;
  --navy-800: #122a6b;
  --navy-700: #1b3a86;
  --navy-600: #244aa0;   /* ação primária */
  --navy-500: #2f5bbb;   /* ação primária (hover claro) */
  --navy-400: #5b82d6;
  --navy-300: #93aee8;
  --navy-200: #c3d3f3;
  --navy-100: #e5ecfa;
  --navy-50:  #f2f6fd;

  /* ----- Marca: DOURADO (acento) ----- */
  --gold-700: #b38a00;
  --gold-600: #d9a900;
  --gold-500: #f5c200;   /* dourado da marca */
  --gold-400: #ffd42e;
  --gold-300: #ffe375;
  --gold-100: #fff6d1;   /* realce sutil de fundo */

  /* ----- Neutros (texto/superfícies) ----- */
  --gray-950: #0b1220;
  --gray-900: #111a2e;
  --gray-800: #1f2a44;
  --gray-700: #33415c;
  --gray-600: #4a5a78;
  --gray-500: #6b7a97;
  --gray-400: #94a2bb;
  --gray-300: #c3cddc;
  --gray-200: #e1e7f0;
  --gray-100: #eef2f8;
  --gray-50:  #f6f8fb;

  /* ----- Semânticos ----- */
  --success: #16a34a;
  --success-bg: #e8f7ee;
  --danger:  #dc2626;
  --danger-bg: #fdeaea;
  --warning: #d97706;
  --warning-bg: #fdf0dd;
  --info:    var(--navy-600);
  --info-bg: var(--navy-50);

  /* ----- Papéis (use SEMPRE estes nos componentes) ----- */
  --brand:            var(--navy-600);   /* cor de ação principal */
  --brand-hover:      var(--navy-700);
  --brand-contrast:   #ffffff;           /* texto sobre --brand */
  --accent:           var(--gold-500);   /* destaque/CTA secundário */
  --accent-hover:     var(--gold-600);
  --accent-contrast:  var(--navy-950);   /* texto sobre dourado */

  --bg:          #ffffff;                /* fundo da página */
  --surface:     #ffffff;                /* cards */
  --surface-2:   var(--gray-50);         /* fundo sutil / zebra de tabela */
  --surface-ink: var(--navy-950);        /* painéis escuros (topbar) */
  --text:        var(--gray-950);        /* texto principal */
  --text-muted:  var(--gray-600);        /* texto secundário */
  --text-faint:  var(--gray-400);        /* placeholders */
  --text-on-ink: #ffffff;                /* texto sobre painel escuro */
  --border:      var(--gray-200);
  --border-strong: var(--gray-300);
  --ring:        var(--navy-400);        /* foco */

  /* ----- Tipografia ----- */
  --font-display: 'Montserrat', system-ui, sans-serif;  /* títulos */
  --font-sans:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; /* corpo */
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace; /* números/tabelas */

  /* ----- Raio ----- */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* ----- Sombras ----- */
  --shadow-sm: 0 1px 2px rgba(5,16,58,.06);
  --shadow:    0 4px 14px rgba(5,16,58,.08);
  --shadow-lg: 0 12px 32px rgba(5,16,58,.14);

  /* ----- Espaçamento base (opcional) ----- */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-8: 48px;
}

/* ===== Dark mode ===== */
:root[data-theme="dark"], :root.dark {
  --bg:         var(--navy-950);
  --surface:    #0c1a46;
  --surface-2:  #0a1640;
  --surface-ink:#030b28;
  --text:       #eef2f8;
  --text-muted: #a9b6d1;
  --text-faint: #6b7a97;
  --border:     rgba(255,255,255,.10);
  --border-strong: rgba(255,255,255,.18);
  --brand:      var(--navy-500);
  --brand-hover:var(--navy-400);
  --ring:       var(--navy-300);
  --shadow:     0 4px 14px rgba(0,0,0,.4);
  --shadow-lg:  0 12px 32px rgba(0,0,0,.5);
}

/* ==========================================================================
   Base + componentes essenciais (opcional — remova se já tiver os seus)
   ========================================================================== */

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -.01em;
  line-height: 1.2;
}

.mono, .tabular { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

a { color: var(--brand); }

/* foco acessível consistente */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* ----- Botões ----- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-weight: 600; font-size: .95rem;
  padding: 11px 20px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--brand); color: var(--brand-contrast); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-hover); box-shadow: var(--shadow); }

.btn-accent { background: var(--accent); color: var(--accent-contrast); box-shadow: var(--shadow-sm); }
.btn-accent:hover { background: var(--accent-hover); }

.btn-outline { background: transparent; color: var(--brand); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--brand); background: var(--navy-50); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-danger { background: var(--danger); color: #fff; }

/* ----- Card ----- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}

/* ----- Input ----- */
.input, .select, .textarea {
  width: 100%;
  font-family: var(--font-sans); font-size: .95rem; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 13px;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
  outline: none;
}

/* ----- Badge / Pill ----- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 700; line-height: 1;
  padding: 5px 10px; border-radius: var(--radius-full);
  text-transform: uppercase; letter-spacing: .03em;
}
.badge-brand   { background: var(--navy-100); color: var(--navy-700); }
.badge-accent  { background: var(--gold-100); color: var(--gold-700); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }

/* ----- Topbar escura (padrão navy, estilo módulo Reuniões) ----- */
.topbar-ink {
  background: var(--surface-ink, var(--navy-950));
  color: var(--text-on-ink);
}
