/* ==========================================================================
   SISTEMA POS & CONTROL DE FINANZAS - CHORIZOS & CARNES AL CARBÓN
   Estilo Material Design 3 Premium - Paleta Corporativa: Negro, Rojo y Amarillo
   ========================================================================== */

:root {
  /* --- PALETA CORPORATIVA: NEGRO, ROJO Y AMARILLO --- */
  --primary: #dc2626;                  /* Rojo carmesí brasa */
  --primary-hover: #b91c1c;            /* Rojo intenso hover */
  --primary-light: rgba(220, 38, 38, 0.15);
  --primary-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 55%, #991b1b 100%);
  --secondary: #991b1b;                /* Rojo oscuro vino */

  --accent-gold: #f59e0b;              /* Amarillo Oro / Ámbar brasa */
  --accent-gold-hover: #d97706;
  --accent-gold-light: rgba(245, 158, 11, 0.15);
  --accent-gold-gradient: linear-gradient(135deg, #fde047 0%, #f59e0b 60%, #d97706 100%);

  --accent-cash: #10b981;              /* Verde esmeralda para cuadre exacto */
  --accent-cash-light: rgba(16, 185, 129, 0.15);
  --accent-nequi: #a855f7;             /* Púrpura Nequi */
  --accent-nequi-light: rgba(168, 85, 247, 0.15);

  --warning: #f59e0b;                  /* Amarillo / Ámbar advertencia */
  --danger: #ef4444;                   /* Rojo peligro / faltante */

  /* --- SUPERFICIES MATERIAL DESIGN 3 (OBSIDIANA & CARBÓN) --- */
  --bg-main: #09090b;                  /* Negro obsidiana puro de fondo */
  --bg-card: #121216;                  /* Carbón elevado Material Level 1 */
  --bg-card-elevated: #181820;         /* Carbón Material Level 2 */
  --bg-card-hover: #22222a;            /* Carbón Material Level 3 */
  --bg-topbar: #0c0c10;
  --bg-input: #16161d;

  --text-main: #f8fafc;                /* Blanco de alto contraste */
  --text-muted: #a1a1aa;               /* Plata satinado */
  --text-gold: #fbbf24;                /* Amarillo oro para precios y métricas */
  --text-red: #f87171;                 /* Acentos rojos */

  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-glow: rgba(220, 38, 38, 0.35);
  --border-gold-glow: rgba(245, 158, 11, 0.35);

  /* --- SOMBRAS Y ELEVACIONES MATERIAL DESIGN 3 --- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.7), 0 4px 10px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.85), 0 8px 16px rgba(0, 0, 0, 0.6);
  --shadow-glow-red: 0 4px 20px rgba(220, 38, 38, 0.35);
  --shadow-glow-gold: 0 4px 20px rgba(245, 158, 11, 0.35);

  /* --- RADIOS MATERIAL 3 --- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modo Claro de Alto Contraste - Textos negros nítidos, elegantes y legibles */
body:not(.dark-mode) {
  --bg-main: #f3f4f6;                  /* Fondo gris claro limpio */
  --bg-card: #ffffff;                  /* Tarjetas en blanco puro */
  --bg-card-elevated: #f9fafb;         /* Superficie elevada */
  --bg-card-hover: #f3f4f6;
  --bg-topbar: #0c0c10;
  --bg-input: #ffffff;

  --text-main: #111827;                /* Negro profundo para máxima nitidez */
  --text-muted: #4b5563;               /* Gris carbón para texto secundario */
  --text-gold: #b45309;                /* Ámbar tostado / oro visible sobre blanco */
  --text-red: #dc2626;

  --border-color: #d1d5db;             /* Bordes nítidos y limpios */
  --border-color-glow: rgba(220, 38, 38, 0.25);
  --border-gold-glow: rgba(180, 83, 9, 0.25);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.09), 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 35px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: auto;
  user-select: none;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Scrollbar estilizada */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: rgba(150, 150, 150, 0.3);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ==========================================================================
   BARRA SUPERIOR (HEADER) & LOGO SEÑOR CHORIZO
   ========================================================================== */
.app-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #140707;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

body:not(.dark-mode) .app-header-wrapper {
  background-color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.top-bar {
  background: linear-gradient(135deg, #180606 0%, #0c0c10 50%, #1a0808 100%);
  color: #ffffff;
  padding: 0.75rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid rgba(220, 38, 38, 0.35);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 8px rgba(220, 38, 38, 0.45));
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.brand-logo-emblem:hover {
  transform: rotate(-4deg) scale(1.06);
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-heading-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.15;
}

.brand-slogan {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.15);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.brand-info .shift-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 0.1rem;
  transition: var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.shift-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  box-shadow: 0 0 6px var(--accent-gold);
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.shift-badge.is-closed {
  color: #94a3b8 !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  cursor: pointer !important;
}

.shift-badge.is-closed:hover {
  color: #cbd5e1 !important;
}

.shift-dot.is-closed {
  background-color: #ef4444 !important;
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.6) !important;
}

.shift-badge.is-monday-active {
  color: #cbd5e1 !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  cursor: pointer !important;
}

.shift-badge.is-monday-active:hover {
  color: #ffffff !important;
}

.shift-dot.is-active {
  background-color: #10b981 !important;
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.6) !important;
}

.shift-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.1rem;
  min-height: 18px;
}

.brand-sub-sep {
  color: rgba(148, 163, 184, 0.4);
  font-size: 0.65rem;
  line-height: 1;
  user-select: none;
}

/* Puntito sutil de estado de sincronización en la izquierda */
.sync-dot-tiny {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}

.sync-dot-tiny::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  cursor: pointer;
}

.sync-dot-tiny.status-blocked {
  background-color: #64748b;
  box-shadow: none;
  opacity: 0.75;
}

.sync-dot-tiny.status-blocked:hover {
  opacity: 1;
  transform: scale(1.2);
}

.sync-dot-tiny.status-online {
  background-color: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.85);
  animation: pulseSyncDotTiny 2s infinite ease-in-out;
}

.sync-dot-tiny.status-online:hover {
  transform: scale(1.25);
}

.sync-dot-tiny.status-pending {
  background-color: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.75);
  animation: pulseSyncDotTiny 1.2s infinite ease-in-out;
}

.sync-dot-tiny.status-conflict {
  background-color: #ef4444;
  box-shadow: 0 0 7px rgba(239, 68, 68, 0.8);
}

.sync-status-label {
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.sync-status-label.status-online { color: #34d399; }
.sync-status-label.status-pending { color: #fbbf24; }
.sync-status-label.status-conflict { color: #f87171; }
.sync-status-label.status-blocked { color: #94a3b8; }

@keyframes pulseSyncDotTiny {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
    box-shadow: 0 0 5px rgba(16, 185, 129, 0.7);
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 9px rgba(52, 211, 153, 0.95);
  }
}

body:not(.dark-mode) .sync-dot-tiny.status-blocked {
  background-color: #94a3b8;
  opacity: 0.8;
}

body:not(.dark-mode) .sync-dot-tiny.status-online {
  background-color: #059669;
  box-shadow: 0 0 6px rgba(5, 150, 105, 0.7);
}

body:not(.dark-mode) .brand-sub-sep {
  color: rgba(100, 116, 139, 0.4);
}

/* Widget Elegante de Ventas Hoy, Caja Física y Turno */
.top-shift-widget {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: rgba(18, 18, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--radius-md);
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.top-shift-widget:hover {
  background: rgba(28, 28, 36, 0.95);
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 14px rgba(245, 158, 11, 0.25);
}

.widget-pod {
  display: flex;
  flex-direction: column;
}

.lbl-desktop {
  display: inline;
}

.lbl-mobile {
  display: none;
}

.widget-pod .pod-lbl {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: #a1a1aa;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.widget-pod .pod-val {
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1.15;
}

.widget-pod .sales-val {
  color: var(--text-gold);
}

.widget-pod .cash-val {
  color: #34d399;
}

.widget-pod-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 0.25rem;
}

.widget-mobile-action {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   NAVEGACIÓN POR PESTAÑAS (Material 3 Tabs)
   ========================================================================== */
.nav-tabs {
  display: flex;
  background-color: var(--bg-card);
  border-bottom: 1.5px solid var(--border-color);
  padding: 0.55rem 1.4rem;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.15rem;
  background-color: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-normal);
  user-select: none;
}

.tab-btn .tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  stroke: currentColor;
  opacity: 0.85;
  transition: var(--transition-normal);
}

.tab-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-card-hover);
  border-color: rgba(220, 38, 38, 0.3);
}

.tab-btn:hover .tab-icon {
  stroke: var(--primary);
}

.tab-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.45);
}

.tab-btn.active .tab-icon {
  opacity: 1;
  stroke: #ffffff;
}

.main-content {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 7.5rem 1.25rem !important; /* Espacio amplio abajo para que ningún elemento tape los botones */
  box-sizing: border-box;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

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

/* ==========================================================================
   BARRA DE CUENTAS / MESAS ACTIVAS (MATERIAL ELEVATION)
   ========================================================================== */
.accounts-master-header {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-color);
  padding: 0.95rem 1.2rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
}

.accounts-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.accounts-title-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
}

.accounts-title-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-add-product-menu-top {
  height: 34px;
  padding: 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-gold);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-fast);
}

.btn-add-product-menu-top:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--accent-gold);
}

.accounts-main-heading {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-main);
  white-space: nowrap !important;
}

.open-accounts-summary-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--bg-card-elevated);
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  white-space: nowrap !important;
  flex-shrink: 0;
}

.summary-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  white-space: nowrap !important;
}

.summary-pill-item strong {
  white-space: nowrap !important;
}

.indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
  flex-shrink: 0;
}

.indicator-divider {
  color: var(--border-color);
  flex-shrink: 0;
}

.btn-new-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 42px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 0 1rem;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
  transition: all 0.18s ease;
  width: 100%;
  box-sizing: border-box;
}

.btn-new-account:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.55);
}

.btn-new-account:active {
  transform: scale(0.98);
}

/* Zona de Acciones en Encabezado de Mesas */
.accounts-actions-zone {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  position: relative;
  width: 100%;
}

@media (max-width: 700px) {
  .accounts-actions-zone {
    width: 100%;
    align-items: stretch;
  }
}

/* Envoltorio de Pestaña Flotante */
.floating-cart-wrapper {
  position: relative;
  z-index: 40;
}

/* Pestaña Flotante Fija (Tarjeta de Factura Espaciosa, Elegante y Nítida) */
.floating-cart-tab-btn {
  background: linear-gradient(135deg, #1a1a24 0%, #12121c 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: var(--transition-normal);
  user-select: none;
  width: 100%;
  box-sizing: border-box;
}

.floating-cart-tab-btn:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65), 0 0 14px rgba(245, 158, 11, 0.25);
}

.floating-cart-tab-btn.pulse-update {
  animation: cartPulse 0.35s ease-out;
}

@keyframes cartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); border-color: #fbbf24; box-shadow: 0 0 18px rgba(251, 191, 36, 0.5); }
  100% { transform: scale(1); }
}

.floating-tab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.floating-tab-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.floating-cart-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.floating-acc-title-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.floating-factura-badge {
  background: rgba(220, 38, 38, 0.22);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fca5a5;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  line-height: 1.1;
}

.floating-mode-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  line-height: 1.1;
  flex-shrink: 0;
}

.floating-mode-badge.llevar {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.floating-acc-name {
  font-size: 1rem;
  font-weight: 950;
  color: var(--text-main);
  line-height: 1.15;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-tab-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.floating-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
}

.floating-price-block .price-val {
  font-size: 1.15rem;
  font-weight: 950;
  color: var(--text-gold);
  white-space: nowrap !important;
  font-family: monospace;
}

.floating-price-block .price-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: #f87171;
  white-space: nowrap !important;
}

.floating-tab-price {
  display: flex;
  align-items: center;
}

.btn-floating-pay-direct {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9px;
  height: 38px;
  padding: 0 1rem;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4);
  white-space: nowrap !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-floating-pay-direct:hover:not(:disabled) {
  filter: brightness(1.1);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.55);
}

.btn-floating-pay-direct:disabled {
  background: #27272a !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #71717a !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

.floating-arrow-indicator {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.floating-cart-tab-btn.active .floating-arrow-indicator {
  transform: rotate(180deg);
  color: var(--accent-gold);
}

/* Fila Inferior: Resumen de Consumo Ancho Completo */
.floating-tab-summary-row {
  width: 100%;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
}

.floating-items-summary-text {
  font-size: 0.82rem;
  color: #cbd5e1;
  font-weight: 600;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-items-bullet {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.btn-floating-pay-direct:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.floating-arrow-indicator {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.floating-cart-tab-btn.active .floating-arrow-indicator {
  transform: rotate(180deg);
  color: var(--primary);
}

/* Ventana Emergente Flotante (Popover) */
.floating-cart-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: 92vw;
  background-color: var(--bg-card);
  border: 1.5px solid rgba(220, 38, 38, 0.45);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 25px rgba(220, 38, 38, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 50;
  animation: popoverFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-cart-popover.active {
  display: flex;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.floating-popover-header {
  padding: 0.85rem 1.15rem;
  background-color: var(--bg-card-elevated);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.floating-popover-tag {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}

.floating-popover-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.2;
}

.floating-header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-clear-cart-mini {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.btn-clear-cart-mini:hover {
  background-color: rgba(239, 68, 68, 0.15);
}

.btn-close-popover {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: var(--transition-fast);
}

.btn-close-popover:hover {
  color: var(--danger);
  background-color: rgba(220, 38, 38, 0.15);
}

.mini-mode-selector {
  padding: 0.5rem 1.15rem;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.floating-cart-items-list {
  padding: 0.85rem 1.15rem;
  overflow-y: auto;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.floating-popover-footer {
  padding: 0.95rem 1.15rem;
  border-top: 1.5px solid var(--border-color);
  background-color: var(--bg-card-elevated);
}

.floating-footer-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.floating-footer-total-row .lbl-total {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}

.floating-footer-total-row .total-amount {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--text-gold);
}

.open-accounts-scroll {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

/* Botón chip de agregar mesa en el carril: oculto en versión de computadora para no duplicar */
.account-chip-add-btn {
  display: none !important;
}

.account-chip {
  flex: 0 0 auto;
  min-width: 165px;
  background-color: var(--bg-card-elevated);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.account-chip:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
}

.account-chip.active {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.18) 0%, rgba(245, 158, 11, 0.15) 100%);
  border-color: var(--accent-gold);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.account-chip-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
}

.account-chip-header-tags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap !important;
}

.account-chip-title {
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--text-main);
  white-space: nowrap !important;
}

.account-chip-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  white-space: nowrap !important;
}

.account-chip.active .account-chip-badge {
  background-color: var(--primary);
  color: white;
}

.account-chip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.2rem;
  gap: 0.4rem;
  width: 100%;
}

.account-chip-total {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-gold);
  white-space: nowrap !important;
}

.account-chip-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap !important;
}

.btn-chip-close {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  font-weight: 900;
  line-height: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 5;
  touch-action: manipulation;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-chip-close:active {
  transform: scale(0.9);
  background: #b91c1c;
}



/* Banner sutil cuando todos los pedidos han salido */
.prep-zone-empty-banner {
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  padding: 0.42rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #34d399;
  font-weight: 700;
}

/* ==========================================================================
   BARRA DE ACCIONES DE PRODUCTOS (FILTRO Y + AGREGAR PRODUCTO)
   ========================================================================== */
.pos-products-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.category-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
}

.cat-filter-btn {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.cat-filter-btn:hover {
  border-color: var(--primary);
  color: var(--text-main);
  background-color: var(--bg-card-hover);
}

.cat-filter-btn.active {
  background: var(--primary-gradient);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
}

.btn-add-product-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-gold);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-add-product-menu:hover {
  border-color: var(--accent-gold);
  background-color: var(--bg-card-elevated);
  transform: translateY(-1px);
}

/* ==========================================================================
   DISTRIBUCIÓN DEL PUNTO DE VENTA (POS)
   ========================================================================== */
.pos-layout {
  width: 100%;
}

/* Menú Dividido / Compacto: Comidas y Bebidas visibles sin scroll excesivo */
.pos-products-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  align-items: stretch;
}

@media (max-width: 768px) {
  .pos-products-two-columns {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.pos-column-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.45rem 0.55rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.comidas-section {
  border-top: 2.5px solid #dc2626;
}

.bebidas-section {
  border-top: 2.5px solid #3b82f6;
}

/* Cabeceras de Sección Slim / Chip */
.pos-column-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.15rem 0.25rem 0.3rem 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.column-compact-title {
  font-size: 0.8rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.column-compact-badge {
  font-size: 0.64rem;
  font-weight: 800;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.38rem;
  border-radius: 10px;
}

.empty-col-msg {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.8rem;
  text-align: center;
}

/* Cuadrícula Limpia de Productos Compactos: 2 Columnas en Móvil */
.products-clean-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.38rem;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .products-clean-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-clean-card {
  background-color: #1a1a20;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.38rem 0.48rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 64px;
  box-sizing: border-box;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  transition: var(--transition-fast);
  position: relative;
  user-select: none;
}

.product-clean-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background-color: #22222a;
  transform: translateY(-1px);
}

.product-clean-card:active {
  transform: scale(0.97);
}

/* Resaltado cuando está en la comanda de la mesa activa */
.product-clean-card.in-cart {
  background: #17231c;
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.12);
}

.product-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.product-clean-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

.btn-edit-prod-link {
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 0.1rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-edit-prod-link:hover {
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.1);
}

.product-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.product-clean-price {
  font-size: 0.84rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.product-card-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.btn-prod-qty-minus {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--primary-gradient);
  border: 1px solid rgba(248, 113, 113, 0.38);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  padding: 0;
  line-height: 1;
}

.btn-prod-qty-minus:hover {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: #dc2626;
}

.prod-qty-badge {
  font-size: 0.72rem;
  font-weight: 900;
  color: #34d399;
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid #10b981;
  padding: 0.1rem 0.28rem;
  border-radius: 4px;
  min-width: 12px;
  text-align: center;
  line-height: 1.1;
}

.btn-prod-qty-plus {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
  padding: 0;
  line-height: 1;
}

.btn-prod-qty-plus:hover {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 5px 14px rgba(22, 163, 74, 0.48);
}

.btn-prod-qty-minus:focus-visible,
.btn-prod-qty-plus:focus-visible {
  outline: 2px solid #f3b65d;
  outline-offset: 2px;
}

.btn-add-clean:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.7);
}

/* ==========================================================================
   COMANDA / CARRITO DE LA CUENTA ACTIVA
   ========================================================================== */
.order-cart-panel {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border-top: 3.5px solid #dc2626;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 130px;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
}

.cart-title-block {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.cart-account-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
}

.btn-clear-cart {
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.btn-clear-cart:hover {
  background-color: rgba(239, 68, 68, 0.15);
}

.cart-mode-selector {
  padding: 0.65rem 1.15rem;
  background-color: var(--bg-card-elevated);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cart-mode-btn-group {
  display: flex;
  gap: 0.35rem;
}

.cart-mode-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.cart-mode-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.cart-mode-btn.active {
  background: var(--primary-gradient);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.cart-items-list {
  padding: 0.85rem 1.15rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 380px;
}

.empty-cart-message {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  background-color: var(--bg-card-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-type {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-qty {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-qty:hover {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.item-qty-number {
  font-size: 0.92rem;
  font-weight: 900;
  min-width: 22px;
  text-align: center;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--text-gold);
}

.cart-summary {
  padding: 1.15rem;
  border-top: 1.5px solid var(--border-color);
  background-color: var(--bg-card-elevated);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.95rem;
  font-weight: 800;
  color: var(--text-muted);
}

.cart-total-box .total-amount,
.summary-total .total-amount {
  font-size: 1.95rem;
  font-weight: 900;
  color: var(--text-gold);
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
}

.btn-checkout {
  width: 100%;
  background: var(--primary-gradient);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.45);
}

.btn-checkout:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(220, 38, 38, 0.65);
}

.btn-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ==========================================================================
   MODALES Y FORMULARIOS (DIÁLOGOS MATERIAL DESIGN 3)
   ========================================================================== */
/* Bloqueo total de scroll del fondo cuando un modal está abierto */
body.modal-open {
  overflow: hidden !important;
  touch-action: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
  overflow: hidden !important; /* Nunca scroll afuera */
  overscroll-behavior: contain;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

/* El confirmador de borrado debe capturar todos los toques; nunca deben
   terminar en una tarjeta o botón que esté detrás del modal. */
#confirmDeleteSaleModal {
  z-index: 100000 !important;
  isolation: isolate;
}

#confirmDeleteSaleModal:not(.active) {
  pointer-events: none;
}

#confirmDeleteSaleModal.active {
  display: flex !important;
  pointer-events: auto !important;
}

#confirmDeleteSaleModal .modal-card,
#confirmDeleteSaleModal button {
  pointer-events: auto;
  touch-action: manipulation;
}

.modal-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(220, 38, 38, 0.15);
  max-height: 94vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
}

.modal-header {
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-card-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.35rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.btn-close-modal:hover {
  color: var(--danger);
  background-color: rgba(220, 38, 38, 0.15);
}

.modal-body {
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.modal-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card-elevated);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Badge de Producto Listo en Ventas (Insumos) */
.badge-pos-ready {
  background-color: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
  font-weight: 800;
}

/* Selector Rápido de Insumos Existentes */
.quick-supply-picker-box {
  background-color: var(--bg-card-elevated);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
}

.quick-picker-header {
  margin-bottom: 0.35rem;
}

.quick-picker-lbl {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.quick-supply-chips-scroll {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: thin;
}

.btn-supply-quick-chip {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.btn-supply-quick-chip:hover {
  border-color: var(--accent-gold);
  background-color: var(--bg-card-hover);
  transform: translateY(-1px);
}

.btn-supply-quick-chip.active {
  background: var(--accent-gold-gradient);
  color: #140707;
  border-color: #f59e0b;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.chip-price-badge {
  font-size: 0.68rem;
  opacity: 0.9;
  font-weight: 800;
  color: var(--accent-gold);
}

.btn-supply-quick-chip.active .chip-price-badge {
  color: #140707;
}

/* Selector Táctil de Tipo de Producto (Bebida vs Comida) */
.quick-product-type-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.account-chip-new-order {
  border-color: rgba(245, 158, 11, .9);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, .35), 0 0 1.2rem rgba(245, 158, 11, .18);
  animation: account-chip-new-pulse 1.8s ease-in-out infinite;
}

.account-chip-new-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-top: .25rem;
  color: #fbbf24;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .01em;
}

@keyframes account-chip-new-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(245, 158, 11, .35), 0 0 1rem rgba(245, 158, 11, .12); }
  50% { box-shadow: 0 0 0 2px rgba(245, 158, 11, .55), 0 0 1.8rem rgba(245, 158, 11, .28); }
}

.quick-product-type-btn {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.45rem;
  row-gap: 0.12rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-card-elevated);
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
}

.quick-product-type-btn > span {
  grid-row: span 2;
  color: var(--accent-gold);
  font-size: 1.2rem;
}

.quick-product-type-btn strong {
  color: var(--text-main);
  font-size: 0.76rem;
}

.quick-product-type-btn small {
  color: var(--text-muted);
  font-size: 0.65rem;
  line-height: 1.2;
}

.quick-product-type-btn:hover,
.quick-product-type-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.quick-product-type-btn.active strong,
.quick-product-type-btn.active > span {
  color: #fca5a5;
}

/* Editor de fotografía del producto */
.product-image-editor {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(255, 255, 255, 0.02));
}

.product-image-editor-copy .form-label {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.82rem;
  font-weight: 850;
}

.product-image-editor-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.product-image-editor-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-image-preview {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-muted);
  font-size: 1.7rem;
}

.product-image-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-image-editor-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
}

.btn-image-upload,
.btn-image-remove {
  min-height: 2.15rem;
  padding: 0.45rem 0.7rem;
  border-radius: 9px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-image-upload {
  border: 1px solid rgba(220, 38, 38, 0.55);
  background: rgba(220, 38, 38, 0.16);
  color: #fca5a5;
}

.btn-image-upload:hover {
  background: rgba(220, 38, 38, 0.26);
  border-color: var(--primary);
}

.btn-image-remove {
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
}

.btn-image-remove:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-main);
}

.btn-image-remove:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.product-image-hint {
  flex-basis: 100%;
  color: var(--text-muted);
  font-size: 0.64rem;
}

.quick-type-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.quick-type-btn {
  background-color: var(--bg-card-elevated);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.quick-type-btn .quick-type-icon {
  font-size: 1.25rem;
}

.quick-type-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-main);
}

.quick-type-btn#quickTypeBtnDrink.active {
  background: rgba(59, 130, 246, 0.16);
  border-color: #3b82f6;
  color: #60a5fa;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.25);
}

.quick-type-btn#quickTypeBtnFood.active {
  background: rgba(220, 38, 38, 0.16);
  border-color: #dc2626;
  color: #f87171;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.25);
}

/* Chips de Precios Rápidos */
.quick-price-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.btn-quick-price-chip {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.32rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-gold);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-quick-price-chip:hover {
  border-color: var(--accent-gold);
  background-color: rgba(245, 158, 11, 0.12);
}

.btn-quick-price-chip.active {
  background: var(--accent-gold-gradient);
  color: #140707;
  border-color: #f59e0b;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

/* Acordeón de Receta de Insumos Opcional */
.recipe-accordion-card {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 0.2rem;
}

.recipe-accordion-header {
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition-fast);
  user-select: none;
}

.recipe-accordion-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.accordion-title-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
}

.accordion-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.recipe-accordion-body {
  padding: 0.75rem 0.85rem;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   MODAL DE COBRO ULTRA-COMPACTO (CERO SCROLL)
   ========================================================================== */
.checkout-modal-compact {
  max-width: 470px;
  width: 95vw;
  max-height: 96vh;
  align-self: flex-start;
  margin-top: 3.5vh;
  overflow: hidden !important; /* Nunca scroll */
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(220, 38, 38, 0.45);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(220, 38, 38, 0.2);
}

.compact-modal-header {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-card-elevated);
}

.compact-modal-header .modal-title {
  font-size: 1.05rem;
  font-weight: 900;
}

.compact-modal-body {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow: hidden !important; /* Nunca scroll */
}

/* Banner Horizontal Compacto */
.checkout-banner-compact {
  background: linear-gradient(135deg, #1f0b0b 0%, #121218 100%);
  border: 1.5px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.banner-compact-left {
  display: flex;
  flex-direction: column;
}

.banner-compact-lbl {
  font-size: 0.72rem;
  color: #a1a1aa;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.banner-compact-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
}

.banner-compact-val {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--text-gold);
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
  line-height: 1;
  white-space: nowrap;
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

/* Barra Compacta de Empaques en Cobro */
.checkout-pkg-compact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.65rem;
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
}

.checkout-pkg-compact-info {
  display: flex;
  flex-direction: column;
}

.checkout-pkg-compact-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.checkout-pkg-compact-fee {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.checkout-pkg-compact-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-pkg-step {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  font-weight: 900;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
}

.btn-pkg-step:active {
  transform: scale(0.92);
}

.checkout-pkg-compact-count {
  font-size: 1rem;
  font-weight: 900;
  color: var(--accent-gold);
  min-width: 18px;
  text-align: center;
}

.btn-pkg-change-tag {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-pkg-change-tag:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

/* Botones Rápidos del Modal de Empaques */
.btn-quick-pkg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.35rem;
  background: var(--bg-card-elevated);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.btn-quick-pkg:hover,
.btn-quick-pkg:active {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.15);
  transform: scale(0.97);
}

.btn-quick-pkg strong {
  font-size: 0.86rem;
  color: var(--text-main);
  font-weight: 800;
}

.btn-quick-pkg span {
  font-size: 0.74rem;
  color: var(--accent-gold);
  font-weight: 800;
  margin-top: 0.15rem;
}

/* Selector Compacto de Medio de Pago */
.payment-methods-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.method-compact-btn {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-card-elevated);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 900;
  text-align: center;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.method-compact-btn:hover {
  border-color: var(--accent-gold);
  color: var(--text-main);
}

.method-compact-btn.active.method-cash {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.method-compact-btn.active.method-nequi {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

/* Sección Efectivo Compacta */
.cash-calc-compact {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cash-quick-grid-compact {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.28rem;
  width: 100%;
}

.btn-bill-compact {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.15rem;
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--text-gold);
  cursor: pointer;
  text-align: center;
  transition: var(--transition-fast);
  white-space: nowrap;
  min-width: 0;
  letter-spacing: -0.02em;
}

.btn-bill-compact:hover {
  border-color: var(--accent-gold);
  background-color: var(--bg-card-hover);
  transform: translateY(-1px);
}

.btn-bill-compact.btn-bill-exact {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.5);
  font-weight: 900;
}

.cash-inline-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  align-items: flex-end;
}

.cash-col-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.compact-field-lbl {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.cash-input-wrap-compact {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
}

.cash-input-wrap-compact span.prefix {
  position: absolute;
  left: 0.75rem;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-muted);
  pointer-events: none;
}

.input-received-compact {
  width: 100%;
  height: 100%;
  font-size: 1.25rem;
  font-weight: 900;
  padding: 0 0.65rem 0 1.95rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-gold);
  outline: none;
  transition: var(--transition-fast);
}

.input-received-compact:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}

/* Caja de Vueltos Compacta (100% Simétrica con el Input de Paga Con) */
.change-box-compact {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.65rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  transition: var(--transition-fast);
}

.change-box-compact.change-ok {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.change-box-compact.change-deficit {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

.change-box-val {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

/* Sección Nequi Compacta */
.nequi-calc-compact {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background-color: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
}

.form-group-compact {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.form-input-compact {
  width: 100%;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  outline: none;
}

.form-input-compact:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
}

.nequi-check-compact {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

/* Footer Compacto */
.compact-modal-footer {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card-elevated);
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 0.65rem;
  align-items: center;
}

.compact-btn-cancel {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.85rem;
  font-size: 0.88rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
}

.compact-btn-confirm {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 900;
  border-radius: var(--radius-sm);
}

/* Caja de Resultados de Cuadre en Cierre de Turno */
.change-result-box {
  padding: 0.85rem;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1.5px solid transparent;
}

.change-result-box.change-ok {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.change-result-box.change-deficit {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-secondary {
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card-elevated);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-confirm-sale {
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--primary-gradient);
  color: white;
  font-size: 0.98rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(220, 38, 38, 0.45);
  transition: var(--transition-fast);
}

.btn-confirm-sale:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(220, 38, 38, 0.65);
}

.btn-confirm-sale:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Modal Mesas Rápidas */
.quick-mesa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.btn-quick-mesa {
  padding: 0.7rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-card-elevated);
  color: var(--text-main);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-fast);
}

.btn-quick-mesa:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background-color: var(--bg-card-hover);
}

/* ==========================================================================
   INVENTARIO & INSUMOS NO PARA LA VENTA
   ========================================================================== */
.section-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.25rem;
  background: var(--primary-gradient);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 3px 12px rgba(220, 38, 38, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(220, 38, 38, 0.55);
}

/* Banner de compras e insumos por agotarse */
.inventory-status-banner {
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.35rem;
  box-shadow: var(--shadow-md);
}

.inventory-status-banner.banner-alert {
  background: linear-gradient(135deg, #181308 0%, #120e06 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  color: #fde68a;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}

.inventory-status-banner.banner-ok {
  background: linear-gradient(135deg, #052014 0%, #03140c 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.5);
  color: #a7f3d0;
}

.status-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.status-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.status-banner-content .status-icon {
  font-size: 1.7rem;
  line-height: 1;
}

/* Banner Compacto de Insumos / Compras */
.inventory-status-banner-compact {
  border-radius: 9px;
  padding: 0.35rem 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  font-size: 0.76rem;
  border: 1px solid transparent;
  width: 100%;
  box-sizing: border-box;
}

.inventory-status-banner-compact.banner-ok {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.inventory-status-banner-compact.banner-alert {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.status-banner-summary {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.status-alert-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fef08a;
  white-space: nowrap;
}

.alert-toggle-pill {
  font-size: 0.66rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.alert-toggle-pill:hover {
  background: rgba(251, 191, 36, 0.25);
}

.btn-whatsapp-shopping-compact {
  background: #15803d;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.btn-whatsapp-shopping-compact:hover {
  background: #16a34a;
}

.shopping-list-preview-compact {
  list-style: none;
  padding: 0.4rem 0.6rem;
  margin: 0 0 0.5rem 0;
  background: rgba(245, 158, 11, 0.05);
  border: 1px dashed rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.73rem;
}

.shopping-item-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.shopping-item-needed-compact {
  color: #34d399;
  font-weight: 800;
}

/* Selector de Carpetas de Insumos Compacto */
.inventory-folder-bar {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  margin-bottom: 0.55rem;
  padding-bottom: 0.2rem;
}

.folder-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.28rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.folder-tab-btn.active {
  background: #27272a;
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.folder-tab-btn .folder-count {
  font-size: 0.65rem;
  padding: 0.08rem 0.32rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
}

/* Secciones de Insumos Ultra-Compactas */
.inventory-folder-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 11px;
  padding: 0.45rem 0.55rem;
  margin-bottom: 0.55rem;
  box-shadow: var(--shadow-sm);
}

.inventory-movement-audit {
  margin: 0.8rem 0 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 11px;
  padding: 0.7rem;
  box-shadow: var(--shadow-sm);
}

.inventory-movement-header,
.inventory-movement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.inventory-movement-header {
  padding: 0.15rem 0.2rem 0.55rem;
  border-bottom: 1px solid var(--border-color);
}

.inventory-movement-header div,
.inventory-movement-main,
.inventory-movement-meta {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.inventory-movement-header strong {
  font-size: 0.82rem;
}

.inventory-movement-header small,
.inventory-movement-main small,
.inventory-movement-meta span,
.inventory-movement-empty {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.inventory-movement-header > span {
  color: var(--text-muted);
  font-size: 0.66rem;
  white-space: nowrap;
}

.inventory-movement-list {
  display: flex;
  flex-direction: column;
}

.inventory-movement-row {
  padding: 0.48rem 0.2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.inventory-movement-row:last-child {
  border-bottom: 0;
}

.inventory-movement-main {
  min-width: 0;
}

.inventory-movement-main strong,
.inventory-movement-main span,
.inventory-movement-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-movement-main strong {
  font-size: 0.74rem;
}

.inventory-movement-main span {
  color: var(--text-muted);
  font-size: 0.67rem;
}

.inventory-movement-meta {
  align-items: flex-end;
  flex-shrink: 0;
  text-align: right;
}

.inventory-movement-delta {
  font-size: 0.84rem;
}

.inventory-movement-delta.is-increase {
  color: #34d399;
}

.inventory-movement-delta.is-decrease {
  color: #fb7185;
}

.inventory-movement-empty {
  padding: 0.4rem 0.2rem;
}

.folder-section-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.1rem 0.2rem 0.3rem 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.35rem;
}

.folder-compact-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #ffffff;
}

.folder-count-pill {
  font-size: 0.64rem;
  font-weight: 800;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.08rem 0.35rem;
  border-radius: 8px;
}

.folder-alert-pill {
  font-size: 0.66rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.08rem 0.4rem;
  border-radius: 8px;
}

.inventory-compact-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* Tarjeta de Insumo Rediseñada (Formato 2 Filas, Ultra-Legible, Touch-Optimized) */
.inventory-compact-row {
  background: #18181c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: var(--transition-fast);
}

.inventory-compact-row:hover {
  background: #202026;
  border-color: rgba(255, 255, 255, 0.18);
}

.inventory-compact-row.stock-empty {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}

.inventory-compact-row.stock-low {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.04);
}

/* Fila 1: Título e Insignias */
.inv-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  cursor: pointer;
}

.inv-row-name-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}

.inv-row-name {
  font-size: 0.94rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}

.inv-row-badge {
  font-size: 0.6rem;
  font-weight: 900;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.inv-row-badges-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.inv-row-price-badge {
  font-size: 0.75rem;
  font-weight: 900;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  white-space: nowrap;
}

/* Fila 2: Metadatos y Controles */
.inv-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.inv-row-meta {
  font-size: 0.72rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}

.inv-row-meta strong {
  color: #cbd5e1;
}

.meta-sep {
  color: #52525b;
}

.inv-row-controls {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  flex-shrink: 0;
}

.btn-inv-step {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #27272a;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0;
  line-height: 1;
}

.btn-inv-step.minus {
  color: #f87171;
}

.btn-inv-step.minus:hover {
  background: #dc2626;
  color: white;
}

.btn-inv-step.plus {
  color: #34d399;
}

.btn-inv-step.plus:hover {
  background: #15803d;
  color: white;
}

.btn-inv-step.pack {
  width: auto;
  min-width: 36px;
  height: 28px;
  padding: 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #f1f5f9;
  background: #334155;
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-inv-step.pack:hover {
  background: #475569;
  color: white;
}

.inv-row-stock-box {
  min-width: 50px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  padding: 0 0.2rem;
}

.inv-row-stock-num {
  font-size: 0.96rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.inv-row-stock-unit {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.btn-inv-edit {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-inv-edit:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.inv-meta-price {
  color: #fbbf24;
  font-weight: 700;
}

.inv-meta-price strong {
  color: #fef08a;
  font-weight: 900;
}

.btn-danger-outline {
  background: transparent;
  border: 1.5px solid rgba(239, 68, 68, 0.5);
  color: #f87171;
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

/* ==========================================================================
   MODAL DE PRECIOS DEL MENÚ (REDISEÑO MODERNO Y ELEGANTE)
   ========================================================================== */
.pricing-modal-filter-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem 0.4rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.prices-filter-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.prices-filter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.prices-filter-btn.active {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  border-color: rgba(220, 38, 38, 0.6);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.modal-pricing-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pricing-row-item {
  background: linear-gradient(135deg, #181822 0%, #12121a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease;
}

.pricing-row-item:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.pricing-product-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.pricing-name-input {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  flex: 1;
  min-width: 0;
}

.pricing-name-input:focus {
  border-color: var(--accent-gold);
  background: rgba(0, 0, 0, 0.5);
  outline: none;
}

.pricing-prod-category {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}

.pricing-prod-category.cat-bebida {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.pricing-prod-category.cat-comida {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.pricing-inputs-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.pricing-input-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pricing-input-group label {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted);
  white-space: nowrap;
}

.pricing-field {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  flex: 1;
  min-width: 0;
}

.pricing-field .currency-sign {
  color: var(--accent-gold);
  font-weight: 900;
  font-size: 0.85rem;
  margin-right: 0.25rem;
}

.pricing-field input {
  background: transparent;
  border: none;
  color: var(--text-gold);
  font-weight: 900;
  font-size: 0.95rem;
  width: 100%;
  outline: none;
}

.inv-stock-stats {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0.5rem 0 0.25rem 0;
}

.inv-count {
  font-size: 1.95rem;
  font-weight: 900;
  color: var(--text-main);
}

.inv-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.inv-progress-bar {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.inv-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
}

.fill-normal { background-color: #10b981; }
.fill-low { background-color: var(--accent-gold); }
.fill-empty { background-color: var(--danger); }

.inv-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.btn-restock-quick {
  flex: 1;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-restock-quick:hover {
  border-color: var(--primary);
  background-color: var(--primary);
  color: white;
}

/* ==========================================================================
   GASTOS Y ARQUEO - MÓDULO INTUITIVO & TARJETA DE PAGO DE EMPLEADO
   ========================================================================== */

/* TARJETA INTELIGENTE: PAGO DIARIO DE EMPLEADO */
.employee-pay-wrapper {
  width: 100%;
}

.employee-pay-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem .8rem;
  align-items: center;
  padding: .65rem .8rem;
  border: 1px solid rgba(245, 158, 11, .35);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}
.employee-pay-compact.is-paid { border-color: rgba(16, 185, 129, .4); }
.employee-pay-compact-main { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.employee-pay-compact-main > div { display: grid; gap: .12rem; min-width: 0; }
.employee-pay-compact-main strong { overflow: hidden; color: var(--text-main); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.employee-pay-compact-main small { color: var(--text-muted); font-size: .62rem; }
.employee-pay-compact-icon { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: rgba(245, 158, 11, .15); font-size: .9rem; }
.employee-pay-compact.is-paid .employee-pay-compact-icon { background: rgba(16, 185, 129, .15); }
.employee-pay-compact-actions { display: flex; align-items: center; gap: .35rem; }
.btn-compact-employee-pay,
.btn-edit-rate-subtle { min-height: 1.85rem; padding: .3rem .55rem; border: 1px solid rgba(245, 158, 11, .5); border-radius: .55rem; background: rgba(245, 158, 11, .12); color: #fbbf24; font: inherit; font-size: .62rem; font-weight: 850; cursor: pointer; }
.btn-edit-rate-subtle { border-color: var(--border-color); background: transparent; color: var(--text-muted); }
.employee-pay-compact-list { grid-column: 1 / -1; display: grid; gap: .25rem; padding-top: .4rem; border-top: 1px solid var(--border-color); }
.employee-pay-compact-row { display: flex; align-items: center; gap: .45rem; color: var(--text-muted); font-size: .62rem; }
.employee-pay-compact-row > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-pay-compact-row strong { color: #34d399; white-space: nowrap; }
.employee-pay-compact-row .btn-undo-emp-pay { padding: .2rem .4rem; }

.inventory-purchase-card { margin: .9rem 0 1rem; padding: .8rem; border: 1px solid rgba(16, 185, 129, .35); border-radius: var(--radius-md); background: rgba(16, 185, 129, .06); }
.inventory-purchase-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; margin-bottom: .65rem; }
.inventory-purchase-kicker { color: #fbbf24; font-size: .58rem; font-weight: 900; letter-spacing: .1em; }
.inventory-purchase-heading h3 { margin: .12rem 0 .15rem; color: var(--text-main); font-size: .88rem; }
.inventory-purchase-heading p { margin: 0; color: var(--text-muted); font-size: .62rem; }
.inventory-purchase-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .65rem; background: rgba(16, 185, 129, .15); font-size: 1rem; }
.inventory-purchase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.inventory-purchase-grid > .form-group:first-child { grid-column: 1 / -1; }
.inventory-purchase-grid .form-group { margin-bottom: 0; }
.inventory-purchase-grid .form-label { font-size: .6rem; }
.inventory-purchase-grid .form-input,
.inventory-purchase-grid .form-select { padding: .5rem .45rem; font-size: .68rem; }
.inventory-purchase-new-fields { display: contents; }
.inventory-purchase-new-fields[hidden] { display: none; }
.inventory-purchase-summary { margin-top: .55rem; color: #6ee7b7; font-size: .68rem; font-weight: 850; }
.inventory-purchase-profit { margin-top: .25rem; color: var(--text-muted); font-size: .64rem; font-weight: 750; }
.inventory-purchase-profit.is-warning { color: #fca5a5; }
.inventory-purchase-footer { display: flex; align-items: end; justify-content: space-between; gap: .6rem; margin-top: .65rem; }
.inventory-purchase-method { display: flex; align-items: center; gap: .4rem; color: var(--text-muted); font-size: .62rem; font-weight: 800; }
.inventory-purchase-method .form-select { width: auto; min-width: 9rem; padding: .42rem .5rem; font-size: .65rem; }
.inventory-purchase-footer .btn-primary { min-height: 2rem; padding: .45rem .7rem; font-size: .68rem; }

.employee-pay-modal-card { width: min(100% - 1rem, 25rem); padding: 0; overflow: hidden; }
.employee-pay-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; padding: .85rem 1rem .65rem; border-bottom: 1px solid var(--border-color); }
.employee-pay-modal-kicker { color: #f59e0b; font-size: .58rem; font-weight: 900; letter-spacing: .1em; }
.employee-pay-modal-header h2 { margin: .18rem 0 .15rem; color: var(--text-main); font-size: 1rem; }
.employee-pay-modal-header p { margin: 0; color: var(--text-muted); font-size: .65rem; }
.employee-pay-modal-body { display: grid; gap: .55rem; padding: .85rem 1rem 1rem; }
.employee-pay-modal-body > input[type="text"] { width: 100%; min-height: 2.6rem; padding: .55rem .7rem; border: 1px solid var(--border-color); border-radius: 9px; color: var(--text-main); background: var(--bg-card-elevated); font: inherit; font-size: .85rem; }
.employee-pay-modal-body > input[type="text"]:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 1px; }
.employee-pay-modal-body .emp-amount-input:disabled { opacity: .7; cursor: not-allowed; }
.employee-pay-modal-body .emp-method-pills { gap: .35rem; }
.employee-pay-modal-body .emp-method-pill { padding: .55rem .45rem; font-size: .68rem; }
.employee-pay-modal-body .btn-pay-employee { margin-top: .25rem; padding: .7rem .8rem; font-size: .75rem; }

@media (max-width: 700px) {
  .employee-pay-compact { grid-template-columns: 1fr; }
  .employee-pay-compact-actions { justify-content: stretch; }
  .employee-pay-compact-actions button { flex: 1; }
  .inventory-purchase-grid { grid-template-columns: 1fr 1fr; }
  .inventory-purchase-grid .form-group:first-child { grid-column: 1 / -1; }
  .inventory-purchase-new-fields { display: contents; }
  .inventory-purchase-new-fields[hidden] { display: none; }
  .inventory-purchase-footer { align-items: stretch; flex-direction: column; }
  .inventory-purchase-method .form-select { flex: 1; }
}

.employee-pay-card {
  background: linear-gradient(145deg, #16161d 0%, #121218 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.employee-pay-card.state-pending {
  border-color: rgba(245, 158, 11, 0.45);
  border-top: 3.5px solid #f59e0b;
}

.employee-pay-card.state-paid {
  border-color: rgba(16, 185, 129, 0.45);
  border-top: 3.5px solid #10b981;
}

.employee-pay-card.state-extra {
  border-color: rgba(59, 130, 246, 0.45);
  border-top: 3.5px solid #3b82f6;
}

.emp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.emp-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.emp-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.emp-icon-circle.paid {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.emp-card-headline {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}

.emp-card-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.emp-status-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-paid {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-extra {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.emp-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
}

.emp-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-edit-rate {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-edit-rate:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-cancel-extra {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.emp-card-body {
  margin-top: 0.25rem;
}

.emp-pay-config-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.emp-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.emp-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.emp-amount-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.emp-amount-input-wrap .currency-prefix {
  position: absolute;
  left: 0.85rem;
  font-weight: 800;
  color: #fbbf24;
  font-size: 1.1rem;
  pointer-events: none;
}

.emp-amount-input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 900;
  padding: 0.65rem 0.85rem 0.65rem 1.85rem;
  outline: none;
  transition: var(--transition-fast);
}

.emp-amount-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.emp-method-pills {
  display: flex;
  gap: 0.5rem;
}

.emp-date-choice {
  display: grid;
  gap: .45rem;
  padding: .1rem 0 .15rem;
}

.emp-date-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem;
}

.emp-date-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  min-width: 0;
  min-height: 3.25rem;
  padding: .6rem .7rem;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: .7rem;
  background: linear-gradient(180deg, rgba(30, 35, 43, .95), rgba(17, 21, 27, .95));
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.1;
  transition: var(--transition-fast);
}

.emp-date-heading {
  color: var(--text-main);
  font-size: .7rem;
  letter-spacing: .01em;
  text-transform: none;
}

.emp-date-pill > span {
  color: inherit;
  font-size: .8rem;
  font-weight: 900;
}

.emp-date-pill small {
  color: inherit;
  font-size: .64rem;
  font-weight: 700;
  opacity: .72;
  white-space: nowrap;
}

.emp-date-pill.active {
  border-color: #f59e0b;
  background: linear-gradient(180deg, rgba(245, 158, 11, .2), rgba(120, 72, 4, .2));
  color: #fbbf24;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .12), 0 5px 14px rgba(245, 158, 11, .1);
}

.emp-date-selection-note {
  color: var(--text-muted);
  font-size: .64rem;
  line-height: 1.3;
}

.emp-recent-payments {
  display: grid;
  gap: .45rem;
  padding: .55rem;
  border: 1px solid rgba(245, 158, 11, .25);
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, .06);
}

.emp-recent-payments[hidden] {
  display: none;
}

.emp-recent-payments-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  color: var(--text-main);
  font-size: .67rem;
  font-weight: 850;
}

.emp-recent-payments-heading small,
.emp-recent-payment-info small {
  color: var(--text-muted);
  font-size: .6rem;
  font-weight: 700;
}

.emp-recent-payments-list {
  display: grid;
  gap: .3rem;
}

.emp-recent-payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .45rem;
  padding-top: .35rem;
  border-top: 1px solid var(--border-color);
}

.emp-recent-payment-info {
  display: grid;
  gap: .1rem;
  min-width: 0;
}

.emp-recent-payment-info strong {
  overflow: hidden;
  color: var(--text-main);
  font-size: .64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emp-recent-payment-amount {
  color: #fbbf24;
  font-size: .66rem;
  white-space: nowrap;
}

.emp-recent-payment-row .btn-undo-emp-pay {
  min-height: 1.65rem;
  padding: .22rem .4rem;
  font-size: .58rem;
}

body:not(.dark-mode).app-redesign .employee-pay-modal-card .emp-date-pill {
  background: #fff;
  border-color: #cbd6df;
  color: #344451;
}

body:not(.dark-mode).app-redesign .employee-pay-modal-card .emp-date-heading {
  color: #344451;
}

body:not(.dark-mode).app-redesign .employee-pay-modal-card .emp-date-pill.active {
  background: linear-gradient(180deg, #fff8e9, #fff1d4);
  border-color: #e5c98f;
  color: #8a5a00;
}

body:not(.dark-mode).app-redesign .employee-pay-modal-card .emp-date-selection-note {
  color: #536371;
}

body:not(.dark-mode).app-redesign .employee-pay-modal-card .emp-recent-payments {
  border-color: #e5c98f;
  background: #fffaf0;
}

body:not(.dark-mode).app-redesign .employee-pay-modal-card .emp-recent-payment-info strong {
  color: #344451;
}

body:not(.dark-mode).app-redesign .employee-pay-modal-card .emp-recent-payment-amount {
  color: #8a5a00;
}

.emp-method-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.85rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
  user-select: none;
}

.emp-method-pill.active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.emp-action-footer {
  margin-top: 0.5rem;
}

.btn-pay-employee {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.95rem 1.5rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #09090b;
  font-size: 0.98rem;
  font-weight: 900;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn-pay-employee:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.45);
  filter: brightness(1.06);
}

.btn-pay-employee:active {
  transform: translateY(1px);
  filter: brightness(0.95);
}

.btn-pay-employee .btn-badge {
  background: rgba(0, 0, 0, 0.28);
  color: #ffffff;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 900;
}

/* ESTADO PAGADO */
.emp-paid-total-box {
  text-align: right;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.85rem;
  flex-shrink: 0;
}

.emp-paid-total-lbl {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  color: #34d399;
  text-transform: uppercase;
}

.emp-paid-total-num {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
}

.emp-paid-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.emp-paid-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.emp-paid-item-concept {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
  display: block;
}

.emp-paid-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.15rem;
}

.emp-paid-item-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.emp-paid-item-val {
  font-size: 1.05rem;
  font-weight: 900;
  color: #fbbf24;
}

.btn-undo-emp-pay {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-undo-emp-pay:hover {
  background: rgba(239, 68, 68, 0.25);
}

.emp-paid-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.btn-add-another-emp {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-add-another-emp:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-edit-rate-subtle {
  background: none;
  border: none;
  font-size: 0.74rem;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-edit-rate-subtle:hover {
  color: var(--text-main);
  text-decoration: underline;
}

/* BARRA DE GASTOS RÁPIDOS */
.quick-expenses-bar {
  margin-bottom: 1.15rem;
}

.quick-expenses-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.quick-exp-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.quick-exp-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.quick-expense-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.quick-chip {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.quick-chip:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  transform: translateY(-1px);
}

.quick-chip:active {
  transform: translateY(0);
}

.row-employee-expense {
  background: rgba(245, 158, 11, 0.04);
}

.expenses-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.exp-mobile-meta {
  display: none;
}

.exp-desktop-col {
  display: table-cell;
}

.expense-form-card,
.expenses-list-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.25rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.form-input,
.form-select {
  width: 100%;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.95rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border-color);
}

.custom-table td {
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.custom-table tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.btn-delete-row {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--danger);
  cursor: pointer;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 800;
  transition: var(--transition-fast);
}

.btn-delete-row:hover {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: var(--danger);
}

.drawer-cuadre-card {
  background: linear-gradient(135deg, #140505 0%, #121216 100%);
  border: 1.5px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.drawer-cuadre-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.drawer-cuadre-title h2 {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-main);
}

.drawer-cuadre-title p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cash-target-box {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(52, 211, 153, 0.4);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  text-align: right;
}

.cash-target-box .target-label {
  font-size: 0.72rem;
  color: #a1a1aa;
  font-weight: 800;
  text-transform: uppercase;
}

.cash-target-box .target-value {
  font-size: 1.95rem;
  font-weight: 900;
  color: #34d399;
  text-shadow: 0 0 16px rgba(52, 211, 153, 0.35);
}

.formula-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.formula-item {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.formula-item .item-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
}

.formula-item .item-val {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-main);
  margin-top: 0.2rem;
}

.shift-action-bar {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-whatsapp {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 3px 10px rgba(34, 197, 94, 0.35);
}

.btn-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(34, 197, 94, 0.55);
}

.btn-close-shift {
  background: var(--primary-gradient);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.35rem;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 3px 12px rgba(220, 38, 38, 0.45);
}

.btn-close-shift:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(220, 38, 38, 0.65);
}

.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.stat-card:hover {
  border-color: rgba(220, 38, 38, 0.35);
  transform: translateY(-2px);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.stat-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-gold);
  line-height: 1.2;
  margin: 0.35rem 0 0.15rem 0;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.stat-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: #181822;
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xl);
  font-size: 0.88rem;
  font-weight: 800;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.toast-success { border-left: 4px solid #10b981; }
.toast.toast-warning { border-left: 4px solid var(--accent-gold); }
.toast.toast-danger { border-left: 4px solid var(--danger); }

@media (max-width: 768px) {
  .top-bar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "brand actions"
      "widget widget" !important;
    padding: 0.55rem 0.75rem !important;
    gap: 0.45rem !important;
    align-items: center !important;
  }

  .brand-section {
    grid-area: brand;
    gap: 0.55rem;
    min-width: 0;
  }

  .brand-logo-svg {
    width: 32px;
    height: 32px;
  }

  .brand-heading-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
  }

  .brand-title {
    font-size: 0.98rem !important;
    line-height: 1.15;
    white-space: nowrap;
  }

  .brand-slogan {
    font-size: 0.58rem !important;
    padding: 0.05rem 0.25rem !important;
    white-space: nowrap;
  }

  .shift-badge-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.05rem;
  }

  .brand-info .shift-badge {
    font-size: 0.65rem;
    margin-top: 0;
    white-space: nowrap;
  }

  .top-actions {
    grid-area: actions;
    align-self: center;
    justify-self: end;
    display: flex !important;
    flex-shrink: 0;
  }

  .top-shift-widget {
    grid-area: widget;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr auto auto !important;
    align-items: center !important;
    justify-items: center !important;
    padding: 0.45rem 0.75rem !important;
    gap: 0.4rem !important;
    border-radius: var(--radius-sm) !important;
    background: linear-gradient(135deg, rgba(28, 12, 12, 0.95) 0%, rgba(16, 16, 22, 0.98) 100%) !important;
    border: 1.2px solid rgba(220, 38, 38, 0.45) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6) !important;
  }

  .widget-pod {
    align-items: center;
    text-align: center;
  }

  .widget-pod .pod-lbl {
    font-size: 0.64rem !important;
    font-weight: 800;
    color: #94a3b8 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .widget-pod .pod-val {
    font-size: 1.08rem !important;
    font-weight: 900;
  }

  .widget-pod-divider {
    height: 22px;
  }

  .widget-mobile-action {
    font-size: 0.7rem !important;
    font-weight: 800;
    padding: 0.25rem 0.55rem !important;
    color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
  }

  .nav-tabs {
    padding: 0.35rem 0.5rem !important;
    gap: 0.35rem !important;
  }

  .tab-btn {
    padding: 0.45rem 0.65rem !important;
    font-size: 0.8rem !important;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .tab-btn .tab-icon {
    width: 15px;
    height: 15px;
  }

  .main-content {
    padding: 0.75rem 0.5rem 7.5rem 0.5rem !important;
  }
  .products-clean-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.35rem !important;
  }
  .cash-quick-buttons {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Gastos Móvil (390 x 844) */
  .employee-pay-card {
    padding: 1rem 0.9rem !important;
  }
  .emp-pay-config-row {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  .emp-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .emp-header-actions {
    width: 100% !important;
    justify-content: flex-end !important;
  }
  .emp-paid-item-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }
  .emp-paid-item-right {
    width: 100% !important;
    justify-content: space-between !important;
  }
  .expenses-container {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
  .expense-form-card,
  .expenses-list-card {
    padding: 0.85rem !important;
    border-radius: var(--radius-md) !important;
  }
  .exp-desktop-col {
    display: none !important;
  }
  .exp-mobile-meta {
    display: block !important;
  }

  /* Historial Móvil (390 x 844) */
  .history-tabs-pills {
    max-width: 100% !important;
  }
  .hist-view-tab-btn {
    font-size: 0.76rem !important;
    padding: 0.5rem 0.4rem !important;
  }
  .closed-shift-card {
    padding: 0.95rem !important;
  }
  .shift-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }
  .shift-card-header-right {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-start !important;
  }
  .shift-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
  .shift-metric-pod {
    padding: 0.55rem 0.65rem !important;
  }
  .shift-metric-pod .pod-val {
    font-size: 1.02rem !important;
  }
  .shift-card-actions-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.55rem !important;
    padding-top: 0.65rem !important;
  }
  .btn-shift-action {
    width: 100% !important;
    min-height: 42px !important;
    justify-content: center !important;
  }
  .btn-shift-action.btn-inspect-shift {
    grid-column: 1 / 2 !important;
  }
  .btn-shift-action.btn-recount-shift {
    grid-column: 2 / 3 !important;
  }
  .btn-shift-action.btn-whatsapp-shift {
    grid-column: 1 / 3 !important;
  }
  .hist-recap-grid {
    grid-template-columns: 1fr !important;
  }
  .unstarted-shift-warning-card {
    padding: 1.25rem 0.85rem !important;
  }

  /* ==========================================================================
     VENTAS MÓVIL: PANTALLA DE BLOQUEO CELULAR & MESAS OPTIMIZADAS SIN SCROLL
     ========================================================================== */
  
  /* 1. Barra de Mesas y Cobro Rápido Ultra-Optimizada */
  .accounts-master-header {
    padding: 0.5rem 0.65rem !important;
    margin-bottom: 0.55rem !important;
    border-radius: 14px !important;
    background: #111116 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
  }

  .accounts-header-top {
    margin-bottom: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    gap: 0.4rem !important;
  }

  .accounts-title-area {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.4rem !important;
  }

  .accounts-title-left {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100% !important;
    min-width: 0 !important;
  }

  .accounts-main-heading {
    font-size: 0.92rem !important;
    font-weight: 900 !important;
  }

  .open-accounts-summary-strip {
    font-size: 0.68rem !important;
    padding: 0.15rem 0.5rem !important;
    height: 38px !important;
    min-height: 38px !important;
    width: 174px !important;
    max-width: 174px !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  /* Los dos controles superiores deben verse como tarjetas compactas del mismo alto. */
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .btn-recent-orders {
    height: 38px !important;
    min-height: 38px !important;
    width: 92px !important;
    min-width: 92px !important;
    padding: 0 0.4rem !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  .btn-add-product-menu-top {
    height: 30px !important;
    padding: 0 0.65rem !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.45) !important;
    color: var(--accent-gold) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    transition: var(--transition-fast) !important;
  }

  .btn-add-product-menu-top:active {
    transform: scale(0.95) !important;
  }

  /* Ocultar botón duplicado grande de nueva mesa en móvil; ya está integrado en el carril */
  .btn-new-account {
    display: none !important;
  }

  .accounts-actions-zone {
    width: 100% !important;
  }

  /* Tarjeta de Factura en Móvil: Espaciosa, Nítida, en 2 Filas */
  .floating-cart-tab-btn {
    padding: 0.65rem 0.85rem !important;
    min-height: auto !important;
    border-radius: 14px !important;
    border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
    background: linear-gradient(135deg, #1c1c28 0%, #12121c 100%) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 16px rgba(245, 158, 11, 0.2) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
  }

  .floating-tab-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }

  .floating-tab-left {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  .floating-cart-icon {
    font-size: 1.25rem !important;
    flex-shrink: 0 !important;
  }

  .floating-acc-name {
    font-size: 0.98rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .floating-tab-right {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    flex-shrink: 0 !important;
  }

  .floating-price-block .price-val {
    font-size: 1.08rem !important;
    font-weight: 900 !important;
    color: #fbbf24 !important;
    font-family: monospace;
    letter-spacing: -0.02em;
    white-space: nowrap !important;
  }

  /* BOTÓN COBRAR TÁCTIL PARA EL PULGAR */
  .btn-floating-pay-direct {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 0.85rem !important;
    font-size: 0.88rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.02em !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 9px !important;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .btn-floating-pay-direct:active {
    transform: scale(0.94) !important;
  }

  .btn-floating-pay-direct:disabled {
    background: #27272a !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #71717a !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
  }

  /* Fila Inferior de Resumen: Ancho Completo en Móvil */
  .floating-tab-summary-row {
    width: 100% !important;
    padding-top: 0.35rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex !important;
    align-items: center !important;
  }

  .floating-items-summary-text {
    font-size: 0.82rem !important;
    color: #cbd5e1 !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    width: 100% !important;
  }

  /* Carril de Mesas en Móvil: Todas las tarjetas y el botón Nueva Mesa exactamente del mismo tamaño */
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .open-accounts-scroll {
    gap: 0.45rem !important;
    padding: 0.2rem 0 !important;
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    align-items: stretch !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip {
    width: 202px !important;
    min-width: 202px !important;
    max-width: 202px !important;
    min-height: 92px !important;
    height: 92px !important;
    box-sizing: border-box !important;
    align-self: stretch !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip-add-btn {
    width: 202px !important;
    min-width: 202px !important;
    max-width: 202px !important;
    min-height: 92px !important;
    height: 92px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    align-self: stretch !important;
    padding: 0.35rem 0.75rem !important;
    background: rgba(220, 38, 38, 0.12) !important;
    border: 1.5px dashed rgba(220, 38, 38, 0.55) !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    flex-shrink: 0 !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip-add-btn:active {
    transform: scale(0.95) !important;
  }

  /* 2. DISEÑO PANTALLA DE BLOQUEO CELULAR (PRODUCTOS GRANDES Y TÁCTILES) */
  .pos-column-section {
    padding: 0.5rem 0.6rem !important;
    border-radius: 14px !important;
    margin-bottom: 0.55rem !important;
  }

  .pos-column-header-compact {
    padding: 0.2rem 0.35rem 0.4rem 0.35rem !important;
  }

  .column-compact-title {
    font-size: 0.88rem !important;
  }

  /* Cuadr?cula Lockscreen M?vil: Comidas en 1 columna de impacto (estilo widgets de pantalla de bloqueo) */
  .comidas-section .products-lockscreen-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.55rem !important;
  }

  .bebidas-section .products-lockscreen-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.35rem !important;
  }

  /* TARJETA PANTALLA DE BLOQUEO (GRANDE, N?TIDA, T?CTIL) */
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card {
    height: auto !important;
    min-height: 82px !important;
    padding: 0.75rem 0.95rem !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #181822 0%, #12121a 100%) !important;
    border: 1.8px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    position: relative !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: transform 0.12s ease, border-color 0.15s ease !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card:active {
    transform: scale(0.97) !important;
  }

  /* Bordes de Acento Caracter?sticos para Reconocimiento Instant?neo en Pantalla Encendida */
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card[data-category="chorizos"] {
    border-left: 4.5px solid #ef4444 !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card[data-category="carnes"] {
    border-left: 4.5px solid #f59e0b !important;
  }

  /* Bebidas Fr?as: Cuadraditos m?s peque?os y compactos para celulares */
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card[data-category="bebidas"],
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card {
    border-left: 3.5px solid #3b82f6 !important;
    min-height: 56px !important;
    height: auto !important;
    padding: 0.42rem 0.52rem !important;
    border-radius: 11px !important;
    gap: 0.3rem !important;
  }

  /* Tarjeta con producto a?adido a la mesa */
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card.in-cart {
    border-color: #10b981 !important;
    background: linear-gradient(135deg, rgba(16, 55, 35, 0.9) 0%, rgba(14, 28, 20, 0.98) 100%) !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.28), 0 4px 14px rgba(0, 0, 0, 0.6) !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card .product-card-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  /* Nombre de Producto Grande y Destacado */
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card .product-clean-name {
    font-size: 1.12rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    letter-spacing: -0.01em !important;
    line-height: 1.2 !important;
    white-space: normal !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .product-card-top {
    gap: 0.25rem !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .product-clean-name {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card .btn-edit-prod-link {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #a1a1aa !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .btn-edit-prod-link {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border-radius: 6px !important;
    padding: 0 !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .btn-edit-prod-link svg {
    width: 12px !important;
    height: 12px !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card .product-card-bottom {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-card-bottom {
    gap: 0.25rem !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .product-price-wrap {
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }

  /* Precio Grande en Oro Radiante */
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card .product-clean-price {
    font-size: 1.28rem !important;
    font-weight: 900 !important;
    color: #fbbf24 !important;
    letter-spacing: -0.01em !important;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3) !important;
    line-height: 1 !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .product-clean-price {
    font-size: 0.88rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
    letter-spacing: -0.01em !important;
    line-height: 1 !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card .product-card-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .product-card-actions {
    gap: 0.2rem !important;
    flex-shrink: 0 !important;
  }

  /* BOTONES GRANDES PARA LOS DEDOS (+ y -) */
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card .btn-prod-qty-minus,
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card .btn-prod-qty-plus {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    border-radius: 12px !important;
    font-size: 1.45rem !important;
    font-weight: 900 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45) !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .btn-prod-qty-minus,
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .btn-prod-qty-plus {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
    font-size: 1.15rem !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card .btn-prod-qty-minus {
    background: #27272a !important;
    border: 1.5px solid rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card .btn-prod-qty-minus:active {
    background: #dc2626 !important;
    color: #ffffff !important;
    transform: scale(0.92) !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card .btn-prod-qty-plus {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4) !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card .btn-prod-qty-plus:active {
    transform: scale(0.92) !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card .prod-qty-badge {
    min-width: 34px !important;
    height: 34px !important;
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    border-radius: 9px !important;
    background: rgba(16, 185, 129, 0.25) !important;
    border: 1.5px solid #10b981 !important;
    color: #34d399 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .prod-qty-badge {
    min-width: 24px !important;
    height: 26px !important;
    font-size: 0.86rem !important;
    border-radius: 6px !important;
    padding: 0 0.2rem !important;
  }

  /* Ajuste ultra-compacto para celulares peque?os (380px o menos, ej. Tecno KL4) */
  @media (max-width: 380px) {
    body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .products-lockscreen-grid {
      gap: 0.28rem !important;
    }
    body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .product-lockscreen-card[data-category="bebidas"],
    body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card {
      padding: 0.38rem 0.44rem !important;
      min-height: 52px !important;
    }
    body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .product-clean-name {
      font-size: 0.78rem !important;
    }
    body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .product-clean-price {
      font-size: 0.82rem !important;
    }
    body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .btn-prod-qty-minus,
    body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .btn-prod-qty-plus {
      width: 29px !important;
      height: 29px !important;
      min-width: 29px !important;
      min-height: 29px !important;
      font-size: 1.05rem !important;
      border-radius: 7px !important;
    }
    body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .bebidas-section .product-lockscreen-card .prod-qty-badge {
      min-width: 21px !important;
      height: 24px !important;
      font-size: 0.8rem !important;
    }
  }

  /* Modo Claro para Pantalla de Bloqueo Celular */
  body:not(.dark-mode):not(.app-redesign[data-active-tab="pos"]) .product-lockscreen-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
  }
  body:not(.dark-mode):not(.app-redesign[data-active-tab="pos"]) .product-lockscreen-card .product-clean-name {
    color: #111827 !important;
  }
  body:not(.dark-mode):not(.app-redesign[data-active-tab="pos"]) .product-lockscreen-card .product-clean-price {
    color: #b45309 !important;
  }
  body:not(.dark-mode) .accounts-master-header {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
  }
  body:not(.dark-mode) .floating-cart-tab-btn {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
  }
}

/* VERSIÓN DE ESCRITORIO / COMPUTADORA: Ocultar el chip duplicado "+ Mesa" al lado de las mesas */
@media (min-width: 769px) {
  .account-chip-add-btn {
    display: none !important;
  }
}

@media (max-width: 400px) {
  .top-shift-widget {
    padding: 0.35rem 0.45rem !important;
    gap: 0.25rem !important;
  }
  .widget-pod .pod-lbl {
    font-size: 0.6rem !important;
  }
  .widget-pod .pod-val {
    font-size: 0.95rem !important;
  }
  .widget-mobile-action {
    font-size: 0.62rem !important;
    padding: 0.2rem 0.35rem !important;
  }
}

/* Modal de Recuento y Cierre de Turno */
.shift-recap-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  background: linear-gradient(135deg, #180808 0%, #121218 100%);
  border: 1.5px solid rgba(220, 38, 38, 0.35);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  color: white;
}

@media (max-width: 500px) {
  .shift-recap-banner {
    grid-template-columns: 1fr;
  }
}

.recap-stat-box {
  display: flex;
  flex-direction: column;
}

.recap-stat-box .lbl {
  font-size: 0.74rem;
  color: #a1a1aa;
  font-weight: 800;
  text-transform: uppercase;
}

.recap-stat-box .val {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.2;
}

.recap-stat-box .val.sales {
  color: var(--text-gold);
}

.recap-stat-box .val.cash {
  color: #34d399;
}

.recap-stat-box .sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.shift-recap-section {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.15rem;
}

.recap-section-title {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.recap-products-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.recount-product-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background-color: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
}

.recount-p-stats {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.recount-p-qty {
  font-weight: 900;
  color: var(--primary);
}

.recount-p-money {
  font-weight: 800;
  color: var(--text-gold);
}

.recount-missing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.84rem;
  background-color: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 0.35rem;
}

.btn-whatsapp-share {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.35);
}

.btn-whatsapp-share:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.55);
}

/* ==========================================================================
   PESTAÑA DE AJUSTES Y CONFIGURACIÓN (MATERIAL ELEVATION)
   ========================================================================== */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 860px) {
  .config-grid {
    grid-template-columns: 1fr;
  }
}

.config-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.config-card h3 {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px solid var(--border-color);
}

.config-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.15rem;
  line-height: 1.45;
}

/* ==========================================================================
   REGLAS EXHAUSTIVAS DE ALTO CONTRASTE PARA MODO CLARO (TEXTOS EN NEGRO)
   ========================================================================== */
body:not(.dark-mode) {
  /* Fondo general */
  background-color: #f3f4f6;
  color: #111827;
}

/* Encabezados y títulos principales */
body:not(.dark-mode) .section-title,
body:not(.dark-mode) .accounts-main-heading h2,
body:not(.dark-mode) .cart-account-title,
body:not(.dark-mode) .folder-title,
body:not(.dark-mode) .drawer-cuadre-title h2,
body:not(.dark-mode) .recap-section-title,
body:not(.dark-mode) .config-card h3 {
  color: #111827 !important;
}

/* Textos secundarios y descripciones */
body:not(.dark-mode) .section-subtitle,
body:not(.dark-mode) .accounts-main-heading p,
body:not(.dark-mode) .cart-item-desc,
body:not(.dark-mode) .folder-subtitle,
body:not(.dark-mode) .drawer-cuadre-title p,
body:not(.dark-mode) .stat-subtitle,
body:not(.dark-mode) .config-card p {
  color: #4b5563 !important;
}

/* Tarjetas de Producto en Modo Claro */
body:not(.dark-mode) .product-clean-card {
  background-color: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

body:not(.dark-mode) .product-clean-card:hover {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09), 0 0 10px rgba(220, 38, 38, 0.15);
}

body:not(.dark-mode) .product-clean-name {
  color: #111827 !important;
  font-weight: 900;
}

body:not(.dark-mode) .product-clean-desc {
  color: #4b5563 !important;
  font-weight: 500;
}

body:not(.dark-mode) .product-price-box .price-val {
  color: #b45309 !important;
  text-shadow: none;
}

body:not(.dark-mode) .product-price-box .price-prefix {
  color: #78350f !important;
}

/* Barra de Cuentas y Mesas */
body:not(.dark-mode) .accounts-master-header {
  background-color: #ffffff;
  border-color: #e5e7eb;
}

body:not(.dark-mode) .accounts-summary-indicator {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #374151;
}

body:not(.dark-mode) .account-chip {
  background-color: #ffffff;
  border-color: #d1d5db;
}

body:not(.dark-mode) .account-chip:hover {
  background-color: #f3f4f6;
  border-color: #9ca3af;
}

body:not(.dark-mode) .account-chip-title {
  color: #111827 !important;
}

body:not(.dark-mode) .account-chip-items {
  color: #4b5563 !important;
}

body:not(.dark-mode) .account-chip.active {
  background: #fff1f2;
  border-color: #dc2626;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.2);
}

/* Comanda / Carrito */
body:not(.dark-mode) .order-cart-panel {
  background-color: #ffffff;
  border-color: #e5e7eb;
}

body:not(.dark-mode) .cart-mode-selector {
  background-color: #f3f4f6;
}

body:not(.dark-mode) .cart-mode-btn {
  background-color: #ffffff;
  color: #374151;
  border-color: #d1d5db;
}

body:not(.dark-mode) .cart-mode-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
}

body:not(.dark-mode) .cart-item {
  background-color: #f9fafb;
  border-color: #e5e7eb;
}

body:not(.dark-mode) .cart-item-name {
  color: #111827 !important;
}

body:not(.dark-mode) .cart-item-price {
  color: #b45309 !important;
}

body:not(.dark-mode) .cart-summary {
  background-color: #f9fafb;
  border-top-color: #e5e7eb;
}

body:not(.dark-mode) .summary-row {
  color: #374151;
}

body:not(.dark-mode) .summary-total {
  color: #111827 !important;
}

body:not(.dark-mode) .summary-total .total-amount {
  color: #b45309 !important;
  text-shadow: none;
}

/* Insumos & Carpetas */
body:not(.dark-mode) .inventory-folder-section {
  background-color: #ffffff;
  border-color: #e5e7eb;
}

body:not(.dark-mode) .folder-tab-btn {
  background-color: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}

body:not(.dark-mode) .folder-tab-btn:hover {
  background-color: #f3f4f6;
  color: #111827;
}

body:not(.dark-mode) .folder-tab-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
}

body:not(.dark-mode) .inventory-card {
  background-color: #f9fafb;
  border-color: #e5e7eb;
}

body:not(.dark-mode) .inv-name {
  color: #111827 !important;
}

body:not(.dark-mode) .inv-count {
  color: #111827 !important;
}

body:not(.dark-mode) .inv-unit {
  color: #4b5563 !important;
}

body:not(.dark-mode) .btn-restock-quick {
  background-color: #ffffff;
  color: #111827;
  border-color: #d1d5db;
}

/* Banner de Compras */
body:not(.dark-mode) .inventory-status-banner.banner-alert {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

body:not(.dark-mode) .inventory-status-banner.banner-alert strong {
  color: #78350f;
}

body:not(.dark-mode) .inventory-status-banner.banner-ok {
  background: #f0fdf4;
  border-color: #10b981;
  color: #166534;
}

/* Tablas en Gastos y Arqueo */
body:not(.dark-mode) .expense-form-card,
body:not(.dark-mode) .expenses-list-card {
  background-color: #ffffff;
  border-color: #e5e7eb;
}

body:not(.dark-mode) .custom-table th {
  background-color: #f9fafb;
  color: #1f2937 !important;
  border-bottom-color: #e5e7eb;
}

body:not(.dark-mode) .custom-table td {
  color: #111827 !important;
  border-bottom-color: #e5e7eb;
}

body:not(.dark-mode) .custom-table tr:hover {
  background-color: #f9fafb;
}

body:not(.dark-mode) .form-label {
  color: #374151 !important;
}

body:not(.dark-mode) .form-input,
body:not(.dark-mode) .form-select {
  background-color: #ffffff;
  color: #111827 !important;
  border-color: #d1d5db;
}

/* Arqueo y Cuadre de Caja */
body:not(.dark-mode) .drawer-cuadre-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border-color: rgba(220, 38, 38, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

body:not(.dark-mode) .cash-target-box {
  background-color: #ecfdf5;
  border-color: #10b981;
}

body:not(.dark-mode) .cash-target-box .target-label {
  color: #065f46 !important;
}

body:not(.dark-mode) .cash-target-box .target-value {
  color: #047857 !important;
  text-shadow: none;
}

body:not(.dark-mode) .formula-item {
  background-color: #ffffff;
  border-color: #e5e7eb;
}

body:not(.dark-mode) .formula-item .item-lbl {
  color: #4b5563 !important;
}

body:not(.dark-mode) .formula-item .item-val {
  color: #111827 !important;
}

body:not(.dark-mode) .stat-card {
  background-color: #ffffff;
  border-color: #e5e7eb;
}

body:not(.dark-mode) .stat-title {
  color: #4b5563 !important;
}

body:not(.dark-mode) .stat-value {
  color: #b45309 !important;
  text-shadow: none;
}

/* Modales en Modo Claro */
body:not(.dark-mode) .modal-card {
  background-color: #ffffff;
  border-color: #d1d5db;
  color: #111827;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

body:not(.dark-mode) .modal-header {
  background-color: #f9fafb;
  border-bottom-color: #e5e7eb;
}

body:not(.dark-mode) .modal-title {
  color: #111827 !important;
}

body:not(.dark-mode) .modal-footer {
  background-color: #f9fafb;
  border-top-color: #e5e7eb;
}

body:not(.dark-mode) .btn-close-modal {
  color: #6b7280;
}

body:not(.dark-mode) .btn-close-modal:hover {
  color: #dc2626;
  background-color: #fee2e2;
}

body:not(.dark-mode) .checkout-banner {
  background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
  border-color: rgba(220, 38, 38, 0.3);
}

body:not(.dark-mode) .checkout-banner .label {
  color: #7f1d1d !important;
}

body:not(.dark-mode) .checkout-banner .total-display {
  color: #b45309 !important;
  text-shadow: none;
}

body:not(.dark-mode) .checkout-banner .items-summary {
  color: #4b5563 !important;
}

body:not(.dark-mode) .method-choice-btn {
  background-color: #f9fafb;
  border-color: #d1d5db;
  color: #111827 !important;
}

body:not(.dark-mode) .btn-bill {
  background-color: #f9fafb;
  border-color: #d1d5db;
  color: #111827 !important;
}

body:not(.dark-mode) .btn-bill:hover {
  background-color: #fff7ed;
  border-color: #f59e0b;
  color: #b45309 !important;
}

body:not(.dark-mode) .btn-bill-exact {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8 !important;
}

body:not(.dark-mode) .input-received-cash {
  background-color: #ffffff;
  color: #111827 !important;
  border-color: #d1d5db;
}

body:not(.dark-mode) .change-result-box.change-ok {
  background-color: #ecfdf5;
  border-color: #10b981;
  color: #047857 !important;
}

body:not(.dark-mode) .change-result-box.change-deficit {
  background-color: #fef2f2;
  border-color: #ef4444;
  color: #b91c1c !important;
}

body:not(.dark-mode) .btn-quick-mesa {
  background-color: #f9fafb;
  color: #111827 !important;
  border-color: #d1d5db;
}

body:not(.dark-mode) .btn-quick-mesa:hover {
  background-color: #fff1f2;
  border-color: #dc2626;
  color: #dc2626 !important;
}

body:not(.dark-mode) .shift-recap-banner {
  background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
  border-color: rgba(220, 38, 38, 0.3);
  color: #111827 !important;
}

body:not(.dark-mode) .recap-stat-box .lbl {
  color: #4b5563 !important;
}

body:not(.dark-mode) .recap-stat-box .val.sales {
  color: #b45309 !important;
}

body:not(.dark-mode) .recap-stat-box .val.cash {
  color: #047857 !important;
}

body:not(.dark-mode) .shift-recap-section {
  background-color: #f9fafb;
  border-color: #e5e7eb;
}

body:not(.dark-mode) .recount-product-row {
  background-color: #ffffff;
  border-color: #e5e7eb;
  color: #111827 !important;
}

body:not(.dark-mode) .recount-missing-row {
  background-color: #ffffff;
  border-color: #e5e7eb;
  color: #111827 !important;
}

body:not(.dark-mode) .recount-p-money {
  color: #b45309 !important;
}

/* Pestaña Flotante y Popover en Modo Claro */
body:not(.dark-mode) .floating-cart-tab-btn {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body:not(.dark-mode) .floating-cart-tab-btn:hover {
  border-color: var(--primary);
  background-color: #f9fafb;
}

body:not(.dark-mode) .floating-acc-name {
  color: #111827 !important;
}

body:not(.dark-mode) .floating-items-count {
  color: #4b5563 !important;
}

body:not(.dark-mode) .floating-tab-price {
  color: #b45309 !important;
}

body:not(.dark-mode) .floating-cart-popover {
  background-color: #ffffff;
  border-color: #d1d5db;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

body:not(.dark-mode) .floating-popover-header {
  background-color: #f9fafb;
  border-color: #e5e7eb;
}

body:not(.dark-mode) .floating-popover-title {
  color: #111827 !important;
}

body:not(.dark-mode) .floating-popover-footer {
  background-color: #f9fafb;
  border-color: #e5e7eb;
}

body:not(.dark-mode) .floating-footer-total-row .total-amount {
  color: #b45309 !important;
}

/* Modal de Cobro Compacto en Modo Claro */
body:not(.dark-mode) .checkout-modal-compact {
  background-color: #ffffff;
  border-color: #d1d5db;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

body:not(.dark-mode) .compact-modal-header {
  background-color: #f9fafb;
  border-color: #e5e7eb;
}

body:not(.dark-mode) .checkout-banner-compact {
  background: linear-gradient(135deg, #fef2f2 0%, #fffbeb 100%);
  border-color: rgba(220, 38, 38, 0.25);
}

body:not(.dark-mode) .banner-compact-lbl {
  color: #4b5563 !important;
}

body:not(.dark-mode) .banner-compact-sub {
  color: #6b7280 !important;
}

body:not(.dark-mode) .banner-compact-val {
  color: #b45309 !important;
}

body:not(.dark-mode) .method-compact-btn {
  background-color: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

body:not(.dark-mode) .btn-bill-compact {
  background-color: #f9fafb;
  border-color: #d1d5db;
  color: #111827 !important;
}

body:not(.dark-mode) .btn-bill-compact.btn-bill-exact {
  background-color: #fef3c7;
  border-color: #f59e0b;
  color: #92400e !important;
}

body:not(.dark-mode) .input-received-compact {
  background-color: #ffffff;
  border-color: #d1d5db;
  color: #111827 !important;
}

body:not(.dark-mode) .compact-field-lbl {
  color: #374151 !important;
}

body:not(.dark-mode) .change-box-compact.change-ok {
  background-color: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46 !important;
}

body:not(.dark-mode) .change-box-compact.change-deficit {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #991b1b !important;
}

body:not(.dark-mode) .form-input-compact {
  background-color: #ffffff;
  border-color: #d1d5db;
  color: #111827 !important;
}

body:not(.dark-mode) .compact-modal-footer {
  background-color: #f9fafb;
  border-color: #e5e7eb;
}

/* ==========================================================================
   VENTANA EMERGENTE: RESUMEN DE VENTAS Y CAJA DEL TURNO (MODAL)
   ========================================================================== */
.shift-summary-modal-card {
  max-width: 520px;
  width: 95%;
  background: #18181b !important;
  border: 1px solid #27272a !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75) !important;
}

.shift-modal-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.shift-modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.shift-summary-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0.95rem;
  max-height: 72vh;
  overflow-y: auto;
}

/* 1. Tarjeta de Base de Caja del Día (Unificada) */
.shift-base-card {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.shift-base-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.shift-base-label-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: #f4f4f5;
}

.shift-base-label-wrap .base-icon {
  font-size: 1.2rem;
}

.shift-base-current-pill {
  font-size: 0.76rem;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
}

.shift-base-form-unified {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.shift-base-input-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.shift-base-input-wrap .prefix {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 1rem;
  pointer-events: none;
}

.form-input.shift-base-input,
.shift-base-input {
  width: 100%;
  padding-left: 2.8rem !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  height: 38px;
}

.btn-save-base-wide {
  width: 100%;
  height: 38px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0 1rem;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.btn-save-base-wide:hover {
  background: #ef4444;
}

/* 2. Resumen Financiero en Grid (Achicado y Ultra-Compacto) */
.shift-financial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.shift-stat-box {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.shift-stat-box.box-drawer-cash {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(18, 24, 20, 0.9) 100%);
  border-color: rgba(16, 185, 129, 0.45);
}

.shift-stat-box .stat-box-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.shift-stat-box .stat-box-val {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap !important;
}

.shift-stat-box .val-drawer {
  color: #34d399;
  text-shadow: 0 0 14px rgba(52, 211, 153, 0.3);
}

.shift-stat-box .val-sales {
  color: var(--text-gold);
}

.shift-stat-box .val-expenses {
  color: #f87171;
}

.shift-stat-box .stat-box-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.05rem;
}

.stat-box-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.stat-box-pills .pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-full);
}

.stat-box-pills .pill-cash {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-box-pills .pill-nequi {
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.stat-box-pills .pill-count {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* 3. Sección de Qué se ha Vendido */
.shift-products-section {
  background-color: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.shift-section-heading {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--text-main);
  margin: 0;
}

.section-heading-tag {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.shift-products-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.summary-product-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.summary-product-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.summary-product-item.is-takeout-packaging {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.3);
}

.summary-prod-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

.summary-prod-stats {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.summary-prod-qty {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
}

.summary-prod-money {
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--text-gold);
}

.empty-recount-box {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Pie de los modales de turno (Organizados 50/50 lado a lado) */
.shift-summary-footer,
.close-shift-footer {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.5rem !important;
  padding: 0.65rem 0.85rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.shift-summary-footer .btn-whatsapp-share,
.close-shift-footer .btn-whatsapp-share {
  width: 100% !important;
  min-width: 0 !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 78, 59, 0.5)) !important;
  border: 1.2px solid rgba(16, 185, 129, 0.5) !important;
  color: #34d399 !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  padding: 0 0.4rem !important;
  white-space: nowrap !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.shift-summary-footer .btn-whatsapp-share:hover,
.close-shift-footer .btn-whatsapp-share:hover {
  background: #059669 !important;
  color: #ffffff !important;
}

.shift-summary-footer .btn-close-shift-action,
.close-shift-footer .btn-close-shift {
  width: 100% !important;
  min-width: 0 !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(127, 29, 29, 0.5)) !important;
  border: 1.2px solid rgba(239, 68, 68, 0.5) !important;
  color: #fca5a5 !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  padding: 0 0.4rem !important;
  white-space: nowrap !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.shift-summary-footer .btn-close-shift-action:hover,
.close-shift-footer .btn-close-shift:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
}

/* Modo claro overrides para shiftSummaryModal */
body:not(.dark-mode) .shift-summary-modal-card {
  background: #ffffff;
  border-color: #cbd5e1;
}

body:not(.dark-mode) .shift-base-card {
  background: #f8fafc;
  border-color: #f59e0b;
}

body:not(.dark-mode) .shift-stat-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body:not(.dark-mode) .shift-stat-box.box-drawer-cash {
  background: #ecfdf5;
  border-color: #10b981;
}

body:not(.dark-mode) .shift-products-section {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body:not(.dark-mode) .summary-product-item {
  background: #ffffff;
  border-color: #e2e8f0;
}

/* ==========================================================================
   HISTORIAL: SELECTOR DE VISTAS (TURNOS CERRADOS vs VENTAS POR FECHA)
   ========================================================================== */
.history-view-switcher-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.25rem;
  width: 100%;
}

.history-tabs-pills {
  display: inline-flex;
  background: var(--bg-card-elevated);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 4px;
  width: 100%;
  max-width: 520px;
}

.hist-view-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
  white-space: nowrap;
  user-select: none;
}

.hist-view-tab-btn:hover {
  color: #ffffff;
}

.hist-view-tab-btn.active {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.4);
}

/* ==========================================================================
   VISTA 1: TURNOS LABORALES CERRADOS (HISTORIAL DE ARQUEOS Y CAJA NEGRA)
   ========================================================================== */
.empty-shifts-box {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-lg);
  margin: 1.5rem auto;
  max-width: 600px;
}

.closed-shifts-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.closed-shift-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.closed-shift-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.shift-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.85rem;
}

.shift-card-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.shift-flag-icon {
  font-size: 1.4rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.shift-card-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 0.15rem 0;
  letter-spacing: -0.01em;
}

.shift-card-timeline {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.shift-card-timeline strong {
  color: var(--text-main);
}

.shift-card-header-right {
  flex-shrink: 0;
}

.shift-cuadre-tag {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.01em;
}

.shift-cuadre-tag.tag-exact {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.shift-cuadre-tag.tag-surplus {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.shift-cuadre-tag.tag-deficit {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.shift-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.95rem;
}

.shift-metric-pod {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.shift-metric-pod .pod-lbl {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.shift-metric-pod .pod-val {
  font-size: 1.15rem;
  font-weight: 900;
  margin-top: 0.1rem;
  line-height: 1.2;
}

.shift-metric-pod .pod-val.val-sales {
  color: #fbbf24;
}

.shift-metric-pod .pod-val.val-expenses {
  color: #f87171;
}

.shift-metric-pod .pod-val.val-profit {
  color: #34d399;
}

.shift-metric-pod .pod-val.val-drawer {
  color: #60a5fa;
}

.shift-metric-pod .pod-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift-card-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  padding-top: 0.75rem;
  margin-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  align-items: stretch;
}

.btn-shift-action {
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-shift-action.btn-inspect-shift {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
}

.btn-shift-action.btn-inspect-shift:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn-shift-action.btn-recount-shift {
  background: rgba(234, 179, 8, 0.12);
  color: #fbbf24;
  border: 1.5px solid rgba(234, 179, 8, 0.4);
}

.btn-shift-action.btn-recount-shift:hover {
  background: rgba(234, 179, 8, 0.22);
  border-color: #fbbf24;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-shift-action.btn-recount-shift.has-recount {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.45);
}

.btn-shift-action.btn-recount-shift.has-recount:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: #ffffff;
}

.btn-shift-action.btn-whatsapp-shift {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  border: 1px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.btn-shift-action.btn-whatsapp-shift:hover {
  filter: brightness(1.12);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.45);
  transform: translateY(-1px);
}

/* ==========================================================================
   ALERTA PREVENTIVA: TURNO AÚN NO INICIADO (PROTECCIÓN ANTI-CIERRE ACCIDENTAL)
   ========================================================================== */
.unstarted-shift-warning-card {
  background: linear-gradient(135deg, rgba(30, 27, 24, 0.96) 0%, rgba(20, 18, 16, 0.98) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.25rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.unstarted-shift-warning-card .warning-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.unstarted-shift-warning-card .warning-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: #fbbf24;
  margin: 0 0 0.5rem 0;
}

.unstarted-shift-warning-card .warning-desc {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.5;
  margin: 0 auto 1.15rem auto;
  max-width: 460px;
}

.last-shift-summary-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin: 0 auto 1.35rem auto;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
}

.last-shift-summary-pill .pill-lbl {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 800;
}

.last-shift-summary-pill .pill-val {
  font-size: 0.92rem;
  color: #ffffff;
  font-weight: 900;
}

.warning-actions-box {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 380px;
  margin: 0 auto;
}

/* ==========================================================================
   MODAL: DETALLE COMPLETO DE TURNO HISTÓRICO ("TODO LO QUE PASÓ")
   ========================================================================== */
.shift-detail-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: 1.15rem;
}

.shift-detail-block-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: #fbbf24;
  margin: 0 0 0.85rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hist-recap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.6rem;
}

.hist-recap-item {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hist-p-name {
  font-size: 0.85rem;
  color: #ffffff;
}

.hist-p-values {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
}

.hist-p-qty {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-muted);
}

.hist-p-money {
  font-size: 0.88rem;
  font-weight: 900;
  color: #fbbf24;
}

/* ==========================================================================
   VISTA 2: VENTAS POR FECHA (CALENDARIO COMPACTO Y COMANDAS DETALLADAS)
   ========================================================================== */
.hist-compact-layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 800px;
  margin: 0 auto;
}

.hist-date-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.hist-date-chips-scroll {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.hist-date-chips-scroll::-webkit-scrollbar {
  display: none;
}

.hist-date-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.hist-date-pill:hover,
.hist-date-pill.active {
  background: var(--primary-gradient);
  border-color: rgba(220, 38, 38, 0.6);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.hist-chip-money {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: middle;
}

.hist-date-pill.active .hist-chip-money {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.hist-datepicker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.hist-date-native-input {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  color: #ffffff;
  padding: 0.35rem 0.65rem 0.35rem 2.1rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.hist-cal-icon {
  position: absolute;
  left: 0.65rem;
  pointer-events: none;
  font-size: 0.85rem;
}

.hist-pay-tabs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.hist-pay-tab {
  background: var(--bg-card-elevated);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.35rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  user-select: none;
}

.hist-pay-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
}

.hist-pay-tab.active {
  background: linear-gradient(135deg, rgba(35, 14, 14, 0.95) 0%, rgba(20, 10, 10, 0.98) 100%);
  border-color: var(--accent-gold);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

.hist-pay-title {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.hist-pay-val {
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.15;
}

.hist-pay-val.total-val {
  color: var(--text-gold);
}

.hist-pay-val.cash-val {
  color: #34d399;
}

.hist-pay-val.nequi-val {
  color: #c084fc;
}

.hist-pay-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 700;
}

.hist-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.hist-sales-feed {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hist-sale-item {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.hist-sale-item:hover {
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}

.hist-sale-item.is-debt-row {
  border-left: 3.5px solid #f59e0b;
}

.hist-expense-item {
  border-left: 3.5px solid #ef4444;
  cursor: default;
}

.hist-expense-item:hover {
  border-color: #ef4444;
}

.hist-sale-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.hist-sale-headline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.hist-sale-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
}

.hist-mode-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.08rem 0.35rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.hist-mode-pill.mode-llevar {
  background: rgba(245, 158, 11, 0.18);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.hist-mode-pill.mode-mesa {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hist-sale-acc-name {
  font-size: 0.88rem;
  font-weight: 900;
  color: #ffffff;
}

.hist-order-pill {
  font-size: 0.64rem;
  font-weight: 900;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  color: #ffd58b;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.38);
  white-space: nowrap;
}

.hist-sale-badge {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.hist-badge-cash {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.hist-badge-nequi {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.hist-badge-debt {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.hist-badge-split {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.hist-sale-items-snippet {
  font-size: 0.74rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hist-sale-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.hist-sale-total {
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--text-gold);
}

.hist-expense-total {
  color: #f87171 !important;
}

.hist-arrow-glyph {
  color: var(--text-muted);
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-hist-del-sale {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  border-radius: 6px;
  padding: 0.25rem 0.45rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.btn-hist-del-sale:hover,
.btn-hist-del-sale:active {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  transform: scale(1.08);
}

/* Light mode overrides for history */
body:not(.dark-mode) .closed-shift-card,
body:not(.dark-mode) .shift-detail-block,
body:not(.dark-mode) .hist-sale-item {
  background: #ffffff;
  border-color: #e2e8f0;
}

body:not(.dark-mode) .shift-card-title,
body:not(.dark-mode) .hist-sale-acc-name,
body:not(.dark-mode) .last-shift-summary-pill .pill-val {
  color: #0f172a;
}

body:not(.dark-mode) .shift-metric-pod,
body:not(.dark-mode) .hist-recap-item,
body:not(.dark-mode) .history-tabs-pills {
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* Indicador de sincronización en la barra superior (Bloqueado offline / Activo en subida) */
.top-sync-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: 20px;
  background: rgba(100, 116, 139, 0.16);
  border: 1.2px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.top-sync-status-pill.status-blocked,
.top-sync-status-pill.is-blocked {
  background: rgba(100, 116, 139, 0.16) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
}

.top-sync-status-pill.status-blocked:active,
.top-sync-status-pill.is-blocked:active {
  transform: scale(0.97);
  background: rgba(100, 116, 139, 0.24) !important;
}

.top-sync-status-pill.status-online {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #34d399 !important;
  cursor: pointer !important;
}

.top-sync-status-pill.status-online:active {
  transform: scale(0.95);
}

.top-sync-status-pill .sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.top-sync-status-pill .sync-dot.status-online {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseSyncDot 2s infinite ease-in-out;
}

.top-sync-status-pill .sync-dot.status-blocked,
.top-sync-status-pill .sync-dot.status-offline {
  background: #64748b;
  box-shadow: none;
}

.top-sync-status-pill .sync-text {
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
}

body:not(.dark-mode) .top-sync-status-pill.status-blocked,
body:not(.dark-mode) .top-sync-status-pill.is-blocked {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
}

body:not(.dark-mode) .top-sync-status-pill.status-online {
  background: #ecfdf5 !important;
  border-color: #6ee7b7 !important;
  color: #059669 !important;
}

.sync-status-dot {
  width: 8px;
  height: 8px;
  background: #64748b;
  border-radius: 50%;
}

@keyframes pulseSyncDot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 8px #10b981;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.75;
    box-shadow: 0 0 12px #34d399;
  }
}

/* ==========================================================================
   CUADRADITOS PEQUEÑOS DE TURNOS LABORALES (VISTA HISTORIAL)
   ========================================================================== */

.shifts-squares-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.65rem;
  padding: 0.4rem 0 1rem 0;
}

@media (max-width: 480px) {
  .shifts-squares-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

.shift-square-card {
  min-height: 110px;
  aspect-ratio: 1.1 / 1;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a1a26 0%, #13131c 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 0.75rem 0.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.shift-square-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 10px rgba(245, 158, 11, 0.15);
}

.shift-square-card:active {
  transform: scale(0.94);
  border-color: #f59e0b;
}

.sq-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  width: 100%;
}

.sq-day-badge {
  font-size: 0.76rem;
  font-weight: 900;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.12rem 0.42rem;
  border-radius: 6px;
  letter-spacing: 0.01em;
}

.sq-cuadre-chip {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  white-space: nowrap;
}

.sq-cuadre-chip.exact {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.sq-cuadre-chip.surplus {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.sq-cuadre-chip.deficit {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.sq-card-mid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  margin: 0.2rem 0;
}

.sq-date-sub {
  font-size: 0.68rem;
  color: #a1a1aa;
  font-weight: 700;
  line-height: 1.1;
}

.sq-sales-val {
  font-size: 1rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.sq-card-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sq-sales-count {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 700;
}

.sq-open-btn {
  font-size: 0.68rem;
  font-weight: 800;
  color: #fbbf24;
  opacity: 0.85;
}

/* Modo Claro para Cuadraditos de Turnos */
body:not(.dark-mode) .shift-square-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06) !important;
}

body:not(.dark-mode) .sq-day-badge {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}

body:not(.dark-mode) .sq-date-sub {
  color: #64748b !important;
}

body:not(.dark-mode) .sq-sales-val {
  color: #b45309 !important;
}

body:not(.dark-mode) .sq-card-bot {
  border-top-color: #f1f5f9 !important;
}

body:not(.dark-mode) .sq-sales-count {
  color: #64748b !important;
}

body:not(.dark-mode) .sq-open-btn {
  color: #b45309 !important;
}

/* ==========================================================================
   BANNER FLOTANTE DE ACTUALIZACIÓN DE APP
   ========================================================================== */
.app-update-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border-bottom: 2px solid #6366f1;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85), 0 0 25px rgba(99, 102, 241, 0.4);
  padding: 0.65rem 1rem;
  animation: slideDownUpdateBanner 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownUpdateBanner {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.update-banner-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.update-banner-icon {
  font-size: 1.6rem;
  animation: pulseUpdateIcon 1.5s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseUpdateIcon {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px #818cf8); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 10px #6366f1); }
}

.update-banner-info {
  flex: 1;
  min-width: 0;
}

.update-banner-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.update-tag {
  background: #6366f1;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  letter-spacing: 0.03em;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.update-banner-desc {
  font-size: 0.8rem;
  color: #cbd5e1;
  margin-top: 0.15rem;
  line-height: 1.35;
}

.update-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-update-now {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
  transition: all 0.2s ease;
}

.btn-update-now:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.65);
  transform: translateY(-1px);
}

.btn-update-now:active {
  transform: translateY(0);
}

.btn-update-dismiss {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-update-dismiss:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

@media (max-width: 650px) {
  .app-update-banner {
    padding: 0.6rem 0.85rem;
  }
  .update-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .update-banner-icon {
    display: none;
  }
  .update-banner-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  .btn-update-now {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.8rem;
    font-size: 0.86rem;
  }
}

/* Indicador y botón de Pantalla Siempre Encendida (Wake Lock) */
.top-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.top-wakelock-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  padding: 0.22rem 0.55rem;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.top-wakelock-pill:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.55);
}

.top-wakelock-pill.locked {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.top-wakelock-pill:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #71717a;
  opacity: 0.65;
}

@media (max-width: 768px) {
  .top-wakelock-pill .wakelock-label {
    display: none;
  }
  .top-wakelock-pill {
    padding: 0;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
  }
}

/* Switch Toggle para Ajustes */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-toggle {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #3f3f46;
  transition: .25s ease;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.slider-toggle:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .25s ease;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.switch-toggle input:checked + .slider-toggle {
  background-color: #10b981;
  border-color: #059669;
}

.switch-toggle input:checked + .slider-toggle:before {
  transform: translateX(20px);
}

/* ==========================================================================
/* ==========================================================================
   NUEVO MODAL UNIFICADO DE COBRO Y ABONOS (COMPACTO, ELEGANTE & ZERO SCROLL)
   ========================================================================== */
.abono-modal-card {
  max-width: 420px !important;
  width: min(95vw, 420px) !important;
  max-height: min(94vh, 700px) !important;
  margin: auto !important;
  background: #18181b !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Pestañas de Modo de Cobro (Amigos por Productos vs Total/Monto) */
.checkout-split-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  background: #141416;
  padding: 0.25rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.35rem;
}

.split-mode-tab-btn {
  background: transparent;
  border: none;
  color: #a1a1aa;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.25rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-align: center;
  white-space: nowrap;
}

.split-mode-tab-btn.active {
  background: #27272a;
  color: #fbbf24;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Tarjeta Vista Previa de Factura en Modal de Cobro */
.checkout-invoice-preview-card {
  background: #1f1f23;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.35rem;
}

.checkout-invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.invoice-header-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.invoice-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.invoice-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
}

.invoice-sub {
  display: block;
  font-size: 0.7rem;
  color: #a1a1aa;
}

.invoice-mode-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.invoice-mode-badge.mode-mesa {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.invoice-mode-badge.mode-llevar {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.checkout-invoice-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 140px;
  overflow-y: auto;
  padding-right: 2px;
}

.invoice-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.18rem 0;
}

.invoice-item-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-item-qty {
  font-weight: 800;
  color: #fbbf24;
  font-size: 0.82rem;
}

.invoice-item-name {
  color: #e4e4e7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-item-price {
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  margin-left: 0.5rem;
}

.invoice-row-extra {
  color: #a1a1aa;
  font-style: italic;
}

.invoice-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
}

.invoice-total-val {
  font-size: 0.95rem;
  color: #fbbf24;
}

.split-items-view-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.split-items-tip {
  font-size: 0.7rem;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.split-items-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 210px;
  overflow-y: auto;
  padding-right: 2px;
}

.split-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #202025;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  gap: 0.4rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.split-item-row.has-selected {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.06);
}

.split-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.split-item-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.split-item-meta {
  font-size: 0.67rem;
  color: #a1a1aa;
}

.split-item-stepper {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-split-step {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #27272a;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-split-step:active {
  transform: scale(0.92);
  background: #3f3f46;
}

.split-step-qty {
  font-size: 0.85rem;
  font-weight: 900;
  color: #fbbf24;
  min-width: 24px;
  text-align: center;
}

.split-step-qty.zero {
  color: #52525b;
}

.split-item-subtotal {
  font-size: 0.8rem;
  font-weight: 800;
  color: #34d399;
  min-width: 58px;
  text-align: right;
  font-family: monospace;
}

.split-items-subtotal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #141416;
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
}

.split-subtotal-info {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.split-subtotal-lbl {
  font-size: 0.7rem;
  color: #a1a1aa;
  font-weight: 700;
}

.split-subtotal-val {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fbbf24;
  font-family: monospace;
}

.split-items-count-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.btn-charge-split-items {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-charge-split-items:active {
  transform: scale(0.98);
}

.btn-charge-split-items:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #3f3f46;
  box-shadow: none;
  transform: none;
}

.abono-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #141416 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.abono-header-title-box {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.abono-header-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff !important;
}

.abono-header-acc {
  color: #f87171;
  font-weight: 900;
}

.abono-header-sub {
  font-size: 0.68rem;
  color: #a1a1aa !important;
  font-weight: 600;
}

.btn-close-abono-modal {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #a1a1aa;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-close-abono-modal:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.checkout-persistence-status {
  padding: 0.28rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #111113;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.checkout-persistence-status[data-state="saving"] {
  color: var(--text-gold);
}

.checkout-persistence-status[data-state="saved"] {
  color: #34d399;
}

.checkout-persistence-status[data-state="error"] {
  color: #f87171;
}

.abono-modal-body {
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow-y: auto;
  background: #18181b !important;
  box-sizing: border-box;
}

/* 1. Tarjeta Resumen Financiero: 3 Columnas */
.abono-financial-summary {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  background: #202025 !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 0.38rem 0.35rem;
  box-sizing: border-box;
}

.abono-summary-cell {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.abono-cell-lbl {
  font-size: 0.61rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.abono-cell-val {
  font-size: 0.9rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
}

.abono-cell-val.val-green {
  color: #34d399;
}

.abono-cell-val.val-due {
  color: #ffffff;
}

.abono-summary-sep {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
}

/* 2. Barra de División */
.abono-division-bar {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.22rem 0.35rem;
  box-sizing: border-box;
}

.abono-div-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  width: 100%;
  box-sizing: border-box;
}

.btn-div-pill {
  width: 100%;
  background: #27272a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.22rem 0.1rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #e4e4e7;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
  line-height: 1.15;
  box-sizing: border-box;
}

.btn-div-pill:hover, .btn-div-pill.active {
  background: #3f3f46;
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.btn-div-pill .split-sub {
  display: block;
  font-size: 0.58rem;
  color: #94a3b8;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3. Tarjeta de Formulario de Pago */
.abono-action-card {
  background: #202025 !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-sizing: border-box;
}

.abono-inputs-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0.35rem;
  width: 100%;
  box-sizing: border-box;
}

.abono-input-col {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0; /* Evita que los inputs desborden */
}

.abono-input-lbl {
  font-size: 0.64rem;
  font-weight: 700;
  color: #a1a1aa;
}

.abono-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.abono-currency-prefix {
  position: absolute;
  left: 0.5rem;
  font-weight: 900;
  color: #71717a;
  font-size: 0.9rem;
  pointer-events: none;
}

.abono-input-number {
  width: 100%;
  box-sizing: border-box;
  background: #18181b;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 0.32rem 0.4rem 0.32rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 900;
  color: #ffffff;
  outline: none;
}

.abono-input-number:focus {
  border-color: #3b82f6;
}

.abono-input-text {
  width: 100%;
  box-sizing: border-box;
  background: #18181b;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 0.32rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  outline: none;
}

.abono-input-text:focus {
  border-color: #3b82f6;
}

.abono-methods-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1.05fr;
  gap: 0.28rem;
  width: 100%;
  box-sizing: border-box;
}

.btn-method-pill {
  width: 100%;
  box-sizing: border-box;
  padding: 0.28rem 0.15rem;
  font-size: 0.71rem;
  font-weight: 800;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #18181b;
  color: #a1a1aa;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
  white-space: nowrap;
}

.btn-method-pill.active {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.btn-method-pill.active#btnGroupMethodNequi {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.4);
}

.btn-quick-full-balance {
  width: 100%;
  box-sizing: border-box;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e4e4e7;
  border-radius: 6px;
  padding: 0.28rem 0.15rem;
  font-size: 0.67rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
  white-space: nowrap;
}

.btn-quick-full-balance:hover {
  background: #27272a;
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.abono-change-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 6px;
  padding: 0.22rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: #34d399;
}

.btn-register-abono {
  width: 100%;
  box-sizing: border-box;
  background: #15803d;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.46rem 0.4rem;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.btn-register-abono:hover {
  background: #16a34a;
}

/* 4. Lista de Historial de Abonos */
.abono-history-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  box-sizing: border-box;
}

.abono-history-heading {
  font-size: 0.65rem;
  font-weight: 700;
  color: #a1a1aa;
  text-transform: uppercase;
}

.abono-history-feed {
  max-height: 75px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: #141417;
}

.abono-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
}

.abono-history-row:last-child {
  border-bottom: none;
}

.abono-history-tag {
  color: #cbd5e1;
  font-weight: 700;
}

.abono-history-amt {
  color: #34d399;
  font-weight: 800;
}

.btn-abono-del {
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 0 0.2rem;
  font-size: 0.8rem;
}

.btn-abono-del:hover {
  color: #ef4444;
}

/* 5. Footer con botones sin desbordes ni texto cortado */
.abono-modal-footer {
  padding: 0.5rem 0.75rem;
  background: #141416 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-sizing: border-box;
}

.abono-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  width: 100%;
  box-sizing: border-box;
}

.btn-footer-action {
  width: 100%;
  box-sizing: border-box;
  padding: 0.44rem 0.2rem;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: var(--transition-fast);
  overflow: hidden;
  text-overflow: ellipsis;
}

.abono-footer-single {
  width: 100%;
  display: flex;
}

.btn-leave-table-wide {
  width: 100%;
  box-sizing: border-box;
  padding: 0.58rem 1rem;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
  background: #27272a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f4f4f5;
}

.btn-leave-table-wide:hover {
  background: #3f3f46;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-leave-table {
  background: #27272a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f4f4f5;
}

.btn-leave-table:hover {
  background: #3f3f46;
}

.btn-finish-account {
  width: 100%;
  box-sizing: border-box;
  background: #15803d;
  color: #ffffff;
  border: none;
  border-radius: 7px;
  padding: 0.5rem;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.btn-finish-account:hover {
  background: #16a34a;
}

.badge-debt {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}


/* ==========================================================================
   RECUENTO DE CHORIZOS Y PRODUCIDO REAL (HISTORIAL DE TURNOS CERRADOS)
   ========================================================================== */
.btn-recount-shift {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(161, 98, 7, 0.25));
  color: #fbbf24;
  border: 1.5px solid rgba(234, 179, 8, 0.45);
  border-radius: 8px;
  padding: 0.55rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-recount-shift:hover {
  background: rgba(234, 179, 8, 0.3);
  border-color: #fbbf24;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-recount-shift.has-recount {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(5, 150, 105, 0.28));
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.5);
}

.btn-recount-shift.has-recount:hover {
  background: rgba(16, 185, 129, 0.35);
  border-color: #34d399;
  color: #ffffff;
}

.btn-recount-shift-sm {
  background: rgba(234, 179, 8, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(234, 179, 8, 0.45);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-recount-shift-sm:hover {
  background: #fbbf24;
  color: #18181b;
}

/* Banner de recuento en la tarjeta de turno cerrado */
.shift-recount-card-strip {
  background: rgba(234, 179, 8, 0.07);
  border: 1.5px solid rgba(234, 179, 8, 0.32);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shift-recount-card-strip:hover {
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(234, 179, 8, 0.55);
}

.recount-strip-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.recount-strip-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.recount-strip-title {
  font-size: 0.88rem;
  color: #f4f4f5;
  font-weight: 700;
}

.recount-strip-title .gold-text {
  color: #fbbf24;
  font-size: 0.95rem;
}

.recount-strip-sub {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.recount-diff-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
}

.recount-diff-badge.surplus {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.recount-diff-badge.deficit {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.recount-diff-badge.exact {
  background: rgba(96, 165, 250, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.4);
}

/* Modal Recuento Físico */
.modal-recount-card {
  max-width: 580px !important;
  width: 95vw;
  background: #18181b !important;
  border: 1px solid #27272a !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8) !important;
  border-radius: 16px !important;
}

.modal-recount-body {
  padding: 0.85rem 1.1rem !important;
  gap: 0.85rem !important;
  max-height: 72vh !important;
  overflow-y: auto !important;
}

.recount-info-box {
  background: rgba(234, 179, 8, 0.08);
  border-left: 3.5px solid #fbbf24;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  color: #fef08a;
  line-height: 1.4;
}

.recount-asador-card {
  background: #202026;
  border: 1.5px solid #2d2d38;
  border-radius: 14px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.recount-calc-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: #18181d;
  border: 1px solid #2a2a34;
  border-radius: 10px;
  flex-wrap: wrap;
}

.recount-calc-step.highlight-step {
  background: rgba(234, 179, 8, 0.08);
  border-color: rgba(234, 179, 8, 0.4);
}

.recount-step-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 180px;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2d2d38;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-num.step-highlight {
  background: #fbbf24;
  color: #18181b;
}

.recount-step-label strong {
  display: block;
  font-size: 0.88rem;
  color: #ffffff;
}

.recount-step-label small {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.recount-stepper-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.recount-quick-chips {
  display: flex;
  gap: 0.35rem;
}

.btn-rec-quick {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-rec-quick:hover {
  background: rgba(234, 179, 8, 0.25);
  border-color: #fbbf24;
  color: #ffffff;
}

.recount-accordion-section {
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 0.65rem;
  margin-top: 0.25rem;
}

.btn-toggle-recount-details {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0;
  transition: color 0.15s;
}

.btn-toggle-recount-details:hover {
  color: #ffffff;
}

.recount-products-detail-wrap {
  margin-top: 0.65rem;
}

.recount-products-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.recount-category-header {
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.35rem 0.2rem 0.15rem 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.4rem;
}

.recount-item-row {
  background: #202026;
  border: 1px solid #2d2d38;
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: border-color 0.2s;
}

.recount-item-row.item-meat {
  border-left: 3.5px solid #fbbf24;
  background: #23222a;
}

.recount-item-row:hover {
  border-color: #3f3f4e;
}

.recount-item-info {
  flex: 1;
  min-width: 0;
}

.recount-item-name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.recount-item-name strong {
  font-size: 0.92rem;
  color: #ffffff;
}

.recount-item-price {
  font-size: 0.78rem;
  color: #a1a1aa;
  font-weight: 600;
}

.recount-item-registered {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.recount-item-registered strong {
  color: #e2e8f0;
}

.recount-item-counter-zone {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.recount-stepper {
  display: flex;
  align-items: center;
  background: #121215;
  border: 1.5px solid #2d2d38;
  border-radius: 10px;
  overflow: hidden;
}

.btn-rec-step {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  border: none;
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}

.btn-rec-step:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fbbf24;
}

.btn-rec-step:active {
  background: rgba(234, 179, 8, 0.25);
}

.input-rec-qty {
  width: 48px;
  height: 40px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}

.input-rec-qty::-webkit-inner-spin-button,
.input-rec-qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.recount-item-subtotal {
  min-width: 85px;
  text-align: right;
  display: flex;
  flex-direction: column;
}

.recount-item-subtotal small {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.recount-item-subtotal strong {
  font-size: 0.92rem;
  color: #fbbf24;
}

/* Panel de Resumen del Recuento */
.recount-summary-panel {
  background: #1c1c22;
  border: 1.5px solid #2d2d38;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.recount-stat-card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.recount-stat-pill {
  background: #141418;
  border: 1px solid #27272e;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.recount-stat-pill.highlight-pill {
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.06);
}

.pill-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 700;
}

.pill-val {
  font-size: 1.15rem;
  font-weight: 900;
  color: #e2e8f0;
}

.pill-val.gold-val {
  color: #fbbf24;
}

.pill-sub {
  font-size: 0.7rem;
  color: #a1a1aa;
}

.recount-diff-banner {
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.recount-diff-banner .diff-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.recount-diff-banner .diff-title {
  font-size: 0.84rem;
  font-weight: 800;
}

.recount-diff-banner .diff-val {
  font-size: 1rem;
  font-weight: 900;
}

.recount-diff-banner .diff-desc {
  font-size: 0.76rem;
  line-height: 1.35;
}

.recount-diff-banner.diff-neutral {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.recount-diff-banner.diff-positive {
  background: rgba(16, 185, 129, 0.14);
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.recount-diff-banner.diff-positive .diff-desc {
  color: #a7f3d0;
}

.recount-diff-banner.diff-negative {
  background: rgba(239, 68, 68, 0.14);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
  color: #f87171;
}

.recount-diff-banner.diff-negative .diff-desc {
  color: #fecaca;
}

.modal-recount-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem !important;
  flex-wrap: wrap;
}

@media (max-width: 540px) {
  .recount-item-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }
  .recount-item-counter-zone {
    justify-content: space-between;
    width: 100%;
  }
  .recount-stat-card-row {
    grid-template-columns: 1fr;
  }
  .btn-rec-step {
    width: 44px;
    height: 44px;
  }
  .input-rec-qty {
    width: 54px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .reconcile-card-controls {
    grid-template-columns: 1fr 1.5fr 1.2fr;
    gap: 0.35rem;
    padding: 0.35rem 0.45rem;
  }
  .stepper-box .btn-step {
    width: 30px;
    height: 30px;
  }
}

/* ==========================================================================
   MODAL DE VENTA COMPLETADA / ENVÍO AL HISTORIAL
   ========================================================================== */
.sale-completed-card {
  max-width: 420px !important;
  width: 95vw;
  background: #18181b !important;
  border: 1px solid #27272a !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8) !important;
  border-radius: 16px !important;
}

.sale-completed-body {
  padding: 0.85rem 1rem !important;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 72vh;
  overflow-y: auto;
}

.sale-completed-hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 78, 59, 0.35));
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
}

.completed-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.completed-check-icon {
  font-size: 0.95rem;
  font-weight: 900;
}

.completed-hero-amount {
  font-size: 2rem;
  font-weight: 900;
  color: #34d399;
  text-shadow: 0 0 20px rgba(52, 211, 153, 0.35);
  line-height: 1.15;
  margin: 0.15rem 0;
  font-variant-numeric: tabular-nums;
}

.completed-hero-status {
  font-size: 0.78rem;
  color: #cbd5e1;
  font-weight: 600;
}

.completed-change-banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

.completed-change-banner .change-lbl {
  color: #fbbf24;
  font-weight: 700;
}

.completed-change-banner .change-val {
  color: #fde68a;
  font-weight: 900;
  font-size: 0.95rem;
}

.completed-section-card {
  background: #202026;
  border: 1px solid #2d2d38;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.completed-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 800;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.completed-card-tag {
  color: #71717a;
  font-size: 0.72rem;
  text-transform: none;
}

.completed-payments-feed {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.completed-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 18, 22, 0.6);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #2d2d38;
  font-size: 0.82rem;
}

.completed-pay-row .pay-info {
  color: #f4f4f5;
  font-weight: 700;
}

.completed-pay-row .pay-amt {
  color: #34d399;
  font-weight: 800;
}

.completed-items-feed {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.completed-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  padding: 0.25rem 0.4rem;
  color: #cbd5e1;
}

.completed-item-row .item-left {
  font-weight: 600;
}

.completed-item-row .item-right {
  font-weight: 800;
  color: #f4f4f5;
}

.sale-completed-footer {
  display: grid !important;
  grid-template-columns: 1fr 1.5fr !important;
  gap: 0.45rem !important;
  padding: 0.65rem 0.85rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.btn-leave-open-alt {
  height: 42px;
  background: #27272a;
  color: #f4f4f5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: var(--transition-fast);
  white-space: nowrap !important;
  padding: 0 0.4rem !important;
}

.btn-leave-open-alt:hover {
  background: #3f3f46;
}

.btn-send-to-history {
  height: 42px;
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap !important;
  padding: 0 0.5rem !important;
}

.btn-send-to-history:hover {
  background: #10b981;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.5);
}

/* ==========================================================================
   ASISTENTE IA AUTÓNOMO - SEÑOR CHORIZO
   ========================================================================== */

/* Contenedor Flotante Permanente No Bloqueante (Por defecto a la IZQUIERDA para nunca tapar botones [+] de listas) */
.ai-floating-widget {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem; /* Libre a la izquierda */
  right: auto;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  pointer-events: none; /* Cero bloqueos en el fondo de la app */
  user-select: none;
  touch-action: none;
}

.ai-floating-widget.pos-left {
  left: 1.25rem !important;
  right: auto !important;
  align-items: flex-start !important;
}

.ai-floating-widget.pos-right {
  left: auto !important;
  right: 1.25rem !important;
  align-items: flex-end !important;
}

.ai-floating-widget.custom-positioned {
  right: auto !important;
  bottom: auto !important;
}

.ai-floating-widget.pos-left .ai-floating-bubble {
  transform-origin: bottom left;
}

.ai-floating-widget.pos-right .ai-floating-bubble {
  transform-origin: bottom right;
}

/* BARRITA EMERGENTE QUE SALE DEL LOGO */
.ai-floating-bubble {
  pointer-events: auto;
  max-width: 380px;
  width: calc(100vw - 2.5rem);
  background: linear-gradient(145deg, #18181f 0%, #22222d 100%);
  border: 1.5px solid rgba(165, 180, 252, 0.45);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 20px rgba(99, 102, 241, 0.3);
  overflow: hidden;
  position: relative;
  transform-origin: bottom right;
  animation: bubblePopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ai-floating-bubble.fade-out {
  animation: bubbleFadeOut 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

.ai-bubble-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-bubble-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-bubble-sender {
  font-size: 0.78rem;
  font-weight: 800;
  color: #a5b4fc;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex: 1;
}

.btn-bubble-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}

.btn-bubble-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.ai-bubble-body {
  padding: 0.75rem 0.95rem 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ai-bubble-text {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #f8fafc;
  word-break: break-word;
}

.ai-bubble-text strong {
  color: #fbbf24;
}

.ai-bubble-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.btn-bubble-undo {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s;
}

.btn-bubble-undo:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #f87171;
  color: #ffffff;
}

/* Barra de progreso de auto-cierre */
.ai-bubble-progress-bar {
  height: 3px;
  background: linear-gradient(90deg, #6366f1 0%, #34d399 100%);
  width: 100%;
  transform-origin: left;
  animation: bubbleTimer 5s linear forwards;
}

.ai-floating-bubble:hover .ai-bubble-progress-bar {
  animation-play-state: paused;
}

@keyframes bubbleTimer {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* PÍLDORA INTERACTIVA FIJA ULTRA-COMPACTA */
.ai-pill-bar {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  border: 1.5px solid rgba(165, 180, 252, 0.45);
  border-radius: 9999px;
  padding: 0.2rem 0.35rem 0.2rem 0.5rem;
  gap: 0.25rem;
  box-shadow: 0 6px 18px rgba(67, 56, 202, 0.4), 0 0 10px rgba(129, 140, 248, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 38px;
}

.ai-pill-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.6), 0 0 16px rgba(165, 180, 252, 0.5);
  border-color: #a5b4fc;
}

.ai-pill-bar.recording {
  background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%) !important;
  border-color: #f87171 !important;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.8) !important;
  animation: pulseRecording 1.4s infinite alternate;
}

@keyframes pulseRecording {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

.btn-ai-pill-main {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.3rem;
  position: relative;
}

.ai-btn-emblem {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
}

.ai-btn-text {
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 0.78rem;
}

.btn-ai-pill-mic {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.ai-pill-drag-handle {
  color: rgba(165, 180, 252, 0.65);
  font-size: 0.85rem;
  font-weight: 900;
  cursor: grab;
  padding: 0 0.2rem 0 0.1rem;
  display: flex;
  align-items: center;
  user-select: none;
  touch-action: none;
  letter-spacing: -1px;
}

.ai-pill-drag-handle:hover {
  color: #ffffff;
}

.ai-pill-bar:active .ai-pill-drag-handle {
  cursor: grabbing;
}

.btn-ai-pill-flip {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #a5b4fc;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 0.15rem;
}

.btn-ai-pill-flip:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: scale(1.1);
}

.btn-ai-pill-flip:active {
  transform: scale(0.92);
}

@media (max-width: 768px) {
  .ai-floating-widget {
    bottom: 0.75rem !important;
    left: 0.75rem !important;
    right: auto !important;
    align-items: flex-start !important;
  }
  .ai-floating-widget.pos-left {
    left: 0.75rem !important;
    right: auto !important;
    align-items: flex-start !important;
  }
  .ai-floating-widget.pos-right {
    left: auto !important;
    right: 0.75rem !important;
    align-items: flex-end !important;
  }
  .ai-pill-bar {
    padding: 0.15rem 0.25rem 0.15rem 0.4rem !important;
    max-height: 34px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
  }
  .ai-btn-text {
    display: none !important; /* En móviles oculta el texto para no estorbar jamás */
  }
  .btn-ai-pill-main {
    padding: 0.1rem 0.2rem !important;
  }
  .btn-ai-pill-mic {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.8rem !important;
  }
  .btn-ai-pill-flip {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.75rem !important;
  }
  .ai-pill-drag-handle {
    display: none !important; /* En móviles el botón ⇋ y el toque directo son suficientes */
  }
}

.btn-ai-pill-mic:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

.ai-pill-bar.recording .btn-ai-pill-mic {
  background: #ffffff;
  color: #dc2626;
  border-color: #ffffff;
  animation: micBlink 1s infinite alternate;
}

@keyframes micBlink {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.15); opacity: 1; }
}

.btn-ai-pill-keyboard {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-ai-pill-keyboard:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ai-btn-pulse {
  position: absolute;
  top: 4px;
  left: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: aiPulse 2s infinite;
}

@keyframes aiPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #34d399; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* MINI-INPUT EXPANDIBLE */
.ai-mini-input-bar {
  pointer-events: auto;
  max-width: 380px;
  width: calc(100vw - 2.5rem);
  background: #18181f;
  border: 1.5px solid rgba(165, 180, 252, 0.5);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
  padding: 0.35rem 0.5rem;
  animation: bubblePopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ai-mini-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-mini-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
}

.ai-mini-input:focus {
  border-color: #818cf8;
  background: rgba(255, 255, 255, 0.08);
}

.btn-ai-mini-send {
  background: #4f46e5;
  color: #ffffff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.95rem;
  transition: all 0.15s;
}

.btn-ai-mini-send:hover {
  background: #6366f1;
  transform: scale(1.05);
}

.btn-ai-mini-close {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.btn-ai-mini-close:hover {
  color: #ffffff;
}

/* Asistente IA Flotante No Bloqueante (Permite usar la app a la vez) */
.ai-assistant-dock {
  position: fixed;
  inset: 0;
  pointer-events: none !important; /* NO bloquea los toques ni clics en la app */
  z-index: 2500;
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1.25rem;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.ai-assistant-dock.active {
  display: flex !important;
  animation: aiDockSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes aiDockSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

body.ai-dock-open #btnFloatingAiAssistant {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

.modal-ai-card {
  pointer-events: auto !important; /* Habilita interactuar dentro del panel de IA */
  max-width: 460px !important;
  width: 450px;
  height: 560px;
  max-height: calc(100vh - 100px);
  margin-bottom: 4.5rem;
  background: #141418 !important;
  border: 1.5px solid rgba(155, 81, 224, 0.45) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(155, 81, 224, 0.25) !important;
  border-radius: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden;
  transition: height 0.25s ease, width 0.25s ease, transform 0.25s ease;
}

/* Modo Minimizado del Asistente */
.modal-ai-card.minimized {
  height: 58px !important;
  max-height: 58px !important;
  width: 330px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6) !important;
}

.modal-ai-card.minimized .modal-ai-body,
.modal-ai-card.minimized .modal-ai-footer {
  display: none !important;
}

.modal-ai-card.minimized .modal-ai-header {
  border-bottom: none;
  cursor: pointer;
}

.btn-ai-header-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-light);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ai-header-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.05);
}

.modal-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: #18181f;
  border-bottom: 1px solid #27272e;
}

.modal-ai-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-ai-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3730a3, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
}

.ai-status-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-top: 0.15rem;
}

.ai-status-badge.badge-local {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.ai-status-badge.badge-cloud {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.modal-ai-header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-ai-settings-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-ai-settings-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Feed de Conversación */
.modal-ai-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.85rem !important;
  overflow: hidden;
  gap: 0.65rem;
  background: #111114;
}

.ai-chat-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-right: 0.35rem;
}

.ai-msg-bubble {
  max-width: 88%;
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-word;
}

.ai-msg-bubble.user-msg {
  align-self: flex-end;
  background: linear-gradient(135deg, #3730a3, #4338ca);
  color: #ffffff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ai-msg-bubble.assistant-msg {
  align-self: flex-start;
  background: #1e1e24;
  color: #e2e8f0;
  border: 1px solid #2d2d38;
  border-bottom-left-radius: 3px;
}

.ai-welcome-examples {
  margin: 0.5rem 0 0 1rem;
  padding: 0;
  font-size: 0.82rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Tarjeta de Acción Ejecutada (Authority card) */
.ai-action-card {
  margin-top: 0.65rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ai-action-card-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #34d399;
  font-size: 0.88rem;
  font-weight: 800;
}

.ai-action-icon {
  font-size: 1.15rem;
}

.ai-action-card-body {
  font-size: 0.82rem;
  color: #d1fae5;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ai-action-card-footer {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(16, 185, 129, 0.25);
  display: flex;
  justify-content: flex-end;
}

.btn-ai-undo {
  background: rgba(255, 255, 255, 0.08);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ai-undo:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ffffff;
  border-color: #ef4444;
}

/* Indicador de pensando */
.thinking-bubble {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: #a1a1aa;
}

.ai-dots {
  display: inline-flex;
  gap: 2px;
}

.ai-dots span {
  animation: dotBlink 1.4s infinite both;
  font-weight: 900;
}
.ai-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBlink {
  0% { opacity: 0.2; }
  20% { opacity: 1; }
  100% { opacity: 0.2; }
}

/* Barra de Chips Rápidos */
.ai-quick-chips-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 0.35rem;
  border-top: 1px solid #1f1f26;
}

.chips-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ai-quick-chips-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.ai-quick-chip {
  background: #1c1c24;
  border: 1px solid #2d2d38;
  color: #cbd5e1;
  border-radius: 9999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.ai-quick-chip:hover {
  background: #272734;
  color: #ffffff;
  border-color: #4f46e5;
  transform: translateY(-1px);
}

/* Footer / Formulario de Entrada */
.modal-ai-footer {
  padding: 0.75rem 0.85rem !important;
  background: #18181f;
  border-top: 1px solid #27272e;
}

.ai-input-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.btn-ai-mic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #22222b;
  border: 1.5px solid #363645;
  color: #ffffff;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-ai-mic:hover {
  background: #2e2e3a;
  border-color: #6366f1;
}

.btn-ai-mic.listening {
  background: #dc2626 !important;
  border-color: #f87171 !important;
  color: #ffffff !important;
  animation: micListenPulse 1.2s infinite;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
}

@keyframes micListenPulse {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.08); }
  100% { transform: scale(0.95); }
}

.ai-input-text {
  flex: 1;
  height: 44px;
  background: #101014;
  border: 1.5px solid #2d2d38;
  border-radius: 12px;
  padding: 0 0.85rem;
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.ai-input-text:focus {
  border-color: #6366f1;
}

.btn-ai-send {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #ffffff;
  border: none;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-ai-send:hover {
  background: #6366f1;
  transform: scale(1.04);
}

.btn-ai-send:active {
  transform: scale(0.95);
}

/* ==========================================================================
   INTERFAZ IA ESTILO GOOGLE GEMINI (AURORA, ONDA DE VOZ Y VENTANA AMPLIA)
   ========================================================================== */
.gemini-aura-glow-bar {
  height: 3.5px;
  width: 100%;
  background: linear-gradient(90deg, #4285F4 0%, #9B51E0 35%, #00C9FF 70%, #FF6584 100%);
  box-shadow: 0 0 16px rgba(155, 81, 224, 0.7);
  flex-shrink: 0;
}

.gemini-mobile-card {
  background: linear-gradient(180deg, #14131c 0%, #0c0b11 100%) !important;
  border: 1.5px solid rgba(155, 81, 224, 0.35) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.92), 0 0 30px rgba(155, 81, 224, 0.22) !important;
}

.gemini-avatar {
  background: linear-gradient(135deg, #4285F4 0%, #9B51E0 100%) !important;
  color: #ffffff;
  font-size: 1.25rem;
  box-shadow: 0 2px 12px rgba(155, 81, 224, 0.5) !important;
}

.gemini-glow-pill {
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(90deg, #4285F4, #9B51E0);
  color: #ffffff;
  padding: 0.12rem 0.45rem;
  border-radius: 12px;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 6px rgba(66, 133, 244, 0.35);
}

/* Visualizador de Onda de Voz Estilo Gemini Live */
.gemini-voice-wave-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.gemini-wave-bars {
  display: flex;
  align-items: center;
  gap: 3.5px;
  height: 22px;
}

.gemini-voice-wave-bar {
  width: 4px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(180deg, #4285F4, #9B51E0);
  transition: height 0.15s ease, background 0.15s ease;
}

/* Animación cuando la IA está escuchando o hablando */
.is-speaking .gemini-voice-wave-bar,
.recording .gemini-voice-wave-bar {
  animation: geminiWave 0.65s ease-in-out infinite;
}

.gemini-voice-wave-bar.bar-1 { animation-delay: 0.0s; background: #4285F4; }
.gemini-voice-wave-bar.bar-2 { animation-delay: 0.15s; background: #9B51E0; }
.gemini-voice-wave-bar.bar-3 { animation-delay: 0.3s; background: #00C9FF; }
.gemini-voice-wave-bar.bar-4 { animation-delay: 0.45s; background: #FF6584; }

@keyframes geminiWave {
  0%, 100% { height: 6px; transform: scaleY(0.7); }
  50% { height: 22px; transform: scaleY(1.3); }
}

.gemini-voice-wave-status {
  font-size: 0.8rem;
  color: #c7d2fe;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Input y botones ampliados estilo Gemini */
.gemini-footer {
  padding: 0.75rem 1rem !important;
  background: #100f16 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.gemini-mic-btn {
  width: 48px !important;
  height: 48px !important;
  font-size: 1.35rem !important;
  background: linear-gradient(135deg, #4285F4 0%, #9B51E0 100%) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 14px rgba(155, 81, 224, 0.4) !important;
}

.gemini-input-text {
  height: 48px !important;
  font-size: 0.95rem !important;
  background: #181722 !important;
  border: 1.5px solid rgba(155, 81, 224, 0.25) !important;
  border-radius: 14px !important;
  padding: 0 1rem !important;
}

.gemini-input-text:focus {
  border-color: #9B51E0 !important;
  box-shadow: 0 0 12px rgba(155, 81, 224, 0.3) !important;
}

.gemini-send-btn {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #9B51E0 0%, #6366f1 100%) !important;
}

@media (max-width: 768px) {
  .ai-assistant-dock {
    padding: 0.6rem !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    pointer-events: none !important;
  }
  .modal-ai-card {
    width: calc(100vw - 1rem) !important;
    max-width: 440px !important;
    height: 530px !important;
    max-height: 72vh !important;
    border-radius: 20px !important;
    margin-bottom: 4.8rem !important;
    border: 1.5px solid rgba(155, 81, 224, 0.45) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(155, 81, 224, 0.35) !important;
    pointer-events: auto !important;
  }
  .modal-ai-card.minimized {
    height: 48px !important;
    max-height: 48px !important;
    width: 220px !important;
    border-radius: 14px !important;
    margin-bottom: 4.8rem !important;
  }
  .ai-chat-feed {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
  }
  .ai-msg-bubble {
    font-size: 0.93rem !important;
    padding: 0.75rem 0.95rem !important;
  }
}

@media (max-width: 480px) {
  .btn-floating-ai-assistant {
    bottom: 4.8rem;
    right: 0.85rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
  }
}

/* ==========================================================================
   ESTILOS DE IMPRESIÓN Y PDF NATIVO (@media print)
   ========================================================================== */
#printReportContainer {
  display: none;
}
#historyReceiptPrintContainer { display: none; }

@media print {
  /* Ocultar toda la interfaz visual de la app */
  body > *:not(#printReportContainer):not(#historyReceiptPrintContainer) {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #printReportContainer {
    display: block !important;
    position: static !important;
    width: 100% !important;
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 12pt !important;
  }
  body.printing-history-receipt #printReportContainer { display: none !important; }

  #historyReceiptPrintContainer {
    display: none !important;
  }
  body.printing-history-receipt #historyReceiptPrintContainer {
    display: block !important;
    position: static !important;
    width: 100% !important;
    background: #fff !important;
    color: #111 !important;
  }
  #historyReceiptPrintContainer .hist-thermal-paper {
    display: block !important;
    width: 76mm !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 4mm !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #111 !important;
    font-size: 9pt !important;
    animation: none !important;
    transform: none !important;
  }
  #historyReceiptPrintContainer .hist-paper-header,
  #historyReceiptPrintContainer .hist-paper-meta,
  #historyReceiptPrintContainer .hist-paper-items,
  #historyReceiptPrintContainer .hist-paper-payments,
  #historyReceiptPrintContainer .hist-paper-totals,
  #historyReceiptPrintContainer .hist-paper-footer,
  #historyReceiptPrintContainer .hist-paper-item,
  #historyReceiptPrintContainer .hist-paper-total { break-inside: avoid; page-break-inside: avoid; }
  #historyReceiptPrintContainer .hist-paper-row,
  #historyReceiptPrintContainer .hist-paper-item-main { color: #111 !important; }
  #historyReceiptPrintContainer .hist-paper-row > span,
  #historyReceiptPrintContainer .hist-paper-item-details,
  #historyReceiptPrintContainer .hist-paper-footer small,
  #historyReceiptPrintContainer .hist-paper-section-title { color: #444 !important; }
  #historyReceiptPrintContainer .hist-paper-status { color: #111 !important; background: #fff !important; }
  @page { margin: 8mm; }

  table {
    page-break-inside: auto;
  }
  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
}

/* Menú compacto de Ventas: categorías rápidas, sin imágenes y con poco scroll. */
.pos-sales-compact-menu {
  width: 100%;
  margin-top: .55rem;
  padding: .55rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(30,18,22,.96), rgba(16,15,20,.98));
  box-shadow: 0 .45rem 1.2rem rgba(0,0,0,.25);
}

.pos-sales-compact-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .1rem .25rem .45rem;
  color: var(--text-main, #fff);
  font-size: .82rem;
  font-weight: 950;
}

.pos-sales-compact-heading small {
  color: var(--text-muted, #a1a1aa);
  font-size: .58rem;
  font-weight: 800;
}

/* Edición rápida del pedido actual: sumar y quitar sin salir del menú. */
.pos-sales-current-order {
  margin: 0 0 .7rem;
  padding: .65rem .7rem;
  border: 1px solid rgba(16,185,129,.35);
  border-radius: .8rem;
  background: rgba(16,185,129,.08);
}
.pos-sales-current-order-empty {
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
}
.pos-sales-current-order-heading,
.pos-sales-current-order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.pos-sales-current-order-heading {
  color: #f8fafc;
  font-size: .72rem;
  font-weight: 900;
}
.pos-sales-current-order-heading strong {
  color: #6ee7b7;
  font-size: .62rem;
}
.pos-sales-current-order-help {
  margin: .22rem 0 .48rem;
  color: #a1a1aa;
  font-size: .58rem;
  line-height: 1.3;
}
.pos-sales-current-order-list {
  display: grid;
  gap: .28rem;
  max-height: 10rem;
  overflow-y: auto;
}
.pos-sales-current-order-item {
  min-height: 2.25rem;
  padding: .25rem .35rem .25rem .45rem;
  border-radius: .55rem;
  background: rgba(0,0,0,.16);
}
.pos-sales-current-order-name {
  min-width: 0;
  overflow: hidden;
  color: #f8fafc;
  font-size: .65rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pos-sales-current-order .pos-sales-quick-qty { flex: 0 0 auto; }
.pos-sales-current-order .pos-sales-quick-qty button { width: 1.7rem; height: 1.7rem; }
.pos-sales-current-order .pos-sales-quick-qty b { min-width: 1.1rem; }

.pos-sales-order-options {
  display: grid;
  gap: .45rem;
  margin-top: .65rem;
  padding-top: .6rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.pos-sales-order-options-label {
  color: var(--text-muted, #a1a1aa);
  font-size: .6rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.pos-sales-order-mode-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
}
.pos-sales-order-mode-btn,
.pos-sales-packaging-btn {
  min-height: 2.35rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: .65rem;
  background: rgba(255,255,255,.05);
  color: var(--text-main, #fff);
  font: inherit;
  cursor: pointer;
}
.pos-sales-order-mode-btn { font-size: .65rem; font-weight: 900; }
.pos-sales-order-mode-btn.active {
  border-color: rgba(243,182,93,.75);
  background: rgba(243,182,93,.16);
  color: #ffd58b;
}
.pos-sales-takeout-toggle,
.pos-sales-takeout-status {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.35rem;
  padding: .4rem .55rem;
  border: 1px solid rgba(245,158,11,.55);
  border-radius: .65rem;
  background: rgba(245,158,11,.12);
  color: var(--text-main, #fff);
  text-align: left;
}
.pos-sales-takeout-toggle {
  width: 100%;
  font: inherit;
  cursor: pointer;
}
.pos-sales-takeout-toggle > span:nth-child(2),
.pos-sales-takeout-status > span:nth-child(2) {
  display: grid;
  gap: .08rem;
  min-width: 0;
  flex: 1;
}
.pos-sales-takeout-toggle b,
.pos-sales-takeout-status b { color: var(--accent-gold, #f59e0b); font-size: .68rem; }
.pos-sales-takeout-toggle small,
.pos-sales-takeout-status small { color: var(--text-muted, #a1a1aa); font-size: .57rem; }
.pos-sales-takeout-toggle > strong { color: var(--accent-gold, #f59e0b); font-size: 1rem; }
.pos-sales-packaging-btn {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .4rem .55rem;
  border-color: rgba(245,158,11,.55);
  background: rgba(245,158,11,.12);
  text-align: left;
}
.pos-sales-packaging-icon { font-size: 1.15rem; }
.pos-sales-packaging-btn span:not(.pos-sales-packaging-icon) { display: grid; gap: .08rem; min-width: 0; flex: 1; }
.pos-sales-packaging-btn b { color: var(--accent-gold, #f59e0b); font-size: .68rem; }
.pos-sales-packaging-btn small { overflow: hidden; color: var(--text-muted, #a1a1aa); font-size: .57rem; text-overflow: ellipsis; white-space: nowrap; }
.pos-sales-packaging-btn strong { color: var(--accent-gold, #f59e0b); font-size: 1.15rem; }

.pos-sales-compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}

.pos-sales-compact-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: .42rem;
  min-width: 0;
  min-height: 4.4rem;
  padding: .45rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .82rem;
  background: linear-gradient(145deg, #21151a, #141116);
  color: #fff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform .12s ease, border-color .15s ease;
}

.pos-sales-compact-card::after {
  content: '';
  position: absolute;
  right: -1.1rem;
  bottom: -1.25rem;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(220,38,38,.14);
  pointer-events: none;
}

.pos-sales-compact-card:active { transform: scale(.97); border-color: #f59e0b; }
.pos-sales-compact-comidas { border-top: 2px solid #ef4444; }
.pos-sales-compact-bebidas { border-top: 2px solid #3b82f6; }

.pos-sales-compact-icon {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 2.35rem;
  border-radius: .65rem;
  background: rgba(255,255,255,.08);
  font-size: 1.25rem;
}

.pos-sales-compact-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .08rem;
}

.pos-sales-compact-copy b { font-size: .75rem; font-weight: 950; line-height: 1.05; }
.pos-sales-compact-copy small { color: #c7bbbd; font-size: .52rem; line-height: 1.1; }
.pos-sales-compact-copy em { color: #fbbf24; font-size: .5rem; font-style: normal; font-weight: 850; }
.pos-sales-compact-card > strong { position: absolute; top: .3rem; right: .42rem; z-index: 1; color: #fca5a5; font-size: 1.1rem; }

.pos-sales-quick-modal { position: fixed; inset: 0; z-index: 3000; display: none; }
.pos-sales-quick-modal.active { display: block; }
.pos-sales-quick-overlay { display: grid; place-items: center; width: 100%; height: 100%; padding: .55rem; background: rgba(0,0,0,.78); }
.pos-sales-quick-dialog {
  position: relative;
  width: min(100%, 24rem);
  max-height: min(31rem, calc(100dvh - 1.1rem));
  overflow: hidden;
  padding: 1rem;
  border: 1px solid var(--border-gold-glow);
  border-radius: 1.15rem;
  background: linear-gradient(145deg, var(--bg-card-elevated), var(--bg-card));
  color: var(--text-main);
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--primary-light);
}

.pos-sales-quick-close { position: absolute; top: .55rem; right: .6rem; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 1px solid var(--border-color); border-radius: 50%; background: var(--bg-card-hover); color: var(--text-main); font-size: 1.1rem; cursor: pointer; transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast); }
.pos-sales-quick-close:hover { border-color: var(--primary); background: var(--primary-light); transform: rotate(5deg); }
.pos-sales-quick-eyebrow { display: block; color: var(--accent-gold); font-size: .58rem; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.pos-sales-quick-dialog h2 { margin: .2rem 2rem .2rem 0; font-size: 1.05rem; line-height: 1.1; }
.pos-sales-quick-help, .pos-sales-quick-count { margin: .2rem 0 .6rem; color: var(--text-muted); font-size: .67rem; }
.pos-sales-quick-count { color: var(--text-gold); font-weight: 850; }
.pos-sales-quick-group-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .4rem; margin: .7rem 0; }
.pos-sales-quick-group { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: .18rem; padding: .55rem .25rem; border: 1px solid var(--border-color); border-radius: .7rem; background: var(--bg-card); color: var(--text-main); cursor: pointer; transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast); }
.pos-sales-quick-group:hover { border-color: var(--border-color-glow); background: var(--bg-card-hover); }
.pos-sales-quick-group:active, .pos-sales-quick-product:has(button:active) { border-color: var(--accent-gold); transform: scale(.97); }
.pos-sales-quick-group span { font-size: 1.25rem; }
.pos-sales-quick-group b { font-size: .62rem; line-height: 1; }
.pos-sales-quick-group small { color: var(--text-muted); font-size: .48rem; }
.pos-sales-quick-products { display: grid; gap: .35rem; margin: .55rem 0; }
.pos-sales-quick-product { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .3rem; min-height: 3.1rem; padding: .25rem .35rem; border: 1px solid var(--border-color); border-radius: .72rem; background: var(--bg-card); transition: border-color var(--transition-fast), background var(--transition-fast); }
.pos-sales-quick-product.selected { border-color: var(--accent-cash); background: var(--accent-cash-light); }
.pos-sales-quick-product-main { display: flex; align-items: center; justify-content: space-between; gap: .35rem; min-width: 0; border: 0; background: transparent; color: var(--text-main); text-align: left; cursor: pointer; }
.pos-sales-quick-product-main span { display: flex; min-width: 0; flex-direction: column; gap: .15rem; }
.pos-sales-quick-product-main b { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.pos-sales-quick-product-main small { color: var(--text-gold); font-size: .62rem; font-weight: 850; }
.pos-sales-quick-product-main strong { color: var(--primary); font-size: 1.2rem; }
.pos-sales-quick-qty { display: flex; align-items: center; gap: .22rem; }
.pos-sales-quick-qty button { display: grid; place-items: center; width: 1.55rem; height: 1.55rem; border: 1px solid var(--border-color); border-radius: .45rem; background: var(--bg-card-hover); color: var(--text-main); font-size: .95rem; font-weight: 900; cursor: pointer; transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast); }
.pos-sales-quick-qty button:nth-of-type(2) { border-color: var(--primary); background: var(--primary); color: #fff; }
.pos-sales-quick-qty button:hover:not(:disabled) { border-color: var(--accent-gold); transform: translateY(-1px); }
.pos-sales-quick-qty button.pos-sales-quick-remove,
.pos-sales-quick-qty button.pos-sales-quick-remove:last-child { border-color: var(--primary-light); background: var(--primary-light); color: var(--primary); }
.pos-sales-quick-qty button:disabled { opacity: .3; cursor: not-allowed; }
.pos-sales-quick-qty b { min-width: 1rem; color: var(--text-gold); font-size: .72rem; text-align: center; }
.pos-sales-quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .45rem; }
.pos-sales-quick-back, .pos-sales-quick-done { min-height: 2.15rem; border: 0; border-radius: .65rem; font: inherit; font-size: .65rem; font-weight: 900; cursor: pointer; }
.pos-sales-quick-back { border: 1px solid transparent; background: transparent; color: var(--primary); transition: border-color var(--transition-fast), background var(--transition-fast); }
.pos-sales-quick-back:hover { border-color: var(--primary-light); background: var(--primary-light); }
.pos-sales-quick-done { background: var(--accent-gold-gradient); color: #24100b; box-shadow: 0 4px 12px var(--border-gold-glow); transition: filter var(--transition-fast), transform var(--transition-fast); }
.pos-sales-quick-done:hover { filter: brightness(1.06); transform: translateY(-1px); }
.pos-sales-quick-dialog :is(button, [tabindex]):focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 2px; }
.pos-sales-quick-done span { font-size: .9rem; }
.qr-crown-badge { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; margin-top: .18rem; border-radius: 50%; background: rgba(245,158,11,.15); font-size: .95rem; line-height: 1; }

@media (max-width: 380px) {
  .pos-sales-compact-menu { margin-top: .35rem; padding: .4rem; }
  .pos-sales-compact-grid { gap: .32rem; }
  .pos-sales-compact-card { min-height: 3.65rem; padding: .35rem; gap: .28rem; border-radius: .68rem; }
  .pos-sales-compact-icon { width: 1.9rem; height: 1.9rem; flex-basis: 1.9rem; font-size: 1rem; }
  .pos-sales-compact-copy b { font-size: .66rem; }
  .pos-sales-compact-copy small { font-size: .46rem; }
  .pos-sales-compact-copy em { font-size: .45rem; }
  .pos-sales-quick-dialog { width: min(100%, 18rem); padding: .8rem; }
  .pos-sales-quick-product { min-height: 2.8rem; }
}

/* Tarjeta de cuentas legible en teléfonos estrechos: nada debe salir del bloque. */
@media (max-width: 480px) {
  .accounts-master-header {
    box-sizing: border-box;
    overflow: visible !important;
  }

  .accounts-title-left {
    min-width: 0;
    flex-wrap: wrap;
    row-gap: .35rem;
  }

  .accounts-main-heading {
    min-width: 0;
    flex: 1 1 100%;
    line-height: 1.15;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .open-accounts-summary-strip {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    line-height: 1.2;
    white-space: normal !important;
  }

  .summary-pill-item,
  .summary-pill-item strong {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .floating-cart-tab-btn {
    box-sizing: border-box;
    overflow: visible !important;
  }

  .floating-tab-top {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
  }

  .floating-tab-left {
    width: 100% !important;
    flex: 1 1 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .floating-acc-title-row {
    min-width: 0;
    flex-wrap: wrap;
  }

  .floating-acc-name {
    min-width: 0;
    max-width: 100%;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
  }

  .floating-tab-right {
    width: 100% !important;
    justify-content: space-between !important;
    gap: .35rem !important;
  }

  .btn-floating-pay-direct {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    padding-right: .55rem !important;
    padding-left: .55rem !important;
    font-size: .78rem !important;
  }

  .floating-tab-summary-row {
    align-items: flex-start !important;
  }

  .floating-items-summary-text {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .account-chip-main,
  .account-chip-header-tags,
  .account-chip-footer {
    min-width: 0;
  }

  .account-chip-header-tags {
    flex-wrap: wrap;
    white-space: normal !important;
  }

  .account-chip-title,
  .account-chip-count,
  .account-chip-total {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .account-chip-add-btn {
    min-width: 150px !important;
    white-space: normal !important;
  }

  .account-chip-add-btn .account-chip-title,
  .account-chip-add-btn .account-chip-count {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
}

/* Dimensiones finales del carril de cuentas en móvil: todos los elementos quedan alineados. */
@media (max-width: 600px) {
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .accounts-title-left {
    flex-wrap: nowrap !important;
    width: 100% !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .accounts-main-heading {
    display: none !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .btn-recent-orders,
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .open-accounts-summary-strip {
    flex: 0 0 auto !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .btn-recent-orders {
    width: 106px !important;
    min-width: 106px !important;
    padding: 0 0.3rem !important;
    font-size: 0.68rem !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .open-accounts-summary-strip {
    width: 154px !important;
    min-width: 154px !important;
    max-width: 154px !important;
    padding: 0.1rem 0.35rem !important;
    gap: 0.18rem !important;
    font-size: 0.58rem !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip,
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip-add-btn {
    width: 202px !important;
    min-width: 202px !important;
    max-width: 202px !important;
    height: 92px !important;
    min-height: 92px !important;
  }

  /* El contenido se adapta dentro de la tarjeta, nunca por fuera de ella. */
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip {
    overflow: hidden !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip-main,
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip-footer {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip-main {
    align-items: flex-start !important;
    overflow: hidden !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip-header-tags {
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip-title {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip-footer {
    display: grid !important;
    grid-template-columns: max-content max-content !important;
    justify-content: space-between !important;
    align-items: center !important;
    overflow: visible !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip-total,
  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip-count {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip-total {
    flex: 0 0 auto !important;
    font-size: 0.98rem !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .account-chip-count {
    width: max-content !important;
    max-width: max-content !important;
    flex: none !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .open-accounts-summary-strip .summary-pill-item {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.58rem !important;
  }

  body:not(.app-redesign[data-active-tab="pos"]):not(:has(#tab-pos.active)) .open-accounts-summary-strip .summary-pill-item + .summary-pill-item {
    margin-left: 0.2rem !important;
  }
}






.recount-type-stock-card { margin-top: 1rem; }
.recount-type-grid { display: grid; gap: .65rem; margin-top: .85rem; }
.recount-type-row { display: grid; grid-template-columns: minmax(150px, 1fr) auto auto auto; gap: .55rem; align-items: center; padding: .65rem; border-radius: .7rem; background: rgba(255,255,255,.04); }
.recount-type-row label { display: flex; align-items: center; gap: .3rem; font-size: .75rem; color: var(--text-muted); }
.recount-type-row input { width: 4.2rem; padding: .45rem; text-align: center; border: 1px solid var(--border-color); border-radius: .45rem; background: var(--bg-card); color: var(--text-main); font-weight: 700; }
.recount-type-row span { min-width: 5.5rem; text-align: right; font-size: .75rem; color: var(--accent); font-weight: 700; }
@media (max-width: 600px) { .recount-type-row { grid-template-columns: 1fr 1fr; } .recount-type-row strong { grid-column: 1 / -1; } .recount-type-row span { text-align: left; } }

/* Mapa visual de abastecimiento: la cantidad y la línea mínima acompañan
   siempre al color para que la lectura no dependa de la visión cromática. */
#inventoryVisualTable { margin: 0 0 1rem; }
.inventory-visual-card {
  padding: .85rem;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.inventory-visual-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: .8rem;
  margin-bottom: .8rem;
}
.inventory-visual-heading h3 { margin: .15rem 0 .2rem; font-size: 1rem; color: var(--text-main); }
.inventory-visual-heading p { margin: 0; color: var(--text-muted); font-size: .7rem; }
.inventory-visual-legend { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; color: var(--text-muted); font-size: .65rem; white-space: nowrap; }
.legend-dot { width: .55rem; height: .55rem; border-radius: 50%; display: inline-block; }
.legend-sufficient { background: #22c55e; }
.legend-low { background: #f59e0b; }
.legend-empty { background: #ef4444; }
.inventory-visual-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: .65rem; align-items: stretch; }
.inventory-visual-item {
  --visual-bar-height: 142px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: .65rem .6rem .55rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}
.inventory-visual-item.priority-major { --visual-bar-height: 176px; border-width: 2px; box-shadow: 0 8px 18px rgba(0,0,0,.12); }
.inventory-visual-item.priority-major-1 { border-color: rgba(239, 68, 68, .52); }
.inventory-visual-item.priority-major-2 { border-color: rgba(245, 158, 11, .62); }
.inventory-visual-item.priority-major-3 { border-color: rgba(59, 130, 246, .5); }
.inventory-visual-item.status-sufficient { --status-color: #22c55e; }
.inventory-visual-item.status-low { --status-color: #f59e0b; }
.inventory-visual-item.status-empty { --status-color: #ef4444; }
.inventory-visual-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .45rem; min-height: 3.05rem; }
.inventory-visual-item-head h4 { margin: .15rem 0 0; color: var(--text-main); font-size: .76rem; line-height: 1.2; }
.inventory-visual-group { color: var(--text-muted); font-size: .58rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.inventory-visual-status { flex: 0 0 auto; padding: .18rem .35rem; border: 1px solid var(--status-color); border-radius: 999px; color: var(--status-color); font-size: .56rem; font-weight: 900; white-space: nowrap; }
.inventory-visual-bar-button { position: relative; display: flex; flex-direction: column; align-items: center; flex: 1; min-height: calc(var(--visual-bar-height) + 3.2rem); padding: .25rem .1rem .1rem; border: 0; background: transparent; color: inherit; cursor: pointer; }
.inventory-visual-bar-scale { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 100%; height: var(--visual-bar-height); }
.inventory-visual-bar-track { position: relative; z-index: 1; display: block; width: min(54px, 42%); height: 100%; overflow: hidden; border: 1px solid color-mix(in srgb, var(--status-color) 42%, var(--border-color)); border-radius: 9px 9px 4px 4px; background: rgba(148,163,184,.12); }
.inventory-visual-bar-fill { position: absolute; right: 0; bottom: 0; left: 0; display: block; height: var(--stock-height); border-radius: 7px 7px 2px 2px; background: var(--status-color); opacity: .9; transition: height .2s ease; }
.inventory-visual-minimum-line { position: absolute; right: 4%; bottom: var(--minimum-height); left: 4%; z-index: 3; display: flex; justify-content: flex-end; border-top: 2px dashed #f8fafc; pointer-events: none; }
.inventory-visual-minimum-line span { position: relative; top: -1.1rem; padding: .12rem .25rem; border-radius: 4px; background: var(--bg-card); color: var(--text-main); font-size: .55rem; font-weight: 900; white-space: nowrap; }
.inventory-visual-quantity { margin-top: .28rem; color: var(--text-main); font-size: 1.05rem; line-height: 1; }
.inventory-visual-unit { margin-top: .18rem; color: var(--text-muted); font-size: .6rem; }
.inventory-visual-item-foot { display: flex; justify-content: space-between; gap: .35rem; margin-top: .35rem; color: var(--text-muted); font-size: .6rem; }
.inventory-visual-item-foot span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inventory-visual-item-foot strong { color: var(--text-main); }
@media (max-width: 620px) {
  .inventory-visual-heading { align-items: flex-start; flex-direction: column; }
  .inventory-visual-legend { justify-content: flex-start; white-space: normal; }
  .inventory-visual-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
  .inventory-visual-item { --visual-bar-height: 124px; padding: .55rem .45rem .45rem; }
  .inventory-visual-item.priority-major { --visual-bar-height: 150px; }
  .inventory-visual-item-head { display: block; min-height: 3.65rem; }
  .inventory-visual-status { display: inline-block; margin-top: .35rem; }
  .inventory-visual-item-foot { display: block; line-height: 1.35; }
  .inventory-visual-item-foot span { display: block; }
}

/* Tabla compacta para los insumos prioritarios. Los secundarios conservan
   la lista normal de inventario debajo, sin duplicar tarjetas grandes. */
.inventory-priority-table-wrap { overflow-x: auto; border: 1px solid var(--border-color); border-radius: 10px; }
.inventory-priority-table { width: 100%; min-width: 680px; border-collapse: collapse; table-layout: fixed; }
.inventory-priority-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inventory-priority-table th { padding: .55rem .7rem; background: rgba(148,163,184,.09); color: var(--text-muted); font-size: .62rem; font-weight: 900; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.inventory-priority-table th:nth-child(1) { width: 32%; }
.inventory-priority-table th:nth-child(2) { width: 18%; text-align: center; }
.inventory-priority-table th:nth-child(3) { width: 12%; text-align: center; }
.inventory-priority-table th:nth-child(4) { width: 14%; }
.inventory-priority-table th:nth-child(5) { width: 24%; }
.inventory-priority-row { border-top: 1px solid var(--border-color); background: var(--bg-card); }
.inventory-priority-row:hover { background: rgba(148,163,184,.08); }
.inventory-priority-row.priority-major-1 { background: color-mix(in srgb, #ef4444 5%, var(--bg-card)); }
.inventory-priority-row.priority-major-2 { background: color-mix(in srgb, #f59e0b 5%, var(--bg-card)); }
.inventory-priority-row.priority-major-3 { background: color-mix(in srgb, #3b82f6 5%, var(--bg-card)); }
.inventory-priority-row.status-sufficient { --status-color: #22c55e; }
.inventory-priority-row.status-low { --status-color: #f59e0b; }
.inventory-priority-row.status-empty { --status-color: #ef4444; }
.inventory-priority-row td { padding: .5rem .7rem; vertical-align: middle; }
.inventory-priority-name-cell { display: flex; flex-direction: column; gap: .15rem; }
.inventory-priority-name-cell strong { color: var(--text-main); font-size: .78rem; line-height: 1.2; }
.priority-major .inventory-priority-name-cell strong { font-size: .88rem; }
.inventory-priority-stock-cell { text-align: center; }
.inventory-table-bar-button { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; min-width: 58px; padding: .1rem .2rem; border: 0; background: transparent; color: inherit; cursor: pointer; }
.inventory-table-bar-scale { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 22px; height: 64px; }
.inventory-table-bar-track { position: relative; z-index: 1; display: block; width: 17px; height: 100%; overflow: hidden; border: 1px solid color-mix(in srgb, var(--status-color) 48%, var(--border-color)); border-radius: 5px 5px 2px 2px; background: rgba(148,163,184,.12); }
.inventory-table-bar-fill { position: absolute; right: 0; bottom: 0; left: 0; display: block; height: var(--stock-height); border-radius: 4px 4px 1px 1px; background: var(--status-color); }
.inventory-table-minimum-line { position: absolute; right: -11px; bottom: var(--minimum-height); left: -11px; z-index: 2; border-top: 2px dashed var(--text-main); opacity: .65; }
.inventory-table-quantity { display: flex; flex-direction: column; align-items: center; line-height: 1.05; text-align: center; }
.inventory-table-quantity strong { color: var(--text-main); font-size: .92rem; }
.inventory-table-quantity small, .inventory-priority-minimum-cell small { color: var(--text-muted); font-size: .57rem; }
.inventory-priority-minimum-cell { text-align: center; }
.inventory-priority-minimum-cell strong { display: block; color: var(--text-main); font-size: .85rem; }
.inventory-visual-status { display: inline-flex; border-color: var(--status-color); color: var(--status-color); }
.inventory-priority-action-cell { display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: var(--text-muted); font-size: .67rem; }
.inventory-priority-action-cell > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-inventory-table-edit { flex: 0 0 auto; padding: .3rem .5rem; border: 1px solid var(--border-color); border-radius: 6px; background: transparent; color: var(--text-main); font-size: .62rem; font-weight: 800; cursor: pointer; }
.btn-inventory-table-edit:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 620px) {
  .inventory-priority-table { min-width: 650px; }
  .inventory-priority-table th, .inventory-priority-row td { padding-right: .5rem; padding-left: .5rem; }
}

/* Cobro móvil: un solo panel vertical desplaza todo el contenido del formulario. */
#checkoutModal .abono-modal-card,
body.app-redesign #checkoutModal .abono-modal-card {
  width: min(96vw, 440px) !important;
  max-width: 440px !important;
  max-height: min(94dvh, 760px) !important;
  min-width: 0 !important;
}

#checkoutModal .abono-modal-body {
  min-width: 0;
  min-height: 0;
  overflow-x: clip;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#checkoutModal .checkout-invoice-items-list,
#checkoutModal .split-items-picker-list,
#checkoutModal .abono-history-feed {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

#checkoutModal .checkout-invoice-preview-card,
#checkoutModal .abono-action-card,
#checkoutModal .split-items-view-container,
#checkoutModal .abono-financial-summary,
#checkoutModal .abono-modal-footer,
#checkoutModal .checkout-split-mode-tabs {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#checkoutModal .abono-methods-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .4rem;
}

#checkoutModal .btn-method-pill {
  min-width: 0;
  min-height: 44px;
  padding-inline: .25rem;
  white-space: normal;
}

#checkoutModal .mixed-payment-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: .5rem;
}

#checkoutModal .mixed-payment-fields[hidden] { display: none; }
#checkoutModal .mixed-payment-fields label,
#checkoutModal .mixed-payment-cash-summary,
#checkoutModal .group-cash-received-row { min-width: 0; }
#checkoutModal .mixed-payment-fields label { display: grid; gap: .2rem; color: var(--text-muted, #a1a1aa); font-size: .72rem; font-weight: 700; }
#checkoutModal .mixed-payment-cash-summary { padding: .55rem .45rem; border-radius: 7px; background: rgba(255,255,255,.04); color: #a1a1aa; font-size: .72rem; }
#checkoutModal .mixed-payment-cash-summary strong { color: #fff; white-space: nowrap; }
#checkoutModal .group-cash-received-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .2rem; color: #a1a1aa; font-size: .72rem; font-weight: 700; }
#checkoutModal .btn-select-all-items { margin-left: auto; min-height: 36px; padding: .3rem .6rem; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: #18181b; color: #e4e4e7; font: inherit; font-size: .7rem; font-weight: 800; }

@media (max-width: 380px) {
  #checkoutModal .abono-modal-body { padding: .45rem .5rem; }
  #checkoutModal .abono-modal-header { min-width: 0; gap: .35rem; padding-inline: .55rem; }
  #checkoutModal .abono-header-title-box { min-width: 0; }
  #checkoutModal .abono-financial-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .2rem; padding: .4rem .25rem; }
  #checkoutModal .abono-summary-sep { display: none; }
  #checkoutModal .abono-summary-cell { min-width: 0; text-align: center; }
  #checkoutModal .abono-cell-lbl { font-size: .62rem; white-space: normal; }
  #checkoutModal .abono-cell-val { font-size: .8rem; white-space: nowrap; }
  #checkoutModal .abono-inputs-grid { grid-template-columns: minmax(0, 1fr); gap: .45rem; }
  #checkoutModal #splitCashChangeRow { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
  #checkoutModal .checkout-invoice-header { align-items: flex-start; gap: .35rem; }
  #checkoutModal .invoice-mode-badge { flex: 0 0 auto; }
  #checkoutModal .split-item-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  #checkoutModal .split-item-subtotal { grid-column: 1 / -1; text-align: right; }
  #checkoutModal .split-item-name { white-space: normal; overflow-wrap: break-word; }
}
#checkoutModal .mixed-payment-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#checkoutModal .mixed-payment-balance-status { grid-column: 1 / -1; min-height: 1.1em; color: #94a3b8; font-size: .72rem; font-weight: 800; }
#checkoutModal .mixed-payment-balance-status[data-state="valid"] { color: #34d399; }
#checkoutModal .mixed-payment-balance-status[data-state="invalid"] { color: #fca5a5; }
#checkoutModal .mixed-payment-fields label { min-width: 0; }

/* El editor de precios ahora muestra un único importe por producto. */
.pricing-inputs-wrap { grid-template-columns: minmax(0, 1fr); }
