/* StockMaster — tokens semánticos (default: tema oscuro). El modo claro redefine --sm-* en theme-light.css */
:root {
  --sm-bg-root: #0f172a;
  --sm-bg-surface: #111b2d;
  --sm-bg-raised: #26354a;
  --sm-bg-sunken: #1e293b;
  --sm-bg-hover: rgba(255, 255, 255, 0.06);

  --sm-border-soft: rgba(248, 250, 252, 0.08);
  --sm-border-medium: rgba(248, 250, 252, 0.14);
  --sm-border-strong: rgba(248, 250, 252, 0.22);

  --sm-text-primary: #f8fafc;
  --sm-text-secondary: #cbd5e1;
  --sm-text-muted: #94a3b8;
  --sm-text-disabled: #64748b;
  --sm-text-on-inverse: #f8fafc;

  --sm-accent: #1e3a5f;
  --sm-accent-hover: #2563a8;
  --sm-accent-soft: rgba(30, 58, 95, 0.18);
  --sm-accent-border: rgba(30, 58, 95, 0.4);

  --rojo: #e11d48;
  --sm-blue: #3b82f6;
  --sm-blue-soft: rgba(59, 130, 246, 0.15);
  --sm-blue-border: rgba(59, 130, 246, 0.35);

  --sm-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --sm-shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --sm-shadow-md: 0 8px 22px rgba(0, 0, 0, 0.38);
  --sm-shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.42);
  --sm-shadow-xl: 0 22px 44px rgba(0, 0, 0, 0.48);

  --sm-ring-blue: 0 0 0 3px rgba(59, 130, 246, 0.28);
  --sm-ring-red: 0 0 0 3px rgba(225, 29, 72, 0.28);

  --sm-fw-body: 400;
  --sm-fw-label: 500;
  --sm-fw-kpi: 600;
  --sm-fw-heading: 700;

  /* Tarjetas escritorio (profundidad sin depender de tokens legacy) */
  --sm-desk-card-a: rgba(12, 28, 52, 0.9);
  --sm-desk-card-b: rgba(10, 22, 42, 0.94);
  --sm-desk-border-soft: rgba(96, 165, 250, 0.2);
  --sm-desk-border-strong: rgba(225, 29, 72, 0.34);
  --sm-desk-text-soft: #b8c8dd;
}

    .hidden {
  display: none !important;
}

/* Rango de precio inventario: acentos coherentes con tokens */
input.inv-pr-min {
  accent-color: var(--sm-accent);
}
input.inv-pr-max {
  accent-color: var(--sm-blue);
}
    /* --- ESTILOS MODERNOS PARA BOTONES --- */
    .btn-mini, .btn-submit {
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
      cursor: pointer;
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
    }

    .btn-mini:hover, .btn-submit:hover {
      transform: translateY(-2px);
      filter: brightness(1.1);
      box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }

    .btn-mini:active, .btn-submit:active {
      transform: translateY(0);
      filter: brightness(0.9);
    }

/* Botón WhatsApp moderno y visible */
.btn-whatsapp-modern,
.btn-whatsapp-metal {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.24), transparent 28%),
    linear-gradient(135deg, #0b5f3a 0%, #17995a 42%, #35d47a 68%, #0f6d43 100%) !important;
  color: white !important;
  border: 1px solid rgba(134, 239, 172, 0.42) !important;
  border-radius: 12px !important;
  padding: 10px 18px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 -1px 0 rgba(0,0,0,0.22),
    0 10px 22px rgba(5, 46, 22, 0.42) !important;
  transition: all 0.3s ease !important;
}

.btn-whatsapp-modern:hover,
.btn-whatsapp-metal:hover {
  transform: translateY(-2px) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.32),
    inset 0 -1px 0 rgba(0,0,0,0.22),
    0 14px 28px rgba(5, 46, 22, 0.48) !important;
  filter: saturate(1.08) brightness(1.06) !important;
}

.btn-whatsapp-modern:active,
.btn-whatsapp-metal:active {
  transform: translateY(1px) !important;
}

.home-refresh-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.home-refresh-btn {
  min-height: 38px !important;
  padding: 8px 14px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(148,163,184,0.22) !important;
  color: #f8fafc !important;
  font-size: 11px !important;
  font-family: 'Oswald', sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: 0.055em !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.38);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 10px 20px rgba(2,6,23,0.34) !important;
}

.home-refresh-btn--sep {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(135deg, #5a3a03, #a16207 58%, #d97706) !important;
  border-color: rgba(251,191,36,0.34) !important;
}

.home-refresh-btn--conduce {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(135deg, #12345f, #1d4ed8 58%, #3b82f6) !important;
  border-color: rgba(96,165,250,0.36) !important;
}

.home-refresh-btn--inventario {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(135deg, #34155f, #5b21b6 58%, #8b5cf6) !important;
  border-color: rgba(196,181,253,0.34) !important;
}

.home-refresh-btn:hover {
  filter: brightness(1.08) saturate(1.08);
}

.btn-whatsapp-chip {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.18), transparent 32%),
    linear-gradient(135deg, rgba(11,95,58,0.96), rgba(23,153,90,0.96)) !important;
  color: #dcfce7 !important;
  border-color: rgba(134,239,172,0.34) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 6px 14px rgba(5,46,22,0.24) !important;
}

/* Sistema visual unificado */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-sizing: border-box;
  min-height: 52px;
  padding: 8px 14px;
  background:
    linear-gradient(90deg, rgba(225,29,72,0.18), transparent 30%),
    linear-gradient(180deg, rgba(15,23,42,0.96), rgba(2,6,23,0.98)) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.36);
  position: relative;
  width: 100%;
  left: 0;
  overflow: visible;
  border-radius: 0 0 14px 14px;
  animation: headerNeonPulse 4s ease-in-out infinite;
}
.header .logo-container {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  font-weight: 900;
  font-size: clamp(1.15rem, 2.6vw, 1.65rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f8fafc;
  text-shadow: 0 0 14px rgba(14, 165, 233, 0.16);
}
.header .logo-container img {
  height: 36px;
  max-height: 36px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 8px rgba(59,130,246,0.35));
}
.header .logo-stock {
  color: #fb7185;
  text-shadow: 0 0 16px rgba(251, 113, 133, 0.28);
}
.header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(225,29,72,0.45), rgba(225,29,72,0.1), transparent 65%);
  box-shadow: 0 0 12px rgba(225,29,72,0.45);
}

.header::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(
    90deg,
    rgba(59,130,246,0.55) 0%,
    rgba(147,197,253,0.20) 40%,
    rgba(59,130,246,0.06) 60%,
    rgba(59,130,246,0.45) 100%
  );
  background-size: 250% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: headerBorderDrift 5s linear infinite;
}

@keyframes headerNeonPulse {
  0%, 100% {
    box-shadow:
      0 0 9px 1px rgba(59,130,246,0.13),
      0 0 24px 4px rgba(59,130,246,0.06),
      0 12px 28px rgba(2, 6, 23, 0.36);
  }
  50% {
    box-shadow:
      0 0 15px 2px rgba(59,130,246,0.20),
      0 0 42px 8px rgba(59,130,246,0.09),
      0 12px 28px rgba(2, 6, 23, 0.36);
  }
}

@keyframes headerBorderDrift {
  0% { background-position: 0%; }
  100% { background-position: 250%; }
}

/* ── NUEVA BARRA DE MENÚ ─────────────────────────────────── */
.menu {
  gap: 6px;
  padding: 8px 10px 10px;
  background: rgba(8, 14, 26, 0.97) !important;
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 1px 0 rgba(255,255,255,0.02), 0 4px 24px rgba(0,0,0,0.4);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.menu button,
.drawer-content button,
.admin-menu-button {
  background: transparent !important;
  border: none !important;
  border-radius: 10px !important;
  color: #64748b !important;
  padding: 8px 13px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s, transform 0.1s !important;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.menu button:hover {
  background: rgba(255,255,255,0.06) !important;
  color: #cbd5e1 !important;
  transform: none !important;
}

.menu button.active,
.drawer-content button.active {
  color: #f8fafc !important;
  background: rgba(225,29,72,0.22) !important;
  border: 1px solid rgba(225,29,72,0.34) !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 20px rgba(225,29,72,0.18) !important;
}

.menu button.active::after {
  display: none;
}
.menu button.menu-perm-unlocked::before {
  content: '';
  position: absolute;
  top: 4px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(2,6,23,0.75);
}

.menu-btn-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
}

.menu-btn-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Separador visual entre grupos de botones */
.menu .menu-sep {
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,0.06);
  margin: 0 2px;
  align-self: center;
  flex-shrink: 0;
}

.dropdown-admin {
  position: relative;
  display: inline-block;
}

.admin-shortcut-btn {
  background: linear-gradient(135deg, rgba(37,99,235,0.92), rgba(29,78,216,0.92)) !important;
  color: #eff6ff !important;
  border: 1px solid rgba(96,165,250,0.28) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.26);
}

.admin-shortcut-btn:hover {
  background: linear-gradient(135deg, rgba(59,130,246,0.96), rgba(37,99,235,0.96)) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.3);
}

.admin-dropdown-section-title {
  padding: 5px 8px 3px;
  margin-bottom: 2px;
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.admin-dropdown-section-title--ops { color: #fb923c; }
.admin-dropdown-section-title--sales { color: #4ade80; }
.admin-dropdown-section-title--inventory { color: #c4b5fd; }
.admin-dropdown-section-title--system { color: #60a5fa; }

.admin-dropdown-divider {
  height: 1px;
  margin: 6px 0;
  background: rgba(255,255,255,0.07);
}

.container {
  max-width: 1240px !important;
  padding: 18px 18px 42px !important;
}

.section {
  padding-top: 6px;
}

.section-hero {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 20px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,0.15), transparent 28%),
    linear-gradient(135deg, rgba(15,23,42,0.96), rgba(30,41,59,0.98)) !important;
  box-shadow: 0 24px 40px rgba(2, 6, 23, 0.28);
}

.section-hero::after {
  content: '';
  position: absolute;
  inset: auto -40px -40px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 68%);
  pointer-events: none;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fbbf24;
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.18);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.section-hero-title {
  margin: 0 0 10px 0;
  border: none !important;
  padding: 0 !important;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  color: #fff;
  line-height: 1.04;
}

.section-hero-copy {
  margin: 0;
  max-width: 760px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.7;
}

.surface-card,
.dashboard-card,
.section .card {
  background:
    linear-gradient(180deg, rgba(30,41,59,0.94), rgba(15,23,42,0.98)) !important;
  border: 1px solid rgba(148,163,184,0.12) !important;
  border-radius: 22px !important;
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.22);
}

.section .card:hover {
  border-color: rgba(59,130,246,0.24) !important;
  box-shadow: 0 24px 42px rgba(2, 6, 23, 0.3);
}

.stat-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 18px !important;
  text-align: left !important;
  border-radius: 20px !important;
  border-bottom: none !important;
  background:
    linear-gradient(180deg, rgba(20,33,61,0.96), rgba(15,23,42,0.98)) !important;
  box-shadow: 0 16px 28px rgba(2, 6, 23, 0.24);
  position: relative;
  overflow: hidden;
}

.stat-num {
  font-size: clamp(1.7rem, 3vw, 2.25rem) !important;
  line-height: 1 !important;
  font-family: 'Oswald', sans-serif;
  animation: kpiPop 0.45s ease both;
}

.stat-lab {
  font-size: 10px !important;
  letter-spacing: 0.12em;
  color: #94a3b8 !important;
}
.stat-card::before {
  content: '↗';
  position: absolute;
  top: 10px;
  right: 12px;
  color: rgba(148,163,184,0.55);
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
}
.stat-card::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(59,130,246,0.9), rgba(34,197,94,0.8));
  opacity: 0.85;
}
@keyframes kpiPop {
  from { transform: translateY(3px); opacity: 0.55; }
  to { transform: translateY(0); opacity: 1; }
}

.search-box,
.form-control,
.sel-filter,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
  border-radius: 14px !important;
  border: 1px solid rgba(148,163,184,0.16) !important;
  background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(30,41,59,0.94)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.section-filters,
.section-filters-transito,
.filter-row,
.filter-row-prov {
  background: rgba(15,23,42,0.55);
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 18px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  position: relative;
  z-index: 2;
}

.filter-row,
.filter-row-prov {
  margin-bottom: 12px;
}

.filter-row-prov {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px;
  align-items: center;
}

@media (max-width: 700px) {
  .filter-row-prov {
    grid-template-columns: 1fr;
  }
}

.btn-submit {
  border-radius: 14px !important;
  padding: 13px 16px !important;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.24);
}

.info-grid {
  gap: 10px !important;
}

.info-item {
  border-radius: 14px !important;
  padding: 10px 12px !important;
  background: rgba(15,23,42,0.62) !important;
  border: 1px solid rgba(148,163,184,0.1) !important;
}

#dashboard-acciones-top .btn-submit {
  min-width: 156px;
}

.home-view-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(2,6,23,0.5);
  border: 1px solid rgba(148,163,184,0.14);
}

.home-view-toggle button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  padding: 7px 10px;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
  font-family: Oswald, sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.home-view-toggle button.active {
  color: #fff;
  background: linear-gradient(135deg, #1e3a5f, #3b82f6);
  box-shadow: 0 10px 22px rgba(37,99,235,0.18);
}

.home-hierarchy-panel {
  margin-bottom: 20px;
  overflow: hidden;
}

.home-hierarchy-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.home-hierarchy-summary > span:first-child {
  display: grid;
  gap: 3px;
}

.home-report-subtitle {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.home-hierarchy-summary::-webkit-details-marker {
  display: none;
}

.home-hierarchy-summary::after {
  content: '+';
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  color: #94a3b8;
  font-family: Oswald, sans-serif;
  font-size: 14px;
}

.home-hierarchy-panel[open] .home-hierarchy-summary::after {
  content: '-';
}

.home-hierarchy-total {
  margin-left: auto;
  color: #cbd5e1;
  font-family: Oswald, sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.home-hierarchy-content {
  padding: 0 16px 16px;
}

.home-report-search-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 8px;
  margin-bottom: 12px;
}

.home-report-export-main {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(225,29,72,.92), rgba(190,18,60,.92)) !important;
  border-color: rgba(244,63,94,.42) !important;
}

.home-hierarchy-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

.home-report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.home-report-view-toggle,
.home-report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.home-report-actions {
  align-items: center;
}

.home-report-filters-summary {
  color: #94a3b8;
  font-size: 11px;
}

.home-report-view-toggle button {
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(15,23,42,.72);
  color: #94a3b8;
  border-radius: 10px;
  padding: 7px 11px;
  cursor: pointer;
}

.home-report-view-toggle button.active {
  color: #e2e8f0;
  border-color: rgba(96,165,250,.38);
  background: rgba(37,99,235,.18);
}

.home-report-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.home-report-kpi {
  border: 1px solid rgba(148,163,184,.14);
  background: rgba(15,23,42,.58);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}

.home-report-kpi:hover {
  border-color: rgba(96,165,250,.35);
  background: rgba(30,41,59,.72);
  transform: translateY(-1px);
}

.home-report-kpi b {
  display: block;
  font-family: Oswald, sans-serif;
  font-size: 20px;
  color: #f8fafc;
}

.home-report-kpi span {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  margin-top: 2px;
}

.home-report-table-wrap {
  overflow: auto;
  border: 1px solid rgba(148,163,184,.14);
  border-radius: 12px;
}

.home-report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.home-report-table th,
.home-report-table td {
  padding: 10px 11px;
  border-bottom: 1px solid rgba(148,163,184,.10);
  text-align: left;
  font-size: 12px;
}

.home-report-table th {
  position: sticky;
  top: 0;
  background: #0f172a;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 10px;
}

.home-report-table td {
  color: #e2e8f0;
}

.home-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-report-card {
  border: 1px solid rgba(148,163,184,.14);
  border-radius: 12px;
  background: rgba(15,23,42,.46);
  overflow: hidden;
}

.home-report-card h4 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148,163,184,.1);
  color: #e2e8f0;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.home-report-card .home-report-table {
  min-width: 0;
}

.home-report-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.home-report-note {
  color: #94a3b8;
  font-size: 11px;
}

@media (max-width: 900px) {
  .home-report-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-report-grid,
  .home-report-search-row {
    grid-template-columns: 1fr;
  }
}

.home-hierarchy-body {
  display: grid;
  gap: 8px;
}

.home-hierarchy-node {
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 12px;
  background: rgba(15,23,42,0.46);
  overflow: hidden;
}

.home-hierarchy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 9px 12px;
  color: #e2e8f0;
  font-family: Oswald, sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  list-style: none;
}

.home-hierarchy-row::-webkit-details-marker {
  display: none;
}

.home-hierarchy-row.level-marca {
  background: rgba(225,29,72,0.12);
  color: #fff;
}

.home-hierarchy-row.level-modelo {
  background: rgba(59,130,246,0.1);
}

.home-hierarchy-row.level-version {
  color: #cbd5e1;
}

.home-hierarchy-row.level-year {
  cursor: default;
  padding-left: 18px;
  background: rgba(2,6,23,0.28);
}

.home-hierarchy-count {
  min-width: 34px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #f8fafc;
  text-align: center;
}

.home-hierarchy-children {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.home-hierarchy-year-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f8fafc;
}

.home-hierarchy-year-meta small {
  color: #94a3b8;
  font-size: 10px;
}

.home-hierarchy-empty {
  padding: 18px;
  border: 1px dashed rgba(148,163,184,0.18);
  border-radius: 12px;
  color: #94a3b8;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 900px) {
  .home-hierarchy-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .home-hierarchy-summary {
    align-items: flex-start;
  }

  .home-hierarchy-filters {
    grid-template-columns: 1fr;
  }
}

.home-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  text-align: left;
}

.home-command-card {
  width: 100%;
  min-height: 68px;
  border: 1px solid rgba(148,163,184,0.14);
  border-radius: 12px;
  padding: 10px;
  background: #0f172a;
  color: #e2e8f0;
  cursor: pointer;
  text-align: left;
}

.home-command-card b {
  display: block;
  font-family: Oswald, sans-serif;
  font-size: 12px;
  color: #fff;
  margin-bottom: 5px;
}

.home-command-card span {
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.25;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-bottom-nav button {
  border: 0;
  background: transparent;
  color: #94a3b8;
  min-width: 0;
  min-height: 52px;
  padding: 6px 4px;
  border-radius: 12px;
  font-size: 10px;
  font-family: Oswald, sans-serif;
  letter-spacing: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.mobile-bottom-nav button .mob-icon {
  display: block;
  font-size: 20px;
  line-height: 1;
}

.mobile-bottom-nav button .mob-label {
  display: block;
  font-size: 10px;
  letter-spacing: .02em;
}

.mobile-bottom-nav button.active {
  color: #fff;
  background: rgba(37,99,235,0.18);
}

.inv-count-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: #94a3b8;
  font-family: Oswald, sans-serif;
  font-size: 11px;
  letter-spacing: .04em;
}

.inv-filter-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  border-radius: 999px;
  padding: 2px 6px;
  line-height: 1;
  font-family: Oswald, sans-serif;
}

.inv-empty-state {
  margin-top: 12px;
  border: 1px dashed rgba(148,163,184,0.3);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  background: rgba(15,23,42,0.45);
}
.inv-empty-state-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 8px;
  color: #64748b;
}
.inv-empty-state-title {
  font-family: Oswald, sans-serif;
  color: #e2e8f0;
  font-size: 16px;
  margin-bottom: 4px;
}
.inv-empty-state-sub {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}

mark.inv-mark {
  background: rgba(251,191,36,0.3);
  color: #fbbf24;
  border-radius: 3px;
  padding: 0 2px;
}

#sec-home.home-compact .dh-panel,
#sec-home.home-compact #admin-control-panel,
#sec-home.home-compact #panel-alertas-realtime,
#sec-home.home-compact #dh-drilldown {
  margin-bottom: 10px !important;
}

#sec-home.home-compact .dh-panel {
  padding: 12px !important;
}

#sec-home.home-compact .dh-panel-head {
  margin-bottom: 8px !important;
}

#sec-home.home-compact .dh-hero {
  padding: 14px !important;
  border-radius: 16px !important;
}

#sec-home.home-compact #dashboard-acciones-top {
  margin-top: 10px !important;
  gap: 6px !important;
}

#sec-home.home-compact .home-mesa-aprobaciones {
  padding: 12px 14px !important;
  margin-bottom: 14px !important;
  border-radius: 14px !important;
}

.home-stock-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 12px;
}

.home-stock-card {
  min-height: 104px;
  border: 1px solid rgba(148,163,184,0.13);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  color: #f8fafc;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15,23,42,0.96), rgba(2,6,23,0.92));
  box-shadow: 0 14px 30px rgba(2,6,23,0.24), inset 0 1px 0 rgba(255,255,255,0.035);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.home-stock-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--stock-accent, #3b82f6);
}

.home-stock-card::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  right: -48px;
  top: -52px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--stock-accent, #3b82f6) 16%, transparent);
  pointer-events: none;
}

.home-stock-card:hover {
  transform: translateY(-2px);
  background: linear-gradient(145deg, rgba(20,31,51,0.98), rgba(6,12,24,0.94));
  border-color: color-mix(in srgb, var(--stock-accent, #3b82f6) 42%, rgba(148,163,184,0.13));
}

.home-stock-card.nuevos {
  --stock-accent: #3b82f6;
}

.home-stock-card.nuevos .home-stock-card-icon {
  background: rgba(59,130,246,0.14);
  border-color: rgba(59,130,246,0.28);
  color: #93c5fd;
}

.home-stock-card.usados {
  --stock-accent: #e11d48;
}

.home-stock-card.usados .home-stock-card-icon {
  background: rgba(225,29,72,0.14);
  border-color: rgba(225,29,72,0.28);
  color: #fda4af;
}

.home-stock-card.registro {
  --stock-accent: #22c55e;
  min-height: 76px;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin: -2px 0 12px;
}

.home-stock-card.registro .home-stock-card-icon {
  background: rgba(34,197,94,0.14);
  border-color: rgba(34,197,94,0.28);
  color: #86efac;
}

.home-register-copy {
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

.home-register-action {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  color: #86efac;
  font-family: Oswald, sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.home-stock-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-stock-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--stock-accent, #3b82f6) 14%, rgba(15,23,42,0.9));
  border: 1px solid color-mix(in srgb, var(--stock-accent, #3b82f6) 26%, rgba(148,163,184,0.12));
  color: color-mix(in srgb, var(--stock-accent, #3b82f6) 58%, #fff);
  font-family: Oswald, sans-serif;
  font-size: 16px;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}

.home-stock-card-arrow {
  color: #64748b;
  font-size: 20px;
  position: relative;
  z-index: 1;
}

.home-stock-card-title {
  margin-top: 12px;
  font-family: Oswald, sans-serif;
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: 1;
  display: block;
  position: relative;
  z-index: 1;
}

.home-stock-card-sub {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.25;
  display: block;
  position: relative;
  z-index: 1;
}

.home-stock-card-count {
  font-family: Oswald, sans-serif;
  font-size: 24px;
  line-height: 1;
  color: #f8fafc;
  position: relative;
  z-index: 1;
}

.home-stock-card-count small {
  color: #64748b;
  font-size: 10px;
  letter-spacing: 0.06em;
  margin-left: 3px;
  text-transform: uppercase;
}

#sec-home.home-compact .home-stock-shortcuts {
  margin: 8px 0 10px;
  gap: 8px;
}

#sec-home.home-compact .home-stock-card {
  min-height: 92px;
  padding: 11px;
}

#sec-home.home-compact .home-stock-card.registro {
  min-height: 68px;
}

#dashboard-prioridades .card,
#dashboard-accesos .card,
#dashboard-rol-kpis .card {
  min-height: 158px;
}

.home-role-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.home-role-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.home-ops-mesas,
.home-ops-secciones {
  grid-column: 1 / -1;
}

.home-ops-mesas {
  border: 1px solid rgba(45, 212, 191, 0.2);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.72), rgba(8, 13, 24, 0.72));
  border-radius: 16px;
  padding: 14px;
}

.home-ops-mesas-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.home-ops-mesas-head span {
  font-family: 'Oswald', sans-serif;
  color: #f8fafc;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.home-ops-mesas-head small {
  color: #94a3b8;
  font-size: 12px;
}

.home-ops-mesas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
}

.home-ops-secciones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

#dashboard-rol-detalle .card {
  min-height: 230px;
}

.home-ops-mesas #dashboard-rol-detalle .card,
.home-ops-mesas .card {
  min-height: 0;
}

#dashboard-ventas-mes-lista .venta-row {
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

#dashboard-ventas-mes-lista .venta-row:first-child {
  border-top: none;
}

#dashboard-ventas-mes-lista .venta-fecha {
  background: rgba(34,197,94,0.12);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.16);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
}

#dashboard-ventas-mes-resumen {
  line-height: 1.6;
}

.dashboard-hero-shell {
  padding: 20px !important;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(225,29,72,0.18), rgba(59,130,246,0.14) 55%, rgba(15,23,42,0.96)) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  overflow: hidden;
  position: relative;
}

.dashboard-hero-glow {
  position: absolute;
  inset: auto -40px -50px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(251,191,36,0.16), transparent 68%);
  pointer-events: none;
}

.dashboard-hero-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
}

.dashboard-hero-copy-shell {
  max-width: 620px;
}

.dashboard-priority-card {
  min-width: 220px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,23,42,0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.dashboard-priority-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 8px;
}

.dashboard-priority-value {
  font-family: 'Oswald', sans-serif;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
}

.dashboard-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  position: relative;
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.dashboard-summary-card {
  border-width: 1px !important;
  border-style: solid !important;
}

.dashboard-summary-card.is-clickable {
  cursor: pointer;
}

.dashboard-summary-label {
  display: block;
}

.dashboard-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-grid.priorities {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-grid.access {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.dashboard-grid.kpis {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dashboard-grid.detail {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dashboard-card-soft {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.08);
}

.dashboard-card-soft-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.dashboard-card-soft-value {
  font-family: 'Oswald', sans-serif;
  font-size: 30px;
  line-height: 1;
  margin: 10px 0 8px;
}

.dashboard-card-soft-copy {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.55;
}

.dashboard-card-link {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(59,130,246,0.18);
}

.dashboard-card-link-title {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  color: #fff;
  margin-bottom: 8px;
}

.dashboard-card-link-copy {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 12px;
}

.dashboard-action-btn {
  width: auto !important;
  min-width: 150px;
  padding: 10px 16px !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

.dashboard-link-btn {
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #1d4ed8, #0f766e) !important;
}

.vehicle-card-extra-meta {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.vehicle-card-extra-meta-item {
  font-size: 11px;
  color: var(--sm-text-secondary);
  line-height: 1.45;
}

.vehicle-card-shell {
  display: grid;
  gap: 14px;
}

.vehicle-card-header {
  width: 100%;
  padding-right: 0;
}

.vehicle-card-header-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.vehicle-card-header-left {
  flex: 1;
  min-width: 0;
}

.vehicle-card-header-aside {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  flex-shrink: 0;
}

.vehicle-card-meta-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  text-align: right;
}

.vehicle-card-tipo-chip {
  font-size: 10px !important;
  letter-spacing: 0.08em !important;
  padding: 4px 10px !important;
}

.vehicle-card-year-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 14px;
  border-radius: 12px;
  background: var(--sm-bg-surface);
  color: #fff;
  font-family: Oswald, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.vehicle-card-dias-wrap {
  display: flex;
  justify-content: flex-end;
}

.vehicle-card-dias-wrap .vehicle-card-dias-badge {
  margin: 0;
}

.vehicle-card-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  min-height: 28px;
}

.vehicle-card-title {
  margin: 0;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  line-height: 1.12;
}

.vehicle-card-marca {
  font-family: Oswald, sans-serif;
  font-size: clamp(1.28rem, 2.6vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #f8fafc;
}

.vehicle-card-modelo {
  font-family: Oswald, sans-serif;
  font-size: clamp(1.28rem, 2.6vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.card-professional h3.vehicle-card-title {
  margin-top: 0 !important;
  margin-bottom: 4px !important;
}

.vehicle-card-version {
  font-size: 14px;
  font-weight: 800;
  color: #f1f5f9;
  border-left: 4px solid var(--rojo);
  padding-left: 10px;
  margin-top: 8px;
  letter-spacing: 0.02em;
}

/* Menú ⋮: solo en la franja de acciones (misma fila / grid que WhatsApp, Conduce, etc.) */
.vehicle-card-quick-actions--footer {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  flex: 1 1 140px;
  min-width: 0;
  padding-top: 0;
}

.vehicle-card-actions-main .vehicle-card-quick-actions--footer .admin-menu-container {
  display: flex;
  width: 100%;
  min-width: 0;
  flex: 1 1 auto !important;
}

.vehicle-card-actions-main .vehicle-card-quick-actions--footer .admin-menu-button.card-menu-trigger {
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: 1 1 auto;
  min-height: 44px;
  border-radius: 12px !important;
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
  color: #e2e8f0 !important;
}

.vehicle-card-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* Solo menús flotantes en cabecera (si reaparecen): alinear arriba */
.vehicle-card-quick-actions:not(.vehicle-card-quick-actions--footer) {
  align-self: flex-start;
  padding-top: 1px;
}

.vehicle-card-quick-actions .btn-mini,
.vehicle-card-quick-actions .admin-menu-container {
  flex: 0 0 auto;
}

.vehicle-card-actions-main > .vehicle-card-quick-actions--footer {
  align-self: stretch;
}

.vehicle-card-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.vehicle-card-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.vehicle-card-highlight {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.14);
  background: rgba(15,23,42,0.52);
}

.vehicle-card-highlight-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 4px;
}

.vehicle-card-highlight-value {
  display: block;
  font-size: 13px;
  color: #f8fafc;
  font-weight: 700;
  line-height: 1.4;
}

.vehicle-card-detail-box {
  background: rgba(15,23,42,0.56);
  border: 1px solid rgba(148,163,184,0.14);
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.55;
  color: #e2e8f0;
}

.vehicle-card-detail-box strong {
  color: #f8fafc;
}

.vehicle-card-price {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin-top: 15px;
  background: rgba(255,255,255,0.05);
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--sm-border-medium);
}

.vehicle-card-price-main {
  flex: 1;
  min-width: 0;
}

.vehicle-card-price-label {
  display: block;
  font-size: 9px;
  color: var(--sm-text-secondary);
  font-family: 'Oswald';
  letter-spacing: 0.08em;
}

.vehicle-card-price-value {
  display: block;
  font-size: 24px;
  font-family: 'Oswald';
  font-weight: 700;
  color: #22c55e;
  text-shadow: 0 0 12px rgba(34,197,94,0.28);
  line-height: 1.1;
}

.vehicle-card-disclaimer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 10px;
  color: #fecaca;
  font-weight: 700;
}

.vehicle-card-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 220px;
}

.vehicle-card-actions-note {
  font-size: 9px;
  color: var(--naranja);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: rgba(251, 191, 36, 0.12);
  padding: 5px 8px;
  border-radius: 999px;
  text-align: center;
}

.vehicle-card-actions-main,
.vehicle-card-actions-side {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vehicle-card-actions-main .btn-mini,
.vehicle-card-actions-main .btn-submit {
  flex: 1 1 140px;
}

/* Botones de acción rápidos dentro de cada tarjeta */
.btn-action-card {
  min-height: 44px;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn-action-card .btn-action-icon {
  font-size: 15px;
  line-height: 1;
}

.btn-action-card .btn-action-label {
  font-size: 11px;
  font-family: 'Oswald';
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}

.btn-action-card:focus-visible {
  outline: 2px solid rgba(255,255,255,0.65);
  outline-offset: 1px;
  box-shadow: 0 0 0 2px rgba(15,23,42,0.75), 0 10px 24px rgba(0,0,0,0.35) !important;
}

.btn-action-card.btn-action-critical {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563a8 100%) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
}

.btn-action-card.btn-action-attention {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
  color: #eef2ff !important;
  border: 1px solid rgba(129, 140, 248, 0.45) !important;
}

.btn-action-card.btn-action-success {
  background: linear-gradient(135deg, #0ea5a3 0%, #22c55e 100%) !important;
  color: #ecfdf5 !important;
  border: 1px solid rgba(74, 222, 128, 0.45) !important;
}

.btn-action-card.btn-action-neutral {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
}

.vehicle-card-actions-side {
  justify-content: flex-end;
}

.vehicle-card-actions-side .admin-menu-container {
  margin-left: auto;
}

.btn-icon {
  min-width: 42px;
  min-height: 42px;
  padding: 10px !important;
  border-radius: 12px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-round {
  border-radius: 999px !important;
}

.btn-info-soft {
  background: #3b82f6 !important;
}

.btn-success-soft {
  background: #10b981 !important;
  box-shadow: 0 4px 6px rgba(16,185,129,0.3) !important;
}

.btn-primary-soft {
  background: var(--naranja) !important;
}

.btn-secondary-soft {
  background: #3b82f6 !important;
}

.btn-tertiary-soft {
  background: #8b5cf6 !important;
}

.btn-success-solid {
  background: var(--verde) !important;
}

.btn-ghost-soft {
  background: rgba(15,23,42,0.8) !important;
  border: 1px solid rgba(148,163,184,0.16) !important;
  color: #e2e8f0 !important;
  box-shadow: none !important;
}

.status-pill-note {
  color: var(--naranja);
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--naranja);
  border-radius: 10px;
  width: 100%;
  text-align: center;
  background: rgba(249,115,22,0.08);
}

.card-professional {
  position: relative;
  overflow: visible;
  padding: 18px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(148,163,184,0.14) !important;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,0.08), transparent 28%),
    linear-gradient(180deg, rgba(30,41,59,0.96), rgba(15,23,42,0.98)) !important;
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.24);
  animation: cardFadeUp 280ms ease both;
}

.card-professional::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--status-accent, rgba(59,130,246,0.9)), rgba(15,23,42,0.68));
  opacity: 0.75;
}

#lista-transito .card {
  animation: cardFadeUp 280ms ease both;
}

@keyframes cardFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-professional h3:not(.vehicle-card-title) {
  font-size: 22px;
  line-height: 1.06;
  letter-spacing: 0.01em;
}

.card-professional .info-grid {
  margin-top: 12px;
}

.card-professional .info-item {
  background: rgba(15,23,42,0.72) !important;
  border-color: rgba(148,163,184,0.14) !important;
}

.card-professional .tag-accion {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.card-menu-trigger {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 14px !important;
  padding: 0 !important;
  font-size: 20px;
}

.card-professional.menu-open,
.card.menu-open {
  overflow: visible !important;
  z-index: 99990 !important;
  isolation: isolate;
}

.admin-menu-container.menu-open {
  z-index: 99999 !important;
}

.card-professional .admin-menu-dropdown,
.card .admin-menu-dropdown {
  /* Posición controlada por JS con fixed — no usar !important aquí */
  min-width: 230px;
  max-height: min(70vh, 420px);
  overflow-y: auto;
}

#lista-transito,
.transito-grupo,
.brand-group {
  overflow: visible !important;
}

#lista-transito .card.menu-open,
.transito-grupo .card.menu-open,
.brand-group .card.menu-open {
  position: relative;
  overflow: visible !important;
  z-index: 99990 !important;
}

.notas-toggle {
  cursor: pointer;
  background: rgba(15,23,42,0.56);
  border: 1px solid rgba(148,163,184,0.12);
  padding: 10px 12px;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.notas-toggle-label {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
}

.notas-toggle-arrow {
  color: #94a3b8;
  font-size: 12px;
}

.notas-panel {
  background: rgba(2,6,23,0.28);
  border: 1px solid rgba(148,163,184,0.08);
  padding: 10px;
  border-radius: 0 0 14px 14px;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .dashboard-hero-layout {
    flex-direction: column;
  }

  .dashboard-priority-card {
    width: 100%;
    min-width: 0;
  }

  .dashboard-actions-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-action-btn,
  .dashboard-link-btn {
    width: 100% !important;
    min-width: 0;
  }

  .dashboard-summary-grid,
  .dashboard-grid.priorities,
  .dashboard-grid.access,
  .dashboard-grid.kpis,
  .dashboard-grid.detail {
    grid-template-columns: 1fr;
  }

  .vehicle-card-price {
    flex-direction: column;
    align-items: stretch;
  }

  .vehicle-card-actions {
    min-width: 0;
  }

  /* Encabezado: identificación fuerte a la izquierda; tipo + año + días a la derecha */
  .vehicle-card-header-body {
    align-items: flex-start;
    gap: 10px;
  }

  .vehicle-card-header-aside {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  .vehicle-card-quick-actions--footer {
    display: flex !important;
    justify-content: stretch;
    align-items: stretch;
    flex-shrink: 0;
    padding-top: 0;
    width: 100%;
    min-height: 44px;
    flex: 1 1 auto;
  }

  .vehicle-card-actions-main {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100%;
  }

  .vehicle-card-actions-main > .btn-mini,
  .vehicle-card-actions-main > .btn-submit,
  .vehicle-card-actions-main > .vehicle-card-quick-actions--footer {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    margin: 0 !important;
    box-sizing: border-box;
  }

  .vehicle-card-actions-main .vehicle-card-quick-actions--footer .admin-menu-container {
    display: flex !important;
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
  }

  .vehicle-card-actions-main .vehicle-card-quick-actions--footer .admin-menu-button,
  .vehicle-card-actions-main .vehicle-card-quick-actions--footer .card-menu-trigger {
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    min-height: 44px !important;
    margin: 0 !important;
  }

  .vehicle-card-title {
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
  }

  .vehicle-card-marca {
    font-size: clamp(1.58rem, 6.4vw, 2rem);
    letter-spacing: -0.02em;
    color: #f8fafc;
    font-weight: 800;
  }

  .vehicle-card-modelo {
    font-size: clamp(1.58rem, 6.4vw, 2rem);
    line-height: 1.04;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  }

  .vehicle-card-version {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    margin-top: 12px;
    padding-left: 11px;
    border-left-width: 4px;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: Oswald, sans-serif;
  }

  .vehicle-card-meta-stack {
    gap: 4px;
  }

  .vehicle-card-year-chip {
    font-size: 24px;
    min-width: 76px;
    padding: 8px 14px;
    border-radius: 14px;
  }

  .vehicle-card-tipo-chip {
    font-size: 9px !important;
    padding: 3px 9px !important;
  }

  .vehicle-card-info-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-card-actions-side {
    justify-content: stretch;
  }

  .vehicle-card-actions-side .btn-mini,
  .vehicle-card-actions-side .admin-menu-container {
    flex: 1 1 calc(50% - 4px);
    margin-left: 0;
  }

  .card-professional {
    padding: 16px !important;
    border-radius: 22px !important;
  }

  .card-professional h3:not(.vehicle-card-title) {
    font-size: 20px;
  }
}

@media (max-width: 520px) {
  .dashboard-actions-row {
    grid-template-columns: 1fr;
  }

  .section-hero-title {
    font-size: 1.45rem;
    line-height: 1.12;
  }

  .section-hero-copy {
    font-size: 13px;
    line-height: 1.55;
  }

  .stat-card {
    min-height: 96px;
    padding: 16px !important;
  }

  .vehicle-card-actions-main .btn-mini,
  .vehicle-card-actions-main .btn-submit,
  .vehicle-card-actions-side .btn-mini,
  .vehicle-card-actions-side .admin-menu-container {
    flex: 1 1 100%;
  }

  .vehicle-card-actions-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .vehicle-card-actions-main .btn-mini,
  .vehicle-card-actions-main .btn-submit {
    min-width: 0;
    flex: unset;
  }

  .card-professional {
    padding: 15px !important;
  }

  .card-professional h3:not(.vehicle-card-title) {
    font-size: 18px;
  }
}

.admin-access-modal {
  border-radius: 28px !important;
  border: 1px solid rgba(148,163,184,0.18) !important;
  background:
    radial-gradient(circle at top right, rgba(225,29,72,0.16), transparent 28%),
    linear-gradient(180deg, rgba(15,23,42,0.98), rgba(15,23,42,0.94)) !important;
  box-shadow: 0 28px 60px rgba(2,6,23,0.48) !important;
  padding: 24px 24px 20px !important;
}

.admin-access-title {
  font-family: 'Oswald', sans-serif !important;
  font-size: 30px !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #f8fafc !important;
}

.admin-access-html {
  margin: 0 0 8px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(15,23,42,0.62);
  border: 1px solid rgba(148,163,184,0.14);
  text-align: left;
}

.admin-access-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.22);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.admin-access-copy {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
}

.admin-access-input {
  border-radius: 18px !important;
  border: 1.5px solid rgba(148,163,184,0.24) !important;
  background: linear-gradient(180deg, rgba(2,6,23,0.92), rgba(15,23,42,0.92)) !important;
  color: #f8fafc !important;
  min-height: 56px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  text-align: center !important;
  letter-spacing: 4px !important;
  box-shadow: none !important;
}

.admin-access-input:focus {
  border-color: rgba(96,165,250,0.9) !important;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.16) !important;
}

.admin-access-confirm,
.admin-access-cancel {
  border-radius: 16px !important;
  padding: 12px 18px !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: 14px !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: none !important;
}

.admin-access-confirm {
  background: linear-gradient(135deg, #1e3a5f, #2563a8) !important;
  color: #93c5fd !important;
  box-shadow: 0 14px 24px rgba(30,58,95,0.35);
}

.admin-access-cancel {
  background: rgba(51,65,85,0.85) !important;
  color: #e2e8f0 !important;
}

.admin-access-validation {
  background: rgba(127,29,29,0.18) !important;
  color: #fecaca !important;
  border: 1px solid rgba(248,113,113,0.24) !important;
  border-radius: 14px !important;
  padding: 10px 12px !important;
  margin-top: 10px !important;
}

#sec-transito .transito-grupo-header,
#sec-dash .card,
#sec-conduces .card,
#sec-historial .card,
#sec-imagenes .card,
#sec-registro .card,
#sec-stats > div:first-child,
#sec-investigar #panel-notas-global {
  border-radius: 22px !important;
}

/* Bloque “Detalle:” en listado historial comercial */
.hist-detalle-inline {
  background: rgba(0, 0, 0, 0.22);
  color: #e2e8f0;
}

@media (max-width: 768px) {
  .container {
    padding: 14px 12px 34px !important;
  }

  .section-hero {
    padding: 18px !important;
  }

  .menu {
    padding: 8px 10px 10px;
  }

  .menu button {
    padding: 11px 13px !important;
    font-size: 10px !important;
  }
}

:root {
  --primary: #e11d48;
  --primary-dark: #b91c2c;
  --primary-light: #f43f5e;
  --secondary: #3b82f6;
  --secondary-dark: #2563eb;
  --success: #22c55e;
  --warning: #f97316;
  --danger: #ef4444;
}

/* Tipografía refinada */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Oswald:wght@400;500;600;700&display=swap');

body {
  font-family: 'Inter', sans-serif;
}

h1, h2, h3, .brand-sep, .tag-accion, .stat-lab, .info-label, 
.btn-submit, .menu button, .drawer-content button {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.03em;
}

.section h2 {
  font-size: 1.8rem;
  margin: 1.5rem 0 1rem;
  border-left-width: 6px;
  padding-left: 1rem;
}
    
    body { 
      font-family: 'Roboto', sans-serif; 
      margin: 0; 
      background: var(--sm-bg-root); 
      color: var(--sm-text-primary);
      padding-bottom: 80px; 
      overflow-y: auto;
      -webkit-overflow-scrolling: touch; 
      overscroll-behavior-y: contain;
    }
    
    .section h2, .container h2, h2 { 
      color: var(--sm-text-primary) !important; 
      font-family: 'Oswald', sans-serif !important;
      text-transform: uppercase !important;
      padding-left: 10px;
      border-left: 4px solid var(--rojo);
      margin: 20px 0;
      display: block;
    }
    
    .header { 
      background: var(--sm-bg-surface); 
      padding: 8px 15px; 
      border-bottom: 3px solid var(--rojo); 
      display: flex; 
      justify-content: space-between; 
      align-items: center; 
      position: sticky; 
      top:0; 
      z-index: 1000; 
      height: 55px; 
      box-sizing: border-box; 
    }
    
    .header .logo-container { 
      font-family: 'Oswald'; 
      font-weight: 700; 
      font-size: 20px; 
      color: var(--sm-text-primary);
      display: flex;
      align-items: center;
    }
    .header .logo-container img {
      height: 32px;
      max-height: 32px;
      width: auto;
      max-width: 160px;
      object-fit: contain;
      display: block;
      filter: drop-shadow(0 0 6px rgba(59,130,246,0.35));
    }
    .header .logo-stock { color: var(--rojo); }

    .menu { 
      display: flex; 
      background: var(--sm-bg-surface); 
      position: sticky; 
      top: 55px; 
      z-index: 100; 
      overflow-x: auto; 
      white-space: nowrap; 
      scrollbar-width: none; 
    }
    .menu button { 
      flex: 0 0 auto; 
      padding: 15px 20px; 
      border: none; 
      background: var(--sm-bg-surface); 
      color: var(--sm-text-muted); 
      font-family: 'Oswald'; 
      text-transform: uppercase; 
      cursor: pointer; 
      font-size: 11px; 
    }
    .menu button.active { 
      color: var(--sm-text-primary); 
      border-bottom: 3px solid var(--rojo); 
    }
    
    .container { max-width: 600px; margin: 10px auto; padding: 0 15px; }
    
    .section { display: none; }

    .contenedor-principal, #contenedorStats {
      overflow: visible !important;
      height: auto;
      padding-bottom: 60px;
    }

    #contenedorStats::-webkit-scrollbar {
      width: 6px;
    }
    #contenedorStats::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.2);
      border-radius: 10px;
    }

    .extra-card.hidden {
  display: none;
}

.btn-ver-mas {
  background: var(--azul);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  font-family: Oswald;
  font-size: 12px;
  margin: 10px auto;
  display: block;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ver-mas:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* Mejoras táctiles y de rendimiento */
body {
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.card, .modal-content {
  will-change: transform, opacity;
}
    
    .search-box { 
      width: 100%; 
      padding: 15px; 
      border: 1px solid var(--sm-border-medium); 
      border-radius: 8px; 
      box-sizing: border-box; 
      font-size: 16px; 
      margin-bottom: 10px; 
      background: var(--sm-bg-raised); 
      color: var(--sm-text-primary);
    }
.filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* Para pantallas medianas: 2 columnas */
@media (max-width: 600px) {
  .filter-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Para pantallas muy pequeñas: 1 columna */
@media (max-width: 400px) {
  .filter-row {
    grid-template-columns: 1fr;
  }
}

/* Todos los filtros (selects y dropdown) ocupan el ancho completo de su celda */
.sel-filter,
.dropdown-version {
  width: 100%;
  min-width: 120px; /* ancho mínimo uniforme */
  position: relative;
  z-index: 3;
}

.sel-filter {
  height: 45px;
  padding: 0 16px;
  padding-right: 40px;
  border-radius: 12px;
  border: 1px solid #3b82f6;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  color: white;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  transition: all 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 45px; /* 👈 esto centra verticalmente el texto */
  pointer-events: auto;
}

.sel-filter:hover {
  background: linear-gradient(145deg, #2d3b4f, #1a2536);
  border-color: #fbbf24;
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.sel-filter option {
  background: #1e293b;
  color: white;
  padding: 10px;
}

/* Dropdown de versiones */
.dropdown-version-button {
  width: 100%;
  padding: 12px 16px;
  padding-right: 40px;
  border-radius: 12px;
  border: 1px solid #3b82f6;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  color: white;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.dropdown-version-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.dropdown-version-button:after {
  content: "▼";
  font-size: 10px;
  margin-left: 8px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.dropdown-version-button:hover {
  background: linear-gradient(145deg, #2d3b4f, #1a2536);
  border-color: #fbbf24;
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.dropdown-version-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #1e293b;
  border: 1px solid #3b82f6;
  border-radius: 12px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  padding: 8px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.dropdown-version-panel.show {
  display: block;
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-version-panel label {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  margin: 2px 8px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.dropdown-version-panel label:hover {
  background: rgba(59, 130, 246, 0.2);
}

.dropdown-version-panel input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #334155;
  border: 2px solid #3b82f6;
  border-radius: 4px;
  margin-right: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.dropdown-version-panel input[type="checkbox"]:checked {
  background: #3b82f6;
  border-color: #3b82f6;
}

.dropdown-version-panel input[type="checkbox"]:checked::after {
  content: "✓";
  color: white;
  font-size: 14px;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.version-selection-count {
  background: #fbbf24;
  color: #0f172a;
  border-radius: 20px;
  padding: 2px 8px;
  margin-left: 8px;
  font-size: 10px;
  font-weight: bold;
}
    
    .chips-container {
      display: flex;
      flex-wrap: wrap; 
      gap: 6px;       
      padding: 10px 5px;
      justify-content: center; 
    }

    .chip { 
      background: var(--sm-bg-sunken); 
      border: 1px solid rgba(255,255,255,0.1); 
      color: white;
      padding: 6px 12px; 
      border-radius: 20px; 
      font-family: 'Oswald', sans-serif; 
      font-size: 11px; 
      white-space: nowrap; 
      cursor: pointer; 
      transition: all 0.2s;
    }
    .chip.active { 
      background: var(--rojo) !important; 
      box-shadow: 0 0 10px rgba(255, 77, 77, 0.4); 
    }

    .filter-chip-block {
      margin: 10px 0 14px;
      padding: 12px 14px;
      border: 1px solid rgba(148,163,184,0.16);
      border-radius: 16px;
      background: rgba(15,23,42,0.55);
    }

.filter-chip-title {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.inventory-toolbar {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(148,163,184,0.16);
  background:
    linear-gradient(180deg, rgba(15,23,42,0.92), rgba(15,23,42,0.72)),
    radial-gradient(circle at top left, rgba(255,255,255,0.06), transparent 38%);
  box-shadow: 0 18px 40px rgba(2,6,23,0.26);
}

.inventory-toolbar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.inventory-toolbar-title {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f8fafc;
}

.inventory-toolbar-copy {
  font-size: 12px;
  color: #94a3b8;
  max-width: 640px;
}

.inventory-list-shell {
  padding: 14px 16px 4px;
  border-radius: 22px;
  border: 1px solid rgba(148,163,184,0.12);
  background: linear-gradient(180deg, rgba(15,23,42,0.7), rgba(15,23,42,0.42));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.inv-tab-panel { display: none; }
.inv-tab-panel.active { display: block !important; }
.inventory-tab-switch {
  position: relative;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(15,23,42,0.75);
}
.inventory-tab-switch button {
  z-index: 2;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.inventory-tab-switch button.active { color: #fff; }
.inventory-tab-pill {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(225,29,72,0.25), rgba(225,29,72,0.08));
  border: 1px solid rgba(225,29,72,0.35);
  transition: transform .22s ease;
}
.inventory-tab-switch.is-usados .inventory-tab-pill {
  transform: translateX(100%);
}

#sec-inventario .section-hero,
#sec-nuevos .section-hero {
  background:
    linear-gradient(135deg, rgba(34,197,94,0.15), rgba(15,23,42,0.96) 55%, rgba(16,185,129,0.12)) !important;
  border-color: rgba(34,197,94,0.18) !important;
}

#sec-usados .section-hero {
  background:
    linear-gradient(135deg, rgba(59,130,246,0.16), rgba(15,23,42,0.96) 55%, rgba(37,99,235,0.12)) !important;
  border-color: rgba(59,130,246,0.2) !important;
}

#sec-inventario .inventory-toolbar,
#sec-nuevos .inventory-toolbar {
  border-color: rgba(34,197,94,0.18);
}

#sec-usados .inventory-toolbar {
  border-color: rgba(59,130,246,0.18);
}

#sec-nuevos .brand-sep,
#sec-usados .brand-sep {
  margin: 12px 0 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.14);
  background: linear-gradient(135deg, rgba(15,23,42,0.92), rgba(30,41,59,0.8));
  box-shadow: 0 10px 24px rgba(2,6,23,0.18);
}

#sec-nuevos .brand-sep span:first-child,
#sec-usados .brand-sep span:first-child,
#sec-nuevos .brand-sep .brand-sep-name,
#sec-usados .brand-sep .brand-sep-name {
  padding: 8px 12px;
  border-radius: 999px;
  color: #f8fafc !important;
  border: 1px solid rgba(248, 250, 252, 0.12);
}

#sec-nuevos .brand-sep span:last-child,
#sec-usados .brand-sep span:last-child,
#sec-nuevos .brand-sep .brand-sep-meta,
#sec-usados .brand-sep .brand-sep-meta {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

#sec-nuevos .brand-sep {
  border-left: 4px solid #22c55e;
}

#sec-usados .brand-sep {
  border-left: 4px solid #3b82f6;
}
    
.card {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--sm-border-soft);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2), 0 10px 10px -5px rgba(0,0,0,0.04);
  border-color: rgba(59,130,246,0.3);
}

.btn-submit, .btn-mini, .lw-btn-primary, .lw-btn-secondary {
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-submit:active, .btn-mini:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-submit::after, .btn-mini::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
  transform: translate(-50%, -50%) scale(10);
  opacity: 0;
  transition: transform 0.5s, opacity 0.8s;
  pointer-events: none;
}

.btn-submit:active::after, .btn-mini:active::after {
  transform: translate(-50%, -50%) scale(0);
  opacity: 0.4;
  transition: 0s;
}

    .card h3 { 
      margin: 10px 0 2px 0; 
      font-family: 'Oswald'; 
      font-size: 19px; 
      text-transform: uppercase; 
      padding-right: 70px; 
      color: var(--sm-text-primary);
    }
    
    .version-neon {
      font-size: 13px; 
      font-weight: 800; 
      color: var(--verde); 
      margin-bottom: 10px; 
      border-left: 3px solid var(--rojo); 
      padding-left: 8px;
    }

    .info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
    .info-item { 
      background: rgba(15, 23, 42, 0.4); 
      padding: 8px; 
      border-radius: 6px; 
      border: 1px solid rgba(255,255,255,0.05); 
    }
    .info-label { font-weight: bold; color: var(--sm-text-secondary); display: block; font-size: 8px; text-transform: uppercase; }
    .info-value { font-size: 11px; color: var(--sm-text-primary); font-weight: 700; }

    #contHistorial .card {
      background: #f8fafc !important; 
      color: #1e293b !important;     
      border-left: 5px solid var(--azul);
    }
    #contHistorial h3, #contHistorial .info-value { color: #0f172a !important; }
    #contHistorial .info-label { color: #64748b !important; }
    #contHistorial .info-item { background: #e2e8f0 !important; border-color: #cbd5e1 !important; }

    .grid-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 15px; }
    
    .stat-card, .bloque-mes {
      background: var(--sm-bg-raised);
      border-radius: 10px;
    }
    .stat-card {
      padding: 15px; 
      text-align: center; 
      border-bottom: 4px solid var(--rojo); 
      color: var(--sm-text-primary);
    }
    
    .fila-venta {
      background: var(--sm-bg-raised) !important;
      border: 1px solid rgba(255,255,255,0.05) !important;
    }

    .stat-num { display: block; font-size: 24px; font-family: 'Oswald'; font-weight: bold; color: var(--sm-text-primary); }
    .stat-lab { font-size: 9px; color: var(--sm-text-secondary); text-transform: uppercase; }

    .badge-dias { background: #f1f3f4; padding: 10px; border-radius: 8px; text-align: center; min-width: 60px; }
    .numero-grande { display: block; font-size: 22px; font-weight: bold; color: var(--azul); }
    .label-dias { font-size: 10px; color: #666; text-transform: uppercase; }

    .form-group { margin-bottom: 12px; }
    .form-group label { display: block; font-family: 'Oswald'; font-size: 11px; color: var(--sm-text-secondary); margin-bottom: 4px; text-transform: uppercase; }
    .form-control { 
      width: 100%; 
      padding: 12px; 
      border: 1px solid var(--sm-border-medium); 
      border-radius: 8px; 
      font-size: 14px; 
      box-sizing: border-box; 
      background: var(--sm-bg-sunken); 
      color: var(--sm-text-primary); 
    }
    
    .btn-submit { 
      width: 100%; 
      background: var(--rojo); 
      color: white; 
      padding: 14px; 
      border: none; 
      font-family: 'Oswald'; 
      border-radius: 8px; 
      text-transform: uppercase; 
      cursor: pointer; 
      font-weight: bold;
    }

    .modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 2000; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
    .modal-content { 
      background: var(--sm-bg-raised); 
      width: 100%; 
      max-width: 400px; 
      border-radius: 12px; 
      padding: 20px; 
      box-sizing: border-box; 
      border: 1px solid var(--sm-border-medium); 
    }

/* Filtros separaciones (sec-dash) */
.dash-filtros-sep-lab {
  font-size: 10px;
  color: var(--sm-text-muted);
  display: block;
  margin-bottom: 4px;
}

.dash-sep-tabs {
  display: flex;
  background: #1e293b;
  border-radius: 10px;
  padding: 2px;
}

.brand-sep {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 15px;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  background: linear-gradient(to right, var(--rojo), transparent) bottom / 100% 2px no-repeat;
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  color: var(--sm-text-primary);
}

.brand-sep span:first-child,
.brand-sep-name {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(225, 29, 72, 0.1);
  padding: 4px 12px;
  border-radius: 30px;
  color: #fda4af;
  border: 1px solid rgba(225, 29, 72, 0.22);
}

.brand-sep span:last-child,
.brand-sep-meta {
  background: var(--rojo);
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.3);
}


.tag-accion {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.2);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255,255,255,0.14);
  position: relative;
}
.tag-accion::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
  box-shadow: 0 0 0 0 currentColor;
  animation: pillPulse 1.8s infinite;
}
@keyframes pillPulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.45); }
  70% { box-shadow: 0 0 0 7px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* Mejorar colores específicos (si ya existen, solo actualiza el color) */
.bg-disponible { background: rgba(34,197,94,0.2) !important; color:#4ade80 !important; border-color: rgba(34,197,94,0.45) !important; }
.bg-separado { background: rgba(251,191,36,0.2) !important; color:#fbbf24 !important; border-color: rgba(251,191,36,0.45) !important; }
.bg-consignacion { background: rgba(59,130,246,0.2) !important; color:#60a5fa !important; border-color: rgba(59,130,246,0.45) !important; }
.bg-reparacion { background: rgba(168,85,247,0.2) !important; color:#c084fc !important; border-color: rgba(168,85,247,0.45) !important; }
.bg-investigacion { background: rgba(239,68,68,0.2) !important; color:#f87171 !important; border-color: rgba(239,68,68,0.45) !important; }

.inventory-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.inventory-skeleton-card {
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.2);
  background: rgba(15,23,42,0.5);
  padding: 12px;
}
.inventory-skeleton-line {
  height: 11px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(51,65,85,0.5), rgba(100,116,139,0.35), rgba(51,65,85,0.5));
  background-size: 240% 100%;
  animation: skeleton-loading 1.35s infinite;
  margin-bottom: 8px;
}
.inventory-skeleton-line.sm { width: 45%; }
.inventory-skeleton-line.md { width: 68%; }
.inventory-skeleton-line.lg { width: 88%; }

/* ── Buscador enriquecido ── */
.inv-sr-header {
  padding: 10px 14px 8px; font-family: 'Oswald', sans-serif;
  font-size: 11px; color: #475569; text-transform: uppercase;
  letter-spacing: 0.08em; border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex; justify-content: space-between; align-items: center;
}
.inv-sr-count { background: rgba(225,29,72,0.15); color: #e11d48; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.inv-sr-item {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 12px; padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer; transition: background 0.15s;
}
.inv-sr-item:hover { background: rgba(255,255,255,0.05); }
.inv-sr-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 17px; flex-shrink: 0;
}
.inv-sr-avatar.usado { background: linear-gradient(135deg, #374151, #4b5563); }
.inv-sr-body { min-width: 0; }
.inv-sr-title { font-size: 13px; font-weight: 700; color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-sr-title mark { background: rgba(225,29,72,0.3); color: #fca5a5; border-radius: 3px; padding: 0 2px; }
.inv-sr-sub { font-size: 11px; color: #64748b; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-sr-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.inv-sr-precio { font-family: 'Oswald', sans-serif; font-size: 13px; font-weight: 700; color: #22c55e; white-space: nowrap; }
.inv-sr-badge { font-size: 9px; font-family: 'Oswald', sans-serif; padding: 2px 7px; border-radius: 8px; text-transform: uppercase; white-space: nowrap; }
.inv-sr-badge.disponible { background: rgba(34,197,94,0.15); color: #22c55e; }
.inv-sr-badge.separado   { background: rgba(251,191,36,0.15); color: #fbbf24; }
.inv-sr-badge.otro       { background: rgba(148,163,184,0.15); color: #94a3b8; }
.inv-sr-empty { padding: 24px 14px; text-align: center; color: #475569; }
.inv-sr-empty-icon { font-size: 28px; display: block; margin-bottom: 6px; }
.inv-sr-ver-todos {
  display: block; width: 100%; padding: 11px;
  background: rgba(59,130,246,0.08); border: none;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: #3b82f6; font-family: 'Oswald', sans-serif;
  font-size: 12px; letter-spacing: 0.05em;
  cursor: pointer; text-align: center; transition: background 0.2s;
}
.inv-sr-ver-todos:hover { background: rgba(59,130,246,0.15); }

/* ── Grupos de tránsito ── */
.transito-grupo { margin-bottom: 24px; }
.transito-grupo-header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; margin-bottom: 12px; border-radius: 14px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f2544 100%);
  border: 1px solid rgba(59,130,246,0.35);
  box-shadow: 0 4px 18px rgba(59,130,246,0.13), inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative; overflow: hidden;
}
.transito-grupo-header::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, #3b82f6, #6366f1); border-radius: 4px 0 0 4px;
}
.transito-grupo-header.is-warning::before {
  background: linear-gradient(180deg, #f59e0b, #fbbf24);
}
.transito-grupo-header.is-danger::before {
  background: linear-gradient(180deg, #ef4444, #f87171);
}
.transito-grupo-header.is-warning {
  border-color: rgba(251,191,36,0.45);
}
.transito-grupo-header.is-danger {
  border-color: rgba(248,113,113,0.55);
  box-shadow: 0 4px 18px rgba(248,113,113,0.16), inset 0 1px 0 rgba(255,255,255,0.06);
}
.transito-grupo-icono { font-size: 28px; flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(59,130,246,0.6)); }
.transito-grupo-info { flex: 1; min-width: 0; }
.transito-grupo-nombre {
  font-family: 'Oswald', sans-serif; font-size: 1.2rem; font-weight: 700;
  color: #f8fafc; letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.transito-grupo-sub { font-size: 11px; color: #64748b; margin-top: 2px; letter-spacing: 0.04em; text-transform: uppercase; }
.transito-grupo-badge {
  flex-shrink: 0; background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white; font-family: 'Oswald', sans-serif; font-size: 1rem; font-weight: 700;
  padding: 6px 16px; border-radius: 20px; box-shadow: 0 2px 10px rgba(59,130,246,0.4);
  letter-spacing: 0.05em; white-space: nowrap;
}
.transito-grupo-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.transito-mini-badge {
  font-size: 10px;
  border-radius: 999px;
  padding: 2px 8px;
  font-family: Oswald, sans-serif;
}
.transito-mini-badge.sep {
  background: rgba(251,191,36,0.16);
  border: 1px solid rgba(251,191,36,0.32);
  color: #fbbf24;
}
.transito-mini-badge.ret {
  background: rgba(248,113,113,0.15);
  border: 1px solid rgba(248,113,113,0.32);
  color: #f87171;
}

.inventario-grupo {
  margin-bottom: 24px;
}

.inventario-grupo-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  margin-bottom: 12px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.22), inset 0 1px 0 rgba(255,255,255,0.04);
}

.inventario-grupo-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.inventario-grupo.nuevos .inventario-grupo-header {
  background: linear-gradient(135deg, rgba(13,148,136,0.18), rgba(15,23,42,0.95) 60%, rgba(34,197,94,0.12));
  border-color: rgba(34,197,94,0.22);
}

.inventario-grupo.nuevos .inventario-grupo-header::before {
  background: linear-gradient(180deg, #22c55e, #10b981);
}

.inventario-grupo.usados .inventario-grupo-header {
  background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(15,23,42,0.95) 60%, rgba(99,102,241,0.12));
  border-color: rgba(59,130,246,0.22);
}

.inventario-grupo.usados .inventario-grupo-header::before {
  background: linear-gradient(180deg, #3b82f6, #6366f1);
}

.inventario-grupo-icono {
  font-size: 28px;
  flex-shrink: 0;
}

.inventario-grupo-info {
  flex: 1;
  min-width: 0;
}

.inventario-grupo-nombre {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inventario-grupo-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inventario-grupo-badge {
  flex-shrink: 0;
  color: white;
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 15px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.inventario-grupo.nuevos .inventario-grupo-badge {
  background: linear-gradient(135deg, #22c55e, #10b981);
  box-shadow: 0 6px 16px rgba(34,197,94,0.28);
}

.inventario-grupo.usados .inventario-grupo-badge {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 16px rgba(59,130,246,0.28);
}

    .bg-tipo { background: var(--sm-bg-surface); border: 1px solid rgba(255,255,255,0.1); display: inline-block; }
    
    .price-container {
      display: flex; 
      justify-content: space-between; 
      align-items: center; 
      margin-top: 15px; 
      background: rgba(15, 23, 42, 0.5); 
      padding: 10px; 
      border-radius: 8px; 
      border: 1px solid var(--sm-border-medium); 
    }

    .vendedor-tag {
      margin-left: 5px; 
      font-size: 10px; 
      background: rgba(251, 191, 36, 0.1); 
      color: var(--naranja); 
      padding: 2px 6px; 
      border-radius: 4px; 
      font-weight: bold; 
      border: 1px solid var(--naranja); 
      display: inline-block;
    }

    /* STOCKMASTER — login v2.1 (lw-*) */
    #login {
      position: fixed;
      inset: 0;
      z-index: 9999;
      min-height: 100vh;
      min-height: 100dvh;
      background: #0b0f1a;
      color: #f8fafc;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 32px 16px;
      box-sizing: border-box;
      overflow-x: hidden;
      overflow-y: auto;
    }

    @keyframes fadeSlideUp {
      from { opacity: 0; transform: translateY(18px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .lw-card {
      position: relative;
      width: 100%;
      max-width: 400px;
      background: #111827;
      border: 1px solid #1e2d45;
      border-top: 3px solid #e11d48;
      border-radius: 4px;
      padding: 24px 32px 32px;
      text-align: center;
      box-sizing: border-box;
      animation: fadeSlideUp 0.45s cubic-bezier(0.2, 0.9, 0.4, 1) both;
    }

    /* Fila superior del login: tema en flujo normal (no superpone “Acceso privado” en móvil) */
    .lw-login-toolbar {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      width: 100%;
      margin: 0 0 10px 0;
      flex-shrink: 0;
    }

    .lw-login-toolbar .sm-theme-toggle {
      position: static;
    }

    /* Interruptor tema claro / oscuro (icono se actualiza desde theme.js) */
    .sm-theme-toggle {
      box-sizing: border-box;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      padding: 0;
      margin: 0;
      border-radius: 10px;
      border: 1px solid rgba(148, 163, 184, 0.25);
      background: rgba(15, 23, 42, 0.45);
      color: #e2e8f0;
      font-size: 18px;
      line-height: 1;
      cursor: pointer;
      transition: background 0.2s, border-color 0.2s, transform 0.1s;
      flex-shrink: 0;
    }
    .sm-theme-toggle:hover {
      background: rgba(51, 65, 85, 0.75);
      border-color: rgba(248, 250, 252, 0.2);
    }
    .sm-theme-toggle:active {
      transform: scale(0.96);
    }
    /* Login: clase reservada por si se reutiliza posición absoluta en otro contexto */
    .sm-theme-toggle--login {
      flex-shrink: 0;
    }
    .sm-theme-toggle--header {
      margin-left: 8px;
    }

    .lw-eyebrow {
      font-family: 'DM Mono', 'Courier New', monospace;
      font-size: 11px;
      letter-spacing: 3px;
      color: #e11d48;
      text-transform: uppercase;
      margin-bottom: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }
    .lw-eyebrow::before,
    .lw-eyebrow::after {
      content: '';
      display: inline-block;
      width: 20px;
      height: 1px;
      background: #e11d48;
      flex-shrink: 0;
    }

    .lw-logo {
      font-family: 'Oswald', sans-serif;
      font-size: 42px;
      font-weight: 700;
      letter-spacing: 0.06em;
      color: #f8fafc;
      line-height: 1;
      margin-bottom: 6px;
      text-transform: uppercase;
    }
    .lw-logo span {
      color: #e11d48;
    }

    .lw-tagline {
      font-family: 'DM Mono', 'Courier New', monospace;
      font-size: 11px;
      letter-spacing: 2px;
      color: #94a3b8;
      text-transform: uppercase;
      margin-bottom: 32px;
      padding-bottom: 24px;
      border-bottom: 1px solid #1e2d45;
    }

    .lw-label {
      font-family: 'Oswald', sans-serif;
      font-size: 11px;
      letter-spacing: 3px;
      color: #94a3b8;
      text-transform: uppercase;
      margin-bottom: 8px;
      display: block;
      text-align: left;
    }

    .lw-input-wrap {
      position: relative;
      margin-bottom: 8px;
    }
    #login .lw-input {
      width: 100%;
      background: #0b0f1a !important;
      border: 1px solid #1e2d45 !important;
      border-radius: 3px !important;
      color: #f8fafc !important;
      font-family: 'DM Mono', 'Courier New', monospace !important;
      font-size: 20px;
      letter-spacing: 8px;
      padding: 14px 50px 14px 18px !important;
      box-sizing: border-box;
      outline: none;
      transition: border-color 0.2s;
      text-align: center;
      box-shadow: none !important;
    }
    #login .lw-input:focus {
      border-color: #e11d48 !important;
      box-shadow: none !important;
    }
    #login .lw-input::placeholder {
      letter-spacing: 4px;
      color: #334155 !important;
      font-size: 14px;
    }

    .lw-toggle {
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      color: #94a3b8;
      cursor: pointer;
      font-size: 10px;
      font-family: 'Oswald', sans-serif;
      letter-spacing: 1px;
      padding: 4px;
      transition: color 0.15s;
      text-transform: uppercase;
    }
    .lw-toggle:hover {
      color: #cbd5e1;
    }

    .lw-help {
      font-size: 12px;
      color: #64748b;
      margin-bottom: 24px;
      line-height: 1.6;
      font-family: 'DM Mono', 'Courier New', monospace;
      text-align: center;
    }

    #login .lw-btn-primary {
      width: 100%;
      background: #e11d48 !important;
      border: none !important;
      border-radius: 3px !important;
      color: #fff !important;
      font-family: 'Oswald', sans-serif !important;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 3px;
      text-transform: uppercase;
      padding: 15px;
      cursor: pointer;
      transition: background 0.15s, transform 0.1s;
      margin-bottom: 10px;
      display: block;
      filter: none !important;
    }
    #login .lw-btn-primary:hover {
      background: #be123c !important;
      filter: none !important;
    }
    #login .lw-btn-primary:active {
      transform: scale(0.99);
    }

    .lw-divider {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 4px 0 10px;
    }
    .lw-divider::before,
    .lw-divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: #1e2d45;
    }
    .lw-divider span {
      font-size: 11px;
      color: #64748b;
      font-family: 'DM Mono', monospace;
      letter-spacing: 2px;
    }

    #login .lw-btn-secondary {
      width: 100%;
      background: transparent !important;
      border: 1px solid #1e2d45 !important;
      border-radius: 3px !important;
      color: #94a3b8 !important;
      font-family: 'Oswald', sans-serif !important;
      font-size: 13px;
      font-weight: 400;
      letter-spacing: 2px;
      text-transform: uppercase;
      padding: 13px;
      cursor: pointer;
      transition: border-color 0.15s, color 0.15s;
      display: block;
      filter: none !important;
    }
    #login .lw-btn-secondary:hover {
      border-color: #334155 !important;
      color: #cbd5e1 !important;
      filter: none !important;
    }

    .lw-footer {
      margin-top: 28px;
      padding-top: 20px;
      border-top: 1px solid #1e2d45;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 16px;
    }
    .lw-footer-dot {
      width: 3px;
      height: 3px;
      border-radius: 50%;
      background: #334155;
    }
    .lw-footer-brand {
      font-family: 'Oswald', sans-serif;
      font-size: 11px;
      letter-spacing: 3px;
      color: #475569;
      text-transform: uppercase;
    }
    .lw-footer-ver {
      font-family: 'DM Mono', 'Courier New', monospace;
      font-size: 11px;
      color: #475569;
      letter-spacing: 1px;
    }

    .admin-login-popup {
      width: min(480px, calc(100vw - 28px)) !important;
      border-radius: 28px !important;
      padding: 22px 20px !important;
      background:
        radial-gradient(circle at top right, rgba(225, 29, 72, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.94)) !important;
      border: 1px solid rgba(148, 163, 184, 0.18) !important;
      box-shadow: 0 28px 60px rgba(2,6,23,0.48) !important;
    }

    .admin-confirm-btn,
    .admin-cancel-btn {
      border: none !important;
      border-radius: 16px !important;
      min-height: 50px !important;
      padding: 12px 18px !important;
      font-family: 'Oswald', sans-serif !important;
      font-size: 14px !important;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .admin-confirm-btn {
      background: linear-gradient(135deg, #1e3a5f, #2563a8) !important;
      color: #93c5fd !important;
      box-shadow: 0 14px 24px rgba(30,58,95,0.35);
    }

    .admin-cancel-btn {
      background: rgba(51,65,85,0.88) !important;
      color: #e2e8f0 !important;
    }

    #lista-conjuntos-imagenes {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    #lista-conjuntos-imagenes .card {
      margin-bottom: 0;
      padding: 10px;
    }

    .card-thumb-galeria {
      position: relative;
      border-radius: 10px;
      overflow: hidden;
      background: #020617;
      height: 120px;
    }

    .solo-admin { display: none; }

    /* ===== NUEVAS MEJORAS ===== */
    .btn-loading {
      position: relative;
      pointer-events: none;
      opacity: 0.7;
    }

    .btn-loading::after {
      content: "";
      position: absolute;
      width: 20px;
      height: 20px;
      top: 50%;
      left: 50%;
      margin-left: -10px;
      margin-top: -10px;
      border: 2px solid transparent;
      border-top-color: #ffffff;
      border-radius: 50%;
      animation: button-spinner 0.6s linear infinite;
    }

    @keyframes button-spinner {
      to { transform: rotate(360deg); }
    }

    .btn-ripple {
      position: relative;
      overflow: hidden;
      transform: translate3d(0, 0, 0);
    }

    .btn-ripple::after {
      content: "";
      display: block;
      position: absolute;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
      pointer-events: none;
      background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
      background-repeat: no-repeat;
      background-position: 50%;
      transform: scale(10, 10);
      opacity: 0;
      transition: transform 0.3s, opacity 0.5s;
    }

    .btn-ripple:active::after {
      transform: scale(0, 0);
      opacity: 0.3;
      transition: 0s;
    }

    .toast-notification {
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%) translateY(100px);
      background: #1e293b;
      color: white;
      padding: 12px 24px;
      border-radius: 50px;
      font-size: 14px;
      font-weight: 500;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
      z-index: 10000;
      opacity: 0;
      transition: all 0.3s ease;
      border-left: 4px solid #3b82f6;
      pointer-events: none;
    }

    .toast-notification.show {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
    }

    .toast-notification.success { border-left-color: #22c55e; }
    .toast-notification.error { border-left-color: #e11d48; }
    .toast-notification.warning { border-left-color: #fbbf24; }
    .toast-notification.info { border-left-color: #3b82f6; }

    .mini-loader {
      display: inline-block;
      width: 16px;
      height: 16px;
      border: 2px solid rgba(255,255,255,0.3);
      border-radius: 50%;
      border-top-color: #fff;
      animation: mini-spin 1s ease-in-out infinite;
      margin-right: 8px;
    }

/* ===== DROPDOWN DE VERSIONES MODERNO ===== */
.dropdown-version {
  position: relative;
  display: inline-block;
  width: 100%;
  min-width: 140px;
  flex: 1;
}

.dropdown-version-button {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid #3b82f6;
  border-radius: 12px;
  color: white;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.dropdown-version-button:hover {
  background: linear-gradient(145deg, #2d3b4f, #1a2536);
  border-color: #fbbf24;
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.dropdown-version-button:after {
  content: "▼";
  font-size: 10px;
  margin-left: 8px;
  transition: transform 0.2s;
}

.dropdown-version-button.open:after {
  transform: rotate(180deg);
}

.dropdown-version-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #1e293b;
  border: 1px solid #3b82f6;
  border-radius: 12px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  padding: 8px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 #334155;
}

.dropdown-version-panel.show {
  display: block;
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-version-panel::-webkit-scrollbar {
  width: 6px;
}
.dropdown-version-panel::-webkit-scrollbar-track {
  background: #334155;
  border-radius: 10px;
}
.dropdown-version-panel::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 10px;
}

.dropdown-version-panel label {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  margin: 2px 8px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.dropdown-version-panel label:hover {
  background: rgba(59, 130, 246, 0.2);
}

.dropdown-version-panel input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #334155;
  border: 2px solid #3b82f6;
  border-radius: 4px;
  margin-right: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.dropdown-version-panel input[type="checkbox"]:checked {
  background: #3b82f6;
  border-color: #3b82f6;
}

.dropdown-version-panel input[type="checkbox"]:checked::after {
  content: "✓";
  color: white;
  font-size: 14px;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Contador de selecciones en el botón */
.version-selection-count {
  background: #fbbf24;
  color: #0f172a;
  border-radius: 20px;
  padding: 2px 8px;
  margin-left: 8px;
  font-size: 10px;
  font-weight: bold;
}

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

/* Lista de tránsito en una sola columna vertical */
#lista-transito {
  display: block;
  width: 100%;
}

#lista-transito .transito-kpis-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
#lista-transito .transito-kpi-card {
  background: rgba(15,23,42,0.7);
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: 10px;
  padding: 8px 10px;
}
#lista-transito .transito-kpi-card .kpi-label {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .04em;
}
#lista-transito .transito-kpi-card .kpi-value {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  color: #f8fafc;
  line-height: 1.1;
}
#lista-transito .transito-kpi-card.acento-azul { border-color: rgba(59,130,246,.4); }
#lista-transito .transito-kpi-card.acento-rojo { border-color: rgba(248,113,113,.45); }
#lista-transito .transito-kpi-card.acento-ambar { border-color: rgba(251,191,36,.45); }
#lista-transito .transito-kpi-card.acento-verde { border-color: rgba(74,222,128,.45); }

#lista-transito .transito-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
#lista-transito .transito-chip {
  border: 1px solid rgba(148,163,184,0.45);
  background: rgba(15,23,42,0.5);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  cursor: pointer;
}
#lista-transito .transito-chip.active {
  border-color: rgba(59,130,246,.85);
  background: rgba(59,130,246,.16);
  color: #dbeafe;
}
#lista-transito .transito-empty-state {
  border: 1px dashed rgba(148,163,184,.5);
  border-radius: 12px;
  text-align: center;
  padding: 16px;
}
#lista-transito .transito-empty-icon { font-size: 34px; margin-bottom: 6px; }
#lista-transito .transito-empty-title { color: #cbd5e1; }

/* ── Encabezado de grupo en tránsito ── */
.transito-grupo {
  margin-bottom: 24px;
}

.transito-grupo-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f2544 100%);
  border: 1px solid rgba(59,130,246,0.35);
  box-shadow: 0 4px 18px rgba(59,130,246,0.13), inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}

.transito-grupo-header::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #3b82f6, #6366f1);
  border-radius: 4px 0 0 4px;
}

.transito-grupo-icono {
  font-size: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(59,130,246,0.6));
}

.transito-grupo-info {
  flex: 1;
  min-width: 0;
}

.transito-grupo-nombre {
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transito-grupo-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.transito-grupo-badge {
  flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(59,130,246,0.4);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

#lista-transito .card {
  width: 100%;
  margin-bottom: 15px;
  padding: 18px;
  font-size: 14px;
  box-sizing: border-box;
}

/* Opcional: si quieres que las tarjetas tengan el mismo estilo que las de nuevos/usados */
#lista-transito .card h3 {
  font-size: 19px;
  margin: 10px 0 2px 0;
  padding-right: 70px;
}

#lista-transito .version-neon {
  font-size: 13px;
  margin-bottom: 10px;
}

#lista-transito .info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

#lista-transito .info-item {
  background: rgba(15, 23, 42, 0.4);
  padding: 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.05);
}

#lista-transito .info-label {
  font-size: 8px;
  display: block;
  color: var(--sm-text-secondary);
}

#lista-transito .info-value {
  font-size: 11px;
  font-weight: 700;
}

#lista-transito .btn-submit {
  padding: 8px 10px;
  font-size: 11px;
  width: auto;
  flex: 1;
}

#lista-transito .tag-accion {
  font-size: 11px;
  padding: 4px 10px;
}
#lista-transito .transito-retraso-banner {
  margin: -6px -6px 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-family: Oswald, sans-serif;
  font-size: 11px;
  letter-spacing: .03em;
  background: rgba(185,28,28,0.2);
  border: 1px solid rgba(248,113,113,0.45);
  color: #fecaca;
}
#lista-transito .transito-state-chip {
  font-size: 10px;
  border-radius: 999px;
  padding: 4px 10px;
  font-family: Oswald, sans-serif;
  letter-spacing: .04em;
  border: 1px solid transparent;
}
#lista-transito .transito-state-chip.sep {
  background: rgba(251,191,36,0.2);
  border-color: rgba(251,191,36,0.35);
  color: #fef3c7;
}
#lista-transito .transito-state-chip.ok {
  background: rgba(59,130,246,0.2);
  border-color: rgba(59,130,246,0.35);
  color: #dbeafe;
}
#lista-transito .transito-notas-wrap {
  margin-top: 8px;
}
#lista-transito .transito-notas-toggle {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.26);
  background: rgba(15,23,42,0.5);
  color: #cbd5e1;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}
#lista-transito .transito-notas-body {
  display: none;
  margin-top: 6px;
  border-left: 2px solid rgba(59,130,246,0.45);
  padding-left: 8px;
}
#lista-transito .transito-nota-line {
  font-size: 11px;
  color: #cbd5e1;
  margin: 4px 0;
}

#lista-transito .transito-card-actions-main {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

#lista-transito .transito-copy-unit {
  background: linear-gradient(180deg, rgba(30,41,59,.98), rgba(15,23,42,.98)) !important;
  border: 1px solid rgba(148,163,184,.32) !important;
  color: #e5edf7 !important;
  box-shadow: 0 8px 18px rgba(2,6,23,.2), inset 0 1px 0 rgba(255,255,255,.04) !important;
}

#lista-transito .transito-copy-unit:hover {
  border-color: rgba(96,165,250,.52) !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 24px rgba(15,23,42,.32), inset 0 0 0 1px rgba(96,165,250,.12) !important;
}

#lista-transito .transito-conduce-unit {
  background: linear-gradient(180deg, rgba(37,99,235,.74), rgba(29,78,216,.82)) !important;
  border: 1px solid rgba(96,165,250,.38) !important;
  color: #f8fafc !important;
  box-shadow: 0 8px 18px rgba(37,99,235,.18), inset 0 1px 0 rgba(255,255,255,.08) !important;
}

#lista-transito .transito-card-actions-main .btn-submit {
  width: 100% !important;
  min-height: 36px;
  padding: 7px 10px !important;
  font-size: 10px !important;
  line-height: 1.1;
  white-space: nowrap;
}

#lista-transito .vehicle-card-actions {
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
}

#lista-transito .vehicle-card-actions-side {
  flex: 0 0 auto;
}

#lista-transito .vehicle-card-actions-side .admin-menu-container {
  position: relative;
  z-index: 100001 !important;
}

#lista-transito .admin-menu-dropdown {
  /* Posición manejada por JS — sin !important */
  z-index: 100000;
}

@media (max-width: 620px) {
  #lista-transito .transito-kpis-row {
    grid-template-columns: 1fr 1fr;
  }
  #lista-transito .vehicle-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  #lista-transito .transito-card-actions-main {
    grid-template-columns: 1fr;
    width: 100%;
  }

  #lista-transito .vehicle-card-actions-side {
    width: 100%;
  }

  #lista-transito .vehicle-card-actions-side .admin-menu-container,
  #lista-transito .vehicle-card-actions-side .admin-menu-button {
    width: 100%;
  }
}

.bg-investigacion {
  background: #ff4444 !important;
  color: white !important;
  font-weight: bold;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Asegurar que los modales de SweetAlert2 estén por encima de todo */
.swal2-container {
  z-index: 100000 !important;
}

/* Menú desplegable para acciones de admin */
.admin-menu-container {
  position: relative;
  display: inline-block;
}

.admin-menu-button {
  background: var(--azul);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.2s;
}

.admin-menu-button:hover {
  background: var(--rojo);
  transform: scale(1.05);
}

.admin-menu-dropdown {
  position: absolute;
  bottom: 100%; /* Aparece arriba del botón */
  right: 0;
  background: #1e293b;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
  min-width: 140px;
}

.admin-menu-dropdown.show {
  display: flex;
}

.admin-menu-dropdown button {
  background: transparent;
  border: none;
  color: white;
  padding: 8px 12px;
  text-align: left;
  border-radius: 4px;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

/* Estilos para botones compactos */
.btn-mini {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
}

.btn-mini:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Menú desplegable mejorado */
.admin-menu-container {
  position: relative;
  display: inline-block;
}

.admin-menu-button {
  background: var(--azul);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.admin-menu-button:hover {
  background: var(--rojo);
  transform: scale(1.05);
}

.admin-menu-dropdown {
  position: absolute;
  bottom: 100%; /* Aparece arriba del botón */
  right: 0;
  background: #1e293b;
  border: 1px solid var(--azul);
  border-radius: 8px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
  min-width: 160px;
}

.admin-menu-dropdown.show {
  display: flex;
}

.admin-menu-dropdown button {
  background: transparent;
  border: none;
  color: white;
  padding: 10px 12px;
  text-align: left;
  border-radius: 4px;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.admin-menu-dropdown button:hover {
  background: #334155;
}

/* Ajuste para móvil */
@media (max-width: 600px) {
  .admin-menu-button {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .btn-mini {
    padding: 6px 8px !important;
    font-size: 10px !important;
  }
}

@media (min-width: 992px) {
  /* 1. Ocultar el menú horizontal/vertical que usabas antes */
  .menu {
    display: none !important;
  }

  /* 2. Hacer que el drawer sea visible permanentemente como menú fijo */
  .drawer {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: var(--sm-bg-surface);
    overflow-y: auto;
    border-right: 2px solid var(--rojo);
    z-index: 1000;
    transform: none !important;
  }

  /* Ocultar el botón de cerrar del drawer en escritorio */
  .drawer .drawer-header {
    display: none;
  }

  /* Estilos para los botones del drawer */
  .drawer-content button {
    width: 100%;
    padding: 18px 20px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: var(--sm-text-primary);
    font-family: 'Oswald', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
  }

  .drawer-content button:hover {
    background: rgba(225, 29, 72, 0.2);
    padding-left: 25px;
  }

  .drawer-content button.active {
    background: linear-gradient(90deg, var(--rojo) 0%, transparent 100%);
    color: white;
    border-left: 4px solid var(--rojo);
  }

  /* 3. Ajustar el header y el contenedor principal */
  .header {
    position: sticky;
    top: 0;
    width: calc(100% - 250px);
    margin-left: 250px;
    z-index: 1001;
  }

  .header .hamburger {
    display: none;
  }

  .container {
    max-width: none;
    margin-left: 250px;
    padding: 20px 30px;
  }

  #contenedorStats {
    max-width: 100%;
  }

  #lista-conjuntos-imagenes {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .menu {
    display: none; /* ocultamos la barra horizontal original */
  }
  .header .hamburger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    background: rgba(15,23,42,0.74);
    border: 1px solid rgba(96,165,250,0.28);
    color: #e2e8f0;
    font-size: 15px;
    line-height: 1;
    padding: 0 12px;
    border-radius: 999px;
    cursor: pointer;
  }
  .header .hamburger span {
    font-size: 18px;
    line-height: 1;
  }
  .header .hamburger em {
    font-style: normal;
    font-family: Oswald, sans-serif;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--sm-bg-surface);
    transition: left 0.3s ease;
    z-index: 2000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
  }
  .drawer.open {
    left: 0;
  }
  .drawer .drawer-header {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .drawer .close-drawer {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
  }
  .drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
  }
  .drawer-content button {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: transparent;
    border: none;
    color: var(--sm-text-primary);
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
  }
  .drawer-content button.active {
    background: rgba(225, 29, 72, 0.2);
    color: var(--rojo);
  }
}

/* Estilos adicionales que estaban fuera de las media queries */
.info-item {
  position: relative;
  padding-left: 20px;
}

.info-item::before {
  content: "▹";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--azul);
  font-size: 14px;
  opacity: 0.8;
}

button, .btn-mini, .chip, .card, .brand-sep {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* FORZAR MAYÚSCULAS EN EL MENÚ LATERAL Y TÍTULOS DE SECCIÓN */
.drawer-content button,
.section h2,
.brand-sep span,
.tag-accion,
.info-label,
.card-actions .btn-mini span,
.vendedor-tag {
  text-transform: uppercase !important;
}

/* EXCEPCIONES: campos de entrada no deben estar en mayúsculas */
.drawer-content input, .menu input, .card input,
.drawer-content textarea, .menu textarea, .card textarea {
  text-transform: none;
}

/* ===== MENÚ DESPLEGABLE MODERNO ===== */
.admin-menu-container {
  position: relative;
  display: inline-block;
}

.admin-menu-button {
  background: linear-gradient(145deg, #2d3b4f, #1a2536);
  border: none;
  color: #94a3b8;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.admin-menu-button:hover {
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(59, 130, 246, 0.4);
}

.admin-menu-button svg {
  width: 20px;
  height: 20px;
}

.admin-menu-dropdown {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: #1e293b;
  border: 1px solid #3b82f6;
  border-radius: 12px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  min-width: 160px;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.2s ease;
}

.admin-menu-dropdown.show {
  display: flex;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-menu-dropdown button {
  background: transparent;
  border: none;
  color: #e2e8f0;
  padding: 10px 12px;
  text-align: left;
  border-radius: 8px;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.admin-menu-dropdown button:hover {
  background: rgba(59, 130, 246, 0.2);
  color: white;
  transform: translateX(5px);
}

.admin-menu-dropdown button svg {
  width: 16px;
  height: 16px;
  stroke: #3b82f6;
}

.admin-menu-dropdown button:hover svg {
  stroke: white;
}

/* Separador visual para grupos (opcional) */
.admin-menu-dropdown hr {
  border: none;
  border-top: 1px solid #334155;
  margin: 4px 0;
}

/* Para escritorio: 3 columnas en la info-grid */
@media (min-width: 768px) {
  .info-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

.filtro-disabled {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

.admin-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  background: linear-gradient(180deg, rgba(15,23,42,0.98), rgba(10,18,32,0.98));
  border: 1px solid rgba(96,165,250,0.2);
  border-radius: 16px;
  padding: 10px;
  z-index: 10000;
  flex-direction: column;
  gap: 4px;
  min-width: 228px;
  box-shadow: 0 20px 60px rgba(2,6,23,0.5);
}

.admin-dropdown.show {
  display: flex;
}

.admin-dropdown button {
  width: 100%;
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 8px 12px;
  text-align: left;
  border-radius: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.admin-dropdown button:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}


.admin-menu-dropdown button:hover {
  background: #334155;
}

/* Contenedor del bloque admin */
.drawer-admin-container {
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.3);
  padding-bottom: 10px;
}

/* Botón principal Admin */
.drawer-admin-toggle {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  margin-bottom: 8px;
}

.drawer-admin-toggle:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.5);
}

.drawer-admin-toggle:active {
  transform: translateY(0);
}

.drawer-admin-toggle.active {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.drawer-admin-submenu {
  margin-left: 20px;
  border-left: 2px solid #3b82f6;
  padding-left: 12px;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  max-height: 0;
}

.drawer-admin-submenu.show {
  max-height: 500px; /* ajusta según cantidad de elementos */
}

.drawer-admin-submenu button {
  width: 100%;
  text-align: left;
  padding: 10px 12px !important;
  font-size: 13px !important;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  background: transparent;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 8px;
  margin: 2px 0;
}

.drawer-admin-submenu button:hover {
  background: rgba(59, 130, 246, 0.1);
  color: white;
  transform: translateX(4px);
}

.drawer-admin-submenu button.active {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  font-weight: 500;
  border-left: 3px solid #3b82f6;
  padding-left: 12px;
}

.drawer-admin-toggle svg {
  transition: stroke 0.2s;
}

.drawer-admin-toggle:hover svg {
  stroke: #fbbf24; /* color naranja/amarillo al pasar el mouse */
}

.bg-entregado-pendiente {
  background: #f97316 !important; /* naranja fuerte */
  color: white !important;
}

@keyframes pulseSoft {
  0% { opacity: 0.9; }
  50% { opacity: 1; background: #fb923c; }
  100% { opacity: 0.9; }
}

/* ===== MEJORAS ESTÉTICAS GLOBALES ===== */

/* 1. Tipografía refinada */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Oswald:wght@400;500;600;700&display=swap');

body {
  font-family: 'Inter', sans-serif;
}

h1, h2, h3, .brand-sep, .tag-accion, .stat-lab, .info-label, 
.btn-submit, .menu button, .drawer-content button, .lw-logo {
  font-family: 'Oswald', sans-serif;
}

.section h2 {
  font-size: 1.5rem;
  margin: 1.5rem 0 1rem;
  border-left-width: 5px;
  padding-left: 1rem;
}

/* 2. Tarjetas más elegantes */
.card {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2), 0 10px 10px -5px rgba(0,0,0,0.04);
  border-color: rgba(59,130,246,0.3);
}

/* 3. Botones unificados y con feedback */
.btn-submit, .btn-mini, .lw-btn-primary, .lw-btn-secondary, .drawer-admin-toggle, .admin-menu-button {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.btn-submit:active, .btn-mini:active {
  transform: scale(0.97);
}

/* Mantén la altura y line-height originales para selects */
.sel-filter, .dropdown-version-button {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  height: 45px;                /* ← conserva altura original */
  line-height: 45px;           /* ← conserva centrado vertical */
  padding: 0 16px;             /* ← conserva padding horizontal */
  font-size: 0.85rem;
  color: #f1f5f9;
  transition: border 0.2s, box-shadow 0.2s;
}

/* Para otros inputs, puedes mantener padding diferente */
.form-control {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #f1f5f9;
}

/* 5. Espaciado y estructura responsive */
.container {
  padding: 0 1.5rem;
}

.filter-row {
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .container {
    padding: 0 1rem;
  }
  .info-grid {
    grid-template-columns: 1fr !important;
  }
}

/* 6. Mejoras en el menú lateral (drawer) */
.drawer-content button {
  padding: 14px 20px;
  font-size: 0.9rem;
  transition: all 0.2s;
  border-radius: 0;
}

.drawer-content button:hover {
  background: rgba(59,130,246,0.1);
  transform: translateX(5px);
}

.drawer-content button.active {
  background: linear-gradient(90deg, rgba(225,29,72,0.2) 0%, transparent 100%);
  border-left: 3px solid #e11d48;
  color: #e11d48;
}

/* 7. Paleta de marca (acciones / botones con color inline) */
:root {
  --rojo: #e11d48;
  --azul: #3b82f6;
  --verde: #22c55e;
  --naranja: #f97316;
}

/* ===== MEJORAS ESTÉTICAS Y LEGIBILIDAD - VERSIÓN FINAL ===== */

/* 1. Mantener altura y centrado de selects (corrige fallo de texto invisible) */
.sel-filter {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  height: 45px;               /* ← conserva altura original */
  line-height: 45px;          /* ← conserva centrado vertical */
  padding: 0 16px;            /* ← conserva padding horizontal */
  font-size: 0.85rem;
  color: #f1f5f9;
  transition: border 0.2s, box-shadow 0.2s;
}

.sel-filter:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

/* 2. Selectores de versión (dropdown) con mismo estilo */
.dropdown-version-button {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  height: 45px;
  line-height: 45px;
  padding: 0 16px;
  font-size: 0.85rem;
  color: #f1f5f9;
}

/* 3. Inputs de formulario */
.form-control {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #f1f5f9;
  transition: border 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

/* 4. Animaciones sutiles */
.card, .brand-group, .filter-row, .modal-content {
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 5. Scroll personalizado */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #1e293b;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #60a5fa;
}

/* 6. SweetAlert2 personalizado */
.swal2-popup {
  background: #1e293b !important;
  border-radius: 24px !important;
  border: 1px solid #3b82f6 !important;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.75) !important;
  backdrop-filter: blur(6px);
  padding: 1.2rem 1.2rem 1rem !important;
  overflow: hidden !important;
}

.swal2-title, .swal2-html-container {
  color: #f1f5f9 !important;
}
.swal2-title {
  padding: 12px 16px !important;
  margin: -1.2rem -1.2rem 10px -1.2rem !important;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  /* Los <h2> del tema global llevan barra roja; SweetAlert también usa h2.swal2-title */
  border-left: none !important;
  background:
    linear-gradient(180deg, rgba(30,41,59,0.96), rgba(15,23,42,0.94)),
    radial-gradient(circle at 12% 50%, rgba(59,130,246,0.12), transparent 45%);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.04);
}

.swal2-popup.loading-neutral-popup {
  background: #1e293b !important;
  border: 1px solid rgba(59,130,246,0.32) !important;
  box-shadow: 0 18px 36px rgba(2,6,23,0.52) !important;
}
.swal2-popup.loading-neutral-popup .swal2-title {
  display: none !important;
}
.swal2-popup.loading-neutral-popup .swal2-html-container {
  margin: 0 !important;
  text-align: center !important;
  background: transparent !important;
}
/* No mezclar el loader por defecto de Swal con el mini-loader custom */
.swal2-popup.loading-neutral-popup .swal2-loader {
  display: none !important;
}

.swal2-confirm, .swal2-cancel {
  border-radius: 10px !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: 13px !important;
  letter-spacing: 0.5px;
  min-width: 120px;
}

.swal2-confirm {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35) !important;
}

.swal2-cancel {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3) !important;
}

.swal2-popup .swal2-actions {
  gap: 10px !important;
  position: sticky;
  bottom: 0;
  /* Mismo tono que el popup (#1e293b) para no ver un “bloque” detrás de los botones */
  background: linear-gradient(180deg, rgba(30, 41, 59, 0), rgba(30, 41, 59, 0.98)) !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.swal2-input,
.swal2-textarea,
.swal-input {
  width: 100% !important;
  background: rgba(15, 23, 42, 0.92) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(59, 130, 246, 0.65) !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  padding: 10px 12px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.swal2-input:focus,
.swal2-textarea:focus,
.swal-input:focus {
  outline: none !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.swal2-html-container {
  max-height: 62vh !important;
  overflow-y: auto !important;
  text-align: left !important;
  background: transparent !important;
}

.swal2-popup .modal-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.swal2-popup .modal-form-section {
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 10px;
}

.swal2-popup .modal-form-section h5 {
  margin: 0 0 8px 0;
  color: #93c5fd;
  font-size: 12px;
  letter-spacing: 0.6px;
}

/* Base profesional para todos los modales SweetAlert2 */
.swal2-container {
  z-index: 100000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow: hidden !important;
}

.swal2-popup {
  border-radius: 18px !important;
  padding: 0 !important;
  max-height: calc(100vh - 32px) !important;
  display: flex !important;
  flex-direction: column !important;
  text-align: left !important;
}

.swal2-popup.sm-modal-standard {
  width: min(720px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
}

.swal2-title {
  padding: 18px 22px 14px !important;
  margin: 0 !important;
  text-align: left !important;
  line-height: 1.15 !important;
  flex: 0 0 auto !important;
}

.swal2-html-container {
  width: 100% !important;
  max-height: calc(100vh - 190px) !important;
  margin: 0 !important;
  padding: 18px 22px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  text-align: left !important;
  flex: 1 1 auto !important;
}

.swal2-popup .swal2-actions {
  width: 100% !important;
  justify-content: flex-end !important;
  margin: 0 !important;
  padding: 12px 18px 18px !important;
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
}

.swal2-popup .swal2-actions button {
  min-height: 40px !important;
}

.swal2-input,
.swal2-textarea,
.swal-input {
  min-height: 40px !important;
  margin: 0 !important;
}

textarea.swal-input,
.swal2-textarea {
  min-height: 82px !important;
  resize: vertical !important;
}

.swal2-popup label {
  display: block;
  margin: 0 0 5px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

#modal-registro-normal,
#modal-registro-transito,
#modalInvFisicoOptimizado,
#modalSliderImagenes {
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

#modal-registro-normal-box,
#modal-registro-transito-box,
#modalInvFisicoOptimizado .modal-content,
#modalSliderImagenes .modal-content {
  max-height: calc(100vh - 32px) !important;
  overflow-y: auto !important;
  margin: auto !important;
}

/* 7. Optimización de carga visual */
.card {
  content-visibility: auto;
  contain-intrinsic-size: 1px 200px;
}

/* 8. Iconos y detalles adicionales */
.info-item::before {
  content: "•";
  margin-right: 0.3rem;
  color: #3b82f6;
  font-weight: bold;
}

.version-neon {
  border-left-color: #e11d48;
  padding-left: 10px;
}

/* 9. Mejora en las etiquetas de estado */
.tag-accion {
  font-size: 10px;
  padding: 4px 12px;
  border-radius: 30px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.bg-investigacion {
  background: #ff4444 !important;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0.9; transform: scale(1); }
}

/* 10. Ajustes para el menú de administrador */
.drawer-admin-toggle {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.drawer-admin-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(59,130,246,0.5);
}

.drawer-admin-submenu {
  border-left-color: #3b82f6;
}

.drawer-admin-submenu button {
  font-size: 12px;
  padding: 8px 12px;
}

.drawer-admin-submenu button:hover {
  background: rgba(59,130,246,0.1);
  transform: translateX(4px);
}

/* 11. Mejoras de legibilidad en tarjetas */
.card {
  padding: 1rem;
}

.card h3 {
  font-size: 1.25rem;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.version-neon {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: 0.3px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.info-item {
  background: rgba(15, 23, 42, 0.6);
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  transition: background 0.2s;
}

.info-item:hover {
  background: rgba(59, 130, 246, 0.1);
}

.info-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.2rem;
  display: block;
}

.info-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f1f5f9;
  word-break: break-word;
}

.price-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.75rem;
  border-radius: 12px;
}

.price-container .precio {
  font-size: 1.2rem;
  font-weight: 700;
  color: #22c55e;
}

.price-container .precio-furgon {
  font-size: 0.75rem;
  color: #fbbf24;
  margin-top: 0.25rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-mini {
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
}

.badge-dias {
  background: rgba(34, 197, 94, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #22c55e;
}

.badge-dias.warning {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
}

.badge-dias.danger {
  background: rgba(225, 29, 72, 0.2);
  color: #e11d48;
}

.vendedor-tag {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid #fbbf24;
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.matricula-badge {
  background: rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #60a5fa;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

@media (max-width: 480px) {
  .info-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .card h3 {
    font-size: 1.1rem;
  }
  .price-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Indicador de color */
.color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.3), 0 0 0 2px rgba(0,0,0,0.1);
  transition: transform 0.1s ease;
}

.color-dot:hover {
  transform: scale(1.2);
}

/* Evita desplazamientos horizontales que "cortan" la vista */
.container,
.section,
#contenedorStats,
#listaHistorial,
#contenedorPrincipalVentas,
.bloque-mes {
  overflow-x: hidden;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

/* En historial forzamos tarjetas completas dentro del viewport */
#sec-historial,
#listaHistorial .card {
  overflow-x: hidden;
}

/* Ajustes robustos de escritorio para evitar recortes */
@media (min-width: 992px) {
  :root {
    --drawer-width-desktop: 250px;
  }

  html, body {
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .drawer {
    width: var(--drawer-width-desktop);
  }

  /* El drawer es fixed, así que desplazamos TODO el contenido del app con padding-left */
  #app {
    padding-left: var(--drawer-width-desktop) !important;
    padding-right: 0;
    box-sizing: border-box;
    min-height: 100vh;
    overflow: visible;
  }

  /* Desactivamos desplazamientos por margin para evitar dobles cálculos */
  .header {
    margin-left: 0 !important;
    width: 100% !important;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    box-sizing: border-box;
  }

  .container {
    margin-left: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding: 16px 22px 24px 34px !important; /* separación extra solo para el contenido */
  }

  .section {
    width: 100%;
    max-width: 100%;
  }
}

/* Si el drawer está abierto en pantallas menores (modo overlay), desplazamos
   header y contenido para que no queden cortados. */
@media (max-width: 991px) {
  body.drawer-open .header {
    margin-left: 294px !important; /* drawer + gap */
    width: calc(100vw - 294px) !important;
    box-sizing: border-box;
  }

  body.drawer-open .container {
    margin-left: 294px !important; /* drawer + gap */
    width: calc(100vw - 294px) !important;
    max-width: calc(100vw - 294px) !important;
    box-sizing: border-box;
  }
}

/* Mejor respuesta de rueda de mouse / scroll en escritorio */
@media (min-width: 992px) {
  body {
    overscroll-behavior: auto;
    overscroll-behavior-y: auto;
    touch-action: auto;
  }
}

/* Para tablas o bloques de estadísticas muy anchos */
#contenedorStats table,
#contenedorStats .bloque-mes {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

/* Mejora la visualización en móviles */
@media (max-width: 600px) {
  .container {
    padding: 0 10px;
  }
  .card {
    padding: 12px;
  }
  .info-grid {
    grid-template-columns: 1fr !important;
  }
  .filter-row {
    grid-template-columns: 1fr !important;
  }
  .price-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .card-actions {
    flex-wrap: wrap;
  }
}

/* Ajuste visual consistente entre secciones del menú */
.section {
  padding-top: 8px;
}

/* Barra de filtros unificada y más profesional */
.section-filters {
  display: grid !important;
  grid-template-columns: minmax(240px, 2fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 10px;
  margin-bottom: 15px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.9));
  align-items: center;
}

.section-filters .search-box {
  margin-bottom: 0;
}

/* Variante de 2 columnas para filtros de tránsito */
.section-filters-transito {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.section-filters-transito .search-box {
  margin-bottom: 0;
}

.section-filters-transito .btn-submit {
  width: 100%;
}

@media (max-width: 900px) {
  .section-filters {
    grid-template-columns: 1fr 1fr;
  }
  .section-filters > :first-child {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .section-filters,
  .section-filters-transito {
    grid-template-columns: 1fr;
    padding: 10px;
  }
  .section-filters > :first-child {
    grid-column: span 1;
  }
}

.menu-badge {
  background: #e11d48;
  color: white;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: bold;
  margin-left: 8px;
  display: inline-block;
  line-height: 1;
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 12px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Loader global */
.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  flex-direction: column;
}
.global-loader .spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.toast-notification {
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 12px 24px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  border-left: 4px solid var(--secondary);
  color: white;
  font-size: 0.9rem;
  animation: slideUp 0.3s ease;
}

.toast-notification.success { border-left-color: var(--success); }
.toast-notification.error { border-left-color: var(--danger); }
.toast-notification.warning { border-left-color: var(--warning); }

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.comentario-unidad {
  transition: all 0.2s;
}
.comentario-unidad:hover {
  background: rgba(59,130,246,0.1) !important;
}

/* Estilos para el panel de notas */
.notas-container {
  margin: 10px 0;
}
.notas-panel {
  transition: all 0.2s ease;
}
.notas-panel textarea {
  resize: vertical;
}

#panel-notas-global {
  transition: all 0.2s;
}
#lista-notas-global .btn-mini {
  font-size: 10px;
  padding: 2px 6px;
}

/* =========================================================
   CAPA VISUAL GLOBAL V2 (LIMPIA + ORDENADA + CORPORATIVA)
   ========================================================= */

body {
  background: #0b1220;
  color: #e2e8f0;
}

.section {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  padding: 14px;
}

.section h2 {
  color: #f8fafc;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-bottom: 12px;
}

.card,
.brand-group,
.bloque-mes,
.modal-content,
.filter-row,
.section-filters,
.section-filters-transito {
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  background: #111b31 !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.24);
}

.btn-submit,
.btn-mini,
.lw-btn-primary,
.lw-btn-secondary,
.menu button,
.drawer-content button,
.admin-menu-button {
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 10px !important;
}

.btn-submit:hover,
.btn-mini:hover,
.lw-btn-primary:hover,
.lw-btn-secondary:hover,
.menu button:hover,
.drawer-content button:hover {
  filter: brightness(1.04);
}

.form-control,
.search-box,
.sel-filter,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
  border-radius: 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  background: #0f172a !important;
  color: #f8fafc !important;
}

.form-control:focus,
.search-box:focus,
.sel-filter:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

table thead th {
  background: #0f172a;
  color: #cbd5e1;
}

table td, table th {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding: 8px 10px;
}

.stat-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: #14213d;
}

.tag-accion {
  border: 1px solid rgba(148, 163, 184, 0.28);
  letter-spacing: 0.3px;
}

@media (max-width: 480px) {
  #login {
    min-height: 100dvh;
    padding: max(16px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
    align-items: center;
    justify-content: center;
    background: #0b0f1a;
  }

  .lw-card {
    padding: 32px 22px 28px;
    max-width: 100%;
  }

  .lw-logo {
    font-size: clamp(30px, 9vw, 34px);
  }

  #login .lw-input {
    font-size: 17px !important;
    letter-spacing: 6px !important;
    padding: 13px 48px 13px 14px !important;
  }

  .lw-help {
    font-size: 11px;
    margin-bottom: 18px;
  }

  .admin-login-popup {
    width: calc(100vw - 20px) !important;
    padding: 18px 14px !important;
    border-radius: 22px !important;
  }
  .admin-login-popup #adminPinInput {
    font-size: 20px !important;
    letter-spacing: 8px !important;
    padding: 15px 48px 15px 16px !important;
  }
  .admin-login-popup #toggleAdminPinBtn {
    right: 8px !important;
    font-size: 20px !important;
  }
  .admin-confirm-btn,
  .admin-cancel-btn {
    width: 100% !important;
  }
}

@media (max-width: 360px) {
  #login {
    padding-left: 10px;
    padding-right: 10px;
  }

  .lw-card {
    padding: 26px 16px 24px;
  }

  .lw-logo {
    font-size: 30px;
  }

  .lw-tagline {
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-bottom: 22px;
    padding-bottom: 18px;
  }

  #login .lw-input {
    font-size: 16px !important;
    letter-spacing: 5px !important;
  }

  #login .lw-btn-primary,
  #login .lw-btn-secondary {
    font-size: 12px !important;
    padding: 12px !important;
  }
}

@media (max-height: 680px) and (max-width: 480px) {
  #login {
    justify-content: flex-start;
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .lw-card {
    margin: auto 0;
  }

  .lw-eyebrow,
  .lw-tagline,
  .lw-help {
    display: none;
  }

  .lw-logo {
    font-size: 32px;
    margin-bottom: 10px;
  }

  .lw-footer {
    margin-top: 18px;
    padding-top: 14px;
  }
}


/* ===== TARJETAS DE INCAUTACIÓN MEJORADAS ===== */
.incautacion-card {
  background: linear-gradient(145deg, #1e293b, #0f172a) !important;
  border-radius: 20px !important;
  padding: 1.25rem !important;
  margin-bottom: 1rem !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2) !important;
  transition: all 0.2s ease !important;
}

.incautacion-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -8px rgba(225, 29, 72, 0.15) !important;
  border-color: rgba(225, 29, 72, 0.3) !important;
}

.incautacion-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.incautacion-titulo {
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  color: white;
  margin: 0;
  line-height: 1.2;
}

.incautacion-badge {
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.incautacion-badge.incautado { background: #e11d48; color: white; }
.incautacion-badge.entregado { background: #22c55e; color: white; }
.incautacion-badge.disponible { background: #3b82f6; color: white; }
.incautacion-badge.saldada { background: #f59e0b; color: black; }
.incautacion-badge.voluntaria { background: #8b5cf6; color: white; }
.incautacion-badge.archivo { background: #64748b; color: white; }

.incautacion-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 15px 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.03);
}

.incautacion-info-item {
  display: flex;
  flex-direction: column;
}

.incautacion-info-label {
  font-size: 9px;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.incautacion-info-value {
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
}

.incautacion-cliente-box {
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3b82f6;
  padding: 10px 12px;
  border-radius: 8px;
  margin: 12px 0;
}

.incautacion-dias {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0,0,0,0.2);
  margin-top: 8px;
}

.incautacion-dias.critico { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.incautacion-dias.normal { background: rgba(34, 197, 94, 0.15); color: #4ade80; }

.incautacion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.incautacion-actions .btn-submit {
  padding: 8px 14px;
  font-size: 12px;
  flex: 1 0 auto;
  min-width: 100px;
}

/* Acordeón de archivo mejorado */
.inc-archivo-consulta {
  margin-top: 20px;
  border-radius: 16px !important;
  border: 1px solid #334155 !important;
  background: rgba(15, 23, 42, 0.5) !important;
  overflow: hidden;
}

.inc-archivo-consulta summary {
  cursor: pointer;
  padding: 16px 20px;
  background: linear-gradient(145deg, #1a2536, #0f172a);
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s;
  border-bottom: 1px solid transparent;
}

.inc-archivo-consulta summary:hover {
  background: #1e293b;
}

.inc-archivo-consulta[open] summary {
  border-bottom: 1px solid #334155;
}

.inc-archivo-consulta summary::before {
  content: "📁";
  font-size: 18px;
  margin-right: 8px;
}

.inc-archivo-consulta summary::after {
  content: "▼";
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.2s;
  color: #64748b;
}

.inc-archivo-consulta[open] summary::after {
  transform: rotate(180deg);
}

.inc-archivo-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0,0,0,0.1);
}

/* Estilos para el modal Acerca de */
.acerca-popup {
  border-radius: 28px !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
}

/* Ajuste para que el botón Cerrar sea más vistoso */
.acerca-popup .swal2-confirm {
  background: linear-gradient(145deg, #3b82f6, #2563eb) !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: 14px !important;
  padding: 12px 24px !important;
  border-radius: 40px !important;
  transition: transform 0.2s !important;
}
.acerca-popup .swal2-confirm:hover {
  transform: scale(1.02) !important;
}

/* ===== FIX MÓVIL: botón ⋮ centrado + dropdown visible ===== */
@media (max-width: 768px) {

  /* 1. Centrar el botón ⋮ */
  .vehicle-card-actions-side {
    justify-content: center !important;
  }
  .vehicle-card-actions-side .admin-menu-container {
    margin-left: 0 !important;
    display: flex;
    justify-content: center;
  }
  .card-menu-trigger {
    margin: 0 auto;
  }

  /* 2. Dropdown fijo centrado — encima de TODO */
  .admin-menu-dropdown.show {
    position: fixed !important;
    bottom: auto !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
    z-index: 2147483647 !important;
    min-width: 270px !important;
    max-width: 92vw !important;
    max-height: 82vh !important;
    overflow-y: auto !important;
    border-radius: 18px !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8) !important;
    animation: mobileMenuIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  @keyframes mobileMenuIn {
    from { opacity: 0; transform: translate(-50%, -44%) scale(0.9); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  }

  /* Botones táctiles más grandes */
  .admin-menu-dropdown.show button {
    padding: 15px 18px !important;
    font-size: 14px !important;
    border-radius: 11px !important;
    min-height: 48px !important;
  }
}

/* Overlay móvil — elemento real, no pseudo-elemento */
#mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2147483646;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
#mobile-menu-overlay.visible {
  display: block;
}

  
/* ── Subgrupos del menú Admin en el drawer ── */
.drawer-grupo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 4px 4px;
  margin-top: 6px;
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #475569;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  transition: color 0.2s;
}
.drawer-grupo-header:hover { color: #94a3b8; }
.drawer-grupo-header .dg-icon {
  font-size: 13px;
  opacity: 0.8;
}
.drawer-grupo-header .dg-arrow {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.25s ease;
  color: #334155;
}
.drawer-grupo-header.open .dg-arrow {
  transform: rotate(90deg);
  color: #64748b;
}
.drawer-grupo-items {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s ease-out;
}
.drawer-grupo-items.open {
  max-height: 400px;
}
.drawer-admin-submenu {
  max-height: 2000px !important;
}
/* Ajustar el max-height del submenú admin para acomodar grupos */
.drawer-admin-submenu.show {
  max-height: 2000px !important;
}

/* ── Admin dropdown agrupado ── */
.admin-dropdown button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: 'Inter', system-ui, sans-serif;
}
.admin-dropdown button:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* ══════════════════════════════════════════════
   DASHBOARD HOME v3 — diseño limpio y denso
   ══════════════════════════════════════════════ */

/* Hero */
.dh-hero {
  border-radius: 18px;
  background: linear-gradient(135deg, #080f1e 0%, #0f1f3d 60%, #0a1628 100%);
  border: 1px solid rgba(59,130,246,0.18);
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.dh-hero-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.dh-hero-kicker {
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #3b82f6; font-family: Oswald, sans-serif; margin: 0 0 5px;
}
.dh-hero-title {
  font-family: Oswald, sans-serif; font-size: 1.45rem; font-weight: 700;
  color: #f1f5f9; margin: 0 0 4px; letter-spacing: 0.02em;
}
.dh-hero-sub { font-size: 12px; color: #475569; margin: 0; }
.dh-hero-alert-box {
  background: rgba(59,130,246,0.09); border: 1px solid rgba(59,130,246,0.22);
  border-radius: 10px; padding: 10px 14px; min-width: 170px; flex-shrink: 0;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.dh-hero-alert-label {
  font-size: 8px; letter-spacing: 0.12em; color: #3b82f6;
  font-family: Oswald, sans-serif; margin: 0 0 4px;
}
.dh-hero-alert-val { font-size: 12px; color: #cbd5e1; margin: 0; line-height: 1.4; }
.dh-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; }
#dh-hero-prioridad-box.prioridad-critica {
  border-color: rgba(248,113,113,0.75);
  background: rgba(127,29,29,0.18);
  box-shadow: 0 0 0 1px rgba(248,113,113,0.22), 0 0 18px rgba(248,113,113,0.18);
  animation: dhPriorityPulse 1.8s ease-in-out infinite;
}
@keyframes dhPriorityPulse {
  0%,100% { box-shadow: 0 0 0 1px rgba(248,113,113,0.22), 0 0 10px rgba(248,113,113,0.12); }
  50% { box-shadow: 0 0 0 1px rgba(248,113,113,0.35), 0 0 20px rgba(248,113,113,0.24); }
}

.dh-home-sep {
  margin: 10px 0 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center;
  position: relative;
}
.dh-home-sep > span {
  position: relative;
  top: -8px;
  background: #0b1220;
  padding: 0 10px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: Oswald, sans-serif;
  color: #334155;
}
.dh-home-sep-with-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dh-home-sep-with-actions > span {
  top: -7px;
}

/* Mesa de aprobaciones (admin): bajo el hero, acceso inmediato */
.home-mesa-aprobaciones {
  margin: 6px 0 22px;
  padding: 16px 18px 18px;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(15,23,42,0.98) 0%, rgba(30,27,75,0.42) 45%, rgba(15,23,42,0.95) 100%);
  border: 1px solid rgba(251,191,36,0.28);
  box-shadow: 0 14px 44px rgba(0,0,0,0.38);
}
.home-mesa-aprobaciones.home-mesa-activa {
  border-color: rgba(251,191,36,0.5);
  box-shadow: 0 0 0 1px rgba(251,191,36,0.24), 0 12px 42px rgba(245,158,11,0.2);
}
.home-mesa-aprobaciones .home-mesa-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
.home-mesa-aprobaciones .home-mesa-title {
  font-family: Oswald, sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 5px;
  letter-spacing: 0.05em;
}
.home-mesa-aprobaciones .home-mesa-sub {
  font-size: 11px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
  max-width: 560px;
}
.home-mesa-aprobaciones .home-mesa-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 920px) {
  .home-mesa-aprobaciones .home-mesa-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1280px) {
  .home-mesa-aprobaciones .home-mesa-grid { grid-template-columns: repeat(3, 1fr); }
}
.home-mesa-aprobaciones .home-mesa-grid .dh-panel { margin-bottom: 0; }

/* ── KPI Row ── */
.dh-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
@media (min-width: 480px) { .dh-kpi-row { grid-template-columns: repeat(6, 1fr); } }

.dh-kpi {
  background: #0a1220;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px 8px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  position: relative;
}
.dh-kpi:hover {
  border-color: rgba(59,130,246,0.35);
  background: #0f1e35;
  transform: translateY(-2px);
}
.dh-kpi.dh-kpi-active {
  border-color: #3b82f6;
  background: rgba(59,130,246,0.1);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.18);
}
.dh-kpi-warn { border-color: rgba(248,113,113,0.15); }
.dh-kpi-warn:hover { border-color: rgba(248,113,113,0.4); background: #1a0f0f; }
.dh-kpi-warn .dh-kpi-fill { background: var(--warn-c, #f87171) !important; }
.dh-kpi-top { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 4px; }
.dh-kpi-icon { font-size: 15px; }
.dh-kpi-num  { font-family: Oswald, sans-serif; font-size: 1.5rem; font-weight: 700; color: #f8fafc; line-height: 1; }
.dh-kpi-label{ font-size: 8px; color: #64748b; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.dh-kpi-track { height: 3px; background: rgba(255,255,255,0.05); border-radius: 99px; overflow: hidden; }
.dh-kpi-fill  { height: 100%; width: 0; border-radius: 99px; background: var(--c, #3b82f6); transition: width 0.8s cubic-bezier(.4,0,.2,1); }

/* ── Grid 2 columnas ── */
.dh-grid2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 600px) { .dh-grid2 { grid-template-columns: 1fr 1fr; } }

/* ── Panel (tarjeta estándar del home) ── */
.dh-panel {
  background: #0a1220;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 12px 14px;
}
.dh-panel-critical {
  border-left: 3px solid rgba(248,113,113,0.7);
  background: linear-gradient(180deg, rgba(127,29,29,0.08), rgba(10,18,32,0.96));
}
.dh-panel-info {
  border-left: 3px solid rgba(59,130,246,0.65);
}
.dh-panel-head {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 10px;
}
.dh-panel-title {
  font-family: Oswald, sans-serif; font-size: 12px;
  color: #94a3b8; letter-spacing: 0.05em; text-transform: uppercase;
}
.dh-muted { text-align: center; color: #334155; font-size: 11px; padding: 10px 0; }

/* ── Chips / badges ── */
.dh-chip {
  font-size: 10px; border-radius: 999px; padding: 2px 8px;
  font-family: Oswald; font-weight: 700; letter-spacing: 0.04em;
}
.dh-chip-red    { background: rgba(239,68,68,0.18);  color: #f87171;  border: 1px solid rgba(239,68,68,0.3); }
.dh-chip-amber  { background: rgba(251,191,36,0.18); color: #fbbf24;  border: 1px solid rgba(251,191,36,0.3); }
.dh-chip-orange { background: rgba(249,115,22,0.18); color: #fb923c;  border: 1px solid rgba(249,115,22,0.3); }
.dh-chip-btn {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  color: #475569; border-radius: 6px; padding: 2px 8px; font-size: 11px;
  cursor: pointer; transition: color 0.15s;
}
.dh-chip-btn:hover { color: #94a3b8; }

/* ── Alertas ── */
.dh-alerta-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer;
  margin-bottom: 5px; transition: filter 0.15s;
  font-size: 12px;
}
.dh-alerta-item:hover { filter: brightness(1.15); }
.dh-alerta-critica { background: rgba(239,68,68,0.09);  border-color: rgba(239,68,68,0.18); }
.dh-alerta-warning  { background: rgba(251,191,36,0.09); border-color: rgba(251,191,36,0.18); }
.dh-alerta-info     { background: rgba(59,130,246,0.09); border-color: rgba(59,130,246,0.18); }
.dh-alerta-icono  { font-size: 14px; flex-shrink: 0; }
.dh-alerta-texto  { flex: 1; color: #cbd5e1; }
.dh-alerta-arrow  { color: #334155; flex-shrink: 0; }
.dh-alerta-ok { text-align: center; color: #22c55e; font-size: 11px; padding: 8px; }

/* ── Gráfica barras ── */
.dh-bars {
  display: flex; align-items: flex-end; gap: 6px;
  height: 100px; justify-content: space-around; padding: 0 4px;
}
.dh-bar-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; flex: 1; cursor: pointer; transition: opacity 0.15s;
}
.dh-bar-wrap:hover { opacity: 0.75; }
.dh-bar-val   { font-size: 10px; font-family: Oswald; color: #64748b; }
.dh-bar-outer { width: 100%; height: 70px; background: rgba(255,255,255,0.04); border-radius: 4px 4px 0 0; overflow: hidden; display: flex; align-items: flex-end; }
.dh-bar-inner { width: 100%; height: 0; border-radius: 4px 4px 0 0; transition: height 0.7s cubic-bezier(.4,0,.2,1); }
.dh-bar-label { font-size: 8px; color: #475569; letter-spacing: 0.03em; text-align: center; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Mini filas (por vencer / retraso / últimas) ── */
.dh-mini-row, .dh-ur-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; transition: all 0.13s;
  margin-bottom: 4px;
}
.dh-mini-row:hover, .dh-ur-row:hover { background: rgba(59,130,246,0.07); border-color: rgba(59,130,246,0.18); }
.dh-mini-critico { background: rgba(239,68,68,0.07);  border-color: rgba(239,68,68,0.15) !important; }
.dh-mini-warning  { background: rgba(251,191,36,0.07); border-color: rgba(251,191,36,0.15) !important; }
.dh-mini-left, .dh-ur-left  { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.dh-mini-right,.dh-ur-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.dh-mini-nombre, .dh-ur-nombre { font-family: Oswald; font-size: 12px; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-mini-sub, .dh-ur-sub { font-size: 10px; color: #475569; }
.dh-mini-badge { font-size: 10px; font-family: Oswald; border-radius: 999px; padding: 1px 7px; }
.dh-ur-precio  { font-family: Oswald; font-size: 12px; color: #22c55e; }
.dh-ur-estado  { font-size: 8px; letter-spacing: 0.06em; font-family: Oswald; border-radius: 999px; padding: 2px 7px; }
.dh-ur-dias    { font-size: 10px; color: #334155; }

.dh-sale-row {
  display: block;
  padding: 11px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.09);
  background: rgba(15,23,42,0.44);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, transform 0.14s;
}

.dh-sale-row:hover {
  background: rgba(30,41,59,0.62);
  border-color: rgba(34,197,94,0.2);
  transform: translateY(-1px);
}

.dh-sale-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 9px;
}

.dh-sale-title {
  font-family: Oswald, sans-serif;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.2;
}

.dh-sale-sub {
  margin-top: 3px;
  color: #64748b;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.dh-sale-price {
  font-family: Oswald, sans-serif;
  color: #4ade80;
  font-size: 14px;
  white-space: nowrap;
}

.dh-sale-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.dh-sale-metric {
  min-width: 0;
  padding: 7px 6px;
  border-radius: 9px;
  background: rgba(2,6,23,0.42);
  border: 1px solid rgba(148,163,184,0.08);
}

.dh-sale-metric b {
  display: block;
  font-family: Oswald, sans-serif;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.1;
}

.dh-sale-metric span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 9px;
  line-height: 1.15;
}

/* ── Tabla vendedores ── */
.dh-tv-header {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
  padding: 4px 10px; font-size: 8px; color: #334155;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 3px;
}
.dh-tv-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; transition: all 0.13s; margin-bottom: 2px;
}
.dh-tv-row:hover { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.18); }
.dh-tv-nombre { font-family: Oswald; font-size: 11px; color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-tv-sep    { font-family: Oswald; font-size: 12px; color: #fbbf24; text-align: right; }
.dh-tv-proc   { font-family: Oswald; font-size: 12px; color: #a78bfa; text-align: right; }

/* ── Drilldown ── */
.dh-drill-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; transition: all 0.13s; margin-bottom: 3px;
}
.dh-drill-row:hover { background: rgba(59,130,246,0.09); border-color: rgba(59,130,246,0.18); }
.dh-drill-main { display: flex; flex-direction: column; gap: 2px; }
.dh-drill-nombre { font-family: Oswald; font-size: 13px; color: #e2e8f0; }
.dh-drill-vendedor { font-size: 10px; color: #475569; }
.dh-drill-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.dh-drill-vin { font-size: 10px; color: #334155; font-family: monospace; }
.dh-drill-precio { font-size: 11px; color: #22c55e; font-family: Oswald; }

/* ── Feed ── */
.dh-feed-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 8px; border-radius: 8px; cursor: pointer;
  transition: background 0.13s; margin-bottom: 2px;
}
.dh-feed-item:hover { background: rgba(255,255,255,0.03); }
.dh-feed-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.dh-feed-texto { font-size: 11px; color: var(--feed-text-color, #94a3b8); }
.dh-feed-sub   { font-size: 10px; color: #334155; margin-top: 1px; }

/* Mesa admin: facturadores × separaciones / pendientes facturación */
.dh-mesa-fact-admin {
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.98), rgba(8, 47, 73, 0.35));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.dh-mesa-fact-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  margin-bottom: 10px;
}
.dh-mesa-fact-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dh-mesa-fact-kpi {
  font-family: Oswald, sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.45);
  color: #e2e8f0;
}
.dh-mesa-fact-kpi b {
  color: #38bdf8;
  font-weight: 700;
}
.dh-mesa-fact-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(51, 65, 85, 0.6);
  max-height: min(62vh, 520px);
  overflow-y: auto;
}
.dh-mesa-fact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.dh-mesa-fact-table th {
  text-align: left;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.95);
  color: #94a3b8;
  font-family: Oswald, sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  position: sticky;
  top: 0;
  z-index: 1;
}
.dh-mesa-fact-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.85);
  vertical-align: middle;
  color: #e2e8f0;
}
.dh-mesa-fact-table tr.dh-mesa-fact-row-main:hover td {
  background: rgba(59, 130, 246, 0.08);
}
.dh-mesa-fact-num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dh-mesa-fact-num.dh-mfz-warn {
  color: #fbbf24;
}
.dh-mesa-fact-num.dh-mfz-danger {
  color: #f87171;
}
.dh-mesa-fact-num.dh-mfz-ok {
  color: #86efac;
}
.dh-mesa-fact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dh-mesa-fact-actions button {
  font-size: 10px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.9);
  color: #cbd5e1;
  cursor: pointer;
  font-family: Oswald, sans-serif;
  letter-spacing: 0.04em;
}
.dh-mesa-fact-actions button:hover {
  border-color: rgba(56, 189, 248, 0.55);
  color: #fff;
}
.dh-mesa-fact-detail td {
  padding: 0;
  background: rgba(2, 6, 23, 0.55);
}
.dh-mesa-fact-detail-inner {
  padding: 10px 12px 12px 18px;
  font-size: 11px;
  color: #94a3b8;
  border-top: 1px dashed rgba(51, 65, 85, 0.5);
}
.dh-mesa-fact-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 6px 4px 0;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(71, 85, 105, 0.5);
  cursor: pointer;
  color: #e2e8f0;
  font-size: 10px;
}
.dh-mesa-fact-chip:hover {
  border-color: rgba(56, 189, 248, 0.45);
}

.dh-grid-home {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.dh-grid-home-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dh-grid-home-admin-wrap { margin-bottom: 20px; }
.dh-grid-home-admin {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 700px) {
  .dh-grid-home,
  .dh-grid-home-admin {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1024px) {
  .dh-grid-home,
  .dh-grid-home-admin {
    gap: 20px;
  }
}
@media (max-width: 699px) {
  .dh-home-sep-with-actions {
    flex-wrap: wrap;
  }
  .dh-home-sep-with-actions .home-view-toggle {
    margin-left: auto;
  }
}

.home-stock-status-bar {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 8px;
}
.home-stock-status-track {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(2,6,23,0.58);
  display: flex;
}
.home-stock-status-seg { height: 100%; }
.home-stock-status-seg.disp { background: #22c55e; }
.home-stock-status-seg.sep { background: #fbbf24; }
.home-stock-status-seg.oth { background: #64748b; }

@keyframes dhFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
#sec-home.dh-animate-in .dh-panel,
#sec-home.dh-animate-in .home-stock-card {
  opacity: 0;
  animation: dhFadeUp 280ms ease forwards;
}

/* ===== PRESENCIA DE USUARIO (HEADER) ===== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

#header-user-slot {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

/* Selector de sección (header, junto al usuario) */
.header-section-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
  margin-right: 4px;
}
.header-section-select {
  max-width: min(220px, 42vw);
  min-width: 0;
  flex: 0 1 auto;
  padding: 7px 12px 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.82);
  color: #e2e8f0;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.header-section-select:focus {
  outline: none;
  border-color: rgba(225, 29, 72, 0.45);
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.12);
}

@media (max-width: 480px) {
  .header-section-select { max-width: min(200px, 52vw); }
}

#sm-online-badge-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  margin-right: 6px;
  background: rgba(74,222,128,0.2);
  border: 1px solid rgba(74,222,128,0.45);
  color: #86efac;
  font-size: 10px;
  font-family: Oswald, sans-serif;
  letter-spacing: 0.03em;
}

.user-chip-wrap {
  position: relative;
}

.user-chip {
  height: 40px;
  min-width: 170px;
  max-width: 240px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,23,42,0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 5px 10px 5px 4px;
  color: #e2e8f0;
  cursor: pointer;
}

.user-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: Oswald, sans-serif;
  font-size: 14px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.user-chip-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.user-chip-name {
  font-family: Oswald, sans-serif;
  font-size: 12px;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip-role {
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.user-chip-caret {
  margin-left: auto;
  color: #64748b;
  font-size: 11px;
  transition: transform .15s ease;
}

.user-chip-wrap.open .user-chip-caret {
  transform: rotate(180deg);
}

.user-chip-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(2,6,23,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.42);
  padding: 6px;
  display: none;
  z-index: 2600;
}

.user-chip-wrap.open .user-chip-menu {
  display: block;
}

.user-chip-menu button {
  width: 100%;
  border: none;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  font-size: 11px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.user-chip-menu button:hover {
  background: rgba(59,130,246,0.15);
  color: #fff;
}

.notif-center-wrap {
  position: relative;
  flex-shrink: 0;
}

.notif-bell {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,23,42,0.68);
  color: #e2e8f0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.notif-bell:hover {
  border-color: rgba(96,165,250,0.34);
  background: rgba(30,41,59,0.88);
}

.notif-bell-icon {
  font-size: 18px;
  line-height: 1;
  transform: rotate(-18deg);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 5px;
  background: linear-gradient(135deg,#fb7185,#e11d48);
  color: #fff;
  border: 2px solid #0f172a;
  font-family: Oswald, sans-serif;
  font-size: 10px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  box-shadow: 0 8px 18px rgba(225,29,72,0.35);
}

.notif-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(380px, calc(100vw - 24px));
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(15,23,42,0.98), rgba(2,6,23,0.98));
  box-shadow: 0 24px 60px rgba(0,0,0,0.48);
  overflow: hidden;
  z-index: 2700;
}

.notif-center-wrap.open .notif-panel {
  display: block;
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}

.notif-panel-head strong {
  display: block;
  color: #f8fafc;
  font-family: Oswald, sans-serif;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.notif-panel-head small {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  margin-top: 2px;
}

.notif-panel-head button,
.notif-item-actions button {
  border: 0;
  border-radius: 999px;
  background: rgba(59,130,246,0.14);
  color: #bfdbfe;
  font-size: 11px;
  padding: 7px 10px;
  cursor: pointer;
}

.notif-panel-head button:hover,
.notif-item-actions button:hover {
  background: rgba(59,130,246,0.24);
  color: #fff;
}

.notif-list {
  max-height: min(420px, 60vh);
  overflow: auto;
  padding: 10px;
}

.notif-empty {
  padding: 24px 16px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
}

.notif-item {
  border: 1px solid rgba(255,255,255,0.06);
  border-left-width: 3px;
  border-radius: 14px;
  background: rgba(15,23,42,0.66);
  padding: 11px 11px 10px;
}

.notif-item + .notif-item {
  margin-top: 8px;
}

.notif-item.info { border-left-color: #60a5fa; }
.notif-item.warning { border-left-color: #fbbf24; }
.notif-item.critical { border-left-color: #fb7185; }
.notif-item.success { border-left-color: #34d399; }

.notif-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}

.notif-item-top span {
  color: #cbd5e1;
  font-family: Oswald, sans-serif;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.notif-item-top small {
  color: #64748b;
  font-size: 10px;
}

.notif-item-msg {
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.45;
}

.notif-item-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

/* ===== NUEVO DISEÑO DEL DRAWER ===== */
.drawer {
  background: linear-gradient(180deg, #0b0f17 0%, #0f172a 100%) !important;
  border-right: 1px solid rgba(59, 130, 246, 0.15) !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4) !important;
}

.drawer-content {
  padding: 12px 8px 10px !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100%;
  box-sizing: border-box;
}

.drawer-content button {
  margin: 2px 8px !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  font-weight: 500 !important;
  color: var(--sm-text-secondary) !important;
  transition: all 0.2s ease !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  font-size: 13px !important;
  letter-spacing: 0.3px !important;
}

.drawer-profile {
  margin: 0 8px 4px;
  padding: 12px;
  border: 1px solid var(--sm-border-medium);
  border-radius: 14px;
  background: var(--sm-bg-raised);
}

.drawer-profile-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: Oswald, sans-serif;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.drawer-profile-name {
  font-family: Oswald, sans-serif;
  font-size: 18px;
  color: #f8fafc;
  letter-spacing: 0.02em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-role-badge {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.16);
  font-family: Oswald, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.drawer-role-badge.tier-1 { font-size: 9px; font-weight: 600; }
.drawer-role-badge.tier-2 { font-size: 9.5px; font-weight: 650; }
.drawer-role-badge.tier-3 { font-size: 10px; font-weight: 700; }
.drawer-role-badge.tier-4 { font-size: 10.5px; font-weight: 700; }
.drawer-role-badge.tier-5 { font-size: 11px; font-weight: 800; }
.drawer-role-badge.tier-6 { font-size: 11px; font-weight: 900; }

.drawer-profile-sep {
  height: 1px;
  margin: 10px 0 8px;
  background: linear-gradient(90deg, rgba(148,163,184,0), rgba(148,163,184,0.24), rgba(148,163,184,0));
}

.drawer-profile-sub {
  color: #cbd5e1;
  font-size: 11px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.drawer-online-mini {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.drawer-online-mini-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(15,23,42,0.8);
  border: 1px solid rgba(148,163,184,0.2);
  max-width: 130px;
}

.drawer-online-mini-avatar {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
  flex-shrink: 0;
}

.drawer-online-mini-name {
  font-size: 10px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-profile {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 10px 24px rgba(2,6,23,0.24);
}

.drawer-search {
  margin: 0 8px 2px;
  position: relative;
}

.drawer-search input {
  width: 100%;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.14);
  background: var(--sm-bg-sunken);
  color: #e2e8f0;
  padding: 0 11px 0 34px;
  outline: none;
  font-size: 12px;
}
.drawer-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #64748b;
  pointer-events: none;
}

.drawer-search input::placeholder {
  color: #64748b;
}

.drawer-groups {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  scrollbar-gutter: stable;
}

.drawer-grupo {
  margin: 2px 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.drawer-content button:hover {
  background: rgba(225, 29, 72, 0.15) !important;
  color: #f8fafc !important;
  transform: translateX(4px) !important;
}

.drawer-content button.active {
  background: linear-gradient(90deg, rgba(225, 29, 72, 0.25) 0%, rgba(225, 29, 72, 0.05) 100%) !important;
  color: #f1f5f9 !important;
  border-left: 3px solid #e11d48 !important;
}

.drawer-header {
  padding: 20px 16px 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  margin-bottom: 8px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.drawer-brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: Oswald, sans-serif;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(135deg, #1e3a5f, #3b82f6);
}
.drawer-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.drawer-brand-text strong {
  font-family: Oswald, sans-serif;
  font-size: 12px;
  color: #e2e8f0;
  letter-spacing: .04em;
}
.drawer-brand-text span {
  margin-top: 3px;
  font-size: 9px;
  color: #64748b;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.drawer-header .close-drawer {
  background: transparent !important;
  color: #94a3b8 !important;
  font-size: 18px !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
}

.drawer-header .close-drawer:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
}

.drawer-brand-version {
  font-size: 9px;
  color: #475569;
  letter-spacing: 0.08em;
  font-family: 'Oswald', sans-serif;
  display: block;
  margin-top: 1px;
}

.drawer-theme-btn {
  background: rgba(148,163,184,0.1);
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  color: #94a3b8;
  transition: background 0.2s;
  padding: 0;
}

.drawer-theme-btn:hover {
  background: rgba(148,163,184,0.2);
  color: #e2e8f0;
}

.drawer-grupo-header {
  min-height: 29px;
  padding: 5px 8px !important;
  margin: 2px 5px !important;
  border-radius: 11px;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-grupo-header.open {
  color: #cbd5e1 !important;
  background: var(--sm-bg-hover);
}
.drawer-grupo {
  transition: border-left-color 0.2s;
}
.drawer-grupo-header.open {
  color: #e2e8f0 !important;
}

.drawer-grupo-header .dg-icon {
  width: 16px;
  text-align: center;
}

.drawer-grupo-header .dg-count {
  margin-left: auto;
  min-width: 18px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #94a3b8;
  background: rgba(148,163,184,0.08);
  font-size: 9px;
}

.drawer-grupo-header .dg-arrow {
  margin-left: 2px;
  font-size: 11px;
  transition: transform 0.2s;
  color: #475569;
}

.drawer-grupo-header.open .dg-arrow {
  transform: rotate(90deg);
  color: #94a3b8;
}

.drawer-grupo-items {
  padding-left: 0 !important;
  border-left: none !important;
  margin-left: 0 !important;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.drawer-menu-item,
.drawer-grupo-items button {
  display: flex !important;
  align-items: center !important;
  min-height: 34px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-align: left !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.drawer-item-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #64748b;
  transition: color 0.15s;
}
.drawer-menu-item.active .drawer-item-icon,
.drawer-grupo-items button.active .drawer-item-icon {
  color: var(--rojo);
}
.drawer-item-badge-dot {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-family: 'Oswald', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  animation: pulse 1.5s infinite;
}
.drawer-item-perm-tag {
  margin-left: auto;
  font-size: 9px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: .05em;
  opacity: .95;
}

.role-editor-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
}
.role-card {
  border-radius: 12px;
  padding: 10px;
  border: 1px solid rgba(148,163,184,0.16);
  background: rgba(15,23,42,0.5);
  cursor: pointer;
}
.role-card.active { box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset; }
.perm-switch-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(148,163,184,0.14);
  border-radius: 10px;
  margin-bottom: 6px;
  background: rgba(2,6,23,0.45);
}
.perm-switch {
  position: relative;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}
.perm-switch input { opacity: 0; width: 0; height: 0; }
.perm-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #334155;
  transition: .2s;
}
.perm-switch-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: .2s;
}
.perm-switch input:checked + .perm-switch-slider {
  background: rgba(34,197,94,0.6);
}
.perm-switch input:checked + .perm-switch-slider::before {
  transform: translateX(18px);
}

.drawer-item-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
}

.drawer,
.drawer-content,
.drawer-search,
.drawer-search input,
.drawer-profile {
  max-width: 100%;
  box-sizing: border-box;
}

.drawer-search input,
.drawer-content input,
.drawer-content select,
.drawer-content textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.drawer-groups::-webkit-scrollbar {
  width: 8px;
}
.drawer-groups::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.22);
  border-radius: 999px;
}
.drawer-groups::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.65);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.drawer-bottom-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 6px;
  margin-top: auto;
  border-top: 1px solid rgba(148,163,184,0.09);
  background: rgba(11,15,23,0.92);
  position: static;
  z-index: 1;
}

.drawer-bottom-actions--solo {
  grid-template-columns: 1fr;
}

.drawer-bottom-actions button:not(.drawer-btn-cambiar-usuario) {
  margin: 0 !important;
  min-height: 32px !important;
  justify-content: center !important;
  padding: 6px 8px !important;
  border-radius: 10px !important;
  background: rgba(15,23,42,0.92) !important;
  border: 1px solid rgba(148,163,184,0.16) !important;
  color: #cbd5e1 !important;
  font-size: 8.5px !important;
  letter-spacing: .04em;
}

.drawer-bottom-solo {
  width: 100% !important;
  font-size: 11px !important;
  letter-spacing: 0.06em !important;
  font-family: Oswald, sans-serif !important;
  text-transform: uppercase;
}

/* Botón inferior ancho: legible (antes dos columnas con fuente ~8px y texto recortado) */
.drawer-bottom-actions .drawer-btn-cambiar-usuario {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 !important;
  min-height: 32px !important;
  padding: 8px 4px !important;
  border-radius: 10px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  text-align: center !important;
  text-transform: uppercase !important;
  font-family: 'Oswald', sans-serif !important;
  color: #64748b !important;
  background: rgba(148,163,184,0.07) !important;
  border: 1px solid rgba(148,163,184,0.12) !important;
  transform: none !important;
}

.drawer-bottom-actions .drawer-btn-cambiar-usuario:hover {
  background: rgba(148,163,184,0.15) !important;
  color: #94a3b8 !important;
  border-color: rgba(148,163,184,0.2) !important;
  transform: none !important;
}

.drawer-bottom-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 10px;
  background: rgba(148,163,184,0.07);
  border: 1px solid rgba(148,163,184,0.12);
  color: #64748b;
  font-size: 10px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.drawer-bottom-action-btn:hover {
  background: rgba(148,163,184,0.15);
  color: #94a3b8;
}
.drawer-bottom-action-btn svg {
  color: currentColor;
}

.drawer-btn-cambiar-usuario__icon {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
}

.drawer-btn-cambiar-usuario__text {
  flex: 1;
  min-width: 0;
}

.drawer-empty-search {
  padding: 14px 10px;
  margin: 6px 8px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
  border: 1px dashed rgba(148,163,184,0.16);
  border-radius: 12px;
}

.tab-sep-btn.active {
  background: linear-gradient(135deg, #1e3a5f, #2563a8) !important;
  color: #93c5fd !important;
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.4);
}

.dh-panel {
  background: #0a1220;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.dh-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.dh-panel-title {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  color: #e2e8f0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dh-chip {
  font-size: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: 'Oswald';
  font-weight: 600;
}

.dh-chip-amber { background: rgba(251, 191, 36, 0.15); border: 1px solid rgba(251, 191, 36, 0.3); color: #fbbf24; }
.dh-chip-red   { background: rgba(239, 68, 68, 0.15);  border: 1px solid rgba(239, 68, 68, 0.3);  color: #f87171; }
.dh-chip-blue  { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); color: #60a5fa; }



/* ============================================================
   MOBILE PROFESSIONAL OVERRIDE
   Solo afecta pantallas pequenas. Mantiene desktop intacto.
   ============================================================ */
@media (max-width: 768px) {
  html { scroll-padding-top: 82px; }
  body { background: #07111f !important; font-size: 14px; overflow-x: hidden; }
  #app { min-height: 100vh; background: linear-gradient(180deg, #07111f 0%, #0b1220 42%, #080f1b 100%); }

  .header {
    position: sticky; top: 0; z-index: 1200; min-height: 58px;
    padding: 8px 10px !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
    background: rgba(7, 17, 31, 0.96) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.34);
  }

  .hamburger, #menuToggle {
    width: 42px !important; height: 42px !important; min-width: 42px !important;
    border-radius: 12px !important; background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important; color: #e2e8f0 !important;
    font-size: 19px !important; display: inline-flex !important; align-items: center; justify-content: center;
  }

  .logo-container {
    min-width: 0;
    flex: 1 1 auto;
    font-size: clamp(1.05rem, 4.2vw, 1.35rem) !important;
    letter-spacing: 0.04em !important;
    line-height: 1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  #sm-online-badge-header {
    min-width: 18px !important;
    height: 18px !important;
    margin-right: 0 !important;
    font-size: 9px !important;
  }

  .menu { display: none !important; }
  .container { width: 100% !important; max-width: 100% !important; padding: 12px 10px 104px !important; }
  .section { padding-top: 0 !important; }
  .container > .section { display: none !important; }
  .container > .section[style*="display: block"],
  .container > .section[style*="display:block"] {
    display: block !important;
    position: relative;
    z-index: 1;
    clear: both;
  }

  body.drawer-open .header,
  body.drawer-open .container {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.drawer-open {
    overflow: hidden;
  }

  .drawer {
    position: fixed !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.24s ease !important;
    z-index: 2200 !important;
    /* Panel completo en viewport: cabecera fija + lista con scroll + barra inferior sin solapar */
    display: flex !important;
    flex-direction: column !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    box-sizing: border-box !important;
  }

  .drawer.open {
    left: 0 !important;
    transform: translateX(0) !important;
  }
  .drawer-header {
    flex-shrink: 0 !important;
    min-height: 48px; padding: 8px 10px !important; display: flex; align-items: center; justify-content: flex-end;
    background: rgba(2, 6, 23, 0.32); position: relative !important; z-index: 2;
  }
  .drawer-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 6px 10px 8px !important;
  }
  .drawer-groups {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 6px;
  }
  .drawer-bottom-actions {
    flex-shrink: 0 !important;
    margin-top: 0 !important;
    position: relative !important;
    z-index: 3;
  }
  .drawer-content button, .drawer-grupo-items button {
    min-height: 32px !important; width: 100% !important; margin: 1px 0 !important;
    border-radius: 10px !important; padding: 4px 8px !important; font-size: 12px !important;
    line-height: 1.2 !important; white-space: normal !important;
  }

  .section-hero, .dh-hero, .dashboard-hero-shell {
    margin: 0 0 12px !important; padding: 16px !important; border-radius: 16px !important;
    box-shadow: 0 14px 26px rgba(2, 6, 23, 0.22) !important;
  }

  #sec-home,
  #sec-home * {
    max-width: 100%;
    box-sizing: border-box;
  }

  #sec-home {
    overflow-x: hidden;
  }

  #sec-home .dh-hero {
    padding: 14px !important;
  }

  #sec-home #dashboard-acciones-top {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-top: 12px !important;
  }

  #sec-home #dashboard-acciones-top button,
  #sec-home .dashboard-action-btn,
  #sec-home .dashboard-link-btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 40px !important;
    padding: 9px 8px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 2550;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 7px;
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 18px;
    background: rgba(7,17,31,0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 16px 34px rgba(2,6,23,0.4);
  }

  body.drawer-open .mobile-bottom-nav {
    display: none !important;
  }

  #sec-home .home-view-toggle {
    width: 100% !important;
  }

  #sec-home .home-view-toggle button {
    min-height: 34px !important;
    padding: 7px 8px !important;
    font-size: 10px !important;
  }

  #sec-home .home-stock-shortcuts {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin: 10px 0 12px !important;
  }

  #sec-home .home-stock-card {
    min-height: 88px !important;
    padding: 11px !important;
    border-radius: 14px !important;
  }

  #sec-home .home-stock-card-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
  }

  #sec-home .home-stock-card-title {
    margin-top: 10px !important;
    font-size: 15px !important;
  }

  #sec-home .home-stock-card-sub {
    font-size: 10px !important;
  }

  #sec-home .home-stock-card.registro {
    min-height: 70px !important;
    margin: -2px 0 12px !important;
  }

  #sec-home .home-role-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  #sec-home .home-role-kpis .card {
    min-height: 78px !important;
    padding: 11px !important;
  }

  #sec-home .home-role-kpis .card div:nth-child(2) {
    margin: 6px 0 2px !important;
    font-size: 22px !important;
  }

  #sec-home .home-role-detail {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #sec-home .home-ops-mesas {
    padding: 10px !important;
    border-radius: 14px !important;
  }

  #sec-home .home-ops-mesas-head {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  #sec-home .home-ops-mesas-grid,
  #sec-home .home-ops-secciones {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #sec-home .home-role-detail .card {
    padding: 12px !important;
  }

  #sec-home .home-register-action {
    font-size: 10px !important;
  }

  #sec-home #admin-control-body > div,
  #sec-home .solo-admin > div[style*="grid-template-columns:1fr 1fr"],
  #sec-home > div[style*="grid-template-columns:1fr 1fr"],
  #sec-home div[style*="grid-template-columns:repeat(4,1fr)"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #sec-home #dh-kpi-row-admin {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  #sec-home #panel-pipeline-chart canvas {
    max-width: 100% !important;
  }

  #sec-home .dh-panel-head {
    gap: 8px;
    align-items: flex-start !important;
  }

  #sec-home .dh-panel-title {
    min-width: 0;
    white-space: normal !important;
    line-height: 1.25 !important;
  }

  #sec-home .dh-chip-btn {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 40px !important;
    padding: 7px 9px !important;
  }

  #sec-home .stat-card {
    min-width: 0 !important;
  }

  #sec-home .dh-ur-row,
  #sec-home .dh-mini-row {
    align-items: flex-start !important;
    gap: 8px !important;
  }

  #sec-home .dh-ur-right,
  #sec-home .dh-mini-right {
    max-width: 42%;
  }

  #sec-home .dh-ur-estado,
  #sec-home .dh-mini-badge {
    white-space: normal !important;
    text-align: center;
  }

  #sec-home [style*="display:flex"][style*="justify-content:space-around"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #sec-home [style*="font-size:32px"] {
    font-size: 24px !important;
  }
  .section-hero-title, .dh-hero-title { font-size: 1.45rem !important; line-height: 1.12 !important; }
  .section-hero-copy, .dh-hero-sub, .dh-hero-alert-val { font-size: 12px !important; line-height: 1.55 !important; }
  .dh-hero-body, .dashboard-hero-layout { display: grid !important; grid-template-columns: 1fr !important; gap: 12px !important; }
  .dh-hero-alert-box, .dashboard-priority-card { width: 100% !important; min-width: 0 !important; border-radius: 12px !important; }

  .dh-hero-actions, .dashboard-actions-row, .vehicle-card-actions-main, .vehicle-card-actions-side,
  .filter-row, .filter-row-prov, .section-filters, .section-filters-transito {
    display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important;
  }

  .inventory-toolbar {
    padding: 12px !important;
  }

  .inventory-toolbar-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
  }

  .inventory-toolbar-title {
    font-size: 14px !important;
  }

  .inventory-toolbar-copy {
    font-size: 11px !important;
    line-height: 1.35 !important;
  }

  .inventory-toolbar-head .btn-submit {
    width: 100% !important;
    min-height: 38px !important;
    padding: 8px 10px !important;
  }

  .filter-chip-block {
    margin-top: 8px !important;
  }

  .filter-chip-title {
    font-size: 10px !important;
  }

  .filter-chips {
    gap: 6px !important;
  }
  .dh-hero-actions > *, .dashboard-actions-row > *, .vehicle-card-actions-main > *, .vehicle-card-actions-side > *,
  .filter-row > *, .filter-row-prov > *, .section-filters > *, .section-filters-transito > * {
    min-width: 0 !important; width: 100% !important;
  }

  #sec-clientes .crm-action-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  #sec-clientes .crm-action-row .btn-submit {
    min-width: 0 !important;
    width: 100% !important;
    padding: 10px 8px !important;
    font-size: 11px !important;
  }

  #sec-clientes #crm-pipeline-board {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding-bottom: 4px !important;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  #sec-clientes #crm-pipeline-board > div {
    flex: 0 0 78% !important;
    min-width: 220px !important;
    scroll-snap-align: start;
  }

  #sec-clientes #lista-clientes-contenido > div {
    border-radius: 14px !important;
    padding: 12px !important;
  }

  #sec-clientes #crm-kpis .dh-kpi-card {
    min-height: 84px !important;
    padding: 12px 10px !important;
  }

  #sec-clientes #crm-kpis .dh-kpi-value {
    font-size: 1.4rem !important;
    line-height: 1.1 !important;
  }

  .btn-submit, .btn-mini, .dh-chip-btn, button { touch-action: manipulation; }
  .btn-submit, .btn-mini {
    min-height: 44px !important; border-radius: 12px !important; font-size: 12px !important;
    line-height: 1.2 !important; white-space: normal !important;
  }
  .search-box, .form-control, .sel-filter, input[type="text"], input[type="number"], input[type="date"],
  input[type="password"], select, textarea {
    min-height: 44px !important; border-radius: 12px !important; font-size: 15px !important;
  }

  .dh-kpi-row, .dashboard-summary-grid, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
  .dh-kpi, .stat-card, .dashboard-summary-card {
    min-height: 96px !important; padding: 12px 10px !important; border-radius: 14px !important;
  }
  .dh-kpi-num, .stat-num, .dashboard-card-soft-value { font-size: 1.55rem !important; }

  .dh-grid2, .dashboard-grid, .dashboard-grid.priorities, .dashboard-grid.access, .dashboard-grid.kpis,
  .dashboard-grid.detail, .vehicle-card-info-grid, .vehicle-card-highlight-grid, .info-grid {
    grid-template-columns: 1fr !important; gap: 10px !important;
  }
  .dh-panel, .surface-card, .dashboard-card, .dashboard-card-soft, .card, .card-professional, .section .card {
    border-radius: 14px !important; padding: 14px !important; margin-bottom: 10px !important;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.2) !important;
  }

  .vehicle-card-price {
    display: grid !important; grid-template-columns: 1fr !important; gap: 10px !important;
  }

  .vehicle-card-shell {
    gap: 10px !important;
  }

  .vehicle-card-header {
    margin-bottom: 4px !important;
  }

  .vehicle-card-title {
    gap: 6px !important;
  }

  .vehicle-card-marca,
  .vehicle-card-modelo {
    font-size: 1.2rem !important;
  }

  .vehicle-card-version {
    margin-top: 7px !important;
    font-size: 13px !important;
  }

  .vehicle-card-info-grid {
    gap: 7px !important;
  }

  .vehicle-card-highlight-grid {
    gap: 7px !important;
  }

  .vehicle-card-highlight,
  .vehicle-card-detail-box {
    padding: 8px !important;
  }

  .vehicle-card-price {
    gap: 8px !important;
    padding-top: 8px !important;
  }

  .vehicle-card-price-label {
    font-size: 10px !important;
  }

  .vehicle-card-price-value {
    font-size: 1.2rem !important;
  }

  .vehicle-card-actions-note {
    font-size: 10px !important;
  }

  .vehicle-card-actions-main,
  .vehicle-card-actions-side {
    gap: 6px !important;
  }
  .vehicle-card-header-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }
  .vehicle-card-header-aside .vehicle-card-quick-actions {
    width: auto !important;
  }
  .vehicle-card-actions {
    width: 100% !important;
    min-width: 0 !important;
  }
  .card-professional h3:not(.vehicle-card-title) {
    font-size: 1.18rem !important;
    line-height: 1.18 !important;
    word-break: break-word;
  }
  .vehicle-card-price { align-items: stretch !important; }
  .vehicle-card-price-value { font-size: 1.3rem !important; }

  .dh-mini-row, .dh-ur-row, .dh-drill-row, .dh-feed-item, .dh-tv-row {
    min-height: 58px; padding: 10px !important; border-radius: 12px !important;
  }

  #sec-dash .dash-filtros-sep {
    padding: 12px !important;
  }

  #sec-dash .dash-filtros-sep-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    align-items: end !important;
  }

  #sec-dash .dash-filtros-sep-row > div,
  #sec-dash .dash-filtros-sep-row > button {
    min-width: 0 !important;
    width: 100% !important;
  }

  #sec-dash .dash-filtros-sep-row > div:first-child {
    grid-column: 1 / -1 !important;
  }

  #sec-dash .dash-sep-tabs button {
    min-height: 38px !important;
    font-size: 11px !important;
  }

  #sec-dash #titulo-separaciones {
    display: inline-block;
    font-size: 16px !important;
  }

  #sec-dash #contResumen .card,
  #sec-dash #contEntregadosPendientes .card {
    padding: 12px !important;
  }

  #facturador-home-workspace .dh-panel {
    padding: 12px !important;
  }

  #facturador-home-workspace .dh-panel-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #facturador-home-workspace .dh-panel-head > div:last-child {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #facturador-home-workspace [style*="grid-template-columns:repeat(4,minmax(120px,1fr))"] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #facturador-home-workspace [style*="grid-template-columns:minmax(180px,1.4fr) minmax(150px,.8fr) minmax(130px,.7fr) auto"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  #factWs-operations-list > div {
    padding: 10px !important;
  }

  #factWs-operations-list > div > div:first-child {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #factWs-operations-list > div > div:first-child > div:last-child {
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  #factWs-operations-list .dh-chip-btn {
    min-height: 36px !important;
    padding: 7px 9px !important;
    font-size: 10px !important;
  }
  .dh-mini-nombre, .dh-ur-nombre, .dh-drill-nombre, .dh-tv-nombre {
    font-size: 13px !important; white-space: normal !important; line-height: 1.25 !important;
  }
  .dh-mini-sub, .dh-ur-sub, .dh-drill-vendedor, .dh-feed-sub {
    font-size: 11px !important; line-height: 1.35 !important; word-break: break-word;
  }

  .dh-bars { height: 120px !important; gap: 5px !important; }
  .dh-bar-label { white-space: normal !important; line-height: 1.1 !important; }

  .swal2-popup {
    width: calc(100vw - 20px) !important; max-width: calc(100vw - 20px) !important;
    border-radius: 16px !important; padding: 16px !important;
  }
  .swal2-html-container { margin: 10px 0 0 !important; max-height: 72vh !important; overflow-y: auto !important; }
  .swal2-actions { width: 100% !important; gap: 8px !important; }
  .swal2-actions button { flex: 1 1 0 !important; min-height: 44px !important; border-radius: 12px !important; }

  table { display: block; width: 100% !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 420px) {
  .container { padding-left: 8px !important; padding-right: 8px !important; }
  .dh-hero-actions, .dashboard-actions-row, .vehicle-card-actions-main, .vehicle-card-actions-side,
  .filter-row, .filter-row-prov, .section-filters, .section-filters-transito { grid-template-columns: 1fr !important; }
  .dh-kpi-row, .dashboard-summary-grid, .stats-grid { grid-template-columns: 1fr 1fr !important; }
  .logo-container { font-size: 17px !important; }

  #sec-home #dashboard-acciones-top {
    grid-template-columns: 1fr !important;
  }

  #sec-home #dh-kpi-row-admin {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Corrección global de casillas que se salen del contenedor */
.section-filters > *,
.section-filters-transito > *,
.filter-row > *,
.filter-row-prov > * {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.section-filters input,
.section-filters select,
.section-filters-transito input,
.section-filters-transito select,
.filter-row input,
.filter-row select,
.filter-row-prov input,
.filter-row-prov select {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.section-filters input[type="date"],
.filter-row input[type="date"],
.filter-row-prov input[type="date"] {
  padding-right: 10px !important;
  overflow: hidden !important;
}

.sel-filter,
.search-box,
.form-control,
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Ajuste final integral del menú lateral */
.drawer-content { gap: 4px !important; padding: 6px 8px 8px !important; }
.drawer-profile { margin: 0 6px 4px !important; padding: 10px !important; border-radius: 12px !important; }
.drawer-profile-head { gap: 8px !important; }
.drawer-avatar { width: 40px !important; height: 40px !important; border-radius: 12px !important; font-size: 16px !important; }
.drawer-profile-name { font-size: 15px !important; line-height: 1.15 !important; letter-spacing: 0.01em !important; }
.drawer-role-badge { margin-top: 4px !important; padding: 3px 9px !important; }
.drawer-profile-sub { font-size: 10px !important; }

.drawer-search { margin: 0 6px 2px !important; }
.drawer-search input { height: 36px !important; border-radius: 11px !important; font-size: 12px !important; padding: 0 10px 0 32px !important; }
.drawer-search-icon { left: 10px !important; font-size: 12px !important; }

.drawer-groups { padding: 0 2px 4px !important; }
.drawer-grupo { margin: 1px 0 !important; }
.drawer-grupo-header {
  min-height: 28px !important;
  margin: 2px 4px !important;
  padding: 4px 7px !important;
  font-size: 11px !important;
  letter-spacing: .07em !important;
  gap: 6px !important;
}
.drawer-grupo-header .dg-icon { width: 15px !important; }
.drawer-grupo-header .dg-count { min-width: 17px !important; height: 15px !important; font-size: 8.5px !important; }

.drawer-menu-item,
.drawer-grupo-items button {
  min-height: 31px !important;
  margin: 1px 4px !important;
  padding: 4px 7px !important;
  border-radius: 9px !important;
  font-size: 12.5px !important;
  letter-spacing: .01em !important;
}
.drawer-item-icon { width: 15px !important; }
.drawer-item-label { line-height: 1.08 !important; }

.drawer-bottom-actions { padding: 5px !important; gap: 5px !important; }
.drawer-bottom-actions button:not(.drawer-btn-cambiar-usuario) {
  min-height: 30px !important;
  padding: 5px 7px !important;
  font-size: 9px !important;
  border-radius: 9px !important;
}

.drawer-bottom-actions .drawer-btn-cambiar-usuario {
  min-height: 42px !important;
  padding: 10px 10px !important;
  font-size: 12.5px !important;
  border-radius: 11px !important;
}

@media (max-width: 768px) {
  .drawer { width: 100vw !important; max-width: 100vw !important; }
  .drawer-content { padding: 5px 7px 7px !important; }
  .drawer-menu-item,
  .drawer-grupo-items button {
    min-height: 30px !important;
    margin: 1px 3px !important;
    padding: 3px 6px !important;
    font-size: 12px !important;
  }
}

/* Contención y centrado por secciones críticas */
#sec-historial,
#sec-incautaciones,
#sec-inventario,
#sec-nuevos,
#sec-usados,
#sec-transito {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

#sec-historial .card,
#sec-incautaciones .card,
#sec-inventario .card,
#sec-nuevos .card,
#sec-usados .card,
#sec-transito .card,
#listaHistorial .card,
#lista-incautaciones .card,
#lista-nuevos .card,
#lista-usados .card,
#lista-transito .card,
.transito-grupo,
.transito-grupo-header {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#sec-historial .section-filters,
#sec-incautaciones .section-filters,
#sec-inventario .filter-row,
#sec-inventario .filter-row-prov,
#sec-nuevos .filter-row,
#sec-usados .filter-row,
#sec-transito .section-filters-transito {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#sec-historial .section-filters > *,
#sec-incautaciones .section-filters > *,
#sec-inventario .filter-row > *,
#sec-inventario .filter-row-prov > *,
#sec-nuevos .filter-row > *,
#sec-nuevos .filter-row-prov > *,
#sec-usados .filter-row > *,
#sec-usados .filter-row-prov > *,
#sec-transito .section-filters-transito > * {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

#listaHistorial,
#lista-incautaciones,
#lista-nuevos,
#lista-usados,
#lista-transito {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  #sec-historial .section-filters,
  #sec-incautaciones .section-filters,
  #sec-transito .section-filters-transito,
  #sec-inventario .filter-row,
  #sec-inventario .filter-row-prov,
  #sec-nuevos .filter-row,
  #sec-nuevos .filter-row-prov,
  #sec-usados .filter-row,
  #sec-usados .filter-row-prov {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #sec-historial .section-filters input,
  #sec-historial .section-filters select,
  #sec-incautaciones .section-filters input,
  #sec-incautaciones .section-filters select,
  #sec-transito .section-filters-transito input,
  #sec-transito .section-filters-transito select,
  #sec-inventario .filter-row input,
  #sec-inventario .filter-row select,
  #sec-nuevos .filter-row input,
  #sec-nuevos .filter-row select,
  #sec-usados .filter-row input,
  #sec-usados .filter-row select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* Drawer: alineacion y jerarquia visual unificada */
#drawer .drawer-profile {
  padding: 12px 20px !important;
}
#drawer .drawer-profile-head {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
#drawer .drawer-profile-head > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
#drawer .drawer-avatar {
  width: 44px !important;
  height: 44px !important;
  font-size: 18px !important;
}
#drawer .drawer-profile-name {
  font-family: 'Oswald', sans-serif !important;
  font-size: 15px !important;
  line-height: 1.15 !important;
  max-width: 100% !important;
}
#drawer .drawer-role-badge {
  padding: 3px 12px !important;
  font-size: 11px !important;
}

#drawer .drawer-search {
  margin: 8px 12px !important;
  position: relative;
}
#drawer .drawer-search input {
  border-radius: 12px !important;
  padding: 10px 14px 10px 38px !important;
}
#drawer .drawer-search-icon {
  position: absolute;
  left: 24px !important;
  top: 50%;
  transform: translateY(-50%);
}

#drawer .drawer-menu-item,
#drawer .drawer-grupo-items button {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 16px !important;
  border-radius: 10px !important;
  margin: 2px 8px !important;
  width: calc(100% - 16px) !important;
  box-sizing: border-box !important;
}
#drawer .drawer-item-icon {
  width: 22px !important;
  text-align: center !important;
  font-size: 16px !important;
  flex-shrink: 0 !important;
}
#drawer .drawer-item-label {
  font-size: 13px !important;
  font-family: 'Oswald', sans-serif !important;
  letter-spacing: 0.04em !important;
  flex: 1 !important;
}
#drawer .drawer-content button.active,
#drawer .drawer-grupo-items button.active,
#drawer .drawer-menu-item.active {
  background: rgba(225,29,72,0.12) !important;
  color: #f8fafc !important;
  border-left: 3px solid #e11d48 !important;
  padding-left: 13px !important;
}

#drawer .drawer-grupo-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 16px !important;
  margin-top: 4px !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: 11px !important;
  letter-spacing: 0.1em !important;
  color: #64748b !important;
}
#drawer .drawer-grupo-header .dg-icon {
  width: 22px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  font-size: 15px !important;
}
#drawer .drawer-grupo-header .dg-count {
  font-size: 10px !important;
  background: rgba(255,255,255,0.06) !important;
  border-radius: 999px !important;
  padding: 1px 7px !important;
  color: #64748b !important;
}
#drawer .drawer-grupo-header .dg-arrow {
  font-size: 12px !important;
  color: #475569 !important;
  transition: transform 0.2s !important;
  margin-left: auto !important;
}
#drawer .drawer-grupo-header.open .dg-arrow {
  transform: rotate(90deg) !important;
}

#drawer .drawer-bottom-actions {
  display: flex !important;
  gap: 8px !important;
  padding: 12px 16px !important;
  border-top: 1px solid rgba(255,255,255,0.06) !important;
  background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.82) 28%, rgba(15,23,42,0.96) 100%) !important;
}
#drawer .drawer-bottom-actions button {
  flex: 1 !important;
  padding: 9px !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, rgba(30,41,59,0.9) 0%, rgba(15,23,42,0.94) 100%) !important;
  border: 1px solid rgba(96,165,250,0.14) !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: 12px !important;
  letter-spacing: 0.06em !important;
  color: #94a3b8 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
}
#drawer .drawer-bottom-actions button:hover {
  background: linear-gradient(180deg, rgba(37,99,235,0.18) 0%, rgba(15,23,42,0.98) 100%) !important;
  color: #f8fafc !important;
  border-color: rgba(96,165,250,0.32) !important;
}

#drawer .drawer-bottom-actions .drawer-btn-cambiar-usuario {
  flex: 1 1 auto;
  min-height: 44px !important;
  padding: 10px 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif !important;
  color: #e2e8f0 !important;
  justify-content: center !important;
  transform: none !important;
  background: linear-gradient(180deg, rgba(30,41,59,0.96) 0%, rgba(15,23,42,0.98) 100%) !important;
  border: 1px solid rgba(59,130,246,0.22) !important;
  box-shadow: 0 10px 20px rgba(2,6,23,0.28), inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

#drawer .drawer-bottom-actions .drawer-btn-cambiar-usuario:hover {
  background: linear-gradient(180deg, rgba(37,99,235,0.24) 0%, rgba(15,23,42,0.98) 100%) !important;
  color: #f8fafc !important;
  border-color: rgba(96,165,250,0.42) !important;
  transform: none !important;
}
.card,
.section-hero,
.inventory-toolbar,
.inventory-list-shell,
.dh-panel {
  background-color: rgba(30, 46, 70, 0.9) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.2) !important;
}

.search-box,
.form-control,
.sel-filter,
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  background: #2b3f59 !important;
  border-color: rgba(148, 163, 184, 0.34) !important;
  color: #f1f5f9 !important;
}

.menu {
  background: rgba(18, 31, 49, 0.95) !important;
}

/* Normalizacion global de espacios (layout spacing system) */
:root {
  --sp-1: 8px;
  --sp-2: 14px;
  --sp-3: 20px;
  --sp-4: 26px;
}

.container {
  padding: var(--sp-3) var(--sp-3) 88px !important;
}

.section {
  padding-top: var(--sp-2) !important;
}

.card,
.section-hero,
.inventory-toolbar,
.inventory-list-shell,
.dh-panel {
  margin-bottom: var(--sp-3) !important;
}

.card {
  padding: var(--sp-3) !important;
}

.section-hero {
  padding: var(--sp-4) var(--sp-4) var(--sp-3) !important;
}

.inventory-toolbar,
.dh-panel {
  padding: var(--sp-3) !important;
}

.filter-row,
.filter-row-prov,
.section-filters,
.section-filters-transito {
  gap: var(--sp-2) !important;
  margin-bottom: var(--sp-2) !important;
}

.inventory-toolbar-head,
.dh-panel-head {
  margin-bottom: var(--sp-2) !important;
}

h2, h3 {
  margin-top: var(--sp-2) !important;
  margin-bottom: var(--sp-2) !important;
}

.btn-submit,
.btn-mini {
  margin-top: var(--sp-1);
}

@media (max-width: 768px) {
  :root {
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
  }

  .container {
    padding: var(--sp-2) var(--sp-2) 90px !important;
  }

  .card,
  .section-hero,
  .inventory-toolbar,
  .inventory-list-shell,
  .dh-panel {
    margin-bottom: var(--sp-2) !important;
  }

  .card,
  .inventory-toolbar,
  .dh-panel {
    padding: var(--sp-2) !important;
  }

  .section-hero {
    padding: var(--sp-3) var(--sp-2) var(--sp-2) !important;
  }
}

/* ============================================================
   DESKTOP NEON ELEGANTE
   Mantiene espacios destacados con color, pero en capas suaves.
   ============================================================ */
@media (min-width: 769px) {
  :root {
    --sm-desk-card-a: rgba(10, 22, 42, 0.94);
    --sm-desk-card-b: rgba(12, 28, 52, 0.9);
    --sm-desk-border-soft: rgba(96, 165, 250, 0.2);
    --sm-desk-border-strong: rgba(225, 29, 72, 0.34);
    --sm-desk-text-soft: #b8c8dd;
  }

  .section-hero,
  .dh-hero,
  .dashboard-hero-shell {
    background:
      radial-gradient(circle at 12% 10%, rgba(59,130,246,0.18), transparent 34%),
      linear-gradient(160deg, rgba(9,22,45,0.97), rgba(12,26,48,0.94)) !important;
    border: 1px solid var(--sm-desk-border-strong) !important;
    box-shadow:
      0 16px 34px rgba(2, 6, 23, 0.36),
      0 0 0 1px rgba(225, 29, 72, 0.12) inset !important;
  }

  .surface-card,
  .dashboard-card,
  .dashboard-card-soft,
  .section .card,
  .card,
  .card-professional,
  .dh-panel {
    background:
      linear-gradient(180deg, var(--sm-desk-card-b), var(--sm-desk-card-a)) !important;
    border: 1px solid var(--sm-desk-border-soft) !important;
    box-shadow:
      0 12px 26px rgba(2, 6, 23, 0.24),
      0 0 0 1px rgba(59,130,246,0.08) inset !important;
  }

  .surface-card:hover,
  .dashboard-card:hover,
  .section .card:hover,
  .card:hover,
  .card-professional:hover,
  .dh-panel:hover {
    border-color: rgba(59, 130, 246, 0.34) !important;
    box-shadow:
      0 16px 34px rgba(2, 6, 23, 0.32),
      0 0 0 1px rgba(59,130,246,0.14) inset !important;
  }

  .dh-panel-title,
  .section-hero-title,
  h2, h3 {
    letter-spacing: 0.01em;
  }

  .section-hero-copy,
  .dh-hero-sub,
  .dh-hero-alert-val,
  .stat-lab,
  .home-stock-card-sub,
  .vehicle-card-subtitle-row {
    color: var(--sm-desk-text-soft) !important;
  }

  .stat-card,
  .dh-kpi,
  .transito-kpi-card {
    background:
      linear-gradient(180deg, rgba(13,32,60,0.96), rgba(10,24,46,0.95)) !important;
    border: 1px solid rgba(96,165,250,0.24) !important;
    box-shadow:
      0 10px 20px rgba(2, 6, 23, 0.22),
      0 0 0 1px rgba(59,130,246,0.1) inset !important;
  }

  .btn-submit,
  .btn-mini {
    box-shadow:
      0 8px 16px rgba(2, 6, 23, 0.22),
      0 0 0 1px rgba(255,255,255,0.07) inset !important;
  }

  #dashboard-acciones-top .btn-submit,
  .home-mesa-aprobaciones .btn-submit {
    min-height: 40px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

/* ============================================================
   MOBILE ULTRA-COMPACT PATCH (final)
   Prioriza densidad + legibilidad + tactilidad en móvil.
   ============================================================ */
@media (max-width: 768px) {
  html { font-size: 13px; }
  body {
    font-size: 13px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y !important;
  }

  /* Header compacto y limpio */
  .header {
    min-height: 48px !important;
    padding: 5px 8px !important;
    display: flex !important;
    align-items: center;
    gap: 8px !important;
  }
  #sm-online-badge-header { display: none !important; }
  .hamburger, #menuToggle {
    width: 44px !important;
    height: 40px !important;
    min-width: 44px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(96,165,250,0.36) !important;
    background:
      linear-gradient(180deg, rgba(30,41,59,0.96), rgba(15,23,42,0.98)) !important;
    color: #e2e8f0 !important;
    box-shadow:
      0 10px 20px rgba(2,6,23,0.34),
      inset 0 1px 0 rgba(255,255,255,0.06) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    position: relative !important;
    overflow: hidden !important;
  }
  .hamburger span,
  #menuToggle span {
    width: 18px !important;
    height: 12px !important;
    font-size: 0 !important;
    display: block !important;
    position: relative !important;
  }
  .hamburger span::before,
  .hamburger span::after,
  #menuToggle span::before,
  #menuToggle span::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    width: 18px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
    box-shadow: 0 5px 0 #93c5fd !important;
  }
  .hamburger span::before,
  #menuToggle span::before {
    top: 0 !important;
  }
  .hamburger span::after,
  #menuToggle span::after {
    bottom: 0 !important;
    box-shadow: none !important;
    background: #cbd5e1 !important;
  }
  .hamburger em,
  #menuToggle em {
    display: none !important;
  }
  .hamburger:active,
  #menuToggle:active {
    transform: translateY(1px) !important;
    border-color: rgba(147,197,253,0.55) !important;
  }
  .logo-container {
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(1rem, 4.5vw, 1.28rem) !important;
    line-height: 1 !important;
    max-width: 100% !important;
  }

  .header .logo-container {
    display: none !important;
  }

  .header-actions {
    margin-left: auto !important;
  }

  .user-chip {
    min-width: 0 !important;
    width: auto !important;
    max-width: min(180px, calc(100vw - 118px)) !important;
  }

  .container {
    padding: 8px 8px 84px !important;
  }

  /* Cards y paneles más compactos */
  .card,
  .card-professional,
  .dh-panel,
  .section .card,
  .surface-card,
  .dashboard-card {
    border-radius: 12px !important;
    padding: 8px !important;
    box-shadow: 0 8px 16px rgba(2, 6, 23, 0.2) !important;
  }
  .dh-panel-head,
  .inventory-toolbar-head {
    margin-bottom: 6px !important;
    gap: 6px !important;
  }
  .dh-panel-title,
  .section-hero-title {
    font-size: 1.05rem !important;
    line-height: 1.15 !important;
    margin-bottom: 4px !important;
  }
  .section-hero-copy,
  .dh-hero-sub {
    font-size: 11px !important;
    line-height: 1.35 !important;
  }

  /* KPIs compactos legibles */
  #sec-home #dh-kpi-row-admin,
  .dashboard-grid.kpis {
    gap: 6px !important;
  }
  .stat-card,
  .dh-kpi {
    min-height: 72px !important;
    padding: 9px !important;
    border-radius: 11px !important;
  }
  .stat-num,
  .dh-kpi-value {
    font-size: 1.5rem !important;
    line-height: 1 !important;
  }
  .stat-lab,
  .dh-kpi-label {
    font-size: 9px !important;
    letter-spacing: 0.03em !important;
  }
  .stat-card::before,
  .stat-card::after {
    display: none !important;
  }

  /* Inputs y acciones compactas */
  .search-box,
  .form-control,
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="password"],
  select,
  textarea {
    min-height: 36px !important;
    padding: 7px 9px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
  }
  .btn-submit,
  .btn-mini {
    min-height: 36px !important;
    padding: 7px 8px !important;
    font-size: 11px !important;
    border-radius: 10px !important;
    margin-top: 0 !important;
  }

  /* Tarjetas de operaciones (como la mesa de facturación) */
  .vehicle-card-header {
    margin-bottom: 6px !important;
    gap: 6px !important;
  }
  .vehicle-card-title {
    font-size: unset !important;
    line-height: unset !important;
    flex-direction: row !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .vehicle-card-marca {
    font-size: clamp(1.56rem, 6.2vw, 1.95rem) !important;
    letter-spacing: -0.02em !important;
  }
  .vehicle-card-modelo {
    font-size: clamp(1.56rem, 6.2vw, 1.95rem) !important;
    line-height: 1.05 !important;
  }
  .vehicle-card-version {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }
  .vehicle-card-price,
  .vehicle-card-meta,
  .vehicle-card-body {
    font-size: 11px !important;
    line-height: 1.3 !important;
  }
  .vehicle-card-actions-main,
  .vehicle-card-actions-side,
  .card-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }
  .vehicle-card-actions-main > *,
  .vehicle-card-actions-side > *,
  .card-actions > * {
    width: 100% !important;
    min-width: 0 !important;
  }
  .vehicle-card-actions-main .btn-mini,
  .vehicle-card-actions-main .btn-submit,
  .vehicle-card-actions-side .btn-submit,
  .card-actions .btn-mini,
  .vehicle-card-actions-main .vehicle-card-quick-actions--footer .card-menu-trigger {
    min-height: 34px !important;
    font-size: 10.5px !important;
    padding: 6px 7px !important;
  }

  /* Bottom nav más compacta */
  .mobile-bottom-nav {
    left: 8px !important;
    right: 8px !important;
    bottom: calc(6px + env(safe-area-inset-bottom)) !important;
    padding: 5px !important;
    gap: 4px !important;
    border-radius: 14px !important;
  }
  .mobile-bottom-nav button {
    min-height: 44px !important;
    padding: 4px 3px !important;
    border-radius: 9px !important;
  }
  .mobile-bottom-nav button .mob-icon {
    font-size: 16px !important;
  }
  .mobile-bottom-nav button .mob-label {
    font-size: 9px !important;
  }

  /* Tránsito: botones todavía más compactos */
  #sec-transito .section-filters-transito .btn-submit {
    min-height: 34px !important;
    padding: 6px 8px !important;
    font-size: 10px !important;
  }
  #lista-transito .transito-card-actions-main .btn-submit {
    min-height: 32px !important;
    padding: 5px 7px !important;
    font-size: 9.8px !important;
    border-radius: 9px !important;
  }
}

.av3-filtros {
  display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end;
  background:rgba(15,23,42,0.6); border:1px solid rgba(148,163,184,0.12);
  border-radius:16px; padding:12px; margin-bottom:16px;
}
.av3-filtro-grupo { display:flex; flex-direction:column; gap:4px; }
.av3-filtro-grupo label { font-size:10px; color:#64748b; font-family:'Oswald',sans-serif; letter-spacing:0.1em; }
.av3-btn-clear { background:#334155; padding:8px 14px; border-radius:10px; color:#94a3b8; border:none; cursor:pointer; font-size:12px; }
.av3-btn-clear:hover { background:#475569; color:#fff; }

/* ── Tabs ── */
.av3-tabs { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:18px; }
.av3-tab {
  background:rgba(30,41,59,0.8); border:1px solid rgba(148,163,184,0.14);
  border-radius:12px; color:#94a3b8; padding:9px 18px;
  font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.08em;
  cursor:pointer; transition:all 0.2s;
}
.av3-tab.active, .av3-tab:hover {
  background:linear-gradient(135deg,rgba(225,29,72,0.22),rgba(30,41,59,0.96));
  border-color:rgba(248,113,113,0.4); color:#fff;
}

/* ── Paneles ── */
.av3-panel { display:none; }
.av3-panel.active { display:block; }

/* ── KPI Grid ── */
.av3-kpi-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:12px; margin-bottom:18px;
}
.av3-kpi {
  background:linear-gradient(180deg,rgba(20,33,61,0.96),rgba(15,23,42,0.98));
  border:1px solid rgba(148,163,184,0.12); border-radius:18px;
  padding:16px 14px; display:flex; flex-direction:column; gap:6px;
  transition:transform 0.2s, box-shadow 0.2s;
}
.av3-kpi:hover { transform:translateY(-2px); box-shadow:0 12px 28px rgba(0,0,0,0.3); }
.av3-kpi.blue   { border-left:3px solid #3b82f6; }
.av3-kpi.green  { border-left:3px solid #22c55e; }
.av3-kpi.amber  { border-left:3px solid #fbbf24; }
.av3-kpi.red    { border-left:3px solid #e11d48; }
.av3-kpi.purple { border-left:3px solid #a855f7; }
.av3-kpi.teal   { border-left:3px solid #14b8a6; }
.av3-kpi-icon { font-size:20px; }
.av3-kpi-num  { font-family:'Oswald',sans-serif; font-size:clamp(1.4rem,2.5vw,2rem); color:#fff; line-height:1; }
.av3-kpi-lab  { font-size:10px; letter-spacing:0.1em; color:#64748b; text-transform:uppercase; }

/* ── Cards ── */
.av3-card {
  background:linear-gradient(180deg,rgba(30,41,59,0.94),rgba(15,23,42,0.98));
  border:1px solid rgba(148,163,184,0.12); border-radius:20px;
  padding:18px; margin-bottom:16px;
}
.av3-card-title {
  font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.08em;
  color:#e2e8f0; text-transform:uppercase; margin-bottom:14px;
}

/* ── Grid 2 col ── */
.av3-grid-2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:14px; margin-bottom:14px; }

/* ── Antigüedad ── */
.av3-age-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
  gap:12px; margin-bottom:16px;
}
.av3-age-card {
  border-radius:18px; padding:20px 14px; text-align:center;
  cursor:pointer; transition:transform 0.2s, box-shadow 0.2s;
  position:relative; overflow:hidden;
}
.av3-age-card:hover { transform:translateY(-4px); box-shadow:0 16px 32px rgba(0,0,0,0.4); }
.av3-age-card:active { transform:translateY(-1px); }
.av3-age-card.green  { background:linear-gradient(135deg,rgba(34,197,94,0.2),rgba(15,23,42,0.95)); border:1px solid rgba(34,197,94,0.3); }
.av3-age-card.blue   { background:linear-gradient(135deg,rgba(59,130,246,0.2),rgba(15,23,42,0.95)); border:1px solid rgba(59,130,246,0.3); }
.av3-age-card.amber  { background:linear-gradient(135deg,rgba(251,191,36,0.2),rgba(15,23,42,0.95)); border:1px solid rgba(251,191,36,0.3); }
.av3-age-card.red    { background:linear-gradient(135deg,rgba(225,29,72,0.22),rgba(15,23,42,0.95)); border:1px solid rgba(225,29,72,0.35); }
.av3-age-num   { font-family:'Oswald',sans-serif; font-size:2.4rem; line-height:1; color:#fff; }
.av3-age-rango { font-size:11px; color:rgba(255,255,255,0.7); margin:4px 0; }
.av3-age-label { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.06em; color:rgba(255,255,255,0.5); }
.av3-age-hint  { font-size:10px; color:rgba(255,255,255,0.3); margin-top:8px; }

/* ── Tabla ── */
.av3-table { width:100%; border-collapse:collapse; font-size:12px; }
.av3-table th {
  background:rgba(15,23,42,0.8); padding:10px 12px; text-align:left;
  font-family:'Oswald',sans-serif; letter-spacing:0.06em; color:#64748b;
  font-size:10px; text-transform:uppercase; border-bottom:1px solid rgba(255,255,255,0.06);
}
.av3-table td { padding:10px 12px; border-bottom:1px solid rgba(255,255,255,0.04); color:#e2e8f0; }
.av3-table tr:hover td { background:rgba(59,130,246,0.06); transition:background 0.15s; }

/* ── Badge ── */
.av3-badge {
  display:inline-block; font-size:10px; border-radius:999px;
  padding:3px 10px; font-weight:600;
}
.av3-badge.green { background:rgba(34,197,94,0.15); border:1px solid rgba(34,197,94,0.3); color:#4ade80; }
.av3-badge.red   { background:rgba(225,29,72,0.15);  border:1px solid rgba(225,29,72,0.3);  color:#f87171; }
.av3-badge.blue  { background:rgba(59,130,246,0.15); border:1px solid rgba(59,130,246,0.3); color:#60a5fa; }
.av3-badge.amber { background:rgba(251,191,36,0.15); border:1px solid rgba(251,191,36,0.3); color:#fbbf24; }

/* ── Acordeón ── */
.av3-acordeon-header {
  display:flex; justify-content:space-between; align-items:center;
  cursor:pointer; padding-bottom:12px;
  border-bottom:1px solid rgba(255,255,255,0.06);
  margin-bottom:0; user-select:none;
}
.av3-acordeon-header:hover .av3-flecha { color:#3b82f6; }
.av3-flecha { color:#64748b; transition:color 0.2s; font-size:12px; }
.av3-acordeon-body { display:none; padding-top:14px; }

/* ── Fila venta ── */
.av3-venta-row {
  display:flex; justify-content:space-between; align-items:center;
  background:rgba(255,255,255,0.02); margin-top:8px; padding:12px;
  border-radius:10px; border:1px solid rgba(255,255,255,0.04);
  transition:border-color 0.2s;
}
.av3-venta-row:hover { border-color:rgba(59,130,246,0.2); }

/* ── Top rows ── */
.av3-top-row {
  display:flex; align-items:center; gap:10px; padding:8px 0;
  border-bottom:1px solid rgba(255,255,255,0.05);
}
.av3-top-row:last-child { border-bottom:none; }
.av3-top-pos { font-size:10px; color:#64748b; min-width:20px; }
.av3-top-nom { flex:1; color:#e2e8f0; font-size:12px; }

/* ── Vendedor row ── */
.av3-vendedor-row { padding:10px 0; border-bottom:1px solid rgba(255,255,255,0.05); cursor:pointer; }
.av3-vendedor-row:hover { opacity:0.85; }
.av3-vendedor-row:last-child { border-bottom:none; }

/* ── Progreso ── */
.av3-progreso { height:5px; background:rgba(255,255,255,0.06); border-radius:10px; overflow:hidden; margin-top:4px; }
.av3-progreso div { height:100%; border-radius:10px; transition:width 0.6s ease; }

/* Motion layer for StockMaster */
@keyframes smFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes smSlideLeft {
  from {
    opacity: 0;
    transform: translateX(-22px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes smTitleReveal {
  from {
    opacity: 0;
    transform: translateY(22px) scaleY(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

@keyframes smExpandLine {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes smScanline {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.85; }
}

@keyframes smGlowFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(32px, -28px); }
}

@keyframes smStatIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes smRipple {
  to {
    width: 240px;
    height: 240px;
    opacity: 0;
  }
}

.section-kicker,
.dh-hero-kicker {
  animation: smSlideLeft 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.section-kicker::before,
.dh-hero-kicker::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, var(--sm-blue, #2563eb), transparent);
  animation: smExpandLine 0.55s ease-out 0.18s forwards;
}

.section-hero-title,
.dh-hero-title {
  animation: smTitleReveal 0.72s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: left center;
}

.section-hero-copy,
.dh-hero-sub {
  animation: smFadeUp 0.7s ease-out 0.14s both;
}

.dh-hero-alert-box,
.dh-panel-critical,
.dh-panel-info {
  position: relative;
  overflow: hidden;
}

.dh-hero-alert-box::before,
.dh-panel-critical::before,
.dh-panel-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  animation: smScanline 2.2s linear infinite;
  pointer-events: none;
  opacity: 0.45;
}

.stat-num,
.dh-kpi-num {
  animation: smStatIn 0.55s ease-out;
}

.card,
.dh-panel,
.home-stock-card,
.section-hero {
  transition:
    transform 0.26s ease,
    box-shadow 0.26s ease,
    border-color 0.26s ease,
    background-color 0.26s ease;
}

.card::before,
.dh-panel::before,
.home-stock-card::before,
.section-hero::before {
  pointer-events: none;
}

.card:hover,
.dh-panel:hover,
.home-stock-card:hover {
  transform: translateY(-4px);
}

.section-hero:hover {
  transform: translateY(-3px);
}

.btn-submit,
.btn-mini,
.home-stock-card,
.menu button,
.drawer-content button,
.admin-menu-button,
.drawer-theme-btn,
.sm-theme-toggle {
  position: relative;
  overflow: hidden;
}

.sm-motion-orb {
  position: fixed;
  inset: auto -120px -100px auto;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59,130,246,0.14) 0%, transparent 70%);
  filter: blur(36px);
  pointer-events: none;
  z-index: 0;
  animation: smGlowFloat 9s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .header {
    animation: none !important;
  }

  .header::before {
    animation: none !important;
  }

  .section-kicker,
  .dh-hero-kicker,
  .section-hero-title,
  .dh-hero-title,
  .section-hero-copy,
  .dh-hero-sub,
  .stat-num,
  .dh-kpi-num,
  .dh-hero-alert-box::before,
  .dh-panel-critical::before,
  .dh-panel-info::before,
  .sm-motion-orb {
    animation: none !important;
  }

  .card,
  .dh-panel,
  .home-stock-card,
  .section-hero,
  .btn-submit,
  .btn-mini {
    transition: none !important;
  }
}


/*
 * ══════════════════════════════════════════════════════════════════
 *  STOCKMASTER — NEON RED GOLD  (parche de diseño)
 *  Pegar estas reglas AL FINAL de styles.css, antes del cierre.
 *  Sobreescriben: .header, .dh-hero*, .drawer*, .menu button
 * ══════════════════════════════════════════════════════════════════
 */

/* ─── VARIABLES DE PALETA ─────────────────────────────────────── */
:root {
  --nr:  #1e3a5f;   /* azul oscuro     */
  --nrh: #2563a8;   /* azul hover      */
  --ng:  #3b82f6;   /* azul accent     */
  --ngh: #93c5fd;   /* azul claro      */
  --nbg: #08070a;   /* negro profundo  */

  /* texto legible sobre negro */
  --nt-primary:   #fff8f0;   /* blanco cálido  */
  --nt-secondary: #cbd5e1;   /* gris claro     */
  --nt-muted:     #94a3b8;   /* gris medio     */
  --nt-label:     #94a3b8;   /* labels/KPIs    */
}

/* ─── KEYFRAMES GLOBALES ──────────────────────────────────────── */
@keyframes nrg-gradMove   { 0%   { background-position: 0%   } 100% { background-position: 300% } }
@keyframes nrg-topScan    { 0%,100% { opacity: 0 } 50% { opacity: 1 } }
@keyframes nrg-shimmer    { 0%,100% { background-position: 200% } 50% { background-position: -200% } }
@keyframes nrg-orb1       { 0%,100% { transform: translate(0,0) } 50% { transform: translate(40px,-30px) } }
@keyframes nrg-orb2       { 0%,100% { transform: translate(0,0) } 50% { transform: translate(-30px,20px) } }
@keyframes nrg-pulse      { 0%,100% { opacity: 1 } 50% { opacity: .2 } }
@keyframes nrg-slideLeft  { from { opacity: 0; transform: translateX(-22px) } to { opacity: 1; transform: translateX(0) } }
@keyframes nrg-revealUp   { from { opacity: 0; transform: translateY(22px) } to { opacity: 1; transform: translateY(0) } }
@keyframes nrg-fadeUp     { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: translateY(0) } }
@keyframes nrg-expandLine { to { width: 22px } }
@keyframes nrg-ripple     { to { transform: translate(-50%,-50%) scale(8); opacity: 0 } }
@keyframes nrg-spark      { 0%,100% { opacity: .3 } 50% { opacity: .9 } }
@keyframes nrg-countUp    { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: translateY(0) } }
@keyframes nrg-glow       { 0%,100% { box-shadow: 0 0 0 0 rgba(225,29,72,.5) } 50% { box-shadow: 0 0 0 6px rgba(225,29,72,0) } }

/* ══════════════════════════════════════════════════════════════
   1. HEADER
   ══════════════════════════════════════════════════════════════ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-sizing: border-box;
  min-height: 54px;
  padding: 0 18px;
  background: rgba(8,7,10,.97) !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: hidden;
  /* reset sombra anterior */
  box-shadow: none !important;
}

/* Línea degradada inferior rojo → dorado animada */
.header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, var(--nr), var(--ng), var(--nrh), var(--ng), var(--nr));
  background-size: 300%;
  animation: nrg-gradMove 4s linear infinite;
  box-shadow: 0 0 14px rgba(225,29,72,.45);
}

/* Scan superior dorado */
.header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ng), transparent);
  animation: nrg-topScan 3s ease-in-out infinite;
  opacity: .7;
}

/* Logo — STOCK·MASTER con punto dorado pulsante */
.header .logo-container {
  font-weight: 900;
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f8fafc;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  animation: none;
  text-shadow: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.header .logo-stock {
  -webkit-text-fill-color: #fb7185 !important;
  color: #fb7185 !important;
}

.header .logo-container::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245,158,11,0.8);
  animation: logoDotPulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
  order: 1;
  position: relative;
  top: 0;
  margin: 0 2px;
}
@keyframes logoDotPulse {
  0%,100% { transform: scale(1);   opacity: 1;   }
  50%      { transform: scale(1.6); opacity: 0.5; }
}
.header .logo-stock {
  -webkit-text-fill-color: #f8fafc;
  color: #f8fafc;
  order: 0;
}

/* Botón hamburguesa */
.header .hamburger {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(225,29,72,.3) !important;
  color: var(--nt-muted) !important;
  border-radius: 8px !important;
  transition: border-color .2s, color .2s, box-shadow .2s !important;
}

@media (max-width: 991px) {
  .header .hamburger {
    border-radius: 999px !important;
    border-color: rgba(96,165,250,.32) !important;
    color: #e2e8f0 !important;
    background: rgba(15,23,42,.76) !important;
    box-shadow: 0 10px 24px rgba(2,6,23,.24);
  }
  .header .hamburger:hover {
    border-color: rgba(96,165,250,.58) !important;
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(37,99,235,.22) !important;
  }
}
.header .hamburger:hover {
  border-color: var(--ng) !important;
  color: var(--ng) !important;
  box-shadow: 0 0 12px rgba(245,158,11,.35) !important;
}

@media (max-width: 991px) {
  .header #menuToggle.hamburger {
    width: 44px !important;
    height: 40px !important;
    min-width: 44px !important;
    min-height: 40px !important;
    padding: 0 !important;
    gap: 0 !important;
    border-radius: 12px !important;
    border: 1px solid rgba(96,165,250,0.36) !important;
    background: linear-gradient(180deg, rgba(30,41,59,0.96), rgba(15,23,42,0.98)) !important;
    color: #e2e8f0 !important;
    box-shadow: 0 10px 20px rgba(2,6,23,0.34), inset 0 1px 0 rgba(255,255,255,0.06) !important;
  }
  .header #menuToggle.hamburger:hover {
    border-color: rgba(147,197,253,0.58) !important;
    color: #f8fafc !important;
    box-shadow: 0 12px 24px rgba(37,99,235,0.24), inset 0 1px 0 rgba(255,255,255,0.08) !important;
  }
  .header #menuToggle.hamburger span {
    width: 18px !important;
    height: 12px !important;
    font-size: 0 !important;
  }
  .header #menuToggle.hamburger em {
    display: none !important;
  }
}

/* Toggle de tema en el header */
.sm-theme-toggle--header {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(245,158,11,.25) !important;
  color: var(--nt-muted) !important;
  border-radius: 8px !important;
  transition: .2s !important;
}
.sm-theme-toggle--header:hover {
  border-color: var(--ng) !important;
  color: var(--ng) !important;
  box-shadow: 0 0 12px rgba(245,158,11,.35) !important;
}

/* Badge "online" */
#sm-online-badge-header {
  background: rgba(225,29,72,.12) !important;
  border: 1px solid rgba(225,29,72,.3) !important;
  color: var(--ngh) !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  padding: 3px 10px !important;
  letter-spacing: .06em !important;
}

/* ══════════════════════════════════════════════════════════════
   2. MENÚ HORIZONTAL (desktop)
   ══════════════════════════════════════════════════════════════ */
.menu {
  background: rgba(8,7,10,.98) !important;
  border-bottom: 1px solid rgba(225,29,72,.12) !important;
}

.menu button,
.menu button.btn-ripple {
  color: var(--nt-muted) !important;
  background: transparent !important;
  border: none !important;
  transition: color .15s, background .15s !important;
  position: relative;
  overflow: hidden;
}

/* sweep dorado al hover */
.menu button::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,.14), transparent);
  transition: left .5s;
}
.menu button:hover::before { left: 100%; }

.menu button:hover {
  color: var(--nt-secondary) !important;
  background: rgba(255,255,255,.04) !important;
}

.menu button.active,
.menu button.active.btn-ripple {
  color: var(--nt-primary) !important;
  background: rgba(225,29,72,.14) !important;
  border-bottom: 2px solid var(--nr) !important;
  box-shadow: 0 0 12px rgba(225,29,72,.2) !important;
}

/* Íconos SVG del menú */
.menu-btn-icon svg {
  stroke: currentColor !important;
}

/* ══════════════════════════════════════════════════════════════
   3. DRAWER (menú lateral móvil)
   ══════════════════════════════════════════════════════════════ */
.drawer {
  background: rgba(8,7,10,.98) !important;
  border-right: 1px solid rgba(225,29,72,.15) !important;
}

.drawer-header {
  background: rgba(8,7,10,1) !important;
  border-bottom: 1px solid rgba(225,29,72,.18) !important;
  padding: 14px 16px !important;
  position: relative;
}
/* Línea animada bajo el drawer-header */
.drawer-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--nr), var(--ng), transparent);
  opacity: .7;
}

/* Marca / nombre en el drawer */
.drawer-brand-mark {
  background: rgba(225,29,72,.18) !important;
  border: 1px solid rgba(225,29,72,.35) !important;
  color: var(--nrh) !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
}
.drawer-brand-text strong {
  background: linear-gradient(90deg, var(--nr), var(--ng));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 14px;
  letter-spacing: .06em;
}
.drawer-brand-version {
  color: var(--nt-muted) !important;
  font-size: 10px !important;
}

/* Botones del drawer */
.drawer-content button {
  color: var(--nt-muted) !important;
  background: transparent !important;
  border-radius: 8px !important;
  transition: background .15s, color .15s !important;
  position: relative;
  overflow: hidden;
}
.drawer-content button::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,.14), transparent);
  transition: left .5s;
}
.drawer-content button:hover::before { left: 100%; }

.drawer-content button:hover {
  color: var(--nt-secondary) !important;
  background: rgba(255,255,255,.05) !important;
}
.drawer-content button.active {
  color: var(--nt-primary) !important;
  background: rgba(225,29,72,.15) !important;
  border-left: 3px solid var(--nr) !important;
  box-shadow: 0 0 10px rgba(225,29,72,.18) !important;
}

/* Botón cerrar drawer */
.close-drawer {
  color: var(--nt-muted) !important;
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 8px !important;
  transition: .15s !important;
}
.close-drawer:hover {
  color: var(--nrh) !important;
  border-color: rgba(225,29,72,.4) !important;
  box-shadow: 0 0 10px rgba(225,29,72,.2) !important;
}

/* Secciones del admin en el drawer */
.drawer-admin-toggle {
  color: var(--nt-muted) !important;
  background: rgba(255,255,255,.03) !important;
  border: 1px solid rgba(255,255,255,.06) !important;
  transition: .15s !important;
}
.drawer-admin-toggle:hover,
.drawer-admin-toggle.active {
  color: var(--ng) !important;
  border-color: rgba(245,158,11,.3) !important;
  background: rgba(245,158,11,.07) !important;
}

/* ══════════════════════════════════════════════════════════════
   4. HERO — SECCIÓN INICIO  (.dh-hero)
   ══════════════════════════════════════════════════════════════ */

/* Fondo del hero con orbes ambientales */
.dh-hero {
  border-radius: 16px !important;
  background: linear-gradient(160deg, #0a0810 0%, #08070a 60%, #0a0409 100%) !important;
  border: 1px solid rgba(225,29,72,.18) !important;
  padding: 22px 20px 18px !important;
  margin-bottom: 14px !important;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 40px rgba(225,29,72,.08),
    0 8px 32px rgba(0,0,0,.55) !important;
}

/* Orbe rojo superior izquierdo */
.dh-hero::before {
  content: '';
  position: absolute;
  top: -80px; left: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225,29,72,.14), transparent 70%);
  pointer-events: none;
  animation: nrg-orb1 9s ease-in-out infinite;
}

/* Orbe dorado inferior derecho */
.dh-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -50px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.10), transparent 70%);
  pointer-events: none;
  animation: nrg-orb2 12s ease-in-out infinite reverse;
}

/* Kicker (línea de acento) */
.dh-hero-kicker {
  font-size: 10px !important;
  letter-spacing: .15em !important;
  text-transform: uppercase !important;
  color: var(--ng) !important;
  font-family: 'Oswald', sans-serif !important;
  font-weight: 700 !important;
  margin: 0 0 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  animation: nrg-slideLeft .6s cubic-bezier(.34,1.56,.64,1) !important;
}

/* Línea de acento junto al kicker */
.dh-hero-kicker::before {
  content: '' !important;
  width: 0 !important;
  height: 2px !important;
  min-height: 2px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, var(--nr), var(--ng)) !important;
  display: block !important;
  bottom: auto !important;
  position: static !important;
  animation: nrg-expandLine .6s ease-out .2s forwards !important;
}

/* Título principal del hero */
.dh-hero-title {
  font-family: 'Oswald', sans-serif !important;
  font-size: clamp(1.3rem, 3vw, 1.75rem) !important;
  font-weight: 700 !important;
  color: var(--nt-primary) !important;
  letter-spacing: .02em !important;
  margin: 0 0 6px !important;
  animation: nrg-revealUp .7s cubic-bezier(.34,1.56,.64,1) .1s both !important;
  text-shadow: none !important;
}

/* Texto de contexto */
.dh-hero-sub {
  font-size: 13px !important;
  color: var(--nt-secondary) !important;      /* ← gris claro, legible */
  line-height: 1.6 !important;
  margin: 0 !important;
  animation: nrg-fadeUp .7s ease .2s both !important;
}

/* Caja de prioridad (alerta) */
.dh-hero-alert-box {
  background: rgba(225,29,72,.07) !important;
  border: 1px solid rgba(225,29,72,.28) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  min-width: 170px !important;
  flex-shrink: 0 !important;
  position: relative !important;
  overflow: hidden !important;
  transition: border-color .2s, box-shadow .2s !important;
  box-shadow: 0 0 16px rgba(225,29,72,.08) !important;
}
.dh-hero-alert-box:hover {
  border-color: rgba(245,158,11,.4) !important;
  box-shadow: 0 0 24px rgba(245,158,11,.15) !important;
}

/* Scanline en la caja de prioridad */
.dh-hero-alert-box::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, var(--nr), transparent) !important;
  animation: nrg-topScan 2s ease-in-out infinite !important;
  opacity: .8 !important;
}

.dh-hero-alert-label {
  font-size: 9px !important;
  letter-spacing: .14em !important;
  color: var(--nr) !important;
  font-family: 'Oswald', sans-serif !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  margin: 0 0 5px !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}

/* Punto pulsante junto al label */
.dh-hero-alert-label::before {
  content: '' !important;
  width: 6px !important; height: 6px !important;
  border-radius: 50% !important;
  background: var(--nr) !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 6px var(--nr) !important;
  animation: nrg-glow 1.6s ease-in-out infinite !important;
}

.dh-hero-alert-val {
  font-size: 13px !important;
  color: var(--nt-secondary) !important;        /* ← legible */
  margin: 0 !important;
  line-height: 1.45 !important;
}

/* Prioridad crítica */
#dh-hero-prioridad-box.prioridad-critica {
  border-color: rgba(225,29,72,.55) !important;
  background: rgba(127,29,29,.2) !important;
  box-shadow:
    0 0 0 1px rgba(225,29,72,.25),
    0 0 22px rgba(225,29,72,.22) !important;
  animation: nrg-glow 1.8s ease-in-out infinite !important;
}

/* Separador "ACCESOS RÁPIDOS" / "MÉTRICAS" */
.dh-home-sep {
  margin: 12px 0 14px !important;
  border-top: 1px solid rgba(225,29,72,.12) !important;
  text-align: center !important;
  position: relative !important;
}
.dh-home-sep > span {
  position: relative !important;
  background: var(--nbg) !important;
  padding: 0 10px !important;
  font-size: 9px !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  color: var(--ng) !important;           /* ← dorado legible */
  font-family: 'Oswald', sans-serif !important;
  font-weight: 700 !important;
}

/* Punto dorado centrado en el separador */
.dh-home-sep::after {
  content: '' !important;
  position: absolute !important;
  left: 50%; top: -1px !important;
  transform: translateX(-50%) !important;
  width: 48px !important; height: 3px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, var(--nr), var(--ng)) !important;
  box-shadow: 0 0 10px var(--nr), 0 0 5px var(--ng) !important;
  display: none !important; /* ocultar si el span solapara */
}

/* ══════════════════════════════════════════════════════════════
   5. ACCIONES DEL HERO (.dh-hero-actions)
   ══════════════════════════════════════════════════════════════ */
.dh-hero-actions {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin: 14px 0 16px !important;
  animation: nrg-fadeUp .7s ease .3s both !important;
}

/* Tarjetas de acción rápida */
.dh-hero-actions .dh-chip-btn,
.dh-hero-actions button {
  border-radius: 0 !important;
  font-family: 'Oswald', sans-serif !important;
  letter-spacing: .06em !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  transition: .2s !important;
  position: relative !important;
  overflow: hidden !important;
}

/* ══════════════════════════════════════════════════════════════
   6. KPI CARDS DEL HOME (.dh-kpi-card / .dh-kpi-label)
   ══════════════════════════════════════════════════════════════ */
.dh-kpi-label {
  color: var(--nt-label) !important;    /* ← antes estaba muy oscuro */
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: .05em !important;
  text-transform: uppercase !important;
}
.dh-kpi-value {
  animation: nrg-countUp .55s ease-out !important;
}

/* ══════════════════════════════════════════════════════════════
   7. STOCK CARDS DEL HOME (.home-stock-card)
   ══════════════════════════════════════════════════════════════ */
.home-stock-card-sub {
  color: var(--nt-muted) !important;     /* ← antes muy oscuro */
}
.home-stock-card-title {
  color: var(--nt-secondary) !important;
}

/* ══════════════════════════════════════════════════════════════
   8. EFECTO RIPPLE (rojo en lugar de azul)
   ══════════════════════════════════════════════════════════════ */
.btn-ripple .ripple,
.ripple {
  background: rgba(225,29,72,.4) !important;
}

/* ══════════════════════════════════════════════════════════════
   9. SEPARADORES Y LABELS GENERALES (textos oscuros → legibles)
   ══════════════════════════════════════════════════════════════ */
.dh-panel-title {
  color: var(--nt-secondary) !important;
}
.dh-panel-head {
  border-bottom-color: rgba(225,29,72,.1) !important;
}

/* Labels en tarjetas de stock/jerarquía */
.home-stock-card-label,
.home-hierarchy-total,
.home-hierarchy-filters label,
.filter-chip-title,
.inventory-toolbar-copy,
.section-hero-copy {
  color: var(--nt-muted) !important;
}

/* ══════════════════════════════════════════════════════════════
   10. BOTÓN PRIMARIO DE SUBMIT — acento rojo/dorado
   ══════════════════════════════════════════════════════════════ */
.btn-submit {
  background: linear-gradient(135deg, var(--nr), var(--ng)) !important;
  color: #08070a !important;
  font-weight: 800 !important;
  letter-spacing: .05em !important;
  position: relative !important;
  overflow: hidden !important;
}
.btn-submit::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: -100% !important;
  width: 100% !important; height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent) !important;
  transition: left .5s !important;
}
.btn-submit:hover::before { left: 100% !important; }
.btn-submit:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 0 28px rgba(59,130,246,.45), 0 0 14px rgba(30,58,95,.3) !important;
}

/* Excepciones de marca que no deben heredar el azul global de .btn-submit */
.home-refresh-actions .btn-submit.home-refresh-btn {
  color: #f8fafc !important;
  font-weight: 600 !important;
  letter-spacing: 0.055em !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.38) !important;
}

.home-refresh-actions .btn-submit.home-refresh-btn--sep {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(135deg, #5a3a03, #a16207 58%, #d97706) !important;
  border-color: rgba(251,191,36,0.34) !important;
}

.home-refresh-actions .btn-submit.home-refresh-btn--conduce {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(135deg, #12345f, #1d4ed8 58%, #3b82f6) !important;
  border-color: rgba(96,165,250,0.36) !important;
}

.home-refresh-actions .btn-submit.home-refresh-btn--inventario {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(135deg, #34155f, #5b21b6 58%, #8b5cf6) !important;
  border-color: rgba(196,181,253,0.34) !important;
}

.btn-submit.btn-whatsapp-modern,
.btn-submit.btn-whatsapp-metal {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.24), transparent 28%),
    linear-gradient(135deg, #0b5f3a 0%, #17995a 42%, #35d47a 68%, #0f6d43 100%) !important;
  color: #ffffff !important;
  border-color: rgba(134,239,172,0.42) !important;
  font-weight: 600 !important;
}

#sec-conduces .btn-submit.conduce-action-btn {
  background:
    linear-gradient(180deg, rgba(30,41,59,.98), rgba(15,23,42,.98)) !important;
  color: #e5edf7 !important;
  border: 1px solid rgba(148,163,184,.3) !important;
  box-shadow: 0 10px 22px rgba(2,6,23,.22), inset 0 1px 0 rgba(255,255,255,.04) !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .045em !important;
  text-shadow: none !important;
}

#sec-conduces .btn-submit.conduce-action-btn:hover {
  background:
    linear-gradient(180deg, rgba(37,99,235,.3), rgba(15,23,42,.98)) !important;
  border-color: rgba(96,165,250,.52) !important;
  color: #f8fafc !important;
}

#sec-conduces .conduce-action-primary,
#sec-conduces .conduce-action-maintenance {
  min-height: 40px;
}

#sec-conduces .conduce-action-maintenance {
  border-color: rgba(251,191,36,.28) !important;
}

/* ══════════════════════════════════════════════════════════════
   11. MODO CLARO — overrides completos NRG
   ══════════════════════════════════════════════════════════════ */

/* Hero */
[data-sm-theme="light"] .dh-hero {
  background: var(--sm-bg-surface) !important;
  border-color: rgba(225,29,72,.2) !important;
}
[data-sm-theme="light"] .dh-hero-title   { color: #1a1a1a !important; }
[data-sm-theme="light"] .dh-hero-sub     { color: #374151 !important; }
[data-sm-theme="light"] .dh-hero-kicker  { color: #b45309 !important; }
[data-sm-theme="light"] .dh-hero::after  { display: none !important; }
[data-sm-theme="light"] .dh-kpi-label    { color: #6b7280 !important; }
[data-sm-theme="light"] .dh-home-sep > span { background: var(--sm-bg-surface) !important; color: #b45309 !important; }
[data-sm-theme="light"] .dh-hero-clock,
[data-sm-theme="light"] .dh-hero-date    { color: #94a3b8 !important; }
[data-sm-theme="light"] .dh-stat-pill    { background: rgba(0,0,0,.04) !important; border-color: rgba(0,0,0,.1) !important; }
[data-sm-theme="light"] .dh-tl-accion    { color: #1e293b !important; }
[data-sm-theme="light"] .dh-tl-detail    { color: #64748b !important; }
[data-sm-theme="light"] .dh-tl-time      { color: #94a3b8 !important; }
[data-sm-theme="light"] .dh-tl-card      { border-right-color: rgba(0,0,0,.08) !important; }
[data-sm-theme="light"] .dh-hero-tl-label span { color: #94a3b8 !important; }

/* Header — oscuro en modo claro (intencional) */
[data-sm-theme="light"] .header {
  background: #1a1a2e !important;
  border-bottom: 1px solid rgba(225,29,72,.25) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.2) !important;
}
[data-sm-theme="light"] .header::after  { display: block !important; }
[data-sm-theme="light"] .header::before { display: block !important; }
[data-sm-theme="light"] .header .logo-container {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  animation: none !important;
  color: #f8fafc !important;
}
[data-sm-theme="light"] .header .logo-stock {
  -webkit-text-fill-color: #fb7185 !important;
  color: #fb7185 !important;
}
[data-sm-theme="light"] .header .logo-container::after {
  display: inline-block !important;
  background: #f59e0b !important;
  box-shadow: 0 0 8px rgba(245,158,11,.8) !important;
  animation: logoDotPulse 1.8s ease-in-out infinite !important;
}
[data-sm-theme="light"] .header .hamburger,
[data-sm-theme="light"] .header #menuToggle {
  color: #94a3b8 !important;
  border-color: rgba(255,255,255,.15) !important;
  background: rgba(255,255,255,.05) !important;
}
[data-sm-theme="light"] .header-user-name { color: #f1f5f9 !important; }
[data-sm-theme="light"] .header-user-rol  { color: #64748b !important; }
[data-sm-theme="light"] .sm-theme-toggle--header {
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.15) !important;
  color: #94a3b8 !important;
}

/* Drawer modo claro */
[data-sm-theme="light"] .drawer {
  background: var(--sm-bg-surface) !important;
  border-right: 1px solid var(--sm-border-medium) !important;
}
[data-sm-theme="light"] .drawer-header {
  background: var(--sm-bg-raised) !important;
  border-bottom: 1px solid var(--sm-border-soft) !important;
}
[data-sm-theme="light"] .drawer-header::after { display: none !important; }
[data-sm-theme="light"] .drawer-brand-text strong {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: var(--sm-text-primary) !important;
  color: var(--sm-text-primary) !important;
}
[data-sm-theme="light"] .drawer-content button {
  color: var(--sm-text-secondary) !important;
  background: transparent !important;
}
[data-sm-theme="light"] .drawer-content button::before { display: none !important; }
[data-sm-theme="light"] .drawer-content button:hover {
  background: var(--sm-bg-hover) !important;
  color: var(--sm-text-primary) !important;
}
[data-sm-theme="light"] .drawer-content button.active {
  background: var(--sm-accent-soft) !important;
  color: var(--sm-accent) !important;
  border-left: 3px solid var(--sm-accent) !important;
  box-shadow: none !important;
}
[data-sm-theme="light"] .drawer-grupo-header {
  color: var(--sm-text-muted) !important;
  background: transparent !important;
}
[data-sm-theme="light"] .close-drawer {
  color: var(--sm-text-muted) !important;
  background: rgba(0,0,0,.05) !important;
  border-color: rgba(0,0,0,.1) !important;
}

/* Menú horizontal modo claro */
[data-sm-theme="light"] .menu {
  background: var(--sm-bg-surface) !important;
  border-bottom: 1px solid var(--sm-border-medium) !important;
}
[data-sm-theme="light"] .menu button {
  color: var(--sm-text-secondary) !important;
  background: transparent !important;
}
[data-sm-theme="light"] .menu button::before { display: none !important; }
[data-sm-theme="light"] .menu button:hover {
  background: var(--sm-bg-hover) !important;
  color: var(--sm-text-primary) !important;
}
[data-sm-theme="light"] .menu button.active {
  background: var(--sm-accent-soft) !important;
  color: var(--sm-accent) !important;
  border-bottom: 2px solid var(--sm-accent) !important;
  box-shadow: none !important;
}
/* ── Avatar con favicon: forzar imagen al tamaño completo ── */
.drawer-avatar,
.user-chip-avatar {
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.drawer-avatar img,
.user-chip-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  transform: none !important;
}

.multi-dealer-action-btn {
  min-height: 64px;
  border: 1px solid rgba(96,165,250,0.42);
  background: rgba(37,99,235,0.16);
  color: #e0f2fe;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.multi-dealer-action-btn:hover {
  border-color: rgba(96,165,250,0.78);
  background: rgba(37,99,235,0.24);
  transform: translateY(-1px);
}
.multi-dealer-action-btn strong {
  display: block;
  font-family: Oswald, sans-serif;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: #fff;
}
.multi-dealer-action-btn small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  color: #bfdbfe;
}

/* Multi dealer polish: identidad clara por concesionario */
.header .logo-container {
  gap: 10px !important;
  min-width: 0;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.dealer-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(148,163,184,.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(15,23,42,0.04),
    0 8px 18px rgba(2,6,23,0.22);
}
.dealer-brand-mark img {
  width: 100%;
  height: 100%;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain;
  filter: none !important;
}
.dealer-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}
.dealer-brand-copy strong {
  color: #f8fafc;
  font-family: Oswald, sans-serif;
  font-size: clamp(18px, 2vw, 25px);
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dealer-brand-copy small {
  color: #93c5fd;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.drawer-brand-version,
.user-chip-role {
  max-width: 158px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#sec-dealers .dh-panel {
  background: linear-gradient(180deg, rgba(8,16,30,.96), rgba(10,22,42,.94)) !important;
  border-color: rgba(96,165,250,.18) !important;
}
#sec-dealers .dh-hero {
  background:
    linear-gradient(135deg, rgba(37,99,235,.18), transparent 36%),
    linear-gradient(145deg, rgba(8,13,24,.98), rgba(14,24,43,.96)) !important;
  border-color: rgba(96,165,250,.18) !important;
}
.multi-dealer-shell {
  text-align: left;
}
.multi-dealer-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.multi-dealer-search {
  flex: 1;
  min-width: 220px;
  margin: 0 !important;
  background: rgba(8,17,32,.84) !important;
  border-color: rgba(96,165,250,.34) !important;
}
.multi-dealer-layout {
  display: grid;
  grid-template-columns: minmax(280px,.78fr) minmax(0,1.45fr);
  gap: 12px;
  min-height: 620px;
}
.multi-dealer-list,
.multi-dealer-detail {
  overflow: auto;
  max-height: 70vh;
  border: 1px solid rgba(96,165,250,.16);
  border-radius: 14px;
  background: rgba(7,15,28,.72);
}
.multi-dealer-list {
  padding: 8px;
}
.multi-dealer-detail {
  padding: 14px;
}
.multi-dealer-card {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  border: 1px solid rgba(148,163,184,.12);
  background: rgba(15,28,48,.84);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  color: #e2e8f0;
  cursor: pointer;
}
.multi-dealer-card:hover,
.multi-dealer-card.is-active {
  border-color: rgba(96,165,250,.62);
  background: rgba(30,64,120,.38);
}
.multi-dealer-card-logo,
.multi-dealer-detail-logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: rgba(2,6,23,.48);
  border: 1px solid rgba(148,163,184,.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}
.multi-dealer-card-logo img,
.multi-dealer-detail-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.multi-dealer-card-body {
  min-width: 0;
}
.multi-dealer-card-body strong {
  display: block;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.25;
}
.multi-dealer-card-body small {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  margin-top: 3px;
}
.multi-dealer-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.multi-dealer-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.multi-dealer-detail-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.multi-dealer-detail-logo {
  width: 48px;
  height: 48px;
}
.multi-dealer-detail-title {
  font-family: Oswald, sans-serif;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.multi-dealer-detail-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
}
@media (max-width: 900px) {
  .multi-dealer-layout {
    grid-template-columns: 1fr;
  }
  .multi-dealer-list,
  .multi-dealer-detail {
    max-height: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   MESA DE OPERACIONES DE FACTURACIÓN — Rediseño v2
   Pegar al final de styles.css (o reemplazar bloque anterior si existe)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Panel contenedor ─────────────────────────────────────────────────── */
.factws-panel {
  border: 1px solid rgba(20, 184, 166, 0.32);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.97), rgba(15, 118, 110, 0.18));
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.38);
}

/* ── Cabecera del panel ───────────────────────────────────────────────── */
.factws-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.factws-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #f1f5f9;
}
.factws-title-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0e4f7a, #0d9488);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex: 0 0 auto;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.28);
}
.factws-head-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.factws-subtitle {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── KPI grid ─────────────────────────────────────────────────────────── */
.factws-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.factws-kpi {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 11px 14px;
  transition: border-color 0.2s;
}
.factws-kpi:hover {
  border-color: rgba(56, 189, 248, 0.35);
}
.factws-kpi-label {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  margin-bottom: 4px;
}
.factws-kpi-value {
  font-family: 'Oswald', sans-serif;
  font-size: 26px;
  line-height: 1;
  font-weight: 400;
}
.factws-kpi-value.kpi-total   { color: #2dd4bf; }
.factws-kpi-value.kpi-critica { color: #f87171; }
.factws-kpi-value.kpi-sep     { color: #fbbf24; }
.factws-kpi-value.kpi-pend    { color: #a78bfa; }
.factws-kpi-sub {
  font-size: 10px;
  color: #4ade80;
  margin-top: 4px;
}

/* ── Bloque de búsqueda de separación ────────────────────────────────── */
.factws-search-block {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.17);
  margin-bottom: 12px;
}
.factws-search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.factws-search-title {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.factws-search-notice {
  font-size: 10px;
  color: #475569;
}
.factws-search-row {
  display: flex;
  gap: 6px;
}

.factws-reference-block {
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(120, 53, 15, 0.10);
}

.factws-reference-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

/* ── Bloque de filtros ────────────────────────────────────────────────── */
.factws-filter-block {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.14);
  margin-bottom: 12px;
}
.factws-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.factws-filter-title {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
}
.factws-filter-count {
  font-size: 11px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.factws-filter-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) minmax(140px, 0.8fr) minmax(120px, 0.7fr) auto;
  gap: 6px;
  align-items: center;
}

/* ── Etiqueta de sección ─────────────────────────────────────────────── */
.factws-section-label {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

/* ── Tarjeta de unidad operación ─────────────────────────────────────── */
.factws-card {
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 12px 14px;
  margin-bottom: 8px;
  transition: border-color 0.18s, box-shadow 0.18s;
  position: relative;
}
.factws-card:hover {
  border-color: rgba(148, 163, 184, 0.38);
  box-shadow: 0 4px 18px rgba(2, 6, 23, 0.28);
}

/* Borde izquierdo semántico por prioridad */
.factws-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--factws-priority-color, #4ade80);
}

.factws-card-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-left: 8px;
}
.factws-card-left {
  min-width: 0;
  flex: 1;
}
.factws-card-name {
  font-family: 'Oswald', sans-serif;
  color: #e2e8f0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.factws-card-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.5;
}
.factws-card-right {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

/* ── Badge de estado ─────────────────────────────────────────────────── */
.factws-estado-badge {
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.65);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.factws-estado-badge.sep    { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); }
.factws-estado-badge.pend   { color: #a78bfa; border-color: rgba(167, 139, 250, 0.35); }
.factws-estado-badge.vend   { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); }

/* ── Días y prioridad ────────────────────────────────────────────────── */
.factws-dias {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  line-height: 1.1;
  text-align: right;
}
.factws-prioridad {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ── Badge cliente ───────────────────────────────────────────────────── */
.factws-badge-cliente {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}
.factws-badge-cliente.validado {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}
.factws-badge-cliente.revisar {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

/* ── Nota temporal ───────────────────────────────────────────────────── */
.factws-nota {
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin-left: 8px;
}

/* ── Botones de acción ───────────────────────────────────────────────── */
.factws-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-left: 8px;
}
/* Los .dh-chip-btn ya existen en el sistema; aquí sólo variantes nuevas */
.factws-btn-primary {
  border-color: rgba(74, 222, 128, 0.45) !important;
  color: #4ade80 !important;
}
.factws-btn-primary:hover {
  border-color: rgba(74, 222, 128, 0.8) !important;
  background: rgba(74, 222, 128, 0.1) !important;
}
.factws-btn-warning {
  border-color: rgba(251, 191, 36, 0.45) !important;
  color: #fbbf24 !important;
}
.factws-btn-warning:hover {
  border-color: rgba(251, 191, 36, 0.8) !important;
  background: rgba(251, 191, 36, 0.08) !important;
}
.factws-btn-purple {
  border-color: rgba(167, 139, 250, 0.45) !important;
  color: #a78bfa !important;
}
.factws-btn-purple:hover {
  border-color: rgba(167, 139, 250, 0.8) !important;
  background: rgba(167, 139, 250, 0.08) !important;
}
.factws-btn-danger {
  border-color: rgba(248, 113, 113, 0.4) !important;
  color: #fca5a5 !important;
}
.factws-btn-danger:hover {
  border-color: rgba(248, 113, 113, 0.75) !important;
  background: rgba(248, 113, 113, 0.07) !important;
}
.factws-btn-sky {
  border-color: rgba(14, 165, 233, 0.4) !important;
  color: #38bdf8 !important;
}
.factws-btn-sky:hover {
  border-color: rgba(14, 165, 233, 0.75) !important;
  background: rgba(14, 165, 233, 0.07) !important;
}

/* ── Vendido reciente ────────────────────────────────────────────────── */
.factws-vendido-card {
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(6, 78, 59, 0.18);
  border: 1px solid rgba(74, 222, 128, 0.22);
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s;
}
.factws-vendido-card:hover {
  border-color: rgba(74, 222, 128, 0.42);
}
.factws-vendido-name {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
}
.factws-vendido-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* ── Footer info ─────────────────────────────────────────────────────── */
.factws-footer {
  margin-top: 12px;
  font-size: 10px;
  color: #475569;
}

/* ── Prioridades: fondo de tarjeta ───────────────────────────────────── */
.factws-card.p-critica { background: rgba(127, 29, 29, 0.22); }
.factws-card.p-alta    { background: rgba(124, 45, 18, 0.22); }
.factws-card.p-media   { background: rgba(120, 53, 15, 0.18); }
.factws-card.p-normal  { background: rgba(6, 78, 59, 0.18); }

/* ── Vacío / sin resultados ──────────────────────────────────────────── */
.factws-empty {
  padding: 14px;
  border-radius: 10px;
  font-size: 12px;
}
.factws-empty.ok {
  border: 1px dashed rgba(74, 222, 128, 0.35);
  color: #86efac;
  background: rgba(16, 185, 129, 0.08);
}
.factws-empty.filtered {
  border: 1px dashed rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.35);
}

/* ── Error ───────────────────────────────────────────────────────────── */
.factws-error-panel {
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
}
.factws-error-msg {
  font-size: 12px;
  color: #fca5a5;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .factws-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .factws-filter-grid {
    grid-template-columns: 1fr 1fr;
  }
  .factws-reference-grid {
    grid-template-columns: 1fr 1fr;
  }
  .factws-filter-grid > button {
    grid-column: 1 / -1;
  }
}
@media (max-width: 420px) {
  .factws-kpis {
    grid-template-columns: 1fr 1fr;
  }
  .factws-filter-grid {
    grid-template-columns: 1fr;
  }
  .factws-reference-grid {
    grid-template-columns: 1fr;
  }
}

/* Drawer polish: final overrides */
.drawer-content {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%) !important;
}
.drawer-profile, #drawer .drawer-profile {
  margin: 0 8px 4px !important;
  padding: 14px 12px 10px !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,0.02) !important;
}
.drawer-profile-head, #drawer .drawer-profile-head {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
}
.drawer-avatar, #drawer .drawer-avatar {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  font-family: Oswald, sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 0 2px rgba(74,222,128,0.5) !important;
}
.drawer-profile-name, #drawer .drawer-profile-name {
  font-family: Oswald, sans-serif !important;
  font-size: 16px !important;
  color: #f1f5f9 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.drawer-role-badge, #drawer .drawer-role-badge {
  margin-top: 5px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  border-radius: 999px !important;
  padding: 3px 9px !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  font-family: Oswald, sans-serif !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  font-size: 10px !important;
}
.drawer-role-badge.tier-6, #drawer .drawer-role-badge.tier-6 {
  background: rgba(74,222,128,0.15) !important;
  border-color: rgba(74,222,128,0.4) !important;
  color: #4ade80 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}
.drawer-profile-sep {
  height: 1px !important;
  margin: 8px 0 !important;
  background: linear-gradient(90deg, rgba(148,163,184,0), rgba(148,163,184,0.2), rgba(148,163,184,0)) !important;
}
.drawer-profile-sub {
  color: #94a3b8 !important;
  font-size: 11px !important;
  letter-spacing: 0.02em !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
}
.drawer-search, #drawer .drawer-search {
  margin: 8px 8px 4px !important;
  position: relative !important;
}
.drawer-search input, #drawer .drawer-search input {
  width: 100% !important;
  height: 36px !important;
  border-radius: 11px !important;
  border: 1px solid rgba(148,163,184,0.16) !important;
  background: rgba(15,23,42,0.7) !important;
  color: #e2e8f0 !important;
  padding: 0 10px 0 32px !important;
  outline: none !important;
  font-size: 12px !important;
  transition: border-color 0.2s !important;
}
.drawer-search input:focus { border-color: rgba(148,163,184,0.35) !important; }
.drawer-search input::placeholder { color: #475569 !important; }
.drawer-search-icon, #drawer .drawer-search-icon {
  position: absolute !important;
  left: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 13px !important;
  color: #475569 !important;
  pointer-events: none !important;
}
.drawer-groups {
  flex: 1 !important;
  min-height: 0 !important;
  width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
  padding: 0 6px 6px !important;
}
.drawer-grupo { margin: 2px 0 !important; }
.drawer-grupo-header, #drawer .drawer-grupo-header {
  min-height: 30px !important;
  padding: 6px 8px !important;
  margin: 1px 0 !important;
  border-radius: 10px !important;
  color: #475569 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: background 0.15s, color 0.15s !important;
}
.drawer-grupo-header:hover {
  background: rgba(148,163,184,0.06) !important;
  color: #94a3b8 !important;
}
.drawer-grupo-header.open, #drawer .drawer-grupo-header.open {
  color: #cbd5e1 !important;
  background: rgba(148,163,184,0.08) !important;
}
.drawer-grupo-header .dg-count, #drawer .drawer-grupo-header .dg-count {
  margin-left: auto !important;
  min-width: 18px !important;
  height: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  color: #64748b !important;
  background: rgba(148,163,184,0.1) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
}
.drawer-grupo-header .dg-arrow, #drawer .drawer-grupo-header .dg-arrow {
  margin-left: 2px !important;
  font-size: 11px !important;
  transition: transform 0.2s !important;
  color: #475569 !important;
}
.drawer-grupo-header.open .dg-arrow, #drawer .drawer-grupo-header.open .dg-arrow {
  transform: rotate(90deg) !important;
  color: #94a3b8 !important;
}
.drawer-grupo-items {
  padding-left: 0 !important;
  border-left: none !important;
  margin-left: 0 !important;
  width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}
.drawer-menu-item, .drawer-grupo-items button,
#drawer .drawer-menu-item, #drawer .drawer-grupo-items button {
  display: flex !important;
  align-items: center !important;
  min-height: 34px !important;
  padding: 6px 10px !important;
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-align: left !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 10px !important;
  color: #94a3b8 !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  transition: background 0.15s, color 0.15s, transform 0.15s !important;
  letter-spacing: 0.01em !important;
}
.drawer-content button:hover {
  background: rgba(255,255,255,0.05) !important;
  color: #e2e8f0 !important;
  transform: translateX(3px) !important;
}
.drawer-content button.active,
#drawer .drawer-content button.active,
#drawer .drawer-grupo-items button.active,
#drawer .drawer-menu-item.active {
  background: linear-gradient(90deg, rgba(225,29,72,0.2) 0%, rgba(225,29,72,0.04) 100%) !important;
  color: #fda4af !important;
  border-left: 3px solid #e11d48 !important;
  padding-left: 7px !important;
}
.drawer-item-icon, #drawer .drawer-item-icon {
  width: 18px !important;
  height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: #64748b !important;
  font-size: 14px !important;
  transition: color 0.15s !important;
}
.drawer-menu-item.active .drawer-item-icon,
.drawer-grupo-items button.active .drawer-item-icon {
  color: #e11d48 !important;
}
.drawer-item-badge-dot {
  margin-left: auto !important;
  min-width: 18px !important;
  height: 18px !important;
  border-radius: 999px !important;
  background: #e11d48 !important;
  color: #fff !important;
  font-size: 10px !important;
  font-family: 'Oswald', sans-serif !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 5px !important;
  animation: pulse 1.5s infinite !important;
}
.drawer-bottom-actions, #drawer .drawer-bottom-actions {
  padding: 8px !important;
  border-top: 1px solid rgba(255,255,255,0.06) !important;
  display: grid !important;
  gap: 5px !important;
  background: transparent !important;
}
.drawer-bottom-action-btn, #drawer .drawer-bottom-action-btn {
  background: rgba(148,163,184,0.07) !important;
  border: 1px solid rgba(148,163,184,0.12) !important;
  border-radius: 9px !important;
  padding: 7px 4px !important;
  color: #64748b !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
  transition: all 0.15s !important;
  transform: none !important;
}
.drawer-bottom-action-btn:hover, #drawer .drawer-bottom-action-btn:hover {
  background: rgba(148,163,184,0.13) !important;
  color: #e2e8f0 !important;
  transform: none !important;
}
.drawer-btn-cambiar-usuario, #drawer .drawer-bottom-actions .drawer-btn-cambiar-usuario {
  background: rgba(239,68,68,0.08) !important;
  border: 1px solid rgba(239,68,68,0.22) !important;
  border-radius: 9px !important;
  padding: 7px 4px !important;
  color: #fca5a5 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  transform: none !important;
}
.drawer-btn-cambiar-usuario:hover, #drawer .drawer-bottom-actions .drawer-btn-cambiar-usuario:hover {
  background: rgba(239,68,68,0.15) !important;
  transform: none !important;
}

/* Drawer target reference scale */
@media (min-width: 992px) {
  :root { --drawer-width-desktop: 310px !important; }
  .drawer { width: var(--drawer-width-desktop) !important; }
  #app { padding-left: var(--drawer-width-desktop) !important; }
}

.drawer,
#drawer {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%) !important;
  border-right: 1px solid rgba(96,165,250,0.18) !important;
  box-shadow: 8px 0 30px rgba(2,6,23,0.42) !important;
}

.drawer-content,
#drawer .drawer-content {
  padding: 20px 18px 16px !important;
  gap: 12px !important;
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%) !important;
}

.drawer-profile,
#drawer .drawer-profile {
  margin: 0 -2px 12px !important;
  padding: 18px 18px 14px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(148,163,184,0.18) !important;
  background: rgba(15,23,42,0.44) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

.drawer-profile-head,
#drawer .drawer-profile-head {
  gap: 14px !important;
  margin-bottom: 18px !important;
}

.drawer-avatar,
#drawer .drawer-avatar {
  width: 58px !important;
  height: 58px !important;
  border-radius: 16px !important;
  background: #0f172a !important;
  border: 3px solid #4ade80 !important;
  color: #4ade80 !important;
  font-family: Oswald, sans-serif !important;
  font-size: 28px !important;
  font-weight: 800 !important;
  box-shadow: 0 0 0 1px rgba(74,222,128,0.12), 0 0 20px rgba(74,222,128,0.18) !important;
}

.drawer-profile-name,
#drawer .drawer-profile-name {
  font-size: 28px !important;
  color: #f8fafc !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-weight: 800 !important;
}

#drawer .drawer-profile-head > div {
  gap: 7px !important;
}

#drawer .drawer-profile-head > div > div:not(.drawer-profile-name) {
  font-size: 15px !important;
  color: #93c5fd !important;
  margin: 0 !important;
}

.drawer-role-badge,
#drawer .drawer-role-badge {
  margin-top: 2px !important;
  padding: 6px 14px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  border-radius: 999px !important;
  letter-spacing: 0.07em !important;
  background: rgba(74,222,128,0.15) !important;
  border-color: rgba(74,222,128,0.42) !important;
  color: #4ade80 !important;
}

.drawer-profile-sep {
  margin: 14px 0 !important;
  background: rgba(148,163,184,0.14) !important;
}

.drawer-profile-sub {
  font-size: 16px !important;
  color: #a8b3c7 !important;
  gap: 8px !important;
}

.drawer-profile-sub span:first-child {
  width: 11px !important;
  height: 11px !important;
}

.drawer-profile .drawer-profile-sub + div,
#drawer .drawer-profile .drawer-profile-sub + div {
  margin-top: 16px !important;
}

.drawer-profile .drawer-profile-sub + div > div {
  gap: 10px !important;
}

.drawer-profile .drawer-profile-sub + div span {
  font-size: 14px !important;
  padding: 7px 14px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
}

.drawer-search,
#drawer .drawer-search {
  margin: 0 -2px 12px !important;
}

.drawer-search input,
#drawer .drawer-search input {
  height: 52px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(148,163,184,0.28) !important;
  background: rgba(255,255,255,0.12) !important;
  color: #f8fafc !important;
  font-size: 22px !important;
  padding: 0 14px 0 36px !important;
}

.drawer-search input::placeholder {
  color: #f1f5f9 !important;
  opacity: 0.96 !important;
}

.drawer-search-icon,
#drawer .drawer-search-icon {
  left: 14px !important;
  font-size: 18px !important;
  color: #e2e8f0 !important;
}

.drawer-groups {
  padding: 0 !important;
}

.drawer-grupo {
  margin: 8px 0 !important;
}

.drawer-grupo-header,
#drawer .drawer-grupo-header {
  min-height: 44px !important;
  padding: 9px 14px !important;
  margin: 0 !important;
  border-radius: 13px !important;
  gap: 11px !important;
  background: rgba(30,41,59,0.62) !important;
  color: #cbd5e1 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  letter-spacing: 0.09em !important;
  font-family: Inter, system-ui, sans-serif !important;
}

.drawer-grupo-header:not(.open) {
  background: transparent !important;
  color: rgba(148,163,184,0.58) !important;
}

.drawer-grupo-header .dg-icon,
#drawer .drawer-grupo-header .dg-icon {
  width: 24px !important;
  font-size: 20px !important;
}

.drawer-grupo-header .dg-count,
#drawer .drawer-grupo-header .dg-count {
  min-width: 28px !important;
  height: 24px !important;
  font-size: 14px !important;
  background: rgba(148,163,184,0.1) !important;
}

.drawer-grupo-header .dg-arrow,
#drawer .drawer-grupo-header .dg-arrow {
  font-size: 15px !important;
}

.drawer-grupo-items {
  display: grid !important;
  gap: 2px !important;
  padding: 2px 4px 0 !important;
}

.drawer-menu-item,
.drawer-grupo-items button,
#drawer .drawer-menu-item,
#drawer .drawer-grupo-items button {
  min-height: 50px !important;
  padding: 0 16px !important;
  margin: 0 !important;
  border-radius: 13px !important;
  border: 1px solid rgba(148,163,184,0.28) !important;
  background: rgba(15,23,42,0.52) !important;
  color: #f8fafc !important;
  gap: 14px !important;
  transform: none !important;
}

.drawer-grupo:not(:has(.drawer-grupo-header.open)) .drawer-menu-item,
.drawer-grupo:not(:has(.drawer-grupo-header.open)) .drawer-grupo-items button {
  display: none !important;
}

.drawer-item-icon,
#drawer .drawer-item-icon {
  width: 28px !important;
  height: 28px !important;
  font-size: 22px !important;
  color: #f8fafc !important;
}

.drawer-item-emoji {
  font-size: 22px !important;
  line-height: 1 !important;
}

.drawer-item-label,
#drawer .drawer-item-label {
  font-size: 20px !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  color: inherit !important;
}

.drawer-content button:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #ffffff !important;
  transform: none !important;
}

.drawer-content button.active,
#drawer .drawer-content button.active,
#drawer .drawer-grupo-items button.active,
#drawer .drawer-menu-item.active {
  background: rgba(15,23,42,0.72) !important;
  color: #ffffff !important;
  border: 1px solid rgba(148,163,184,0.42) !important;
  border-left: 0 !important;
  padding-left: 16px !important;
}

.drawer-content button.active .drawer-item-badge-dot,
#drawer .drawer-content button.active .drawer-item-badge-dot {
  min-width: 28px !important;
  height: 28px !important;
  font-size: 16px !important;
}

.drawer-bottom-actions,
#drawer .drawer-bottom-actions {
  margin: 12px -2px 0 !important;
  padding: 14px 0 0 !important;
  gap: 8px !important;
  border-top: 1px solid rgba(148,163,184,0.16) !important;
  background: transparent !important;
  display: grid !important;
}

.drawer-bottom-action-btn,
#drawer .drawer-bottom-action-btn,
.drawer-btn-cambiar-usuario,
#drawer .drawer-bottom-actions .drawer-btn-cambiar-usuario {
  min-height: 82px !important;
  padding: 12px 8px !important;
  border-radius: 12px !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  background: rgba(15,23,42,0.52) !important;
  border: 1px solid rgba(148,163,184,0.36) !important;
  gap: 8px !important;
  justify-content: center !important;
  font-family: Inter, system-ui, sans-serif !important;
}

.drawer-bottom-action-btn span:first-child,
.drawer-btn-cambiar-usuario__icon {
  font-size: 22px !important;
}

.drawer-btn-cambiar-usuario,
#drawer .drawer-bottom-actions .drawer-btn-cambiar-usuario {
  background: rgba(239,68,68,0.1) !important;
  border-color: rgba(248,113,113,0.36) !important;
}

/* Drawer compact target: balanced scale */
@media (min-width: 992px) {
  :root { --drawer-width-desktop: 270px !important; }
  .drawer { width: var(--drawer-width-desktop) !important; }
  #app { padding-left: var(--drawer-width-desktop) !important; }
}

.drawer-content,
#drawer .drawer-content {
  padding: 12px 10px 10px !important;
  gap: 7px !important;
}

.drawer-profile,
#drawer .drawer-profile {
  margin: 0 0 8px !important;
  padding: 12px 12px 10px !important;
  border-radius: 14px !important;
}

.drawer-profile-head,
#drawer .drawer-profile-head {
  gap: 10px !important;
  margin-bottom: 10px !important;
}

.drawer-avatar,
#drawer .drawer-avatar {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  border-width: 2px !important;
  font-size: 20px !important;
}

.drawer-profile-name,
#drawer .drawer-profile-name {
  font-size: 18px !important;
  line-height: 1.05 !important;
}

#drawer .drawer-profile-head > div > div:not(.drawer-profile-name) {
  font-size: 12px !important;
}

.drawer-role-badge,
#drawer .drawer-role-badge {
  padding: 4px 10px !important;
  font-size: 11px !important;
}

.drawer-profile-sep {
  margin: 9px 0 !important;
}

.drawer-profile-sub {
  font-size: 12px !important;
  gap: 6px !important;
}

.drawer-profile-sub span:first-child {
  width: 8px !important;
  height: 8px !important;
}

.drawer-profile .drawer-profile-sub + div,
#drawer .drawer-profile .drawer-profile-sub + div {
  margin-top: 9px !important;
}

.drawer-profile .drawer-profile-sub + div span {
  font-size: 11px !important;
  padding: 4px 9px !important;
  border-radius: 10px !important;
}

.drawer-search,
#drawer .drawer-search {
  margin: 0 0 8px !important;
}

.drawer-search input,
#drawer .drawer-search input {
  height: 38px !important;
  border-radius: 11px !important;
  font-size: 13px !important;
  padding: 0 10px 0 32px !important;
}

.drawer-search-icon,
#drawer .drawer-search-icon {
  left: 10px !important;
  font-size: 13px !important;
}

.drawer-grupo {
  margin: 4px 0 !important;
}

.drawer-grupo-header,
#drawer .drawer-grupo-header {
  min-height: 34px !important;
  padding: 7px 10px !important;
  border-radius: 11px !important;
  gap: 8px !important;
  font-size: 11px !important;
}

.drawer-grupo-header .dg-icon,
#drawer .drawer-grupo-header .dg-icon {
  width: 18px !important;
  font-size: 15px !important;
}

.drawer-grupo-header .dg-count,
#drawer .drawer-grupo-header .dg-count {
  min-width: 22px !important;
  height: 19px !important;
  font-size: 11px !important;
}

.drawer-grupo-items {
  gap: 3px !important;
  padding: 3px 2px 0 !important;
}

.drawer-menu-item,
.drawer-grupo-items button,
#drawer .drawer-menu-item,
#drawer .drawer-grupo-items button {
  min-height: 38px !important;
  padding: 0 11px !important;
  border-radius: 11px !important;
  gap: 9px !important;
}

.drawer-item-icon,
#drawer .drawer-item-icon {
  width: 21px !important;
  height: 21px !important;
  font-size: 15px !important;
}

.drawer-item-emoji {
  font-size: 15px !important;
}

.drawer-item-label,
#drawer .drawer-item-label {
  font-size: 13px !important;
  font-weight: 800 !important;
}

.drawer-content button.active,
#drawer .drawer-content button.active,
#drawer .drawer-grupo-items button.active,
#drawer .drawer-menu-item.active {
  padding-left: 11px !important;
}

.drawer-content button.active .drawer-item-badge-dot,
#drawer .drawer-content button.active .drawer-item-badge-dot,
.drawer-item-badge-dot {
  min-width: 20px !important;
  height: 20px !important;
  font-size: 11px !important;
}

.drawer-bottom-actions,
#drawer .drawer-bottom-actions {
  margin: 8px 0 0 !important;
  padding: 9px 0 0 !important;
  gap: 6px !important;
}

.drawer-bottom-action-btn,
#drawer .drawer-bottom-action-btn,
.drawer-btn-cambiar-usuario,
#drawer .drawer-bottom-actions .drawer-btn-cambiar-usuario {
  min-height: 54px !important;
  padding: 8px 5px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  gap: 4px !important;
}

.drawer-bottom-action-btn span:first-child,
.drawer-btn-cambiar-usuario__icon {
  font-size: 15px !important;
}

/* Drawer avatar: subtle premium ring */
.drawer-avatar,
#drawer .drawer-avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  position: relative !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--drawer-avatar-color, #4ade80) !important;
  box-shadow: none !important;
}

.drawer-avatar::before,
#drawer .drawer-avatar::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: 50% !important;
  border: 2px solid transparent !important;
  border-top-color: var(--drawer-avatar-color, #4ade80) !important;
  border-right-color: var(--drawer-avatar-color, #4ade80) !important;
  opacity: 0.55 !important;
}

.drawer-avatar:hover::before,
#drawer .drawer-avatar:hover::before {
  animation: drawer-avatar-spin 6s linear infinite !important;
}

.drawer-avatar::after,
#drawer .drawer-avatar::after {
  content: attr(data-initial) !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: Oswald, sans-serif !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  background: #fff !important;
  border: 1px solid var(--drawer-avatar-color, #4ade80) !important;
  box-shadow:
    inset 0 0 0 1px rgba(15,23,42,0.04),
    0 8px 18px rgba(2,6,23,0.24) !important;
}

.user-chip-avatar,
.drawer-avatar img,
.user-chip-avatar img,
.multi-dealer-card-logo,
.multi-dealer-detail-logo {
  background: #fff !important;
}

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

/* Readability pass: chips, muted text and compact controls */
.dh-chip-btn,
button.dh-chip-btn,
a.dh-chip-btn {
  min-height: 28px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(148,163,184,0.22) !important;
  background: rgba(30,41,59,0.74) !important;
  color: #cbd5e1 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  letter-spacing: 0.02em !important;
}

.dh-chip-btn:hover,
button.dh-chip-btn:hover,
a.dh-chip-btn:hover {
  background: rgba(51,65,85,0.86) !important;
  border-color: rgba(148,163,184,0.36) !important;
  color: #f8fafc !important;
}

.dh-muted,
.dh-mini-sub,
.dh-ur-sub,
.dh-hero-sub,
.dh-bar-val,
.dh-bar-label,
.dh-drill-vendedor,
.section-hero-copy {
  color: #9fb0c7 !important;
}

#sec-home .dh-panel [style*="color:#64748b"],
#sec-home .dh-panel [style*="color: #64748b"],
#sec-home .dh-panel [style*="color:#475569"],
#sec-home .dh-panel [style*="color: #475569"],
#panel-ranking-facturadores [style*="color:#64748b"],
#panel-ranking-facturadores [style*="color:#475569"],
#facturador-home-workspace [style*="color:#64748b"],
#facturador-home-workspace [style*="color:#475569"] {
  color: #9fb0c7 !important;
}

#sec-home .dh-panel [style*="font-size:10px"],
#panel-ranking-facturadores [style*="font-size:10px"] {
  font-size: 11px !important;
  line-height: 1.45 !important;
}

#panel-centro-rapido .dh-chip-btn,
#sec-home .dh-panel .dh-chip-btn {
  margin: 2px 3px !important;
}

/* Global readability floor for low-contrast inline text */
[style*="color:#64748b"],
[style*="color: #64748b"],
[style*="color:#475569"],
[style*="color: #475569"],
[style*="color:#334155"],
[style*="color: #334155"] {
  color: #9fb0c7 !important;
}

[style*="font-size:9px"],
[style*="font-size: 9px"] {
  font-size: 10.5px !important;
  line-height: 1.35 !important;
}

[style*="font-size:10px"],
[style*="font-size: 10px"] {
  font-size: 11px !important;
  line-height: 1.4 !important;
}

button,
.btn-submit,
.btn-mini,
.dh-chip-btn,
.gerencia-search-btn,
.admin-menu-button {
  text-rendering: geometricPrecision;
}

button:not(.admin-menu-button):not(.drawer-menu-item):not(.drawer-grupo-header):not(.mobile-bottom-nav button),
.btn-submit,
.btn-mini,
.dh-chip-btn,
.gerencia-search-btn {
  min-height: 30px;
}

/* Modal layout final pass: keep every dialog centered and tidy */
.swal2-container {
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
}

.swal2-popup {
  max-height: calc(100vh - 32px) !important;
  overflow: hidden !important;
}

.swal2-popup.sm-modal-standard {
  width: min(720px, calc(100vw - 32px)) !important;
}

.swal2-html-container {
  max-height: calc(100vh - 190px) !important;
  overflow-y: auto !important;
}

@media (max-width: 640px) {
  .swal2-container {
    padding: 10px !important;
  }
  .swal2-popup,
  .swal2-popup.sm-modal-standard {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 20px) !important;
  }
  .swal2-title {
    padding: 15px 16px 12px !important;
  }
  .swal2-html-container {
    padding: 14px 16px !important;
    max-height: calc(100vh - 178px) !important;
  }
}

/* Identidad visual por funcion para botones antes azules */
:root {
  --sm-btn-action-bg: linear-gradient(135deg, #263244 0%, #334155 55%, #1f2937 100%);
  --sm-btn-action-bg-hover: linear-gradient(135deg, #334155 0%, #475569 55%, #263244 100%);
  --sm-btn-action-border: rgba(148, 163, 184, 0.34);
  --sm-btn-action-text: #e5edf7;
  --sm-btn-action-shadow: 0 10px 24px rgba(2, 6, 23, 0.24);
  --sm-btn-refresh-bg: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  --sm-btn-refresh-hover: linear-gradient(135deg, #0d9488 0%, #2dd4bf 100%);
  --sm-btn-open-bg: linear-gradient(135deg, #334155 0%, #475569 100%);
  --sm-btn-open-hover: linear-gradient(135deg, #475569 0%, #64748b 100%);
  --sm-btn-edit-bg: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  --sm-btn-print-bg: linear-gradient(135deg, #0f766e 0%, #155e75 100%);
  --sm-btn-copy-bg: linear-gradient(135deg, #475569 0%, #334155 100%);
  --sm-btn-search-bg: linear-gradient(135deg, #155e75 0%, #0e7490 100%);
  --sm-btn-export-bg: linear-gradient(135deg, #854d0e 0%, #ca8a04 100%);
}

.btn-submit:not([style*="background" i]):not(.btn-whatsapp-modern):not(.btn-whatsapp-metal),
.btn-mini:not([style*="background" i]):not(.btn-whatsapp-modern):not(.btn-whatsapp-metal),
button:not(.home-stock-card):not(.dashboard-quick-action)[style*="#3b82f6" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[style*="#2563eb" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[style*="#1d4ed8" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[style*="#60a5fa" i],
a[style*="#3b82f6" i],
a[style*="#2563eb" i],
a[style*="#1d4ed8" i],
a[style*="#60a5fa" i] {
  background: var(--sm-btn-action-bg) !important;
  border: 1px solid var(--sm-btn-action-border) !important;
  color: var(--sm-btn-action-text) !important;
  box-shadow: var(--sm-btn-action-shadow) !important;
}

button:not(.home-stock-card):not(.dashboard-quick-action)[onclick*="actualizar" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[onclick*="refrescar" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[onclick*="recargar" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[title*="recargar" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[title*="actualizar" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[aria-label*="actualizar" i] {
  background: var(--sm-btn-refresh-bg) !important;
  border-color: rgba(45, 212, 191, 0.42) !important;
  color: #ecfeff !important;
}

button:not(.home-stock-card):not(.dashboard-quick-action)[onclick*="abrir" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[onclick*="showSection" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[onclick*="tab(" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[title*="abrir" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[data-qa*="ver" i],
a[download],
a[target="_blank"][style*="background" i] {
  background: var(--sm-btn-open-bg) !important;
  border-color: rgba(148, 163, 184, 0.36) !important;
  color: #f8fafc !important;
}

button:not(.home-stock-card):not(.dashboard-quick-action)[onclick*="editar" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[data-qa*="editar" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[title*="editar" i] {
  background: var(--sm-btn-edit-bg) !important;
  border-color: rgba(196, 181, 253, 0.42) !important;
  color: #f5f3ff !important;
}

button:not(.home-stock-card):not(.dashboard-quick-action)[onclick*="imprimir" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[onclick*="print" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[title*="imprimir" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[data-qa*="conduce" i] {
  background: var(--sm-btn-print-bg) !important;
  border-color: rgba(45, 212, 191, 0.34) !important;
  color: #ecfeff !important;
}

button:not(.home-stock-card):not(.dashboard-quick-action)[onclick*="copiar" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[class*="copy" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[data-copy-text],
button:not(.home-stock-card):not(.dashboard-quick-action)[title*="copiar" i] {
  background: var(--sm-btn-copy-bg) !important;
  border-color: rgba(203, 213, 225, 0.30) !important;
  color: #e2e8f0 !important;
}

button:not(.home-stock-card):not(.dashboard-quick-action)[onclick*="buscar" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[title*="buscar" i] {
  background: var(--sm-btn-search-bg) !important;
  border-color: rgba(103, 232, 249, 0.32) !important;
  color: #ecfeff !important;
}

button:not(.home-stock-card):not(.dashboard-quick-action)[onclick*="export" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[onclick*="descargar" i],
button:not(.home-stock-card):not(.dashboard-quick-action)[download],
a[download] {
  background: var(--sm-btn-export-bg) !important;
  border-color: rgba(251, 191, 36, 0.38) !important;
  color: #fff7ed !important;
}

button:not(.home-stock-card):not(.dashboard-quick-action)[style*="#3b82f6" i]:hover,
button:not(.home-stock-card):not(.dashboard-quick-action)[style*="#2563eb" i]:hover,
button:not(.home-stock-card):not(.dashboard-quick-action)[style*="#1d4ed8" i]:hover,
button:not(.home-stock-card):not(.dashboard-quick-action)[style*="#60a5fa" i]:hover,
a[style*="#3b82f6" i]:hover,
a[style*="#2563eb" i]:hover,
a[style*="#1d4ed8" i]:hover,
a[style*="#60a5fa" i]:hover {
  filter: brightness(1.08) saturate(1.04);
  color: #ffffff !important;
}

/* Proteccion: los accesos/KPIs del home no son botones operativos */
button.home-stock-card {
  background: linear-gradient(145deg, rgba(15,23,42,0.96), rgba(2,6,23,0.92)) !important;
  border: 1px solid rgba(148,163,184,0.13) !important;
  color: #f8fafc !important;
  box-shadow: 0 14px 30px rgba(2,6,23,0.24), inset 0 1px 0 rgba(255,255,255,0.035) !important;
}

button.home-stock-card:hover {
  background: linear-gradient(145deg, rgba(20,31,51,0.98), rgba(6,12,24,0.94)) !important;
  border-color: color-mix(in srgb, var(--stock-accent, #3b82f6) 42%, rgba(148,163,184,0.13)) !important;
}

button.dashboard-quick-action {
  background: var(--dash-action-color, #334155) !important;
  border: none !important;
  box-shadow: none !important;
}

/* Drawer profesional: iconos solo en encabezados de grupo */
#drawer .drawer-grupo-header .dg-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#drawer .drawer-menu-item,
#drawer .drawer-grupo-items button {
  min-height: 38px !important;
  padding: 0 14px 0 22px !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #cbd5e1 !important;
  gap: 8px !important;
  position: relative !important;
  box-shadow: none !important;
}

#drawer .drawer-menu-item::before,
#drawer .drawer-grupo-items button::before {
  content: '' !important;
  position: absolute !important;
  left: 9px !important;
  top: 50% !important;
  width: 4px !important;
  height: 4px !important;
  border-radius: 999px !important;
  background: rgba(148,163,184,0.45) !important;
  transform: translateY(-50%) !important;
}

#drawer .drawer-menu-item:hover,
#drawer .drawer-grupo-items button:hover {
  background: rgba(148,163,184,0.07) !important;
  border-color: rgba(148,163,184,0.14) !important;
  color: #f8fafc !important;
}

#drawer .drawer-content button.active,
#drawer .drawer-grupo-items button.active,
#drawer .drawer-menu-item.active {
  background: rgba(15,23,42,0.76) !important;
  color: #ffffff !important;
  border: 1px solid rgba(96,165,250,0.34) !important;
  border-left: 2px solid #60a5fa !important;
  padding-left: 20px !important;
}

#drawer .drawer-content button.active::before,
#drawer .drawer-grupo-items button.active::before,
#drawer .drawer-menu-item.active::before {
  background: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(96,165,250,0.12) !important;
}

#drawer .drawer-item-icon,
#drawer .drawer-item-emoji {
  display: none !important;
}

#drawer .drawer-item-label {
  font-size: 12px !important;
  line-height: 1.15 !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
  color: inherit !important;
}

#drawer .drawer-item-perm-tag {
  margin-left: auto !important;
  font-size: 8px !important;
  letter-spacing: 0.05em !important;
}

#drawer .drawer-item-badge-dot {
  margin-left: auto !important;
  min-width: 20px !important;
  height: 18px !important;
  font-size: 10px !important;
}
