/* ═══════════════════════════════════════════════════════════
   CATCHME LOGISTICS — Estilos globales del CRM
   Colores corporativos: Azul #0091c3 · Verde #009d56
═══════════════════════════════════════════════════════════ */

/* ── Variables de tema ── */
:root {
  --sidebar-w: 240px;
  --brand-blue: #0091c3;
  --brand-green: #009d56;
  --brand-gradient: linear-gradient(135deg, #0091c3, #009d56);

  /* Dark mode (por defecto) */
  --bg-body: #060a14;
  --bg-card: #0c1222;
  --bg-topbar: #080d18;
  --bg-modal: #0a1020;
  --bg-th: #080d18;
  --bg-hover: #0f1a2e;
  --bg-input: #080d18;
  --bg-sidebar: #080d18;
  --text-primary: #e0e8f4;
  --text-secondary: #7a8ba8;
  --text-muted: #5a7a9a;
  --border-primary: #1a2744;
  --border-light: #0e2a4a;
  --accent: #0091c3;
  --accent-2: #009d56;
  --accent-bg: #0091c311;
}

[data-theme="light"] {
  --bg-body: #f0f4f8;
  --bg-card: #ffffff;
  --bg-topbar: #ffffff;
  --bg-modal: #ffffff;
  --bg-th: #f8fafc;
  --bg-hover: #f1f5f9;
  --bg-input: #ffffff;
  --bg-sidebar: #ffffff;
  --text-primary: #1a1f35;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-primary: #e2e8f0;
  --border-light: #e2e8f0;
  --accent: #0077a8;
  --accent-2: #007a42;
  --accent-bg: #0077a811;
}

/* ── Base ── */
* { box-sizing: border-box; }
body {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  transition: background .3s, color .3s;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border-primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ═══════════════════════════════════════════════════════════
   LOGIN SCREEN — Diseño corporativo
═══════════════════════════════════════════════════════════ */
#login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #020810 0%, #041428 40%, #061a20 70%, #040c10 100%);
  z-index: 0;
}

/* Efecto de líneas diagonales corporativas */
.login-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 40%, rgba(0,145,195,0.04) 50%, transparent 60%),
    linear-gradient(45deg, transparent 40%, rgba(0,157,86,0.03) 50%, transparent 60%);
  background-size: 60px 60px;
  z-index: 0;
}

/* Glow de fondo */
.login-bg::after {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(0,145,195,0.08) 0%, transparent 70%);
  z-index: 0;
}

.login-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-logo-wrap {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}

.login-logo {
  width: 220px;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(0,145,195,0.3));
}

.login-subtitle {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--brand-green);
  text-transform: uppercase;
  margin-bottom: 28px;
  opacity: 0.85;
}

.login-card {
  background: rgba(10, 16, 32, 0.85);
  border: 1px solid rgba(0,145,195,0.2);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  backdrop-filter: blur(12px);
  box-shadow: 0 0 40px rgba(0,145,195,0.08), 0 20px 60px rgba(0,0,0,0.4);
}

.login-field {
  margin-bottom: 16px;
}

.login-error {
  background: rgba(127,29,29,0.3);
  color: #ff6b6b;
  border: 1px solid rgba(255,68,68,0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 12px;
}

.btn-login {
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 0 20px rgba(0,145,195,0.2);
}

.btn-login:hover {
  box-shadow: 0 0 30px rgba(0,145,195,0.4);
  transform: translateY(-1px);
}

.login-footer {
  margin-top: 20px;
  font-size: 11px;
  color: #374151;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════ */
#sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-primary);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
}

[data-theme="light"] #sidebar {
  box-shadow: 2px 0 12px rgba(0,0,0,0.06);
}

.sidebar-logo-wrap {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
}

.sidebar-logo {
  width: 140px;
  height: auto;
}

/* En modo claro, el logo blanco no se ve — usamos filtro para invertirlo */
[data-theme="light"] .sidebar-logo {
  filter: invert(1) sepia(1) saturate(2) hue-rotate(170deg) brightness(0.7);
}

/* ── Navegación ── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all .15s;
  margin: 2px 8px;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-bg);
  color: var(--accent);
  border-left: 3px solid var(--accent);
}

.nav-item .icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   TOPBAR Y MAIN
═══════════════════════════════════════════════════════════ */
#main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left .25s ease;
}

.topbar {
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(8px);
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.hamburger-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 20px;
  display: none;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all .15s;
}

.hamburger-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.theme-btn {
  background: none;
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}

.theme-btn:hover {
  background: var(--bg-hover);
  color: var(--accent);
  border-color: var(--accent);
}

.page-content {
  padding: 24px;
}

/* ═══════════════════════════════════════════════════════════
   COMPONENTES
═══════════════════════════════════════════════════════════ */

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 0 20px rgba(0,145,195,0.03);
  transition: all .25s ease;
}

.card-sm {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 14px;
  transition: all .25s ease;
}

.card:hover, .card-sm:hover {
  border-color: rgba(0,145,195,0.25);
  box-shadow: 0 0 25px rgba(0,145,195,0.06);
}

/* ── KPI Cards ── */
.kpi {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  padding: 18px 20px;
  transition: all .3s ease;
}

.kpi:hover {
  border-color: rgba(0,145,195,0.3);
  box-shadow: 0 0 30px rgba(0,145,195,0.08);
  transform: translateY(-1px);
}

.kpi-val { font-size: 26px; font-weight: 700; line-height: 1.1; }
.kpi-lbl { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.kpi-sub { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }

/* ── Table ── */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  background: var(--bg-th);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .08em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
}
.tbl td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  transition: background .15s;
  color: var(--text-primary);
}
.tbl tr:hover td { background: var(--bg-hover); }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; backdrop-filter: blur(4px); }
.badge-green  { background: #14532d44; color: #4ade80; border: 1px solid #16a34a44; box-shadow: 0 0 8px rgba(74,222,128,0.15); }
.badge-blue   { background: #1e3a5f44; color: #60a5fa; border: 1px solid #1d4ed844; box-shadow: 0 0 8px rgba(0,145,195,0.15); }
.badge-yellow { background: #78350f44; color: #fbbf24; border: 1px solid #d9770644; }
.badge-red    { background: #7f1d1d44; color: #f87171; border: 1px solid #b91c1c44; box-shadow: 0 0 8px rgba(248,113,113,0.15); }
.badge-gray   { background: #1f2535; color: #94a3b8; border: 1px solid #374151; }
.badge-purple { background: #3b0764aa; color: #c084fc; border: 1px solid #7e22ce44; box-shadow: 0 0 8px rgba(192,132,252,0.15); }
.badge-orange { background: #431407aa; color: #fb923c; border: 1px solid #c2410c44; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  border: none;
}
.btn-primary { background: var(--brand-gradient); color: #fff; }
.btn-primary:hover { box-shadow: 0 0 15px rgba(0,145,195,0.35); transform: translateY(-1px); }
.btn-success { background: linear-gradient(135deg, #00b85c, #00ff88); color: #040810; }
.btn-success:hover { box-shadow: 0 0 15px rgba(0,255,136,0.3); transform: translateY(-1px); }
.btn-danger  { background: linear-gradient(135deg, #dc2626, #ff4444); color: #fff; }
.btn-danger:hover  { box-shadow: 0 0 15px rgba(255,68,68,0.3); transform: translateY(-1px); }
.btn-ghost  { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border-primary); }
.btn-ghost:hover  { background: var(--bg-hover); color: var(--accent); border-color: var(--accent); }
.btn-sm { padding: 5px 11px; font-size: 12px; }

/* ── Modal ── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(2,4,10,0.85);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  width: min(720px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(0,145,195,0.08), 0 0 80px rgba(0,0,0,0.5);
}
.modal-lg { width: min(900px, 96vw); }
.modal-sm { width: min(480px, 95vw); }

/* ── Inputs ── */
.inp {
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  width: 100%;
  outline: none;
  transition: all .2s ease;
}
.inp:focus {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(0,145,195,0.25);
}
select.inp option { background: var(--bg-card); }
.lbl { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; display: block; text-transform: uppercase; letter-spacing: .04em; }

/* ── Tabs ── */
.tabs { display: flex; gap: 2px; background: var(--bg-body); border: 1px solid var(--border-primary); border-radius: 10px; padding: 3px; }
.tab { padding: 6px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--text-secondary); font-weight: 500; transition: all .2s ease; }
.tab:hover { color: var(--accent); background: var(--bg-hover); }
.tab.active { background: var(--accent-bg); color: var(--accent); box-shadow: 0 0 10px rgba(0,145,195,0.15); }

/* ── Timeline ── */
.tl { position: relative; padding-left: 28px; }
.tl::before { content: ''; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 1px; background: linear-gradient(to bottom, rgba(0,145,195,0.3), rgba(26,39,68,0.3)); }
.tl-item { position: relative; margin-bottom: 16px; }
.tl-dot { position: absolute; left: -23px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--border-primary); border: 2px solid var(--bg-modal); box-shadow: 0 0 6px rgba(0,145,195,0.2); }
.tl-dot.green { background: #16a34a; } .tl-dot.blue { background: #0091c3; } .tl-dot.yellow { background: #d97706; } .tl-dot.red { background: #dc2626; } .tl-dot.purple { background: #7c3aed; }

/* ── Pill status ── */
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 4px; }

/* ── Progress bar ── */
.progress { background: var(--bg-hover); border-radius: 999px; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: var(--brand-gradient); transition: width .4s; }

/* ── Tooltip ── */
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%); background: var(--bg-modal); border: 1px solid rgba(0,145,195,0.3); color: var(--text-primary); padding: 5px 10px; border-radius: 6px; font-size: 11px; white-space: nowrap; z-index: 50; box-shadow: 0 0 12px rgba(0,145,195,0.15); }

/* ── Chart ── */
.chart-bar { display: flex; align-items: flex-end; gap: 4px; height: 80px; }
.chart-bar .bar { flex: 1; border-radius: 4px 4px 0 0; background: var(--brand-gradient); opacity: .85; transition: all .2s ease; min-width: 8px; }
.chart-bar .bar:hover { opacity: 1; }

/* ── Highlight ── */
.highlight { background: #fbbf240d; border-left: 3px solid #fbbf24; padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: 13px; color: #fbbf24cc; }
.highlight-red { background: #f871710d; border-left: 3px solid #f87171; color: #f87171cc; }
.highlight-green { background: #4ade800d; border-left: 3px solid #4ade80; color: #4ade80cc; }

/* ── PDF drop zone ── */
.pdf-drop { border: 2px dashed var(--border-primary); border-radius: 12px; padding: 20px; text-align: center; cursor: pointer; background: var(--bg-input); transition: all .25s ease; margin-bottom: 14px; }
.pdf-drop:hover, .pdf-drop.drag-over { border-color: var(--accent); background: var(--bg-hover); box-shadow: 0 0 20px rgba(0,145,195,0.1); }

/* ── Info IA ── */
.ia-section { margin-bottom: 24px; }
.ia-section h3 { font-size: 15px; font-weight: 700; color: var(--accent); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--border-light); }
.ia-section p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 8px; }
.ia-section li { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }
.ia-section ul { padding-left: 18px; }

/* ── Notif dot ── */
.notif-dot { width: 8px; height: 8px; background: #ef4444; border-radius: 50%; position: absolute; top: 2px; right: 2px; animation: subtlepulse 2s ease-in-out infinite; }

/* ── Selection ── */
::selection { background: rgba(0,145,195,0.25); color: var(--text-primary); }

/* ── Animations ── */
@keyframes subtlepulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .85; }
}
@keyframes cyanglow {
  0%, 100% { box-shadow: 0 0 5px rgba(0,145,195,0.1); }
  50% { box-shadow: 0 0 15px rgba(0,145,195,0.2); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Móvil (max 768px)
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Sidebar oculto por defecto en móvil */
  #sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  #sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
  }

  /* Overlay oscuro al abrir sidebar */
  #sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 39;
    backdrop-filter: blur(2px);
  }
  #sidebar.open ~ #sidebar-overlay,
  body.sidebar-open #sidebar-overlay {
    display: block;
  }

  /* Main ocupa todo el ancho */
  #main { margin-left: 0; }

  /* Mostrar botón hamburguesa */
  .hamburger-btn { display: flex !important; }

  /* Topbar compacta */
  .topbar { padding: 10px 16px; }
  .topbar-title { font-size: 14px; }

  /* Page content con menos padding */
  .page-content { padding: 16px 12px; }

  /* Tablas con scroll horizontal */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl { min-width: 600px; }

  /* Grids de 2 columnas → 1 columna */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:repeat(2"],
  [style*="grid-template-columns: repeat(2"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* KPI cards en 2 columnas en móvil */
  .kpi-grid-4 { grid-template-columns: 1fr 1fr !important; }

  /* Modal full screen en móvil */
  .modal { width: 100vw !important; max-width: 100vw; border-radius: 16px 16px 0 0; margin-top: auto; max-height: 92vh; }
  .modal-bg { align-items: flex-end; }

  /* Login en móvil */
  .login-box { padding: 20px 16px; }
  .login-logo { width: 180px; }
  .login-card { padding: 20px; }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  :root { --sidebar-w: 200px; }
  .page-content { padding: 20px 16px; }
}

/* Overlay en escritorio (oculto) */
#sidebar-overlay {
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   MÓDULO FLOTA — Estilos específicos
═══════════════════════════════════════════════════════════ */
.flota-grid-wrap { overflow-x: auto; }
.flota-grid { border-collapse: collapse; font-size: 12px; min-width: 900px; }
.flota-grid th { background: #1e293b; color: #94a3b8; padding: 6px 10px; text-align: center; white-space: nowrap; position: sticky; top: 0; z-index: 2; }
.flota-grid th.col-plate { text-align: left; position: sticky; left: 0; z-index: 3; background: #1e293b; }
.flota-grid td { padding: 4px 8px; border-bottom: 1px solid #1e293b; vertical-align: middle; }
.flota-grid td.col-plate { position: sticky; left: 0; background: #0f172a; z-index: 1; font-weight: 600; color: #e2e8f0; white-space: nowrap; cursor: pointer; }
.flota-grid td.col-plate:hover { color: #38bdf8; text-decoration: underline; }
.flota-grid tr:hover td { background: #1a2744; }
.fleet-cell { display: flex; flex-direction: column; gap: 2px; min-width: 80px; }
.fleet-cell .amazon-val { color: #38bdf8; font-size: 11px; }
.fleet-cell .prov-val { color: #fb923c; font-size: 11px; }
.fleet-cell .empty-val { color: #475569; font-size: 10px; }
.fleet-cell .margin-pos { color: #4ade80; font-size: 10px; }
.fleet-cell .margin-neg { color: #f87171; font-size: 10px; }
.fleet-badge { display: inline-block; padding: 2px 7px; border-radius: 10px; font-size: 10px; font-weight: 600; }
.fb-armada { background: #1e3a5f; color: #60a5fa; }
.fb-lmr { background: #3b1f5e; color: #c084fc; }
.fb-short { background: #1f3d2e; color: #4ade80; }
.fb-seso { background: #3d2a1f; color: #fb923c; }
.fb-activo { background: #14532d; color: #86efac; }
.fb-offboard { background: #451a03; color: #fdba74; }
.fb-mant { background: #1c1917; color: #a8a29e; }
.fb-onboard { background: #0c1a3d; color: #93c5fd; }

/* Ficha van */
.van-card-tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.van-tab-btn { padding: 7px 18px; border-radius: 8px; border: 1px solid var(--border-primary); background: var(--bg-card); color: var(--text-secondary); cursor: pointer; font-size: 13px; }
.van-tab-btn.active { background: #1e3a5f; color: #60a5fa; border-color: #2563eb; }
.van-tab-content { display: none; }
.van-tab-content.active { display: block; }
.fleet-kpi-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.fleet-kpi { background: var(--bg-card); border: 1px solid var(--border-primary); border-radius: 10px; padding: 14px 20px; min-width: 140px; }
.fleet-kpi .kpi-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.fleet-kpi .kpi-val { font-size: 22px; font-weight: 700; }
.fleet-kpi .kpi-val.green { color: #4ade80; }
.fleet-kpi .kpi-val.red { color: #f87171; }
.fleet-kpi .kpi-val.blue { color: #38bdf8; }
.fleet-kpi .kpi-val.orange { color: #fb923c; }

/* Import panels */
.import-panel { background: var(--bg-card); border: 1px solid var(--border-primary); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.import-panel h4 { font-size: 14px; font-weight: 600; margin: 0 0 12px; color: var(--text-primary); }
.drop-zone { border: 2px dashed var(--border-primary); border-radius: 10px; padding: 30px; text-align: center; color: var(--text-secondary); cursor: pointer; transition: all .2s; }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--accent); color: var(--accent); background: var(--bg-hover); }
.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-item { background: var(--bg-hover); border-radius: 6px; padding: 8px 12px; font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
.file-item .fi-name { color: var(--text-primary); }
.file-item .fi-status { font-size: 11px; }
.fi-ok { color: #4ade80; }
.fi-err { color: #f87171; }
.fi-proc { color: #fbbf24; }
.progress-bar-wrap { background: var(--bg-hover); border-radius: 4px; height: 6px; margin-top: 8px; overflow: hidden; }
.progress-bar-inner { height: 100%; background: var(--brand-gradient); transition: width .3s; }
.unknown-vin-row { background: #451a03; }
.unknown-vin-row td { color: #fdba74; }

/* Month header group */
.month-group-th { border-left: 1px solid #334155; }

/* ═══════════════════════════════════════════════════════════
   LIGHT MODE — Overrides para elementos con style inline
   (el HTML usa muchos estilos inline, los sobreescribimos aquí)
═══════════════════════════════════════════════════════════ */

/* Fondos oscuros → blanco */
[data-theme="light"] [style*="background:#0d1a2e"],
[data-theme="light"] [style*="background:#111d2e"],
[data-theme="light"] [style*="background:#0c1222"],
[data-theme="light"] [style*="background:#0f172a"],
[data-theme="light"] [style*="background:#1e293b"],
[data-theme="light"] [style*="background:#1a2535"],
[data-theme="light"] [style*="background:#0a1020"],
[data-theme="light"] [style*="background:#060a14"],
[data-theme="light"] [style*="background:#080d18"],
[data-theme="light"] [style*="background:#0f1117"],
[data-theme="light"] [style*="background:#0e1525"],
[data-theme="light"] [style*="background:#142038"],
[data-theme="light"] [style*="background:#0a0e1a"],
[data-theme="light"] [style*="background:#13151f"],
[data-theme="light"] [style*="background:#1e2235"] { background: #ffffff !important; }

[data-theme="light"] [style*="background:#7f1d1d33"] { background: #fef2f2 !important; }
[data-theme="light"] [style*="background:#0e2a4a"] { background: #f0f7ff !important; }
[data-theme="light"] [style*="background:#1a2744"] { background: #f8fafc !important; }

/* Bordes */
[data-theme="light"] [style*="border:1px solid #1e2d45"],
[data-theme="light"] [style*="border:1px solid #1a2744"],
[data-theme="light"] [style*="border:1px solid #0e2a4a"],
[data-theme="light"] [style*="border:1px solid #1f2535"],
[data-theme="light"] [style*="border:1px solid #3b4d6a"],
[data-theme="light"] [style*="border:1px solid #2d4060"] { border-color: #e2e8f0 !important; }
[data-theme="light"] [style*="border:2px solid #2d4060"] { border-color: #e2e8f0 !important; }
[data-theme="light"] [style*="border-bottom:1px solid #1a2535"],
[data-theme="light"] [style*="border-bottom:1px solid #0e2a4a"],
[data-theme="light"] [style*="border-bottom:1px solid #0e1525"],
[data-theme="light"] [style*="border-bottom:1px solid #1f2535"],
[data-theme="light"] [style*="border-bottom:2px solid #0e2a4a"] { border-bottom-color: #e2e8f0 !important; }
[data-theme="light"] [style*="border-right:1px solid #0e2a4a"],
[data-theme="light"] [style*="border-right:1px solid #1a2744"],
[data-theme="light"] [style*="border-right:1px solid #1f2535"] { border-right-color: #e2e8f0 !important; }
[data-theme="light"] [style*="border-top:1px solid #1f2535"] { border-top-color: #e2e8f0 !important; }

/* Texto claro → oscuro */
[data-theme="light"] [style*="color:#e2e8f0"],
[data-theme="light"] [style*="color:#f1f5f9"],
[data-theme="light"] [style*="color:#cbd5e1"],
[data-theme="light"] [style*="color:#e0e8f4"],
[data-theme="light"] [style*="color:#c8d6e5"] { color: #1a1f35 !important; }

/* Texto gris → gris más oscuro */
[data-theme="light"] [style*="color:#94a3b8"],
[data-theme="light"] [style*="color:#64748b"],
[data-theme="light"] [style*="color:#5a7a9a"],
[data-theme="light"] [style*="color:#7a8ba8"],
[data-theme="light"] [style*="color:#475569"] { color: #64748b !important; }
[data-theme="light"] [style*="color:#374151"] { color: #94a3b8 !important; }

/* Accent cyan → azul corporativo */
[data-theme="light"] [style*="color:#00d4ff"],
[data-theme="light"] [style*="color:#0091c3"] { color: #0077a8 !important; }
[data-theme="light"] [style*="color:#60a5fa"] { color: #2563eb !important; }

/* Topbar en light */
[data-theme="light"] .topbar { background: #ffffff !important; border-bottom-color: #e2e8f0 !important; }

/* Modal en light */
[data-theme="light"] .modal { background: #ffffff !important; border-color: #e2e8f0 !important; box-shadow: 0 4px 24px rgba(0,0,0,0.12) !important; }
[data-theme="light"] .modal-bg { background: rgba(0,0,0,0.3) !important; }

/* Inputs en light */
[data-theme="light"] .inp { background: #ffffff !important; border-color: #e2e8f0 !important; color: #1a1f35 !important; }
[data-theme="light"] .inp:focus { border-color: #0077a8 !important; box-shadow: 0 0 0 3px rgba(0,119,168,0.12) !important; }

/* Botones en light */
[data-theme="light"] .btn-ghost { border-color: #e2e8f0 !important; color: #64748b !important; background: #ffffff !important; }
[data-theme="light"] .btn-ghost:hover { background: #f1f5f9 !important; color: #0077a8 !important; }

/* Tabla en light */
[data-theme="light"] .tbl th { background: #f8fafc !important; color: #0077a8 !important; border-bottom-color: #e2e8f0 !important; }
[data-theme="light"] .tbl td { border-bottom-color: #f1f5f9 !important; color: #1a1f35 !important; }
[data-theme="light"] .tbl tr:hover td { background: #f8fafc !important; }

/* Scrollbar en light */
[data-theme="light"] ::-webkit-scrollbar-track { background: #f8fafc !important; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #cbd5e1 !important; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #94a3b8 !important; }

/* Login en light */
[data-theme="light"] #login-screen .login-bg { background: linear-gradient(135deg, #e8f4f8 0%, #d0eaf4 40%, #d0ede0 70%, #e8f4f0 100%) !important; }
[data-theme="light"] #login-screen .login-bg::after { background: radial-gradient(ellipse, rgba(0,145,195,0.12) 0%, transparent 70%) !important; }
[data-theme="light"] .login-card { background: rgba(255,255,255,0.95) !important; border-color: rgba(0,145,195,0.2) !important; box-shadow: 0 4px 24px rgba(0,0,0,0.1) !important; }
[data-theme="light"] .login-footer { color: #94a3b8 !important; }

/* Flota en light */
[data-theme="light"] .flota-grid th { background: #f1f5f9 !important; color: #64748b !important; }
[data-theme="light"] .flota-grid td.col-plate { background: #ffffff !important; color: #1a1f35 !important; }
[data-theme="light"] .flota-grid tr:hover td { background: #f8fafc !important; }
[data-theme="light"] .flota-grid td { border-bottom-color: #f1f5f9 !important; }
[data-theme="light"] .drop-zone { border-color: #e2e8f0 !important; background: #fafbfc !important; }
[data-theme="light"] .drop-zone:hover { border-color: #0077a8 !important; background: #f0f7ff !important; }
[data-theme="light"] .import-panel { background: #ffffff !important; border-color: #e2e8f0 !important; }
[data-theme="light"] .van-tab-btn { background: #ffffff !important; border-color: #e2e8f0 !important; color: #64748b !important; }

/* ── Panel de Notas de Revisión ── */
.notas-textarea {
  width: 100%;
  background: #0d1520;
  border: 1px solid #1e2d45;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  padding: 12px;
  resize: vertical;
  min-height: 90px;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.15s;
}
.notas-textarea:focus {
  outline: none;
  border-color: #2563eb;
}
.notas-nota-card {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: #111d2e;
  border: 1px solid #1e2d45;
  border-radius: 12px;
  transition: border-color 0.15s;
}
.notas-nota-card:hover {
  border-color: #2d3f5a;
}
