/*
  tokens.css — SkillBridge AI Design System
  Fuente única de verdad para todos los valores de diseño. No se referencian
  valores "mágicos" fuera de este archivo: components.css, layout.css y
  base.css solo consumen estas variables.
*/

:root {
  /* ---------- Tipografía ---------- */
  --font-ui: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --fs-2xs: 0.6875rem;   /* 11px — labels mono en mayúscula */
  --fs-xs: 0.75rem;      /* 12px */
  --fs-sm: 0.8125rem;    /* 13px */
  --fs-base: 0.9375rem;  /* 15px — cuerpo */
  --fs-md: 1.0625rem;    /* 17px */
  --fs-lg: 1.25rem;      /* 20px */
  --fs-xl: 1.625rem;     /* 26px */
  --fs-2xl: 2.125rem;    /* 34px */

  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --tracking-label: 0.06em;

  /* ---------- Color: marca / navy ---------- */
  --navy-900: #0B1F3A;
  --navy-800: #1B355C;
  --navy-700: #12294D;
  --navy-600: #24406B;
  --navy-100: #E7ECF5;

  --blue-accent: #5B8DEF;
  --blue-accent-strong: #3E6FD1;
  --blue-link: #2C5BB0;

  /* ---------- Color: superficie ---------- */
  --canvas: #F4F5F7;
  --surface: #FFFFFF;
  --surface-sunken: #F8F9FB;
  --border-subtle: #E4E7ED;
  --border-default: #D7DBE3;
  --border-strong: #B9C0CC;

  /* ---------- Color: texto ---------- */
  --text-primary: #16213A;
  --text-secondary: #545E70;
  --text-tertiary: #7C8496;
  --text-inverse: #FFFFFF;
  --text-inverse-dim: rgba(255, 255, 255, 0.68);
  --text-on-navy-faint: rgba(255, 255, 255, 0.42);

  /* ---------- Color: estado ---------- */
  --green-fg: #1E8E5A;
  --green-bg: #E7F6EE;
  --green-border: #BEE6D1;

  --amber-fg: #B7791F;
  --amber-bg: #FCF3E1;
  --amber-border: #F3DDA8;

  --red-fg: #C0392B;
  --red-bg: #FBEAE7;
  --red-border: #F0C1B9;

  --blue-fg: #2C5BB0;
  --blue-bg: #EAF1FC;
  --blue-border: #C3D7F6;

  --violet-fg: #6E4EBE;
  --violet-bg: #F1ECFB;
  --violet-border: #D9CBF3;

  /* ---------- Radios ---------- */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 999px;
  /* RG-224 — estilo único de esquinas. Úsalos en vez de valores sueltos:
     --radius-card    tarjetas, paneles, KPI, listados de opciones agrupados
     --radius-control botones, inputs, filas/opciones dentro de un listado */
  --radius-card: var(--radius-lg);
  --radius-control: var(--radius-md);

  /* ---------- Sombras ---------- */
  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-2: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-3: 0 12px 32px rgba(15, 23, 42, 0.14);
  --shadow-btn-primary: 0 2px 8px rgba(18, 41, 77, 0.28);
  --shadow-focus: 0 0 0 3px rgba(91, 141, 239, 0.35);

  /* ---------- Espaciado (escala de 4px) ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* ---------- Layout ---------- */
  --sidebar-w: 264px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 68px;
  --content-max: 1320px;

  /* ---------- Transiciones ---------- */
  --ease-standard: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur-fast: 120ms;
  --dur-base: 180ms;
  --dur-slow: 280ms;

  /* ---------- Color: tintes de interaccion (extraidos de hex sueltos) ---------- */
  --tint-active: #DDE5F2;
  --tint-destructive-active: #F6D9D3;
  --notif-unread-bg: #F5F8FF;
  --amber-fg-strong: #7A5313;
  --red-fg-strong: #8C2A1F;
  --blue-fg-strong: #1F3E7A;
  --violet-fg-strong: #4A3480;

  /* ---------- Índices de apilamiento ---------- */
  --z-sidebar: 20;
  --z-topbar: 30;
  --z-dropdown: 40;
  --z-modal-backdrop: 50;
  --z-modal: 51;
  --z-toast: 60;
  --z-command-palette: 70;
}

/* ============================================================
   Tema oscuro — activado con [data-theme="dark"] en <html>.
   Redefine solo las variables de superficie/texto/estado; el resto
   (tipografia, espaciado, radios, marca navy/azul) se mantiene igual.
   ============================================================ */
:root[data-theme="dark"] {
  --canvas: #14161C;
  --surface: #1C1F27;
  --surface-sunken: #23262F;
  --border-subtle: #2C303B;
  --border-default: #383D4A;
  --border-strong: #4A505F;

  --text-primary: #F1F3F7;
  --text-secondary: #B7BECB;
  --text-tertiary: #868FA1;

  --navy-100: #232A3D;

  --tint-active: #2C354D;
  --tint-destructive-active: #4A2A26;
  --notif-unread-bg: #182238;

  --green-fg: #4ADE94;
  --green-bg: #16302A;
  --green-border: #245C43;

  --amber-fg: #F5C265;
  --amber-fg-strong: #FFDDA0;
  --amber-bg: #3A2E14;
  --amber-border: #6B5321;

  --red-fg: #F0796A;
  --red-fg-strong: #FFB3A8;
  --red-bg: #3A1E1B;
  --red-border: #6B3730;

  --blue-fg: #7AA6F0;
  --blue-fg-strong: #A9C6F5;
  --blue-bg: #16233A;
  --blue-border: #26406B;

  --violet-fg: #B49CE8;
  --violet-fg-strong: #D3C2F5;
  --violet-bg: #251A3D;
  --violet-border: #4A366E;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.28), 0 1px 3px rgba(0, 0, 0, 0.24);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.36);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.48);
  --shadow-btn-primary: 0 2px 8px rgba(0, 0, 0, 0.4);
}
