/* ==========================================================================
   ELECTRONICAT OS v3 — Design Tokens ("Ingeniería Precisa")
   Tema Oscuro: Laboratorio Obsidiana (#0B1219 + #0099DC)
   Tema Claro:  Sol Catamarca (#F4F6F8 + #007BB5)
   ========================================================================== */

:root {
  /* Laboratorio Obsidiana (Default) */
  --bg: #0B1219;
  --bg-elevated: #0E1620;
  --surface: #111A24;
  --surface-2: #182330;
  --surface-3: #1F2D3D;
  --border: #243344;
  --border-strong: #32465C;
  --hairline: rgba(255, 255, 255, 0.05);

  --text: #E6EDF3;
  --text-secondary: #B6C3D1;
  --muted: #8496AA;

  /* Identidad Oficial Electronicat */
  --accent: #0099DC;
  --accent-hover: #14AEF0;
  --accent-soft: rgba(0, 153, 220, 0.14);
  --accent-border: rgba(0, 153, 220, 0.42);

  /* Semántica Oficial Silphy & Agentes */
  --ok: #10B981;
  --ok-soft: rgba(16, 185, 129, 0.14);
  --warn: #F59E0B;
  --warn-soft: rgba(245, 158, 11, 0.14);
  --danger: #EF4444;
  --danger-soft: rgba(239, 68, 68, 0.14);
  --indigo: #6366F1;
  --indigo-soft: rgba(99, 102, 241, 0.15);
  --violet: #8B5CF6;
  --violet-soft: rgba(139, 92, 246, 0.15);
  --rose: #F43F5E;
  --rose-soft: rgba(244, 63, 94, 0.15);
  --sky: #38BDF8;
  --sky-soft: rgba(56, 189, 248, 0.15);

  /* Burbujas & Interfaz WhatsApp (Dark) */
  --wa-wall-bg: #0B141A;
  --wa-wall-dot: rgba(255, 255, 255, 0.032);
  --wa-header-bg: #202C33;
  --wa-out-bg: #005C4B;
  --wa-out-text: #E9EDEF;
  --wa-in-bg: #202C33;
  --wa-in-text: #E9EDEF;
  --wa-meta: rgba(233, 237, 239, 0.62);
  --wa-input-bar: #202C33;
  --wa-input-pill: #2A3942;
  --wa-green: #00A884;
  --wa-green-hover: #06CF9C;
  --wa-check-blue: #53BDEB;
  --wa-date-pill: #182229;
  --wa-date-text: #8696A0;

  /* Sombras discretas GPU-friendly */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 20px 54px rgba(0, 0, 0, 0.55);

  /* Tipografía */
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Dimensiones Layout */
  --sidebar-w: 248px;
  --sidebar-rail-w: 72px;
  --topbar-h: 58px;
  --bottom-nav-h: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  color-scheme: dark;
  accent-color: var(--accent);
}

/* Tema Claro: "Sol Catamarca" (alto contraste legible bajo luz solar) */
[data-theme="light"] {
  --bg: #F4F6F8;
  --bg-elevated: #EDF1F5;
  --surface: #FFFFFF;
  --surface-2: #EEF2F6;
  --surface-3: #E2E8F0;
  --border: #D0D9E2;
  --border-strong: #B5C3D1;
  --hairline: rgba(11, 18, 25, 0.04);

  --text: #0B1219;
  --text-secondary: #263445;
  --muted: #526375;

  --accent: #007BB5;
  --accent-hover: #006699;
  --accent-soft: rgba(0, 123, 181, 0.11);
  --accent-border: rgba(0, 123, 181, 0.38);

  --ok: #059669;
  --ok-soft: rgba(5, 150, 105, 0.12);
  --warn: #D97706;
  --warn-soft: rgba(217, 119, 6, 0.12);
  --danger: #DC2626;
  --danger-soft: rgba(220, 38, 38, 0.11);
  --indigo: #4F46E5;
  --indigo-soft: rgba(79, 70, 229, 0.11);
  --violet: #7C3AED;
  --violet-soft: rgba(124, 58, 237, 0.12);
  --rose: #E11D48;
  --rose-soft: rgba(225, 29, 72, 0.11);
  --sky: #0284C7;
  --sky-soft: rgba(2, 132, 199, 0.12);

  /* Burbujas & Interfaz WhatsApp (Light - Sol Catamarca) */
  --wa-wall-bg: #EFEAE2;
  --wa-wall-dot: rgba(11, 20, 26, 0.045);
  --wa-header-bg: #F0F2F5;
  --wa-out-bg: #D9FDD3;
  --wa-out-text: #111B21;
  --wa-in-bg: #FFFFFF;
  --wa-in-text: #111B21;
  --wa-meta: rgba(17, 27, 33, 0.56);
  --wa-input-bar: #F0F2F5;
  --wa-input-pill: #FFFFFF;
  --wa-green: #00A884;
  --wa-green-hover: #008F6F;
  --wa-check-blue: #53BDEB;
  --wa-date-pill: #FFFFFF;
  --wa-date-text: #54656F;

  --shadow-sm: 0 1px 2px rgba(11, 18, 25, 0.07);
  --shadow-md: 0 4px 14px rgba(11, 18, 25, 0.09);
  --shadow-lg: 0 18px 44px rgba(11, 18, 25, 0.18);

  color-scheme: light;
}

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