/* ==========================================================================
   GestIA · Tokens de diseño, reset y utilidades
   Marca: azul marino y cian de DWConsulware con la chispa de la IA como acento.
   ========================================================================== */

:root {
  --font: "Plus Jakarta Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;

  --navy-950: #060d2b;
  --navy-900: #0b1848;
  --navy-800: #12246a;
  --navy-700: #1c3486;

  --blue-700: #2143b8;
  --blue-600: #2f5bea;
  --blue-500: #4f77f6;
  --blue-200: #c7d5ff;
  --blue-100: #e4ebff;
  --blue-50: #f2f5ff;

  --cyan-500: #14a4dc;
  --cyan-700: #0a6e98;
  --cyan-200: #b9e7f8;
  --cyan-50: #eefafe;
  --teal-500: #12b5a0;
  --teal-400: #22c7b3;
  --violet-700: #5936d9;
  --violet-500: #7c5cfa;
  --violet-200: #dcd3ff;
  --violet-100: #ede7ff;
  --violet-50: #f5f2ff;
  --pink-500: #e6498f;
  --coral-500: #f2654f;
  --amber-500: #f59e0b;
  --green-500: #16a871;
  --green-700: #0b7349;
  --green-200: #bfe9d6;
  --green-50: #f3fbf7;
  --red-500: #e5484d;
  --ring-danger: rgba(229, 72, 77, .14);
  --slate-400: #8a93ad;

  /* Estados de las vacaciones: el mismo color significa lo mismo en toda la app */
  --state-expired: var(--red-500);     /* truncas: periodos cuyo plazo terminó */
  --state-earned: var(--blue-600);     /* ganadas y vigentes */
  --state-progress: var(--slate-400);  /* en curso: se generan en el año de servicio actual */
  --state-taken: var(--green-500);     /* gozadas o aprobadas */
  --state-hold: var(--amber-500);      /* en aprobación */

  --ink: #0e1633;
  --ink-2: #46506c;
  --ink-3: #6f7894;
  --ink-4: #a2a9bd;
  --line: #e3e7f0;
  --line-soft: #edf0f6;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --canvas: #f3f6fb;

  --grad-brand: linear-gradient(135deg, #2143b8 0%, #2f5bea 38%, #14a4dc 78%, #22c7b3 100%);
  --grad-deep: linear-gradient(165deg, #0b1848 0%, #12246a 55%, #1a3182 100%);
  --grad-warm: linear-gradient(135deg, #f59e0b 0%, #f2654f 55%, #e6498f 100%);
  --grad-violet: linear-gradient(135deg, #7c5cfa 0%, #e6498f 100%);
  --grad-ai: conic-gradient(from 0deg, #2f5bea, #14a4dc, #22c7b3, #7c5cfa, #e6498f, #2f5bea);

  --shadow-xs: 0 1px 2px rgba(14, 22, 51, .06);
  --shadow-sm: 0 1px 3px rgba(14, 22, 51, .06), 0 1px 2px rgba(14, 22, 51, .04);
  --shadow-md: 0 12px 30px -14px rgba(14, 22, 51, .2), 0 2px 6px -2px rgba(14, 22, 51, .06);
  --shadow-lg: 0 30px 70px -24px rgba(14, 22, 51, .35), 0 6px 16px -8px rgba(14, 22, 51, .12);
  --shadow-blue: 0 10px 24px -10px rgba(47, 91, 234, .65);
  --shadow-warm: 0 18px 40px -20px rgba(242, 101, 79, .7);

  /* Placa de los logos sobre fondos oscuros: el logo original, sin cambios, sobre blanco */
  --logo-plate-bg: #ffffff;
  --logo-plate-pad: .12;
  --logo-plate-radius: 12px;

  /* Texto y vidrio sobre superficies con degradado */
  --on-color: #ffffff;
  --on-color-2: rgba(255, 255, 255, .86);
  --glass: rgba(255, 255, 255, .16);
  --glass-soft: rgba(255, 255, 255, .12);
  --glass-soft-line: rgba(255, 255, 255, .18);
  --glass-line: rgba(255, 255, 255, .3);
  --glass-dark: rgba(6, 13, 43, .26);
  --shade-hero: linear-gradient(rgba(6, 13, 43, .4), rgba(6, 13, 43, .4));

  /* Ventanas de cruce de vacaciones */
  --overlap-band: rgba(229, 72, 77, .12);
  --overlap-band-line: rgba(229, 72, 77, .4);
  --shadow-overlap: 0 6px 14px -6px rgba(229, 72, 77, .7);

  /* Organigrama */
  --org-line: #c3cbdd;
  --org-dot: #d3d9e7;
  --glass-light: rgba(255, 255, 255, .9);
  --ring-match: rgba(245, 158, 11, .4);
  --shadow-deep: 0 20px 40px -18px rgba(11, 24, 72, .7);
  --shadow-navy: 0 6px 14px -6px rgba(11, 24, 72, .6);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --ease: cubic-bezier(.22, .8, .24, 1);
  --spring: cubic-bezier(.34, 1.45, .64, 1);

  --sidebar: 248px;
  --topbar: 72px;

  /* Trama de marca: la chispa de GestIA con puntos en las esquinas que se unen en rejilla al repetirse */
  --brand-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 18C28.9 25.1 30.9 27.1 38 28C30.9 28.9 28.9 30.9 28 38C27.1 30.9 25.1 28.9 18 28C25.1 27.1 27.1 25.1 28 18Z' fill='none' stroke='%23fff' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cg fill='%23fff'%3E%3Ccircle r='1.6'/%3E%3Ccircle cx='56' r='1.6'/%3E%3Ccircle cy='56' r='1.6'/%3E%3Ccircle cx='56' cy='56' r='1.6'/%3E%3C/g%3E%3C/svg%3E");

  color-scheme: light;
}

/* Tonos: cada componente toma --tone / --tone-soft / --tone-ink */
.tone-blue   { --tone: #2f5bea; --tone-soft: #e4ebff; --tone-ink: #2143b8; }
.tone-cyan   { --tone: #14a4dc; --tone-soft: #dcf2fb; --tone-ink: #0a6e98; }
.tone-teal   { --tone: #12b5a0; --tone-soft: #d6f5f0; --tone-ink: #0a7568; }
.tone-violet { --tone: #7c5cfa; --tone-soft: #ece7ff; --tone-ink: #5a38db; }
.tone-pink   { --tone: #e6498f; --tone-soft: #fce3ee; --tone-ink: #b32868; }
.tone-coral  { --tone: #f2654f; --tone-soft: #ffe7e2; --tone-ink: #be3a26; }
.tone-amber  { --tone: #f59e0b; --tone-soft: #fef0d3; --tone-ink: #8f5600; }
.tone-green  { --tone: #16a871; --tone-soft: #dbf5e9; --tone-ink: #0b7349; }
.tone-red    { --tone: #e5484d; --tone-soft: #fde4e5; --tone-ink: #b42330; }
.tone-slate  { --tone: #6f7894; --tone-soft: #edf0f6; --tone-ink: #46506c; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { letter-spacing: -.02em; line-height: 1.2; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-600); text-decoration: none; font-weight: 650; }
a:hover { color: var(--blue-700); }
[hidden] { display: none !important; }
::selection { background: var(--blue-100); color: var(--navy-900); }
:focus-visible { outline: 3px solid rgba(47, 91, 234, .45); outline-offset: 2px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd5e3; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #b5bdd0; }
::-webkit-scrollbar-track { background: transparent; }

.i {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.eyebrow {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.muted { color: var(--ink-3); }
.tnum { font-variant-numeric: tabular-nums; }
.grow { flex: 1 1 auto; min-width: 0; }
.nowrap { white-space: nowrap; }
.text-grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Rejilla general */
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: 1 / -1; }
@media (max-width: 1180px) {
  .grid-12 > * { grid-column: 1 / -1; }
}

/* Animaciones */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop-out { to { opacity: 0; transform: scale(.96) translateY(6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { from { opacity: .7; transform: scale(1); } 70%, to { opacity: 0; transform: scale(2.2); } }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -50px) scale(1.08); }
  66% { transform: translate(-30px, 30px) scale(.94); }
}
@keyframes sweep { from { transform: translateX(-120%); } to { transform: translateX(220%); } }
@keyframes flip { 0%, 42% { transform: rotate(0); } 50%, 92% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slide-out { to { transform: translateX(40px); opacity: 0; } }

.reveal { animation: rise .38s var(--ease) both; animation-delay: calc(min(var(--i, 0), 6) * 40ms); }
.view.is-soft .reveal { animation: none; }

/* Pulso en un anillo propio: solo anima transform y opacity */
.live-dot, .status-pill.ready i, .stepper .current .step-dot, .wz-step.current i { position: relative; isolation: isolate; }
.live-dot::after, .status-pill.ready i::after, .stepper .current .step-dot::after, .wz-step.current i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  background: var(--pulse, rgba(22, 168, 113, .5));
  pointer-events: none;
  animation: pulse 2s var(--ease) infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
