/* Veritas 2.0 — design system: tokens (cores da marca Audilog, tema claro e escuro, espaços, raios).
   Origem: protótipo v0.3 aprovado (docs/veritas-2/prototipo/styles.css). Sem fontes externas (CSP): Inter se instalada, senão a do sistema. */
@layer tokens, base, layout, components, fields, screens, utilities;

@layer tokens {
  :root {
    /* Marca Audilog (extraída da logo) */
    --brand-navy-950: #000c22;
    --brand-navy-900: #00183f;
    --brand-navy-800: #0a2a5c;
    --brand-navy-700: #163d7a;
    --brand-gold-700: #a86b00;
    --brand-gold-600: #c88000;
    --brand-gold-500: #d99a1e;
    --brand-gold-400: #ecb844;
    --brand-gold-200: #fff1a2;
    --gold-gradient: linear-gradient(135deg, #c88000 0%, #ecb844 55%, #fff1a2 100%);

    --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
    --sidebar-w: 264px;
    /* altura única de campo e botão: um botão ao lado de um campo fica sempre na mesma linha */
    --control-h: 40px;
    --control-h-sm: 34px;
    --ease: cubic-bezier(.2,.7,.2,1);

    /* Tema claro (padrão) */
    --bg: #f4f5f8;
    --bg-glow-1: rgba(236,184,68,.10);
    --bg-glow-2: rgba(22,61,122,.08);
    --surface: #ffffff;
    --surface-2: #f8f9fb;
    --surface-3: #eef1f5;
    --text: #0b1b33;
    --text-2: #42506a;
    --text-3: #6b7890;
    --border: rgba(11,27,51,.09);
    --border-strong: rgba(11,27,51,.16);
    --shadow-sm: 0 1px 2px rgba(11,27,51,.05), 0 1px 1px rgba(11,27,51,.03);
    --shadow-md: 0 1px 2px rgba(11,27,51,.04), 0 6px 20px -6px rgba(11,27,51,.12);
    --shadow-lg: 0 2px 4px rgba(11,27,51,.04), 0 24px 48px -16px rgba(11,27,51,.22);
    --inset-hl: inset 0 1px 0 rgba(255,255,255,.7);
    --accent: var(--brand-gold-600);
    --accent-strong: var(--brand-gold-700);
    --accent-soft: rgba(217,154,30,.12);
    --primary: var(--brand-navy-900);
    --primary-hover: var(--brand-navy-800);
    --on-primary: #ffffff;
    --focus: 0 0 0 3px rgba(236,184,68,.55), 0 0 0 1px var(--brand-gold-600);
    /* Tabela premium: faixa do cabeçalho, filete do card e marcas do checkbox */
    --th-bg: linear-gradient(180deg, #0d3270 0%, #00183f 100%);
    --th-text: rgba(255,255,255,.84);
    --field-shadow: 0 1px 2px rgba(11,27,51,.05);
    --stick-shadow: rgba(11,22,48,.3);
    --on-accent: #ffffff;
    --card-accent: linear-gradient(90deg, #c88000 0%, #ecb844 40%, rgba(236,184,68,0) 100%);
    --check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
    --check-dash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");
    --check-mark-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1200' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
    --check-dash-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1200' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");

    --st-new: #2563eb;      --st-new-bg: rgba(37,99,235,.10);
    --st-audit: #7c3aed;    --st-audit-bg: rgba(124,58,237,.10);
    --st-quar: #b45309;     --st-quar-bg: rgba(217,119,6,.13);
    --st-ok: #047857;       --st-ok-bg: rgba(5,150,105,.11);
    --st-rej: #b91c1c;      --st-rej-bg: rgba(220,38,38,.10);
    --st-muted: #475569;    --st-muted-bg: rgba(71,85,105,.10);

    --sidebar-bg: radial-gradient(120% 60% at 0% 0%, #0d3270 0%, rgba(13,50,112,0) 60%), linear-gradient(180deg, #00183f 0%, #000c22 100%);
    --sidebar-text: rgba(255,255,255,.72);
    --sidebar-text-strong: #ffffff;
    --sidebar-hover: rgba(255,255,255,.06);
    --sidebar-active: rgba(236,184,68,.12);

    color-scheme: light;
  }

  :root[data-theme="dark"] {
    --bg: #050b17;
    --bg-glow-1: rgba(236,184,68,.07);
    --bg-glow-2: rgba(40,90,170,.16);
    --surface: #0b1527;
    --surface-2: #0e1a30;
    --surface-3: #13223d;
    --text: #e8edf6;
    --text-2: #aab6cb;
    --text-3: #7d8aa3;
    --border: rgba(255,255,255,.07);
    --border-strong: rgba(255,255,255,.14);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 1px 2px rgba(0,0,0,.35), 0 10px 28px -10px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 30px 60px -20px rgba(0,0,0,.75);
    --inset-hl: inset 0 1px 0 rgba(255,255,255,.04);
    --accent: var(--brand-gold-400);
    --accent-strong: var(--brand-gold-200);
    --accent-soft: rgba(236,184,68,.12);
    --primary: var(--brand-gold-400);
    --primary-hover: #f3c862;
    --on-primary: #1a1200;
    --focus: 0 0 0 3px rgba(236,184,68,.45), 0 0 0 1px var(--brand-gold-400);
    --th-bg: linear-gradient(180deg, #18365f 0%, #11284c 100%);
    --th-text: #d7e0ee;
    --field-shadow: 0 1px 2px rgba(0,0,0,.3);
    --stick-shadow: rgba(0,0,0,.6);
    --on-accent: #1a1200;
    --check-mark: var(--check-mark-ink);
    --check-dash: var(--check-dash-ink);

    --st-new: #7aa7ff;      --st-new-bg: rgba(96,145,255,.14);
    --st-audit: #b39bff;    --st-audit-bg: rgba(160,130,255,.14);
    --st-quar: #f5b24a;     --st-quar-bg: rgba(245,158,11,.14);
    --st-ok: #4fd1a5;       --st-ok-bg: rgba(16,185,129,.14);
    --st-rej: #ff8a8a;      --st-rej-bg: rgba(248,113,113,.14);
    --st-muted: #a3b0c5;    --st-muted-bg: rgba(148,163,184,.12);

    --sidebar-bg: radial-gradient(120% 60% at 0% 0%, rgba(30,70,140,.35) 0%, rgba(0,0,0,0) 60%), linear-gradient(180deg, #030a19 0%, #02060f 100%);
    color-scheme: dark;
  }
}

