*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== THEMES ===== */
:root {
  --bg:      #0F161C;
  --surface: #1A232B;
  --surface2:#141C23;
  --border:  rgba(255,255,255,0.09);
  --text:    #EAF0F5;
  --muted:   rgba(255,255,255,0.45);
  --accent:  #38BDF8;
  --radius:  12px;
  --sidebar-bg: #0B1219;
  --header-bg:  #131A21;
}
html[data-theme="light"] {
  --bg:      #F1F4F7;
  --surface: #FFFFFF;
  --surface2:#F6F8FA;
  --border:  rgba(0,0,0,0.09);
  --text:    #1E2A36;
  --muted:   #68788A;
  --accent:  #0EA5E9;
  --sidebar-bg: #12212E;
  --header-bg:  #FFFFFF;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  overflow: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.3); border-radius: 4px; }

/* ===== LAYOUT ===== */
#app {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* Critical: fix flex scroll chain */
#app, main, .flex-scroll {
  min-height: 0;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  background: var(--bg);
}

.main-inner {
  flex: 1;
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ===== SIDEBAR ===== */
#sidebar {
  width: 220px;
  flex-shrink: 0;
  transition: width 0.25s cubic-bezier(0.4,0,0.2,1);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 20px 10px;
  gap: 3px;
}
#sidebar.collapsed { width: 66px; }
#sidebar.collapsed .nav-label,
#sidebar.collapsed .brand-name { display: none; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.15); color: #fff; }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ===== HEADER ===== */
header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  flex-shrink: 0;
}

/* ===== VIEWS ===== */
.view {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  min-height: 0;
}

/* POS special */
#view-pos {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}
#view-pos.hidden-view, .view.hidden-view { display: none !important; }

/* ===== BOTTOM NAV (mobile only) ===== */
#bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 62px;
  background: var(--sidebar-bg);
  border-top: 1px solid var(--border);
  z-index: 200;
  align-items: center;
  justify-content: space-around;
}
html[data-theme="light"] #bottom-nav { background: #fff; }
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  border-radius: 8px;
  min-width: 52px;
  transition: color 0.15s;
}
.bnav-item.active { color: var(--accent); }
.bnav-item svg { width: 22px; height: 22px; }

/* ===== CART FAB (mobile only) ===== */
#cart-fab {
  display: none;
  position: fixed;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  z-index: 100;
  gap: 8px;
  align-items: center;
  box-shadow: 0 4px 14px rgba(14,165,233,0.35);
  white-space: nowrap;
}

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

/* ===== PRODUCT GRID ===== */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.product-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.product-card:active { transform: scale(0.97); }

/* ===== CART ===== */
.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  outline: none;
  white-space: nowrap;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { opacity: 0.88; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #6d28d9; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(128,128,128,0.1); }
.btn-danger { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.flex-1 { flex: 1; }

/* ===== INPUT ===== */
.input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s;
  outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }
.input::placeholder { color: var(--muted); }
select.input { cursor: pointer; }
select.input option { background: var(--surface); color: var(--text); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  animation: scaleIn 0.2s;
}
/* Convención usada por customers.js/suppliers.js/accounts-*.js/ncf.js/
   employees.js: generan <div class="modal-header"><h3 class="modal-title">
   ...<button class="modal-close">. Estas clases nunca se definieron, así
   que el botón de cerrar quedaba sin flex (se veía como un checkbox
   apilado debajo del título en vez de arriba a la derecha). */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  flex-shrink: 0;
  padding: 4px;
}
.modal-close:hover { color: var(--text); }
.modal-body { display: flex; flex-direction: column; gap: 14px; }

/* ===== TOAST ===== */
#toast-container {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  animation: slideIn 0.25s ease;
  max-width: 300px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  pointer-events: all;
}
.toast-success { background: #166534; color: #bbf7d0; }
.toast-error   { background: #991b1b; color: #fecaca; }
.toast-info    { background: #1e3a5f; color: #bfdbfe; }
.toast-warning { background: #92400e; color: #fed7aa; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 560px; }
.data-table th {
  text-align: left;
  padding: 11px 14px;
  background: var(--surface2);
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.data-table tbody tr:hover { background: rgba(128,128,128,0.05); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ===== PRINT ===== */
@media print {
  * { margin: 0 !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; }
  body { background: #fff !important; color: #000 !important; }
  body * { display: none !important; }
  /* Modo recibo (default) */
  #receipt-print { display: block !important; position: absolute !important; top: 0 !important; left: 0 !important; width: 80mm !important; }
  #receipt-print * { display: block !important; color: #000 !important; background: transparent !important; text-align: left !important; }
  #receipt-print div { margin: 0 !important; padding: 0 !important; }
  @page { size: 80mm auto; margin: 0; padding: 0; }
  /* Modo reporte */
  body.print-report #receipt-print { display: none !important; }
  body.print-report #report-print-area { display: block !important; position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; font-family: Arial, sans-serif !important; color: #000 !important; font-size: 13px !important; }
  body.print-report #report-print-area * { display: block !important; color: #000 !important; background: transparent !important; }
  body.print-report #report-print-area table { width: 100% !important; border-collapse: collapse !important; }
  body.print-report #report-print-area th, body.print-report #report-print-area td { border: 1px solid #ccc !important; padding: 4px 8px !important; text-align: left !important; font-size: 12px !important; }
  body.print-report #report-print-area th { background: #eee !important; font-weight: bold !important; }
  body.print-report #report-print-area .rpt-section { margin-bottom: 20px !important; page-break-inside: avoid !important; }
  body.print-report { background: white !important; }
  @page { size: A4 portrait; margin: 15mm; }
}

/* ===== MISC ===== */
.tab-btn {
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
}
.tab-btn.active { background: rgba(128,128,128,0.15); color: var(--text); }
.qty-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 17px;
  font-weight: 500;
  transition: background 0.15s;
  flex-shrink: 0;
}
.qty-btn:hover { background: rgba(128,128,128,0.2); }
#login-screen {
  position: fixed; inset: 0;
  background: var(--sidebar-bg);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; }
.chart-container { position: relative; height: 200px; }
label { color: var(--muted); font-size: 13px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  /* Hide desktop sidebar */
  #sidebar { display: none !important; }

  /* Show bottom nav */
  #bottom-nav { display: flex !important; }

  /* Add padding for bottom nav */
  #app { padding-bottom: 62px; }

  /* POS: products fill screen, cart is overlay */
  #view-pos { flex-direction: column; position: relative; }
  #pos-products-area { width: 100% !important; }
  #pos-products { grid-template-columns: repeat(2, 1fr) !important; }

  /* Tablas de datos (Empleados, Usuarios, Ventas, NCF, Inventario...): tienen
     min-width:560px a propósito (para que las columnas no se aplasten), pero
     su contenedor .card usa overflow:hidden inline (para las esquinas
     redondeadas) — en móvil eso CORTABA las columnas de la derecha sin
     ninguna forma de verlas (ni deslizando). Con la tabla misma como
     contenedor de scroll (display:block + overflow-x:auto en vez de su
     .card padre) el usuario puede deslizar horizontal para ver el resto. */
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Buscador + filtros de categoría/marca: en desktop van en una sola fila
     con anchos fijos en px (160/140) que en pantallas angostas dejaban el
     texto cortado ("Todas las categ..."). En móvil el buscador ocupa su
     propia fila completa y categoría/marca se reparten la siguiente. */
  #pos-products-area > .flex.gap-3 { flex-wrap: wrap; }
  #pos-search-wrap { flex: 1 1 100% !important; }
  #pos-category, #pos-brand { width: calc(50% - 6px) !important; }

  /* Cart panel: slide from bottom. visibility:hidden en el estado cerrado
     es a propósito — translateY(105%) por sí solo no siempre alcanza a sacar
     el panel completo de la pantalla en todos los navegadores/anchos (el
     cálculo depende de env(safe-area-inset-bottom), que puede variar), y
     dejaba una franja del panel tapando el contenido de abajo (ej. las
     últimas mesas de la grilla) aunque no estuviera "abierto". Con
     visibility:hidden queda garantizado invisible pase lo que pase con el
     cálculo del transform. */
  /* top+bottom (sin height fijo) en vez de bottom+height(vh): con height:75vh
     el panel se renderizaba en una posición que no cuadraba con el viewport
     real en móvil (quedaba una franja tapando contenido de abajo aunque
     "cerrado", y el panel "abierto" no llegaba hasta el fondo) — top+bottom
     deja que el navegador calcule el alto como la diferencia, sin ese
     desfase. translateY(100vh) en vez de 105% para garantizar que quede
     completamente fuera de pantalla sin depender del alto real del panel. */
  #pos-cart-panel {
    position: fixed !important;
    top: 20% !important;
    bottom: 62px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 18px 18px 0 0 !important;
    border-left: none !important;
    border-top: 1px solid var(--border) !important;
    transform: translateY(100vh) !important;
    visibility: hidden !important;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0.3s !important;
    z-index: 150 !important;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.4);
  }
  #pos-cart-panel.cart-open {
    transform: translateY(0) !important;
    visibility: visible !important;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0s !important;
  }

  /* Cart drag handle */
  #cart-fab { display: flex !important; }

  /* Stats 2 col */
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Reports charts stack */
  .reports-charts { grid-template-columns: 1fr !important; }

  /* Barcodes stack */
  .bc-grid { grid-template-columns: 1fr !important; }

  /* View padding smaller */
  .view { padding: 14px; }

  /* Modal from bottom */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-width: 100%; max-height: 92vh; }

  /* Header compact */
  header { height: 52px; padding: 0 14px; }

  /* Toast — debajo del header compacto, nunca sobre el carrito/checkout */
  #toast-container { top: 60px; right: 10px; left: 10px; }
  #toast-container .toast { max-width: 100%; }
}

@media (max-width: 480px) {
  #pos-products { grid-template-columns: repeat(2, 1fr) !important; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .view { padding: 12px; }

  /* Filas de formulario con grid de 3+ columnas iguales (horario de
     empleado, conversion de unidades, cuenta delivery): con inputs
     nativos de tiempo/numero no caben 3 en un modal movil y se salen
     de la pantalla. Bajan a 2 columnas — el resto fluye a la fila
     siguiente automaticamente. */
  [style*="grid-template-columns:1fr 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; }
}

/* ===== MOBILE MENU DRAWER ===== */
.mob-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 8px;
  border-radius: 12px;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  background: rgba(255,255,255,0.05);
  transition: background 0.15s, color 0.15s;
}
.mob-menu-item:hover,
.mob-menu-item:active { background: rgba(255,255,255,0.12); color: #fff; }
.mob-menu-item svg { width: 24px; height: 24px; flex-shrink: 0; }
html[data-theme="light"] .mob-menu-item { color: rgba(0,0,0,0.65); background: rgba(0,0,0,0.05); }
html[data-theme="light"] #mobile-menu-drawer { background: #fff; }

/* Responsive fixes adicionales */
@media (max-width: 900px) {
  /* Login centrado en móvil */
  #login-screen > div { width: 90% !important; max-width: 360px; }

  /* Tablas scrollables en móvil (el !important vence el overflow:hidden inline de las cards) */
  .table-wrap { overflow-x: auto !important; overflow-y: hidden; -webkit-overflow-scrolling: touch; }

  /* Inputs más grandes para touch */
  input[type="text"], input[type="number"], input[type="email"],
  input[type="password"], input[type="tel"], select, textarea {
    font-size: 16px !important; /* evita zoom en iOS */
  }

  /* POS: grid de productos */
  #pos-products { grid-template-columns: repeat(2, 1fr) !important; }

  /* Cards de stats 2 columnas */
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Filas de toolbar/filtros con "display:flex" inline y SIN wrap propio se
     salen del contenedor .view (que tiene overflow-x:hidden a propósito para
     que la página no scrollee de lado) y quedan botones/inputs inalcanzables
     en el teléfono — ej. "+ Nuevo Producto" en Inventario. Forzamos wrap salvo
     que la fila ya declare su propio flex-wrap (para no pisar ese ajuste). */
  .view div[style*="display:flex"]:not([style*="flex-wrap"]) {
    flex-wrap: wrap !important;
    row-gap: 8px;
  }
}

@media (max-width: 380px) {
  #mobile-menu-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .mob-menu-item { font-size: 10px; padding: 10px 4px; }
}

/* ===== LOGIN LOGO ===== */
.logo-login {
  display: block;
  width: clamp(220px, 32vw, 420px);
  height: auto;
  object-fit: contain;
  background: transparent !important;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.35));
  margin: 0 auto 2rem;
}
@media (max-width: 768px) {
  .logo-login { width: clamp(200px, 65vw, 320px); }
}

/* ===== PULIDO MÓVIL — sensación de app nativa (safe-area + touch) ===== */
@media (max-width: 900px) {
  /* Barra inferior respeta la barra de inicio del iPhone */
  #bottom-nav {
    height: auto;
    min-height: 62px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  /* Contenido nunca queda tapado por la barra inferior */
  #app { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }

  /* Header respeta el notch superior */
  header {
    padding-top: env(safe-area-inset-top, 0px);
    height: calc(52px + env(safe-area-inset-top, 0px));
  }

  /* Carrito y menú flotante por encima de la barra inferior + home bar */
  #pos-cart-panel { bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important; }
  #mobile-menu-drawer {
    bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* El botón de colapsar sidebar no aplica en móvil (no hay sidebar) */
  .sidebar-toggle-btn { display: none !important; }

  /* Scroll fluido tipo nativo + sin resaltado azul al tocar */
  .main-inner, .table-wrap, .view, #pos-products, .modal, #pos-cart-panel {
    -webkit-overflow-scrolling: touch;
  }
  * { -webkit-tap-highlight-color: transparent; }

  /* Áreas de toque cómodas en la barra inferior */
  .bnav-item { min-height: 48px; justify-content: center; }

  /* Título de la vista legible y sin cortarse */
  #view-title { font-size: 15px; }

  /* Modales tipo hoja: el contenido interno scrollea con momentum y respeta home bar */
  .modal { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }

  /* Feedback táctil: arriba quitamos el tap-highlight; lo reemplazamos con un
     "press" real para que los botones se sientan vivos como en una app nativa */
  .btn:active, .bnav-item:active, .mob-menu-item:active,
  .table-card:active, .mesa-card:active, .pos-product:active, #cart-fab:active {
    transform: scale(0.97);
    opacity: 0.92;
  }
  /* Áreas de toque cómodas para el dedo (mínimo recomendado 44px) */
  .btn { min-height: 44px; }
  /* El scroll dentro de modales/paneles no arrastra la página de atrás (rubber-band nativo) */
  .modal, #pos-cart-panel, #mobile-menu-drawer, .table-wrap { overscroll-behavior: contain; }

  /* Footer pegado: la fila de acciones (Cancelar/Guardar) queda SIEMPRE visible
     al pie del modal aunque el formulario sea largo — el cuerpo scrollea detrás.
     Solo aplica a filas que realmente contienen el botón de acción (:has). */
  .modal { display: flex; flex-direction: column; }
  .modal form > div:last-child:has(> button[type="submit"]),
  .modal > div:last-child:has(> button[type="submit"]),
  .modal form > div:last-child:has(> button.btn-primary),
  .modal > div:last-child:has(> button.btn-primary) {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: var(--surface);
    padding-top: 12px;
    margin-top: 4px;
    box-shadow: 0 -1px 0 var(--border), 0 -12px 14px -8px var(--surface);
  }
}

/* Tablet: aprovechar mejor el ancho */
@media (min-width: 601px) and (max-width: 900px) {
  #pos-products { grid-template-columns: repeat(3, 1fr) !important; }
  .stats-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
