/* ==========================================================================
   Routix — Design Tokens (Light & Dark, AA+ Contrast)
   ========================================================================== */

@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-wght.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans-latin-wght.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;

  /* Superfícies e texto principal */
  --bg: #f2f5fa;
  --surface: #ffffff;
  --surface-2: #e6ecf5;
  --ink: #061538;
  --muted: #3d4f6d;
  --line: #c8d4e6;
  --line-strong: #7a8cab;

  /* Identidade e marca (Azul Royal) */
  --brand: #05359e;
  --brand-ink: #ffffff;
  --brand-hover: #042b80;
  --brand-soft: #e6eefc;

  /* Ação positiva e destaque (Esmeralda) */
  --accent: #006b4f;
  --accent-hover: #00543e;
  --accent-soft: #e3f6f0;
  --on-accent: #ffffff;

  /* Links e foco */
  --link: #05359e;
  --focus: #05359e;

  /* Semântica: erro, alerta e informação */
  --negative: #a81e32;
  --negative-hover: #8c1729;
  --negative-soft: #fcecef;
  --on-negative: #ffffff;
  --warning: #7c4200;
  --warning-soft: #fff3d6;
  --info: #05359e;
  --info-soft: #e6eefc;

  /* Painel escuro fixo (Sidebar, História de acesso e Hero) */
  --navy: #061538;
  --navy-surface: #0e2a66;
  --navy-active: #05359e;
  --navy-line: #1c3a78;
  --on-navy: #ffffff;
  --on-navy-muted: #bfd0ee;
  --on-navy-accent: #5ef0bf;
  --hero-gradient: #061538;

  /* Raios de borda */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(6, 21, 56, 0.06);
  --shadow-md: 0 8px 24px rgba(6, 21, 56, 0.10);

  /* Escala de espaçamento */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-7: 2rem;     /* 32px */
  --space-8: 3rem;     /* 48px */

  /* Tipografia */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-numeric: tabular-nums lining-nums;

  /* Ergonomia e movimento */
  --touch-min: 48px;
  --touch-cta: 56px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 160ms;

  /* Dimensões de layout */
  --tabbar-h: 64px;
  --sidebar-w: 248px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #060d1a;
    --surface: #0e1a30;
    --surface-2: #162644;
    --ink: #e6eeff;
    --muted: #9fb2d4;
    --line: #243554;
    --line-strong: #5d7299;

    --brand: #3b7bff;
    --brand-ink: #060d1a;
    --brand-hover: #6c99ff;
    --brand-soft: #16274a;

    --accent: #2ee5ac;
    --accent-hover: #62ecc0;
    --accent-soft: #0d2e27;
    --on-accent: #061538;

    --link: #92b7ff;
    --focus: #92b7ff;

    --negative: #ff8a9b;
    --negative-hover: #ffadb9;
    --negative-soft: #361722;
    --on-negative: #061538;
    --warning: #ffcc70;
    --warning-soft: #33240f;
    --info: #92b7ff;
    --info-soft: #16274a;

    --navy: #0b1b3a;
    --navy-surface: #13284f;
    --navy-active: #3b7bff;
    --navy-line: #243554;
    --on-navy: #ffffff;
    --on-navy-muted: #bfd0ee;
    --on-navy-accent: #5ef0bf;
    --hero-gradient: #0b1b3a;

    --shadow-sm: none;
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #060d1a;
  --surface: #0e1a30;
  --surface-2: #162644;
  --ink: #e6eeff;
  --muted: #9fb2d4;
  --line: #243554;
  --line-strong: #5d7299;

  --brand: #3b7bff;
  --brand-ink: #060d1a;
  --brand-hover: #6c99ff;
  --brand-soft: #16274a;

  --accent: #2ee5ac;
  --accent-hover: #62ecc0;
  --accent-soft: #0d2e27;
  --on-accent: #061538;

  --link: #92b7ff;
  --focus: #92b7ff;

  --negative: #ff8a9b;
  --negative-hover: #ffadb9;
  --negative-soft: #361722;
  --on-negative: #061538;
  --warning: #ffcc70;
  --warning-soft: #33240f;
  --info: #92b7ff;
  --info-soft: #16274a;

  --navy: #0b1b3a;
  --navy-surface: #13284f;
  --navy-active: #3b7bff;
  --navy-line: #243554;
  --on-navy: #ffffff;
  --on-navy-muted: #bfd0ee;
  --on-navy-accent: #5ef0bf;
  --hero-gradient: #0b1b3a;

  --shadow-sm: none;
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
}
