/* ==========================================================================
   LuarSoft · Eros Tecnología — Sistema de diseño v3.0 (Premium SaaS)
   Rediseño completo: paleta corporativa sobria (marinos/grises), iconografía
   vectorial (Bootstrap Icons), estados activos precisos, sombras suaves.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  /* --- Marca Eros: acentos secundarios (logo, info, acciones destructivas) --- */
  --eros-red: #E0102B;
  --eros-red-dark: #B00E24;
  --eros-red-soft: #FBE9EC;
  --eros-blue: #2C67C7;
  --eros-blue-dark: #1F4FA0;
  --eros-blue-soft: #E9F1FD;

  /* --- Paleta corporativa principal (verde ambiental / ecológico) --- */
  --brand-900: #0A2818;
  --brand-800: #0E3620;
  --brand-700: #14472A;
  --brand-600: #1C5B36;
  --brand-500: #277548;
  --accent: #1FA35C;
  --accent-dark: #16824A;
  --accent-light: #6FCB93;
  --accent-soft: #E6F7ED;
  --accent-soft-2: #D2F0DE;

  /* --- Escala neutra (grises suaves con leve tinte verdoso) --- */
  --n-0: #ffffff;
  --n-25: #FBFDFC;
  --n-50: #F4F8F6;
  --n-100: #EBF2EE;
  --n-200: #DEE9E2;
  --n-300: #C6D6CC;
  --n-400: #96AC9E;
  --n-500: #6F8578;
  --n-600: #52645A;
  --n-700: #384A3E;
  --n-800: #22302A;
  --n-900: #131C16;

  /* --- Semánticos --- */
  --color-success: #158A5B;
  --color-success-bg: #E4F6EE;
  --color-warning: #B8790C;
  --color-warning-bg: #FDF2E1;
  --color-danger: #C81E38;
  --color-danger-bg: #FBE9EC;
  --color-info: #2C67C7;
  --color-info-bg: #E9F1FD;

  /* --- Degradados reutilizables --- */
  --gradient-brand: linear-gradient(135deg, var(--brand-700) 0%, var(--accent) 100%);
  --gradient-brand-soft: linear-gradient(135deg, var(--accent-soft) 0%, var(--n-0) 100%);
  --gradient-sidebar: linear-gradient(180deg, var(--brand-900) 0%, #051209 100%);

  /* --- Layout --- */
  --sidebar-width: 268px;
  --sidebar-collapsed-width: 84px;
  --topbar-height: 66px;
  --footer-height: 48px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 16px 36px rgba(10, 16, 32, 0.16);
  --transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--n-50);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--n-800);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
h1, h2, h3, h4, h5, h6 { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
::selection { background: var(--accent-soft-2); color: var(--brand-900); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--n-300); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--n-400); }

/* Iconos: tamaño y alineación consistente en toda la app */
.bi { vertical-align: -0.14em; line-height: 1; }
.icon-md { font-size: 1.05rem; }
.icon-lg { font-size: 1.35rem; }

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.topbar {
  position: fixed;
  top: 0; right: 0; left: var(--sidebar-width);
  height: var(--topbar-height);
  background: var(--n-0);
  border-bottom: 1px solid var(--n-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  z-index: 1030;
  transition: var(--transition);
}
body.sidebar-collapsed .topbar { left: var(--sidebar-collapsed-width); }

.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-toggle {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--n-200);
  background: var(--n-0);
  cursor: pointer;
  transition: var(--transition);
  color: var(--n-600);
  font-size: 1.05rem;
}
.topbar-toggle:hover { background: var(--n-100); border-color: var(--n-300); color: var(--brand-800); }

.topbar-title { font-size: 1.05rem; font-weight: 700; color: var(--n-900); }
.topbar-breadcrumb { font-size: 0.76rem; color: var(--n-500); font-weight: 500; }

.topbar-right { display: flex; align-items: center; gap: 16px; }

.status-pill {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.76rem; font-weight: 600; color: var(--color-success);
  background: var(--color-success-bg);
  padding: 6px 12px; border-radius: 30px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgba(21, 138, 91, 0.16);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

.icon-btn {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--n-500);
  cursor: pointer;
  transition: var(--transition);
  border: none; background: transparent;
  font-size: 1.05rem;
}
.icon-btn:hover { background: var(--n-100); color: var(--accent-dark); }
.icon-btn .badge-dot {
  position: absolute; top: 6px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--eros-red); border: 2px solid var(--n-0);
}

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 30px;
  border: 1px solid var(--n-200);
  cursor: pointer;
  transition: var(--transition);
}
.user-chip:hover { background: var(--n-100); }
.user-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-700), var(--accent));
  color: #fff; font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  flex-shrink: 0;
}
.user-chip .user-name { font-size: 0.83rem; font-weight: 600; color: var(--n-800); line-height: 1.1; }
.user-chip .user-role { font-size: 0.7rem; color: var(--n-500); }

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--gradient-sidebar);
  color: #AFC9B8;
  z-index: 1040;
  display: flex; flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}
body.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed-width); }

.sidebar-brand {
  height: var(--topbar-height);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-brand img {
  width: 36px; height: 36px; border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.12);
}
.sidebar-brand .brand-text { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.02rem; color: #fff; white-space: nowrap; }
.sidebar-brand .brand-sub { font-size: 0.65rem; color: #7CA88C; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
body.sidebar-collapsed .sidebar-brand .brand-text,
body.sidebar-collapsed .sidebar-brand .brand-sub { display: none; }

.sidebar-scroll { flex: 1; overflow-y: auto; padding: 14px 12px; }
.sidebar-section-title {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: #4F8264; font-weight: 700; padding: 16px 12px 6px;
}
body.sidebar-collapsed .sidebar-section-title { text-align: center; padding: 16px 4px 4px; }

.nav-group { margin-bottom: 2px; }

/* Ítem de navegación: estado por defecto sobrio */
.nav-link-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #A9C7B2;
  font-size: 0.87rem; font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
  border-left: 3px solid transparent;
}
.nav-link-item .nav-ico { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; color: #6FA080; transition: var(--transition); }
.nav-link-item .nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.nav-link-item .nav-caret { font-size: 0.7rem; transition: transform 0.25s ease; opacity: 0.55; }
.nav-link-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-link-item:hover .nav-ico { color: #fff; }

/* Grupo padre: solo indicador sutil cuando contiene la sección activa (SIN bloque rojo) */
.nav-link-item.group-current { color: #fff; }
.nav-link-item.group-current .nav-ico { color: var(--accent); }

/* Ítem EXACTO activo (hoja del menú): único que recibe marcado fuerte, sutil y elegante */
.nav-link-item.active {
  background: rgba(59, 111, 224, 0.14);
  color: #ffffff;
  border-left: 3px solid var(--accent);
  font-weight: 600;
}
.nav-link-item.active .nav-ico { color: var(--accent); }

.nav-link-item.open > .nav-caret { transform: rotate(90deg); }
.nav-link-item.logout-link { color: #E39AA6; }
.nav-link-item.logout-link .nav-ico { color: #E39AA6; }
.nav-link-item.logout-link:hover { background: rgba(224,16,43,0.12); color: #fff; }
.nav-link-item.logout-link:hover .nav-ico { color: #fff; }

.nav-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.07);
  margin-left: 23px;
}
.nav-submenu.show { max-height: 600px; }
.nav-submenu .nav-link-item { font-size: 0.81rem; padding: 8px 12px; }

body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-caret { display: none; }
body.sidebar-collapsed .nav-link-item { justify-content: center; border-left: none; }
body.sidebar-collapsed .nav-submenu { display: none; }

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: var(--transition);
}
body.sidebar-collapsed .main-wrapper { margin-left: var(--sidebar-collapsed-width); }

.page-content { flex: 1; padding: 26px 30px 40px; }

.page-heading { margin-bottom: 22px; }
.page-heading h1 { font-size: 1.42rem; color: var(--n-900); display:flex; align-items:center; gap:10px; }
.page-heading h1 .bi { color: var(--accent); font-size: 1.2rem; }
.page-heading p { color: var(--n-500); font-size: 0.88rem; margin-top: 4px; }

/* Banner degradado del panel principal (verde ambiental -> blanco) */
.hero-banner {
  background: linear-gradient(120deg, var(--brand-800) 0%, var(--accent) 55%, var(--accent-light) 100%);
  border-radius: var(--radius-lg);
  padding: 14px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-banner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0) 40%, rgba(255,255,255,0.16) 100%);
}
.hero-banner i.bi-house-heart { color: #fff; font-size: 1.15rem; position: relative; flex-shrink: 0; }
.hero-banner h1 { color: #fff; font-size: 0.98rem; font-weight: 700; position: relative; margin: 0; }
.hero-banner p { color: rgba(255,255,255,0.85); position: relative; margin: 0; font-size: 0.8rem; }
.hero-banner .hero-banner-sep { color: rgba(255,255,255,0.4); position: relative; }

/* Botón "volver" para vistas de pantalla completa (documentos) */
.btn-volver {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 30px;
  background: var(--n-100); color: var(--brand-800);
  font-weight: 600; font-size: 0.85rem; margin-bottom: 18px;
  border: 1px solid var(--n-200); transition: var(--transition);
}
.btn-volver:hover { background: var(--n-200); color: var(--brand-900); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
  height: var(--footer-height);
  border-top: 1px solid var(--n-200);
  background: var(--n-0);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px;
  font-size: 0.76rem; color: var(--n-500);
}
.app-footer a { color: var(--accent-dark); font-weight: 600; }
.app-footer a:hover { color: var(--brand-900); }
.app-footer .footer-status { display: flex; align-items: center; gap: 8px; }
.app-footer .footer-status .status-dot-sm { width:6px; height:6px; border-radius:50%; background: var(--color-success); display:inline-block; }
.app-footer .footer-social { display: flex; align-items: center; gap: 14px; }
.app-footer .footer-social a {
  color: var(--n-500); font-size: 1.05rem; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; transition: var(--transition);
}
.app-footer .footer-social a:hover { color: #fff; background: var(--brand-700); transform: translateY(-1px); }

/* En celular, el pie de página (copyright + redes + versión/estado) no
   entra en una sola fila de 48px de alto: se apila en varias líneas
   centradas para que no se vea amontonado ni se corte texto. */
@media (max-width: 576px) {
  .app-footer {
    height: auto;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    text-align: center;
  }
  .app-footer .footer-social { order: -1; }
  .app-footer .footer-status { flex-wrap: wrap; justify-content: center; }
}

/* ==========================================================================
   TARJETAS / CARDS
   ========================================================================== */
.card-erp {
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card-erp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--n-100);
  background: var(--gradient-brand-soft);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card-erp-header h2, .card-erp-header h3 { font-size: 1rem; color: var(--n-900); display:flex; align-items:center; gap:8px; }
.card-erp-header h2 .bi, .card-erp-header h3 .bi { color: var(--accent); }
.card-erp-body { padding: 22px; }

.kpi-card {
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 15px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-brand);
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: #fff; flex-shrink: 0;
}
.kpi-icon.bg-brand { background: linear-gradient(135deg, var(--brand-700), var(--accent)); }
.kpi-icon.bg-red { background: linear-gradient(135deg, var(--eros-red-dark), var(--eros-red)); }
.kpi-icon.bg-info { background: linear-gradient(135deg, var(--eros-blue-dark), var(--eros-blue)); }
.kpi-icon.bg-success { background: linear-gradient(135deg, #0D8A6B, #2FBF95); }
.kpi-icon.bg-warning { background: linear-gradient(135deg, #A56A08, #D99A1F); }
.kpi-label { font-size: 0.76rem; color: var(--n-500); font-weight: 600; }
.kpi-value { font-size: 1.42rem; font-weight: 800; color: var(--n-900); font-family: 'Plus Jakarta Sans', sans-serif; }

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn-primary, .btn-erp-primary {
  background: var(--gradient-brand); border-color: var(--accent-dark); color: #fff !important;
}
.btn-primary:hover, .btn-erp-primary:hover { background: linear-gradient(135deg, var(--brand-800) 0%, var(--accent-dark) 100%); border-color: var(--accent-dark); box-shadow: 0 6px 14px rgba(31,163,92,0.28); }
.btn-secondary, .btn-erp-secondary { background: var(--n-100); border-color: var(--n-200); color: var(--n-700) !important; }
.btn-secondary:hover, .btn-erp-secondary:hover { background: var(--n-200); }
.btn-success { background: var(--color-success); border-color: var(--color-success); color: #fff !important; }
.btn-success:hover { filter: brightness(0.92); }
.btn-warning { background: var(--color-warning); border-color: var(--color-warning); color: #fff !important; }
.btn-warning:hover { filter: brightness(0.92); }
.btn-danger { background: linear-gradient(135deg, var(--eros-red) 0%, var(--eros-red-dark) 100%); border-color: var(--eros-red-dark); color: #fff !important; }
.btn-danger:hover { background: var(--eros-red-dark); }
.btn-info { background: linear-gradient(135deg, var(--eros-blue) 0%, var(--eros-blue-dark) 100%); border-color: var(--eros-blue-dark); color: #fff !important; }
.btn-info:hover { background: var(--eros-blue-dark); }
.btn-outline-secondary { color: var(--n-600); border-color: var(--n-300); }
.btn-dark { background: var(--brand-800); border-color: var(--brand-800); }
.btn-sm { padding: 0.32rem 0.7rem; font-size: 0.8rem; }
.btn i.bi, .btn .bi { font-size: 0.95em; }

/* Botones de ícono solo (acciones de tabla) */
.btn-icon-only {
  width: 32px; height: 32px; padding: 0; justify-content: center;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   FORMULARIOS
   ========================================================================== */
.form-label, label { font-weight: 600; color: var(--n-700); font-size: 0.83rem; margin-bottom: 6px; display: inline-block; }
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--n-200);
  padding: 10px 13px;
  font-size: 0.89rem;
  transition: var(--transition);
  background-color: var(--n-0);
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 111, 224, 0.14);
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 20px; }
.field-group { margin-bottom: 18px; }
.field-group label .bi { color: var(--accent); margin-right: 4px; }

/* ==========================================================================
   MATRIZ DE PERMISOS — tarjetas de módulo (Usuarios: Nuevo/Editar)
   ========================================================================== */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.perm-tile {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 16px;
  border: 1.5px solid var(--n-200);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  background: var(--n-0);
  position: relative;
}
.perm-tile:hover { border-color: var(--accent-light); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.perm-tile.is-checked { border-color: var(--accent); background: var(--accent-soft); }
.perm-tile-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--n-100); color: var(--n-500); font-size: 1.15rem;
  transition: var(--transition);
}
.perm-tile.is-checked .perm-tile-icon { background: linear-gradient(135deg, var(--brand-700), var(--accent)); color: #fff; box-shadow: 0 4px 10px rgba(31,163,92,0.3); }
.perm-tile-label { font-weight: 650; font-size: 0.87rem; color: var(--n-800); flex: 1; line-height: 1.25; }
.perm-tile.is-checked .perm-tile-label { color: var(--brand-800); }
.perm-tile-check {
  width: 21px; height: 21px; flex-shrink: 0; cursor: pointer;
  accent-color: var(--accent); border-radius: 6px;
}
.perm-tile-badge {
  position: absolute; top: -7px; right: -7px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 0.65rem;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.perm-tile.is-checked .perm-tile-badge { display: flex; }

/* ==========================================================================
   TABLAS
   ========================================================================== */
.table-erp-wrap {
  background: var(--n-0);
  border-radius: var(--radius-lg);
  border: 1px solid var(--n-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table.table { margin-bottom: 0; }
.table thead th {
  background: var(--n-50);
  color: var(--n-600);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  border-bottom: 1px solid var(--n-200);
  padding: 12px 16px;
  white-space: nowrap;
}
.table tbody td { padding: 12px 16px; vertical-align: middle; font-size: 0.86rem; color: var(--n-800); border-color: var(--n-100); }
.table tbody tr { transition: var(--transition); }
.table-hover tbody tr:hover { background: var(--n-50); }

/* Badges de estado */
.badge-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 30px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-status.success { background: var(--color-success-bg); color: var(--color-success); }
.badge-status.warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-status.danger { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-status.info { background: var(--color-info-bg); color: var(--color-info); }
.badge-status.neutral { background: var(--n-100); color: var(--n-600); }
.badge-status.brand { background: var(--accent-soft); color: var(--accent-dark); }

/* ==========================================================================
   TIMELINE DE ESTADOS (Órdenes de Reparación)
   ========================================================================== */
.estado-timeline { display: flex; flex-wrap: wrap; gap: 0; margin: 6px 0 4px; }
.estado-timeline .paso {
  flex: 1; min-width: 120px; text-align: center; padding: 10px 6px;
  border-bottom: 3px solid var(--n-200); color: var(--n-400); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em; position: relative;
}
.estado-timeline .paso.hecho { border-bottom-color: var(--color-success); color: var(--color-success); }
.estado-timeline .paso.actual { border-bottom-color: var(--accent); color: var(--accent-dark); }
.estado-timeline .paso .bi { display:block; font-size: 1.1rem; margin-bottom: 4px; }

/* ==========================================================================
   BUSCADOR / FILTROS
   ========================================================================== */
.search-toolbar {
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.search-input-wrap { position: relative; }
.search-input-wrap .search-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--n-400);
}
.search-input-wrap input { padding-left: 40px; border-radius: 30px; }

/* Autocompletado reutilizable (POS, asignación de repuestos, etc.) */
.autocomplete-list-container { position: relative; }
.autocomplete-list {
  position: absolute; z-index: 1000; width: 100%; max-height: 220px; overflow-y: auto;
  border: 1px solid var(--n-200); background: var(--n-0); box-shadow: var(--shadow-md);
  list-style: none; padding: 0; margin-top: 2px; border-radius: var(--radius-sm);
}
.autocomplete-item { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--n-100); font-size: 0.85rem; }
.autocomplete-item:hover, .autocomplete-item.active { background: var(--n-50); font-weight: 600; }

/* ==========================================================================
   MODAL DE DOCUMENTOS (Boletas / Facturas / Tickets / Recibos)
   ========================================================================== */
.modal-documento .modal-dialog { max-width: 720px; }
.modal-documento .modal-content { border: none; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.modal-documento .modal-header {
  background: linear-gradient(120deg, var(--brand-800), var(--brand-600));
  color: #fff; border: none; padding: 16px 22px;
}
.modal-documento .modal-header .modal-title { font-family:'Plus Jakarta Sans',sans-serif; font-weight:700; display:flex; align-items:center; gap:10px; }
.modal-documento .modal-header .btn-close { filter: invert(1) brightness(2); }
.modal-documento .modal-body { padding: 0; background: var(--n-100); }
.modal-documento .doc-frame-wrap { height: 68vh; overflow: auto; background: var(--n-100); padding: 16px; display:flex; justify-content:center; }
.modal-documento iframe { width: 100%; max-width: 480px; min-height: 100%; border: none; background: #fff; box-shadow: var(--shadow-md); border-radius: 6px; }
.modal-documento .modal-footer { border: none; padding: 14px 22px; background: var(--n-0); gap: 8px; }

/* ==========================================================================
   GALERÍA DE PRODUCTOS
   ========================================================================== */
.galeria-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.galeria-search {
  position: relative; flex: 1; min-width: 240px; max-width: 380px;
}
.galeria-search i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--n-400); font-size: 0.95rem;
}
.galeria-search input {
  width: 100%; padding: 10px 14px 10px 38px;
  border: 1.5px solid var(--n-200); border-radius: 999px;
  font-size: 0.88rem; transition: var(--transition); background: var(--n-0);
}
.galeria-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.galeria-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--n-200);
  background: var(--n-0); color: var(--n-600); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.chip:hover { border-color: var(--accent-light); color: var(--brand-800); }
.chip.active {
  background: linear-gradient(135deg, var(--brand-700), var(--accent));
  border-color: transparent; color: #fff; box-shadow: 0 4px 10px rgba(31,163,92,0.3);
}

.galeria-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px; margin-bottom: 10px;
}
.galeria-card {
  background: var(--n-0); border: 1px solid var(--n-200); border-radius: var(--radius-lg);
  overflow: hidden; cursor: pointer; transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.galeria-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent-light);
}
.galeria-card-img { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: var(--n-100); }
.galeria-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.galeria-card:hover .galeria-card-img img { transform: scale(1.08); }
.galeria-card-img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--n-100); color: var(--n-400); font-size: 2.2rem;
}
.galeria-ribbon {
  position: absolute; top: 10px; right: -32px; transform: rotate(35deg);
  padding: 4px 38px; font-size: 0.68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.ribbon-agotado { background: var(--color-danger); }
.ribbon-bajo { background: #B8790C; }
.galeria-card-body { padding: 14px 16px 16px; }
.galeria-card-cat {
  display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--accent-dark); background: var(--accent-soft);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}
.galeria-card-body h4 {
  font-size: 0.92rem; font-weight: 700; color: var(--n-900); margin: 0 0 8px;
  line-height: 1.3; min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.galeria-card-precio { font-size: 1.25rem; font-weight: 800; color: var(--brand-700); font-family: 'Plus Jakarta Sans', sans-serif; }

.galeria-tab-content {
  background: var(--n-50); border-radius: var(--radius-sm); padding: 16px 18px;
  font-size: 0.88rem; line-height: 1.6; color: var(--n-800); min-height: 160px;
}
#modalProducto .btn-group .btn.active {
  background: linear-gradient(135deg, var(--brand-700), var(--accent)); color: #fff; border-color: transparent;
}

@media (max-width: 480px) {
  .galeria-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}

/* ==========================================================================
   LOGIN — Hero de pantalla completa con tarjeta de cristal oscuro
   ========================================================================== */
.login-hero {
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  padding: 40px 24px;
}
/* Overlay oscuro + viñeta para look "tech" dramático, dejando ver la foto */
.login-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px circle at 50% 38%, rgba(6,20,13,0.28) 0%, rgba(5,16,10,0.62) 68%, rgba(4,12,8,0.8) 100%),
    linear-gradient(180deg, rgba(4,14,9,0.5) 0%, rgba(4,14,9,0.18) 30%, rgba(4,14,9,0.48) 100%);
  z-index: 0;
}
/* Textura sutil de puntos, como un circuito digital, encima del overlay */
.login-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(111,203,147,0.18) 1px, transparent 1px);
  background-size: 26px 26px;
  z-index: 0;
  opacity: 0.5;
}

.login-hero-topbar {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; z-index: 2;
  color: #fff;
}
.login-hero-topbar img { width: 34px; height: 34px; border-radius: 8px; }
.login-hero-topbar span { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; letter-spacing: 0.04em; font-size: 0.92rem; text-transform: uppercase; }

.login-hero-center { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; max-width: 480px; width: 100%; animation: fadeUp 0.6s ease; }
.login-hero-title {
  text-align: center; margin-bottom: 22px; color: #fff;
}
.login-hero-title h1 {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800;
  font-size: 1.7rem; letter-spacing: 0.01em; margin: 0 0 4px;
  text-shadow: 0 2px 14px rgba(0,0,0,0.65);
}
.login-hero-title h1 span { color: var(--accent-light); }
.login-hero-title p {
  font-size: 0.85rem; font-style: italic; opacity: 0.9; margin: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}

.login-hero-card {
  width: 100%;
  background: rgba(8, 26, 16, 0.58);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(111, 203, 147, 0.28);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03) inset;
  padding: 34px 38px 30px;
  color: #fff;
  text-align: center;
}
.login-hero-card img { width: 74px; height: auto; margin-bottom: 12px; border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
.login-hero-card h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; margin-bottom: 2px; }
.login-hero-card h3 span { color: var(--accent-light); }
.login-hero-card .subtitle { color: rgba(255,255,255,0.7); font-size: 0.83rem; margin-bottom: 22px; }

.login-hero-card .field-group { text-align: left; }
.login-hero-card .form-label { color: rgba(255,255,255,0.85); font-size: 0.82rem; font-weight: 600; }
.login-hero-card .input-group-text {
  background: rgba(255,255,255,0.07); border: 1.5px solid rgba(255,255,255,0.18); border-right: none;
  color: var(--accent-light); border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.login-hero-card .input-group .form-control {
  background: rgba(255,255,255,0.07); border: 1.5px solid rgba(255,255,255,0.18); border-left: none;
  color: #fff; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.login-hero-card .input-group .form-control::placeholder { color: rgba(255,255,255,0.4); }
.login-hero-card .input-group .form-control:focus { box-shadow: none; background: rgba(255,255,255,0.1); }
.login-hero-card .input-group:focus-within .input-group-text,
.login-hero-card .input-group:focus-within .form-control { border-color: var(--accent-light); }
.login-hero-card .input-group .btn-eye {
  background: rgba(255,255,255,0.07); border: 1.5px solid rgba(255,255,255,0.18); border-left: none;
  color: rgba(255,255,255,0.6); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0 12px;
}
.login-hero-card .input-group .btn-eye:hover { color: var(--accent-light); }
.login-hero-card .input-group.has-eye .form-control { border-radius: 0; }

.login-hero-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 18px; font-size: 0.8rem;
}
.login-hero-row .form-check-label { color: rgba(255,255,255,0.75); font-size: 0.8rem; cursor: pointer; }
.login-hero-row .form-check-input { cursor: pointer; }
.login-hero-row .form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }

.login-forgot-link {
  background: none; border: none; padding: 0;
  color: var(--accent-light); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; text-decoration: underline;
}
.login-forgot-link:hover { color: #fff; }

.login-hero-card .btn-submit-login {
  width: 100%; padding: 11px; font-weight: 700; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent) 0%, var(--brand-700) 100%);
  color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition); letter-spacing: 0.02em;
}
.login-hero-card .btn-submit-login:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(31,163,92,0.35); }

.login-hero-footer {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 2; text-align: center; font-size: 0.75rem; color: rgba(255,255,255,0.65);
}
.login-hero-footer a, .login-hero-footer strong { color: #fff; }

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

@media (max-width: 480px) {
  .login-hero-card { padding: 28px 22px 24px; }
  .login-hero-title h1 { font-size: 1.35rem; }
}

/* ==========================================================================
   OVERLAY MÓVIL
   ========================================================================== */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(8,12,22,0.55); z-index: 1035;
}
.sidebar-overlay.show { display: block; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
  .sidebar { left: -100%; width: 280px; }
  body.sidebar-mobile-open .sidebar { left: 0; }
  .topbar, .main-wrapper { left: 0; margin-left: 0; }
  body.sidebar-collapsed .topbar, body.sidebar-collapsed .main-wrapper { left: 0; margin-left: 0; }
  .user-chip .user-name, .user-chip .user-role { display: none; }
  .page-content { padding: 18px 16px 32px; }
  .modal-documento iframe { max-width: 100%; }
}

/* Pantallas de tablet/celular en horizontal: la topbar empieza a apretarse
   (título + estado de servidor + accesos rápidos + usuario), así que se
   recorta lo decorativo antes de que se encime. */
@media (max-width: 768px) {
  .topbar { padding: 0 14px; }
  .topbar-left { gap: 10px; }
  .topbar-right { gap: 8px; }
  .status-pill span:not(.status-dot) { display: none; }
  .status-pill { padding: 8px; }
  .page-heading h1 { font-size: 1.2rem; }
  .card-erp-header { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
  .card-erp-body { padding: 16px; }
  .kpi-card { padding: 14px 16px; gap: 12px; }
  .kpi-icon { width: 42px; height: 42px; font-size: 1.1rem; }
  .kpi-value { font-size: 1.2rem; }
  .search-toolbar { padding: 14px 16px; }
}

/* Celulares angostos: se oculta lo que no cabe y todo pasa a una sola
   columna (formularios, botonera de acciones, encabezados de tarjeta). */
@media (max-width: 576px) {
  .topbar-breadcrumb { display: none; }
  .topbar-title { font-size: 0.92rem; max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .status-pill { display: none; }
  .page-heading { margin-bottom: 16px; }
  .page-heading h1 { font-size: 1.08rem; gap: 8px; }
  .page-heading p { font-size: 0.8rem; }
  .form-grid { grid-template-columns: 1fr; gap: 12px 0; }
  .perm-grid { grid-template-columns: 1fr; }
  .card-erp-header h2, .card-erp-header h3 { font-size: 0.92rem; }
  .table thead th, .table tbody td { padding: 10px 12px; font-size: 0.8rem; }
  .btn-lg { padding: 0.5rem 0.9rem; font-size: 0.9rem; }
  .text-end.mt-2, .text-center.mt-3 { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .text-end.mt-2 .btn, .text-center.mt-3 .btn { flex: 1 1 auto; margin: 0 !important; }
}

/* ==========================================================================
   IMPRESIÓN
   ========================================================================== */
@media print {
  .sidebar, .topbar, .app-footer, .no-print, .search-toolbar .btn, .sidebar-overlay, .btn-volver { display: none !important; }
  .main-wrapper { margin-left: 0 !important; padding-top: 0 !important; }
  body { background: #fff !important; }
  .card-erp, .table-erp-wrap { box-shadow: none !important; border: none !important; }
}

/* Utilidades */
.text-brand { color: var(--accent-dark) !important; }
.text-brand-red { color: var(--eros-red) !important; }
.bg-brand { background: var(--accent) !important; }
.shadow-soft { box-shadow: var(--shadow-sm) !important; }
.rounded-xl { border-radius: var(--radius-lg) !important; }

/* ==========================================================================
   COMANDOS DE VOZ — botón flotante disponible en todo el sistema
   ========================================================================== */
#vozFlotante {
  position: fixed; right: 26px; bottom: 26px; z-index: 1060;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
#vozBtn {
  width: 58px; height: 58px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--brand-700), var(--accent));
  color: #fff; font-size: 1.4rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(31,163,92,0.45);
  transition: var(--transition);
  position: relative;
}
#vozBtn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 28px rgba(31,163,92,0.55); }
#vozBtn.escuchando {
  background: linear-gradient(135deg, #C81E38, #E0102B);
  box-shadow: 0 8px 22px rgba(224,16,43,0.5);
  animation: vozPulso 1.1s ease-in-out infinite;
}
@keyframes vozPulso {
  0%   { box-shadow: 0 0 0 0 rgba(224,16,43,0.55); }
  70%  { box-shadow: 0 0 0 16px rgba(224,16,43,0); }
  100% { box-shadow: 0 0 0 0 rgba(224,16,43,0); }
}
#vozAyudaBtn {
  width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--n-200);
  background: var(--n-0); color: var(--n-600); font-size: 0.75rem; font-weight: 800;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
#vozAyudaBtn:hover { color: var(--accent-dark); border-color: var(--accent-light); }

/* En celular el pie de página se apila en varias líneas y crece de
   alto, así que el botón flotante de voz se sube más para no quedar
   encima del texto del footer (ver captura reportada por el cliente). */
@media (max-width: 576px) {
  #vozFlotante { right: 16px; bottom: 165px; }
  #vozBtn { width: 52px; height: 52px; font-size: 1.25rem; }
}

.voz-ayuda-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.voz-ayuda-item {
  border: 1px solid var(--n-200); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 0.82rem; background: var(--n-50);
}
.voz-ayuda-item i { color: var(--accent-dark); margin-right: 4px; }
.voz-ayuda-item strong { display: block; color: var(--n-900); margin-bottom: 2px; }
.voz-ayuda-item span { color: var(--n-500); font-style: italic; }

@media print {
  #vozFlotante { display: none !important; }
}
@media (max-width: 480px) {
  #vozFlotante { right: 16px; bottom: 16px; }
  #vozBtn { width: 52px; height: 52px; font-size: 1.25rem; }
}

/* Marcador para imágenes/videos cuyo archivo físico no existe en este
   equipo (ej. se copió la base de datos pero no la carpeta uploads/) */
.media-faltante {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--n-100); color: var(--n-400);
}
.media-faltante-video {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 140px; background: var(--n-100); color: var(--n-500);
  border-radius: 8px; font-size: 0.85rem; text-align: center; padding: 20px;
}

/* ==========================================================================
   MODO OSCURO — usa el sistema nativo de Bootstrap 5.3+ (data-bs-theme).
   Se activa poniendo data-bs-theme="dark" en <html>, lo que además activa
   automáticamente el modo oscuro nativo de Bootstrap en formularios,
   modales, tablas y menús desplegables. Aquí solo se redefine la escala
   de variables propias de LuarSoft (--n-*, fondos suaves, sombras) para
   que el resto de la interfaz (tarjetas, sidebar-topbar, badges, KPIs)
   siga la misma paleta, invertida, sin tocar ni un componente por separado.
   El sidebar y el login NO cambian: ya son oscuros en ambos modos.
   ========================================================================== */
[data-bs-theme="dark"] {
  /* Escala neutra invertida: lo que era "blanco/superficie" pasa a ser
     la superficie oscura, y lo que era "texto oscuro" pasa a ser el
     texto claro. El resto del CSS ya usa estas variables en todos lados,
     así que se actualiza solo. */
  --n-0: #141F19;
  --n-25: #182620;
  --n-50: #16211B;
  --n-100: #223026;
  --n-200: #2C3D33;
  --n-300: #3C5245;
  --n-400: #7C9686;
  --n-500: #93AC9D;
  --n-600: #A9C0B3;
  --n-700: #C3D6CB;
  --n-800: #DCEAE3;
  --n-900: #F1F7F4;

  /* Fondos suaves (badges, chips, secciones destacadas) en versión
     traslúcida, para que combinen con cualquier superficie oscura. */
  --accent-soft: rgba(31, 163, 92, 0.16);
  --accent-soft-2: rgba(31, 163, 92, 0.26);
  --color-success-bg: rgba(21, 138, 91, 0.2);
  --color-warning-bg: rgba(184, 121, 12, 0.22);
  --color-danger-bg: rgba(200, 30, 56, 0.2);
  --color-info-bg: rgba(44, 103, 199, 0.22);

  /* En modo oscuro los degradados de acento se ven mejor un poco más
     claros/luminosos para mantener buen contraste sobre fondos oscuros. */
  --accent: #2BBE6D;
  --accent-dark: #1FA35C;
  --accent-light: #7FDDA3;

  /* Sombras más profundas (el "peso" de la tarjeta se nota por el tono
     de superficie, no solo por la sombra, como es habitual en dark UI). */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.55);
}

/* El sidebar y la pantalla de Login ya son oscuros en ambos modos (usan
   su propia paleta fija, no la escala --n-* de este bloque), así que no
   necesitan ninguna excepción aquí. */

/* Barra de desplazamiento oscura a juego */
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--n-300); }
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: var(--n-400); }

/* Botón de alternar tema (sol/luna) en el topbar */
.theme-toggle-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--n-200); background: var(--n-0); color: var(--n-600);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); font-size: 1.05rem;
}
.theme-toggle-btn:hover { border-color: var(--accent-light); color: var(--accent-dark); }
.theme-toggle-btn .bi-sun-fill { display: none; }
[data-bs-theme="dark"] .theme-toggle-btn .bi-moon-stars-fill { display: none; }
[data-bs-theme="dark"] .theme-toggle-btn .bi-sun-fill { display: inline-block; }

/* Tarjetas del Panel Principal: sombra suave nativa de Bootstrap 5
   (.shadow-sm) + una ligera elevación al pasar el mouse, para un look
   más moderno y pulido en el dashboard. */
.dashboard-card-modern { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.dashboard-card-modern:hover { transform: translateY(-3px); box-shadow: var(--shadow-md) !important; }

/* ==========================================================================
   ESCÁNER DE CÓDIGO DE BARRAS (cámara)
   ========================================================================== */
.escaner-linea {
  position: absolute; left: 8%; right: 8%; top: 50%;
  height: 2px; background: #E0102B; box-shadow: 0 0 8px 1px rgba(224,16,43,0.7);
  animation: escanerBarrido 1.6s ease-in-out infinite;
}
@keyframes escanerBarrido {
  0%   { top: 18%; }
  50%  { top: 78%; }
  100% { top: 18%; }
}
