/* ============================================================
   CleoWard — Sistema de diseño (tokens.css)

   ESTÉTICA: copiada de CleoMed (decisión del dueño, 2026-12-05).
   CleoMed NO se toca: esto es solo en una dirección.

   Paleta de marca CleoMed:
     Azul profundo  #1A2980
     Turquesa       #26D0CE  (acento: foco de campos, detalles)
   Fondo frío #EDF1F8, tarjetas blancas, bordes #E2E8F0.
   Botones y campos RADIO 11 (no píldora), tarjetas RADIO 18.
   Sin blur masivo (regla 11): las superficies son sólidas.

   Se conservan TODOS los nombres de token anteriores para que las
   pantallas y componentes existentes cambien solos.

   Tipografía: CleoMed usa la pila del sistema ("Segoe UI", Roboto…).
   Aquí se mantiene Inter local (sin CDN, regla 18), que es el
   equivalente más cercano y ya está instalada.
   ============================================================ */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-700.woff2') format('woff2');
}

:root {
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --touch-min: 44px;
  --press-scale: 0.98;
  --dur-press: 150ms;
  --dur-max: 200ms;
}

/* ============ TEMA CLARO (por defecto) ============ */
[data-theme="light"] {
  color-scheme: light;

  --bg: #EDF1F8;
  --bg-gradient: radial-gradient(120% 70% at 50% -10%, #F7FAFF 0%, var(--bg) 55%);
  --bg-elev: #FFFFFF;
  --superficie-solido: #FFFFFF;
  --surface: #FFFFFF;
  --surface-strong: #F7F9FC;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  --text: #0E1A3C;
  --text-secondary: #64748B;
  --text-faint: #94A3B8;

  --accent: #1A2980;
  --accent-strong: #1A2980;
  --accent-hover: #2233A0;
  --accent-soft: rgba(26, 41, 128, 0.08);
  --accent-2: #26D0CE;
  --accent-2-soft: rgba(38, 208, 206, 0.14);
  --on-accent: #FFFFFF;

  --success: #15803D;
  --success-soft: rgba(34, 197, 94, 0.12);
  --warning: #B45309;
  --warning-soft: rgba(245, 158, 11, 0.14);
  --danger: #B3261E;
  --danger-strong: #931F19;
  --danger-soft: rgba(220, 60, 60, 0.10);
  --info: #0369A1;
  --info-soft: rgba(56, 189, 248, 0.14);

  --bar-bg: rgba(255, 255, 255, 0.92);
  --overlay: rgba(6, 11, 28, 0.45);
  --fondo-input: #FFFFFF;

  --shadow-sm: 0 1px 2px rgba(16, 30, 70, 0.04), 0 1px 3px rgba(16, 30, 70, 0.06);
  --shadow-md: 0 1px 2px rgba(16, 30, 70, 0.04), 0 8px 24px rgba(16, 30, 70, 0.08);
  --shadow-lg: 0 1px 2px rgba(16, 30, 70, 0.05), 0 18px 48px rgba(16, 30, 70, 0.12);

  --bs-body-bg: #EDF1F8;
  --bs-body-color: #0E1A3C;
  --bs-border-color: #E2E8F0;
  --bs-secondary-color: rgba(14, 26, 60, 0.6);
  --bs-secondary-bg: #FFFFFF;
}

/* ============ TEMA OSCURO (opcional) ============ */
[data-theme="dark"] {
  color-scheme: dark;

  --bg: #060B1C;
  --bg-gradient: radial-gradient(120% 70% at 50% -10%, #0C1430 0%, var(--bg) 55%);
  --bg-elev: #0F1730;
  --superficie-solido: #0F1730;
  --surface: #121A38;
  --surface-strong: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #E8EEFB;
  --text-secondary: #8CA0C4;
  --text-faint: #64769C;

  --accent: #8FA8E8;
  --accent-strong: #3A4CC4;
  --accent-hover: #4A5CD8;
  --accent-soft: rgba(58, 76, 196, 0.18);
  --accent-2: #4FD8D6;
  --accent-2-soft: rgba(79, 216, 214, 0.16);
  --on-accent: #FFFFFF;

  --success: #4ADE80;
  --success-soft: rgba(74, 222, 128, 0.15);
  --warning: #FBBF24;
  --warning-soft: rgba(251, 191, 36, 0.15);
  --danger: #F87171;
  --danger-strong: #EF4444;
  --danger-soft: rgba(248, 113, 113, 0.16);
  --info: #38BDF8;
  --info-soft: rgba(56, 189, 248, 0.15);

  --bar-bg: rgba(6, 11, 28, 0.9);
  --overlay: rgba(2, 4, 10, 0.72);
  --fondo-input: #121A38;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.30), 0 10px 28px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 1px 2px rgba(0, 0, 0, 0.35), 0 22px 56px rgba(0, 0, 0, 0.48);

  --bs-body-bg: #060B1C;
  --bs-body-color: #E8EEFB;
  --bs-border-color: rgba(255, 255, 255, 0.09);
  --bs-secondary-color: rgba(232, 238, 251, 0.6);
  --bs-secondary-bg: #0F1730;
}

/* ---- Base ---- */
html {
  background-color: var(--bg);
}

html, body {
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg);
  background-image: var(--bg-gradient, none);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  transition: background-color var(--dur-max) ease, color var(--dur-max) ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
