/* =====================================================================
   APICE SERVICES — Sistema de diseño (design tokens)
   Colores tomados de la pieza «Colores Corporativos»:
     · Azul Apice     #1F96D3  ← primario (cuerpo del robot)
     · Cian eléctrico #1AB8E8  ← acento («APICE», brillos, datos)
     · Plata          #A9B3BE  ← «SERVICES» y textos secundarios
     · Grafito/navy   #0B111A  ← fondo metálico oscuro
   ===================================================================== */

:root {
  /* ---- Escala de marca (azul Apice) ---- */
  --brand-50:  #EEF8FD;
  --brand-100: #D6EEFA;
  --brand-200: #ADDCF4;
  --brand-300: #7CC6EC;
  --brand-400: #45ADE2;
  --brand-500: #1F96D3;
  --brand-600: #1479B3;
  --brand-700: #125F8C;
  --brand-800: #134C6E;
  --brand-900: #133F5A;
  --brand-950: #0B2639;

  /* ---- Acento cian (IA / energía / datos) ---- */
  --accent-200: #C2F1FD;
  --accent-300: #7DE3FF;
  --accent-400: #3CCFF5;
  --accent-500: #1AB8E8;
  --accent-600: #0E97C4;
  --accent-700: #0C789C;

  /* ---- Plata y grafito ---- */
  --silver-200: #E1E6EC;
  --silver-300: #C9D2DC;
  --silver-400: #A9B3BE;
  --silver-500: #8792A0;
  --ink-900: #0B111A;
  --ink-800: #101824;
  --ink-700: #162131;

  /* Se conserva la escala «gold» porque la usan algunos indicadores. */
  --gold-200: #FAEBC6;
  --gold-300: #F5D48A;
  --gold-400: #E8B958;
  --gold-500: #D69E2E;
  --gold-600: #B07C1B;

  /* ---- Prioridades de ticket ---- */
  --p1: #E5484D;
  --p2: #F0882A;
  --p3: #1F96D3;
  --p4: #7A8696;

  /* ---- Tipografía ---- */
  --font-display: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem;
  --fs-4xl: 3rem;
  --fs-5xl: 3.75rem;

  /* ---- Radios, medidas, motion ---- */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-2xl: 30px;
  --r-full: 999px;
  --container: 1240px;
  --container-header: 1440px;   /* la cabecera lleva mas elementos que el contenido */
  --header-h: 74px;
  --ease: cubic-bezier(0.22, 0.7, 0.32, 1);
  --dur: 220ms;
}

/* ============================ TEMA CLARO ============================ */
:root,
:root[data-theme="light"] {
  --bg: #F4F7FB;
  --bg-soft: #EAF0F7;
  --surface: #FFFFFF;
  --surface-2: #F7F9FC;
  --surface-3: #EDF2F8;
  --surface-brand: var(--brand-50);
  --border: #DCE4EE;
  --border-soft: #E9EEF5;
  --border-strong: #C3CFDD;

  --text: #0E1726;
  --text-soft: #3F4C5E;
  --text-muted: #6A778A;
  --text-inv: #F2F7FC;

  --primary: var(--brand-600);
  --primary-hov: var(--brand-700);
  --primary-fg: #FFFFFF;
  --on-brand-soft: var(--brand-700);
  --link: var(--brand-600);

  --ok-bg: #E6F6EE;     --ok-fg: #15663C;     --ok-bd: #A9DEC2;
  --warn-bg: #FEF3E2;   --warn-fg: #8A560C;   --warn-bd: #F2D59C;
  --danger-bg: #FDECEC; --danger-fg: #B42318;  --danger-bd: #F3BABA;
  --info-bg: #E8F3FC;   --info-fg: #135C93;   --info-bd: #B2D4F0;
  --neutral-bg: #EDF1F6;--neutral-fg: #455366;--neutral-bd: #D3DBE6;
  --accent-bg: #E3F7FD; --accent-fg: #0A6A8A; --accent-bd: #A8E3F5;

  --shadow-xs: 0 1px 2px rgba(10, 20, 35, 0.06);
  --shadow-sm: 0 1px 3px rgba(10, 20, 35, 0.08), 0 1px 2px rgba(10, 20, 35, 0.04);
  --shadow-md: 0 4px 14px rgba(10, 20, 35, 0.08), 0 2px 4px rgba(10, 20, 35, 0.04);
  --shadow-lg: 0 14px 34px rgba(10, 20, 35, 0.10), 0 4px 10px rgba(10, 20, 35, 0.05);
  --shadow-xl: 0 28px 64px rgba(10, 20, 35, 0.14), 0 8px 20px rgba(10, 20, 35, 0.06);
  --shadow-brand: 0 14px 32px rgba(20, 121, 179, 0.24);

  --glass: rgba(255, 255, 255, 0.74);
  --glass-bd: rgba(255, 255, 255, 0.6);
  --hero-ink: #FFFFFF;
  --grid-line: rgba(20, 121, 179, 0.08);
  --ring: rgba(31, 150, 211, 0.38);
  --glow: rgba(26, 184, 232, 0.35);
}

/* ============================ TEMA OSCURO =========================== */
:root[data-theme="dark"] {
  --bg: #070B11;
  --bg-soft: #0B111A;
  --surface: #0F1621;
  --surface-2: #141D2A;
  --surface-3: #1A2535;
  --surface-brand: #0E2232;
  --border: #1E2A3B;
  --border-soft: #172232;
  --border-strong: #2A3A50;

  --text: #E7EEF6;
  --text-soft: #AAB6C5;
  --text-muted: #7F8C9E;
  --text-inv: #0E1726;

  --primary: #2BA3DF;
  --primary-hov: #45B4EA;
  --primary-fg: #04121C;
  --on-brand-soft: var(--accent-300);
  --link: #5CC3F0;

  --ok-bg: #0C2B1D;     --ok-fg: #6EDCA1;     --ok-bd: #1C5236;
  --warn-bg: #30230B;   --warn-fg: #F0C165;   --warn-bd: #5C441A;
  --danger-bg: #331416; --danger-fg: #F58C8C; --danger-bd: #622A2C;
  --info-bg: #0D2236;   --info-fg: #86C3F0;   --info-bd: #214A70;
  --neutral-bg: #182231;--neutral-fg: #A6B2C1;--neutral-bd: #2A384B;
  --accent-bg: #062634; --accent-fg: #7DE3FF; --accent-bd: #0E4A60;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.55), 0 4px 10px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 28px 64px rgba(0, 0, 0, 0.6), 0 8px 20px rgba(0, 0, 0, 0.4);
  --shadow-brand: 0 14px 32px rgba(26, 184, 232, 0.18);

  --glass: rgba(15, 22, 33, 0.72);
  --glass-bd: rgba(92, 195, 240, 0.14);
  --hero-ink: #EAF4FB;
  --grid-line: rgba(92, 195, 240, 0.07);
  --ring: rgba(60, 207, 245, 0.42);
  --glow: rgba(26, 184, 232, 0.45);
}

/* Gradientes (dependen del tema, se declaran después de ambos) */
:root {
  --grad-brand: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 48%, var(--brand-500) 100%);
  --grad-accent: linear-gradient(135deg, var(--brand-600) 0%, var(--accent-500) 100%);
  --grad-gold: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-300) 100%);
  --grad-hero:
    radial-gradient(1100px 560px at 80% -12%, rgba(26, 184, 232, 0.24) 0%, transparent 62%),
    radial-gradient(820px 480px at 4% 10%, rgba(31, 150, 211, 0.20) 0%, transparent 58%);
}

:root[data-theme="dark"] {
  --grad-brand: linear-gradient(135deg, #070B11 0%, #0E1E2E 50%, #133F5A 100%);
  --grad-hero:
    radial-gradient(1100px 560px at 80% -12%, rgba(26, 184, 232, 0.20) 0%, transparent 62%),
    radial-gradient(820px 480px at 4% 10%, rgba(31, 150, 211, 0.22) 0%, transparent 58%);
}
