/* ==========================================================================
   Green Armor · Reportería — tokens y base compartida
   Paleta tomada de greenarmor.com.ar (verde #114312 / #204421, dorado #E0C55B)
   ========================================================================== */

:root {
  /* Marca */
  --brand-900: #0a2a0b;
  --brand-800: #114312;   /* verde institucional */
  --brand-700: #204421;   /* verde del logo */
  --gold: #e0c55b;        /* "ARMOR" del logo */
  --gold-soft: #d7bd5c;

  /* Acento verde para UI sobre negro (más luminoso, mismo tono) */
  --accent: #3ddc6e;
  --accent-600: #25b555;
  --accent-700: #1b8a41;
  --accent-glow: rgba(var(--accent-rgb), 0.35);

  /* Superficies */
  --bg: #050706;
  --bg-2: #0a0e0b;
  --surface: rgba(18, 24, 20, 0.72);
  --surface-solid: #111713;
  --surface-2: #161e18;
  --border: rgba(var(--ink), 0.07);
  --border-strong: rgba(var(--accent-rgb), 0.28);

  /* Texto */
  --text: #ecf2ee;
  --text-2: #a7b4ab;
  --text-3: #6c7a70;

  /* Estados */
  --danger: #ff5d5d;
  --warning: #f2b84b;
  --info: #5bb8ff;

  /* Superficies que cambian con el modo (día / noche) */
  --ink: 255, 255, 255;            /* tinta de bordes y fondos suaves (rgba(var(--ink), 0.05)) */
  --brand-rgb: 17, 67, 18;         /* verde de marca para tintes */
  --accent-rgb: 61, 220, 110;      /* el acento en r, g, b para tintes (rgba(var(--accent-rgb), 0.1)) */
  --text-strong: #ffffff;
  --chrome-a: rgba(12, 18, 14, 0.92);
  --chrome-b: rgba(6, 9, 7, 0.95);
  --topbar-bg: rgba(5, 7, 6, 0.65);
  --popover: rgba(17, 23, 19, 0.96);
  --card-a: rgba(22, 30, 24, 0.75);
  --card-b: rgba(12, 16, 13, 0.75);
  --panel-a: #141c16;
  --panel-b: #0b0f0c;
  --table-head: #121914;
  --option-bg: #111713;
  --backdrop: rgba(2, 4, 3, 0.7);
  --late: #ff9a4d;
  --shadow-hover: 0 24px 50px -30px rgba(0, 0, 0, 0.9);
  --shadow-panel: 0 40px 120px -30px rgba(0, 0, 0, 0.95);
  color-scheme: dark;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-brand: "Raleway", "Inter", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

/* ---------- Modo día ---------- */
:root[data-theme="light"] {
  --accent: #178a49;
  --accent-600: #12743c;
  --accent-700: #0e5f31;
  --accent-glow: rgba(23, 138, 73, 0.28);
  --gold: #a8861a;
  --gold-soft: #b8962a;

  --bg: #f2f6f3;
  --bg-2: #e9f0eb;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-solid: #ffffff;
  --surface-2: #f6f9f7;
  --border: rgba(16, 40, 24, 0.1);
  --border-strong: rgba(23, 138, 73, 0.35);

  --text: #0f1d14;
  --text-2: #3d5044;
  --text-3: #66786c;

  --danger: #c93636;
  --warning: #a8670f;
  --info: #1d6fb8;

  --ink: 16, 40, 24;
  --brand-rgb: 120, 190, 140;
  --text-strong: #0b1a10;
  --chrome-a: rgba(255, 255, 255, 0.94);
  --chrome-b: rgba(246, 249, 247, 0.96);
  --topbar-bg: rgba(242, 246, 243, 0.8);
  --popover: rgba(255, 255, 255, 0.98);
  --card-a: rgba(255, 255, 255, 0.95);
  --card-b: rgba(250, 252, 250, 0.92);
  --panel-a: #ffffff;
  --panel-b: #f6f9f7;
  --table-head: #eef3ef;
  --option-bg: #ffffff;
  --backdrop: rgba(20, 35, 25, 0.35);
  --late: #c2560c;
  --shadow: 0 20px 50px -24px rgba(16, 40, 24, 0.28);
  --shadow-hover: 0 18px 40px -24px rgba(16, 40, 24, 0.28);
  --shadow-panel: 0 30px 80px -30px rgba(16, 40, 24, 0.35);
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4 { font-family: var(--font-brand); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }

.num { font-variant-numeric: tabular-nums; }

::selection { background: var(--accent); color: #04140a; }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: #26302a transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #26302a; border-radius: 8px; }

/* Escudo inline */
.shield { display: inline-block; color: var(--accent); }
.shield svg { display: block; width: 100%; height: 100%; }

/* Toasts */
.toast-stack {
  position: fixed; right: 24px; bottom: 24px; z-index: 999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  min-width: 260px; max-width: 360px;
  padding: 14px 16px;
  background: var(--popover);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: toast-in 0.5s var(--ease-spring) both;
  pointer-events: auto;
}
.toast.out { animation: toast-out 0.35s var(--ease) forwards; }
.toast__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); flex: none; }
.toast--error { border-color: rgba(255, 93, 93, 0.4); }
.toast--error .toast__dot { background: var(--danger); box-shadow: 0 0 12px var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px) scale(0.95); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px); } }

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

/* ---------- Portal de Área técnica: celeste eléctrico, como su login ----------
   La clase la pone un script en el <head> (sitio areatecnica.luisheredia.dev) y shell.js (en local). */
:root.tema-tecnica {
  --accent: #38c6ff;
  --accent-600: #1aa5e0;
  --accent-700: #0f7fb3;
  --accent-glow: rgba(56, 198, 255, 0.35);
  --accent-rgb: 56, 198, 255;
  --brand-900: #061c2a;
  --brand-800: #0b2f45;
  --brand-700: #0f3a52;
  --brand-rgb: 10, 52, 82;
  --bg: #05080b;
  --bg-2: #08111a;
  --surface: rgba(14, 22, 30, 0.74);
  --surface-solid: #0e1620;
  --surface-2: #121d29;
  --card-a: rgba(16, 26, 36, 0.78);
  --card-b: rgba(8, 13, 19, 0.78);
}
:root.tema-tecnica[data-theme="light"] {
  --accent: #0a7fb5;
  --accent-600: #086a98;
  --accent-700: #06577c;
  --accent-glow: rgba(10, 127, 181, 0.28);
  --accent-rgb: 10, 127, 181;
  --bg: #f1f6fa;
  --bg-2: #e6eff6;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-2: #f4f8fb;
  --card-a: rgba(255, 255, 255, 0.9);
  --card-b: rgba(246, 250, 253, 0.9);
}
/* Fondo del portal técnico: la grilla de circuito del login (en vez de los puntitos) */
:root.tema-tecnica .app-bg::after {
  background-image: linear-gradient(rgba(var(--accent-rgb), 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--accent-rgb), 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at 75% 0%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse at 75% 0%, #000 15%, transparent 75%);
}
