/* ── Theme Variables ── */
:root, [data-theme="dark"] {
  --bg-base:        #020c18;
  --bg-base-grad:   linear-gradient(180deg, #020c18 0%, #050d1a 100%);
  --bg-sidebar:     linear-gradient(180deg, #030e1c 0%, #020c18 100%);
  --bg-panel:       linear-gradient(160deg, #0d1526 0%, #080f1e 100%);
  --bg-elevated:    #0f172a;
  --bg-card:        #1e293b;
  --bg-input:       rgba(255,255,255,0.04);
  --bg-hover:       rgba(139,92,246,0.07);

  --border-subtle:  rgba(139,92,246,0.15);
  --border-default: #1e293b;
  --border-muted:   rgba(139,92,246,0.08);
  --sidebar-border: rgba(139,92,246,0.12);

  --text-primary:   #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted:     rgba(148,163,184,0.6);
  --text-placeholder: rgba(100,116,139,0.5);

  --accent:         #7c3aed;
  --accent-light:   #a855f7;
  --accent-grad:    linear-gradient(135deg, #7c3aed, #a855f7);
  --accent-bar:     linear-gradient(90deg, #7c3aed, #a855f7, #06b6d4);

  --scrollbar-track: #1e293b;
  --scrollbar-thumb: #334155;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg-base:        #f1f5f9;
  --bg-base-grad:   linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  --bg-sidebar:     linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  --bg-panel:       linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  --bg-elevated:    #f8fafc;
  --bg-card:        #ffffff;
  --bg-input:       rgba(0,0,0,0.03);
  --bg-hover:       rgba(99,102,241,0.06);

  --border-subtle:  rgba(148,163,184,0.2);
  --border-default: rgba(148,163,184,0.25);
  --border-muted:   rgba(148,163,184,0.12);
  --sidebar-border: rgba(148,163,184,0.15);

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     rgba(71,85,105,0.75);
  --text-placeholder: rgba(100,116,139,0.6);

  --accent:         #4f46e5;
  --accent-light:   #6366f1;
  --accent-grad:    linear-gradient(135deg, #4f46e5, #6366f1);
  --accent-bar:     linear-gradient(90deg, #4f46e5, #6366f1, #06b6d4);

  --scrollbar-track: #e2e8f0;
  --scrollbar-thumb: #cbd5e1;

  color-scheme: light;
}

/* Custom animations for Landing Page charts */

@keyframes draw-line {
  from {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
  }
  to {
    stroke-dasharray: 1000;
    stroke-dashoffset: 0;
  }
}

@keyframes draw-circle {
  from {
    stroke-dashoffset: 377;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes grow-bar {
  from {
    transform: scaleY(0);
    transform-origin: bottom;
  }
  to {
    transform: scaleY(1);
    transform-origin: bottom;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

.animate-draw-line {
  animation: draw-line 2s ease-out forwards;
}

.animate-draw-circle {
  animation: draw-circle 1.5s ease-out forwards;
}

.animate-grow-bar {
  animation: grow-bar 1s ease-out forwards;
}

.animate-fade-in {
  animation: fade-in 1s ease-in forwards;
}

.animate-pulse-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Hero Digital Aurora entry animations */
@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-badge-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-hero-rise {
  animation: hero-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-hero-badge {
  animation: hero-badge-pop 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes section-spin {
  to { transform: rotate(360deg); }
}

/* Glassmorphism effect */
.backdrop-blur-lg {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.backdrop-blur-sm {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Custom scrollbar for better UX */
.scrollbar-thin::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 4px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Custom slate-850 color for backgrounds */
.bg-slate-850 {
  background-color: #0f172a;
}
[data-theme="light"] .bg-slate-850 { background-color: #f1f5f9 !important; }

/* ── Light Theme Overrides ── */
/* Tailwind bg-slate overrides — excluded inside [data-theme="dark"] nested wrappers */
[data-theme="light"] .bg-slate-950:not([data-theme="dark"] .bg-slate-950) { background-color: #f8fafc !important; }
[data-theme="light"] .bg-slate-900:not([data-theme="dark"] .bg-slate-900)  { background-color: #f8fafc !important; }
[data-theme="light"] .bg-slate-800:not([data-theme="dark"] .bg-slate-800)  { background-color: #f1f5f9 !important; }
[data-theme="light"] .bg-slate-700:not([data-theme="dark"] .bg-slate-700)  { background-color: #e2e8f0 !important; }
[data-theme="light"] .bg-slate-650:not([data-theme="dark"] .bg-slate-650)  { background-color: #e2e8f0 !important; }
[data-theme="light"] .bg-slate-600:not([data-theme="dark"] .bg-slate-600)  { background-color: #cbd5e1 !important; }

/* Opacity / modifier variants */
[data-theme="light"] [class*="bg-slate-900"]:not([data-theme="dark"] [class*="bg-slate-900"]) { background-color: #f8fafc !important; }
[data-theme="light"] [class*="bg-slate-800"]:not([data-theme="dark"] [class*="bg-slate-800"]) { background-color: #f1f5f9 !important; }
[data-theme="light"] [class*="bg-slate-700"]:not([data-theme="dark"] [class*="bg-slate-700"]) { background-color: #e2e8f0 !important; }
[data-theme="light"] [class*="bg-slate-600"]:not([data-theme="dark"] [class*="bg-slate-600"]) { background-color: #cbd5e1 !important; }

/* Exceptions: keep colored accent backgrounds intact */
[data-theme="light"] [class*="bg-purple-"],
[data-theme="light"] [class*="bg-indigo-"],
[data-theme="light"] [class*="bg-violet-"],
[data-theme="light"] [class*="bg-cyan-"],
[data-theme="light"] [class*="bg-blue-"],
[data-theme="light"] [class*="bg-green-"],
[data-theme="light"] [class*="bg-red-"],
[data-theme="light"] [class*="bg-yellow-"],
[data-theme="light"] [class*="bg-orange-"],
[data-theme="light"] [class*="bg-pink-"],
[data-theme="light"] [class*="bg-emerald-"],
[data-theme="light"] [class*="bg-teal-"],
[data-theme="light"] [class*="bg-rose-"] {
  /* Keep these as-is — don't override colored badges/buttons */
  background-color: unset;
}

/* Text overrides — excluded inside [data-theme="dark"] nested wrappers */
[data-theme="light"] .text-slate-100:not([data-theme="dark"] .text-slate-100),
[data-theme="light"] .text-slate-200:not([data-theme="dark"] .text-slate-200) { color: #1e293b !important; }
[data-theme="light"] .text-slate-300:not([data-theme="dark"] .text-slate-300)  { color: #334155 !important; }
[data-theme="light"] .text-slate-400:not([data-theme="dark"] .text-slate-400)  { color: #475569 !important; }
[data-theme="light"] .text-slate-500:not([data-theme="dark"] .text-slate-500)  { color: #64748b !important; }
[data-theme="light"] .text-white:not([data-theme="dark"] .text-white)          { color: #0f172a !important; }

/* Keep white text on colored/dark accent backgrounds */
[data-theme="light"] [class*="bg-purple-"] .text-white,
[data-theme="light"] [class*="bg-indigo-"] .text-white,
[data-theme="light"] [class*="bg-violet-"] .text-white,
[data-theme="light"] [class*="bg-cyan-"] .text-white,
[data-theme="light"] [class*="bg-blue-"] .text-white,
[data-theme="light"] [class*="bg-green-"] .text-white,
[data-theme="light"] [class*="bg-red-"] .text-white,
[data-theme="light"] [class*="bg-rose-"] .text-white,
[data-theme="light"] [class*="bg-yellow-"] .text-white,
[data-theme="light"] [class*="bg-gradient-"] .text-white { color: #ffffff !important; }

/* Border overrides */
[data-theme="light"] .border-slate-800:not([data-theme="dark"] .border-slate-800) { border-color: rgba(148,163,184,0.2) !important; }
[data-theme="light"] .border-slate-700:not([data-theme="dark"] .border-slate-700) { border-color: rgba(148,163,184,0.25) !important; }
[data-theme="light"] .border-slate-600:not([data-theme="dark"] .border-slate-600) { border-color: rgba(148,163,184,0.3) !important; }
[data-theme="light"] [class*="border-slate-8"]:not([data-theme="dark"] [class*="border-slate-8"]) { border-color: rgba(148,163,184,0.2) !important; }
[data-theme="light"] [class*="border-slate-7"]:not([data-theme="dark"] [class*="border-slate-7"]) { border-color: rgba(148,163,184,0.25) !important; }
[data-theme="light"] [class*="border-slate-6"]:not([data-theme="dark"] [class*="border-slate-6"]) { border-color: rgba(148,163,184,0.3) !important; }
[data-theme="light"] [class*="border-purple-500"]:not([data-theme="dark"] [class*="border-purple-500"]) { border-color: rgba(99,102,241,0.2) !important; }
[data-theme="light"] [class*="border-purple-400"]:not([data-theme="dark"] [class*="border-purple-400"]) { border-color: rgba(99,102,241,0.25) !important; }

/* Table dividers — ultra-subtle in light mode */
[data-theme="light"] .divide-y > * + *,
[data-theme="light"] [class*="divide-slate-"] > * + *,
[data-theme="light"] [class*="divide-y"] > * + * { border-color: rgba(148,163,184,0.15) !important; }

/* Table rows hover */
[data-theme="light"] tr:hover { background-color: rgba(99,102,241,0.03) !important; }
[data-theme="light"] [class*="hover:bg-slate-"]:hover { background-color: rgba(148,163,184,0.1) !important; }

/* Hover overrides */
[data-theme="light"] [class*="hover:bg-slate-"]:hover { background-color: rgba(148,163,184,0.1) !important; }

/* Gradient overrides */
[data-theme="light"] .from-slate-900:not([data-theme="dark"] .from-slate-900) { --tw-gradient-from: #f8fafc !important; }
[data-theme="light"] .from-slate-800:not([data-theme="dark"] .from-slate-800) { --tw-gradient-from: #f1f5f9 !important; }
[data-theme="light"] .via-slate-900:not([data-theme="dark"] .via-slate-900)   { --tw-gradient-via: #f8fafc !important; }
[data-theme="light"] .via-slate-800:not([data-theme="dark"] .via-slate-800)   { --tw-gradient-via: #f1f5f9 !important; }
[data-theme="light"] .to-slate-900:not([data-theme="dark"] .to-slate-900)     { --tw-gradient-to: #f8fafc !important; }
[data-theme="light"] .to-slate-800:not([data-theme="dark"] .to-slate-800)     { --tw-gradient-to: #f1f5f9 !important; }

/* ── Card / panel wrappers ── */
/* All rounded containers with slate borders get a feather-light border */
[data-theme="light"] .rounded-xl,
[data-theme="light"] .rounded-2xl,
[data-theme="light"] .rounded-lg {
  --card-border: rgba(148,163,184,0.18);
}
/* Override inline border on card wrappers */
[data-theme="light"] [class*="rounded"][class*="border"][class*="border-slate"] {
  border-color: rgba(148,163,184,0.18) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 0 0 1px rgba(148,163,184,0.12) !important;
}

/* ── Table specific ── */
[data-theme="light"] table { border-color: rgba(148,163,184,0.15) !important; }
[data-theme="light"] thead { background-color: rgba(241,245,249,0.8) !important; border-color: rgba(148,163,184,0.15) !important; }
[data-theme="light"] th { color: #64748b !important; border-color: rgba(148,163,184,0.15) !important; }
[data-theme="light"] td { border-color: rgba(148,163,184,0.1) !important; color: #334155; }
[data-theme="light"] tbody tr { border-color: rgba(148,163,184,0.1) !important; }
[data-theme="light"] tbody tr:hover { background-color: rgba(99,102,241,0.04) !important; }

/* ── AbsencesPage specific ── */
/* Main page wrapper with !bg-slate-900 */
[data-theme="light"] [class*="!bg-slate-900"] { background-color: #f8fafc !important; }
[data-theme="light"] [class*="!bg-slate-800"] { background-color: #f1f5f9 !important; }
/* Calendar grid bg */
[data-theme="light"] .gap-px.bg-slate-800 { background-color: #e2e8f0 !important; }
/* Calendar day cells */
[data-theme="light"] [class*="border-slate-800"][class*="cursor-pointer"] {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}
/* Select/input — subtle borders */
[data-theme="light"] select,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(148,163,184,0.3) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

/* ── Empleado del Mes card ── */
/* The yellow-bordered card with via-slate-800 gradient */
[data-theme="light"] .from-yellow-500\/20 {
  --tw-gradient-from: rgba(234,179,8,0.12) !important;
}

/* ── DashboardPresenceWidget / Centro de Control ── */
/* Outer widget shell */
[data-theme="light"] .presence-widget {
  background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-color: rgba(99,102,241,0.25) !important;
  box-shadow: 0 0 40px rgba(99,102,241,0.06), inset 0 0 60px rgba(0,0,0,0.02) !important;
}

/* Kill dark scanlines / dot-grid overlays inside widget */
[data-theme="light"] .presence-widget > .absolute {
  opacity: 0 !important;
}

/* Header bar */
[data-theme="light"] .presence-widget [style*="rgba(6,182,212,0.02)"] {
  background: rgba(99,102,241,0.04) !important;
}
[data-theme="light"] .presence-widget [style*="rgba(6,182,212,0.12)"] {
  border-color: rgba(99,102,241,0.15) !important;
}

/* LIVE badge & KPI pills */
[data-theme="light"] .presence-widget [style*="rgba(6,182,212,0.1)"] {
  background: rgba(99,102,241,0.08) !important;
}
[data-theme="light"] .presence-widget [style*="rgba(6,182,212,0.3)"] {
  border-color: rgba(99,102,241,0.3) !important;
}

/* Title "Centro de Control" text */
[data-theme="light"] .presence-widget h2.text-white {
  color: #1e293b !important;
}
[data-theme="light"] .presence-widget .text-cyan-300 {
  color: #4f46e5 !important;
}
[data-theme="light"] .presence-widget .text-cyan-500\/50,
[data-theme="light"] .presence-widget [class*="text-cyan-"] {
  color: rgba(79,70,229,0.6) !important;
}

/* 3-screen HUD array — give each monitor a light bezel */
[data-theme="light"] .presence-widget [style*="rgba(1,8,18,0.92)"],
[data-theme="light"] .presence-widget [style*="background: 'rgba(1,8,18,0.92)'"] {
  background: rgba(241,245,249,0.97) !important;
  border-color: rgba(99,102,241,0.2) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
}

/* Floor-plan section background */
[data-theme="light"] .presence-widget [style*="radial-gradient(ellipse 80%"] {
  background: linear-gradient(180deg, rgba(241,245,249,0) 0%, rgba(224,231,255,0.08) 100%) !important;
}

/* Floor grid lines — invisible in light mode */
[data-theme="light"] .presence-widget .absolute.inset-0.pointer-events-none[style*="scaleY"] {
  opacity: 0.04 !important;
}

/* Employee desk surface (dark #0f172a gradient) → light card */
[data-theme="light"] .presence-widget [style*="linear-gradient(170deg, #0f172a"],
[data-theme="light"] .presence-widget [style*="linear-gradient(170deg,#0f172a"] {
  background: linear-gradient(170deg, #e2e8f0 0%, #edf2f7 100%) !important;
}
[data-theme="light"] .presence-widget [style*="linear-gradient(170deg,#060c14"] {
  background: linear-gradient(170deg, #e2e8f0 0%, #edf2f7 100%) !important;
}
/* Desk front panel */
[data-theme="light"] .presence-widget [style*="linear-gradient(to bottom, #0d1f35"] {
  background: linear-gradient(to bottom, #cbd5e1, #e2e8f0) !important;
}
[data-theme="light"] .presence-widget [style*="linear-gradient(to bottom,#04080f"] {
  background: linear-gradient(to bottom, #cbd5e1, #e2e8f0) !important;
}

/* Name tag dark bg on desk */
[data-theme="light"] .presence-widget [style*="rgba(2,12,24,0.9)"] {
  background: rgba(255,255,255,0.92) !important;
  border-color: rgba(99,102,241,0.25) !important;
}

/* Check-in badge cyan tint */
[data-theme="light"] .presence-widget [style*="rgba(6,182,212,0.07)"] {
  background: rgba(99,102,241,0.08) !important;
}
[data-theme="light"] .presence-widget [style*="rgba(6,182,212,0.2)"] {
  border-color: rgba(99,102,241,0.25) !important;
}
[data-theme="light"] .presence-widget .text-cyan-300 {
  color: #4f46e5 !important;
}

/* Avatar ring for absent/idle employees (dark rgba background) */
[data-theme="light"] .presence-widget [style*="rgba(30,58,95,0.4)"] {
  background: rgba(148,163,184,0.3) !important;
}

/* Status beacon border on desktop (border-slate-950) */
[data-theme="light"] .presence-widget .border-slate-950 {
  border-color: #f1f5f9 !important;
}

/* Day Timeline section */
[data-theme="light"] .presence-widget [style*="linear-gradient(180deg,rgba(2,12,24,0)"] {
  background: linear-gradient(180deg, rgba(241,245,249,0) 0%, rgba(224,231,255,0.12) 100%) !important;
  border-color: rgba(99,102,241,0.12) !important;
}

/* Timeline track */
[data-theme="light"] .presence-widget [style*="rgba(255,255,255,0.03)"] {
  background: rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .presence-widget [style*="rgba(255,255,255,0.05)"] {
  background: rgba(0,0,0,0.04) !important;
}

/* Hour ruler lines */
[data-theme="light"] .presence-widget .text-slate-600 {
  color: #94a3b8 !important;
}

/* Row labels (FILA N) */
[data-theme="light"] .presence-widget .text-cyan-500\/30 {
  color: rgba(79,70,229,0.35) !important;
}

/* Alerts panel */
[data-theme="light"] .presence-widget [style*="rgba(239,68,68,0.04)"] {
  background: rgba(239,68,68,0.04) !important;
}
[data-theme="light"] .presence-widget [style*="rgba(239,68,68,0.15)"] {
  border-color: rgba(239,68,68,0.2) !important;
}

/* Status bar */
[data-theme="light"] .presence-widget [style*="rgba(6,182,212,0.1)"] {
  border-color: rgba(99,102,241,0.12) !important;
}
[data-theme="light"] .presence-widget .text-slate-700 {
  color: #94a3b8 !important;
}

/* Pagination buttons */
[data-theme="light"] .presence-widget [style*="rgba(255,255,255,0.04)"] {
  background: rgba(0,0,0,0.04) !important;
}
[data-theme="light"] .presence-widget [style*="rgba(255,255,255,0.08)"] {
  border-color: rgba(0,0,0,0.12) !important;
}
[data-theme="light"] .presence-widget [style*="rgba(255,255,255,0.1)"] {
  border-color: rgba(0,0,0,0.12) !important;
}
[data-theme="light"] .presence-widget [style*="rgba(6,182,212,0.08)"] {
  border-color: rgba(99,102,241,0.1) !important;
}

/* FloatingTimer dark background */
[data-theme="light"] .presence-widget .bg-\[#050b14\] {
  background: #ffffff !important;
}

/* Map tray panel */
[data-theme="light"] .presence-widget [style*="rgba(10,4,22,0.9)"] {
  background: rgba(241,245,249,0.95) !important;
}
[data-theme="light"] .presence-widget [style*="rgba(30,20,50,0.6)"] {
  background: rgba(241,245,249,0.7) !important;
}

/* "SIN SEÑAL" placeholder text */
[data-theme="light"] .presence-widget .text-cyan-500\/30 {
  color: rgba(79,70,229,0.4) !important;
}
[data-theme="light"] .presence-widget .bg-cyan-500\/30 {
  background: rgba(79,70,229,0.2) !important;
}

/* Map tray header */
[data-theme="light"] .presence-widget [style*="rgba(109,40,217,0.3)"] {
  border-color: rgba(99,102,241,0.25) !important;
}
[data-theme="light"] .presence-widget [style*="rgba(109,40,217,0.2)"] {
  border-color: rgba(99,102,241,0.15) !important;
}
[data-theme="light"] .presence-widget .text-purple-300 {
  color: #6366f1 !important;
}

/* Status bar map-toggle button area */
[data-theme="light"] .presence-widget [style*="linear-gradient(135deg,rgba(109,40,217"] {
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(99,102,241,0.1)) !important;
}

/* ── EmployeeDetailModal (portal, outside .presence-widget) ── */
/* The fixed overlay */
[data-theme="light"] .fixed.inset-0.z-50 > div[style*="linear-gradient(160deg,#020c18"] {
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%) !important;
  border-color: rgba(99,102,241,0.3) !important;
  box-shadow: 0 0 40px rgba(99,102,241,0.15), 0 24px 60px rgba(0,0,0,0.12) !important;
}
/* HUD corners on modal */
[data-theme="light"] .fixed.inset-0.z-50 span[style*="borderColor:"] {
  opacity: 0.3;
}
/* Modal header text */
[data-theme="light"] .fixed.inset-0.z-50 h3.text-white {
  color: #1e293b !important;
}
/* Modal timeline record rows */
[data-theme="light"] .fixed.inset-0.z-50 .text-slate-400 {
  color: #64748b !important;
}
/* Modal bottom status bar */
[data-theme="light"] .fixed.inset-0.z-50 [style*="rgba(1,8,18"] {
  background: rgba(248,250,252,0.97) !important;
}
/* Nested WA dialog in modal */
[data-theme="light"] .fixed.inset-0.z-50 .bg-slate-900.border.border-slate-800 {
  background: #f1f5f9 !important;
  border-color: rgba(148,163,184,0.3) !important;
}
[data-theme="light"] .fixed.inset-0.z-50 .text-slate-200 {
  color: #334155 !important;
}

/* Preserve HUD aesthetic but lighten outer wrapper (legacy selector) */
[data-theme="light"] .rounded-2xl[style*="linear-gradient(175deg,#020c18"],
[data-theme="light"] .rounded-2xl[style*="linear-gradient(175deg, #020c18"] {
  background: linear-gradient(175deg, #e8edf5 0%, #f0f4fa 100%) !important;
  border-color: rgba(99,102,241,0.3) !important;
  box-shadow: 0 0 40px rgba(99,102,241,0.08) !important;
}

/* Employee desk cards inside widget (legacy) */
[data-theme="light"] [style*="rgba(2,12,24,0.9)"],
[data-theme="light"] [style*="rgba(1,8,18,0.92)"] {
  background: rgba(248,250,252,0.95) !important;
}

/* ── Inline style overrides ── */
/* rgba dark overlays */
[data-theme="light"] [style*="background: 'rgba(0,0,0,0."],
[data-theme="light"] [style*="background: 'rgba(30,41,59"] {
  background: rgba(241,245,249,0.9) !important;
}
/* Input backgrounds */
[data-theme="light"] [style*="rgba(255,255,255,0.04)"],
[data-theme="light"] [style*="rgba(255,255,255,0.05)"] {
  background: rgba(0,0,0,0.04) !important;
}
/* Inline border colors */
[data-theme="light"] [style*="borderColor: 'rgba(139,92,246"],
[data-theme="light"] [style*="borderColor: rgba(139,92,246"] {
  border-color: rgba(99,102,241,0.25) !important;
}

/* ── Leaflet Popup: dark HUD style for map pins ── */
.map-emp-popup .leaflet-popup-content-wrapper {
  background: #0f172a;
  border: 1px solid rgba(94,41,241,0.35);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 20px rgba(94,41,241,0.15);
  padding: 0;
  overflow: hidden;
}
.map-emp-popup .leaflet-popup-content {
  margin: 0;
  width: auto !important;
}
.map-emp-popup .leaflet-popup-tip-container {
  display: none;
}


/* ── PWA / Native Bottom Nav: padding para que el contenido no quede tapado ── */
/* Se activa en móvil + modo standalone (PWA) O app nativa Capacitor            */
@media (max-width: 767px) {
  @media (display-mode: standalone) {
    /* Variable global con la altura de la barra para reutilizar */
    :root {
      --pwa-nav-h: calc(64px + env(safe-area-inset-bottom, 0px));
      --safe-top: env(safe-area-inset-top, 0px);
    }

    /* ── Navbar fijo: empuja hacia abajo para no quedar bajo la status bar ── */
    nav.fixed,
    header.fixed,
    [data-navbar] {
      padding-top: max(0.75rem, env(safe-area-inset-top, 0px)) !important;
    }

    /* ── Contenido principal scrolleable de la app ── */
    .pwa-main-content {
      padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* ════════════════════════════════════════════════════════════════
       REGLA GENERAL: cualquier overlay fixed que cubra toda la
       pantalla (fixed + inset-0, o top/left/right/bottom explícitos)
       se recorta por abajo para que el modal quede sobre la barra.
       Esto cubre TODOS los modales sin necesitar clases extra.
       ════════════════════════════════════════════════════════════════ */

    /* Selector de alta especificidad para todos los overlays de modal */
    .fixed.inset-0 {
      bottom: var(--pwa-nav-h) !important;
    }

    /* ── Fallback con clase manual (mantener retrocompatibilidad) ── */
    .pwa-modal-overlay {
      bottom: var(--pwa-nav-h) !important;
    }

    /* ── Todo scroll interno dentro de modales recibe padding extra ──
       Apunta a cualquier contenedor scrolleable dentro de un fixed.   */
    .fixed .overflow-y-auto,
    .fixed .overflow-y-scroll,
    .fixed [class*="overflow-y-auto"],
    .fixed [class*="overflow-y-scroll"] {
      padding-bottom: 8px !important;
    }

    /* ── Scroll manual con clase (retrocompatibilidad) ── */
    .pwa-modal-scroll {
      padding-bottom: 16px !important;
    }
  }
}

/* ── App nativa Capacitor Android/iOS: mismas reglas via clase .has-bottom-nav ── */
@media (max-width: 767px) {
  body.has-bottom-nav {
    --pwa-nav-h: calc(64px + env(safe-area-inset-bottom, 0px));
    --safe-top: env(safe-area-inset-top, 0px);
  }

  body.has-bottom-nav .pwa-main-content {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.has-bottom-nav .fixed.inset-0 {
    bottom: var(--pwa-nav-h) !important;
  }

  body.has-bottom-nav .pwa-modal-overlay {
    bottom: var(--pwa-nav-h) !important;
  }

  body.has-bottom-nav .fixed .overflow-y-auto,
  body.has-bottom-nav .fixed .overflow-y-scroll {
    padding-bottom: 8px !important;
  }

  body.has-bottom-nav .pwa-modal-scroll {
    padding-bottom: 16px !important;
  }
}

/* ── Logo Cloud infinite marquee ── */
@keyframes marquee-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes marquee-right {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}
.animate-marquee-left  { animation: marquee-left  var(--marquee-duration, 40s) linear infinite; }
.animate-marquee-right { animation: marquee-right var(--marquee-duration, 36s) linear infinite; }

/* ── Auth page animations (LoginForm / RegistrationForm) ── */
@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes authSlideRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

