:root {
  color-scheme: light;

  /* ==========================================================================
     TEMA PRINCIPAL POR DEFECTO: ROJO MIAPP (ROSE / SLATE / EMERALD)
     ========================================================================== */
  --navy: #1e293b;
  --navy-hover: #1e293b;
  --purple: #e11d48;
  --purple-hover: #be123c;
  --purple-soft: #ffe4e6;
  --purple-border: #fecdd3;

  --pink: #e11d48;
  --occupied-text: #e11d48;
  --occupied-bg: #fff1f2;
  --occupied-border: #fecdd3;
  --occupied-hover-border: #e11d48;

  --orange: #f59e0b;
  --orange-soft: #fef3c7;
  --orange-border: #fde68a;

  --cyan: #06b6d4;
  --cyan-text: #0891b2;

  --free-text: #047857;
  --free-bg: #ecfdf5;
  --free-border: #a7f3d0;
  --free-hover-border: #10b981;

  /* Superficies neutras */
  --bg-app: #f8fafc;
  --cream: #f8fafc;
  --surface: #ffffff;
  --surface-card: #ffffff;
  --surface-muted: #f8fafc;
  --surface-soft: #f1f5f9;
  --surface-add: #e2e8f0;
  --border: #cbd5e1;
  --border-strong: #94a3b8;
  --line: #cbd5e1;

  /* Texto */
  --text-main: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-placeholder: #94a3b8;
  --ink: #1e293b;
  --muted: #64748b;

  /* Mapeos semánticos miapp */
  --brand: #e11d48;
  --brand-pressed: #be123c;
  --black: #1e293b;
  --black-pressed: #020617;
  --black-soft: #f1f5f9;
  --red: #e11d48;
  --red-pressed: #be123c;
  --red-deep: #9f1239;
  --red-soft: #ffe4e6;
  --red-quiet: #fff1f2;
  --pink-alert: #e11d48;
  --green: #10b981;
  --green-deep: #047857;
  --green-soft: #d1fae5;
  --green-quiet: #ecfdf5;
  --amber: #f59e0b;
  --amber-soft: #fef3c7;
  --focus: rgba(225, 29, 72, 0.14);
  --input-focus-border: var(--brand, #e11d48);
  --input-focus-ring: rgba(225, 29, 72, 0.14);
  --shadow: 0 4px 14px rgba(15, 23, 42, .07);
  --shadow-card: 0 6px 20px rgba(15, 23, 42, 0.05);
  --shadow-card-hover: 0 12px 28px rgba(15, 23, 42, 0.09);
  --shadow-dock: 0 10px 30px rgba(15, 23, 42, 0.12);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-family: var(--font-sans);
}

/* ==========================================================================
   TEMA MORADO ALTERNATIVO (CORPORATE)
   ========================================================================== */
:root[data-theme="corporate"],
html[data-theme="corporate"],
body[data-theme="corporate"],
[data-theme="corporate"] {
  color-scheme: light;
  --navy: #1e293b;
  --navy-hover: #15224A;
  --purple: #7A3CFF;
  --purple-hover: #6628EB;
  --purple-soft: #F3EEFF;
  --purple-border: #D8C7FF;
  --pink: #FF3D8F;
  --occupied-text: #E11D74;
  --occupied-bg: #FFF0F6;
  --occupied-border: #FFCCE0;
  --occupied-hover-border: #E11D48;
  --orange: #FF8A00;
  --orange-soft: #FFF7ED;
  --orange-border: #FED7AA;
  --cyan: #00C2FF;
  --cyan-text: #0084B8;
  --free-text: #059669;
  --free-bg: #ECFDF5;
  --free-border: #A7F3D0;
  --free-hover-border: #10B981;
  --bg-app: #F4F6FB;
  --cream: #F4F6FB;
  --surface: #FFFFFF;
  --surface-card: #FFFFFF;
  --surface-muted: #F8FAFC;
  --surface-soft: #F1F5F9;
  --surface-add: #E2E8F0;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --line: #E2E8F0;
  --text-main: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-placeholder: #94A3B8;
  --ink: #1e293b;
  --muted: #64748B;
  --brand: var(--purple);
  --brand-pressed: var(--purple-hover);
  --black: #1e293b;
  --black-pressed: #020617;
  --black-soft: #F1F5F9;
  --red: var(--purple);
  --red-pressed: var(--purple-hover);
  --red-deep: #4C1D95;
  --red-soft: var(--purple-soft);
  --red-quiet: #FAF5FF;
  --pink-alert: var(--pink);
  --green: #059669;
  --green-deep: #047857;
  --green-soft: #D1FAE5;
  --green-quiet: #ECFDF5;
  --amber: var(--orange);
  --amber-soft: var(--orange-soft);
  --focus: rgba(122, 60, 255, .35);
}

/* ==========================================================================
   TEMA CLÁSICO / ROJO (ROSE / SLATE / EMERALD)
   ========================================================================== */
:root[data-theme="classic"],
html[data-theme="classic"],
body[data-theme="classic"],
[data-theme="classic"],
:root[data-theme="red"],
html[data-theme="red"],
body[data-theme="red"],
[data-theme="red"] {
  color-scheme: light;

  /* Colores base Clásico / Rojo */
  --navy: #1e293b;
  --navy-hover: #1e293b;
  --purple: #e11d48;
  --purple-hover: #be123c;
  --purple-soft: #ffe4e6;
  --purple-border: #fecdd3;

  --pink: #e11d48;
  --occupied-text: #e11d48;
  --occupied-bg: #fff1f2;
  --occupied-border: #fecdd3;
  --occupied-hover-border: #e11d48;

  --orange: #f59e0b;
  --orange-soft: #fef3c7;
  --orange-border: #fde68a;

  --cyan: #06b6d4;
  --cyan-text: #0891b2;

  --free-text: #047857;
  --free-bg: #ecfdf5;
  --free-border: #a7f3d0;
  --free-hover-border: #10b981;

  /* Superficies neutras */
  --bg-app: #f8fafc;
  --cream: #f8fafc;
  --surface: #ffffff;
  --surface-card: #ffffff;
  --surface-muted: #f8fafc;
  --surface-soft: #f1f5f9;
  --surface-add: #e2e8f0;
  --border: #cbd5e1;
  --border-strong: #94a3b8;
  --line: #cbd5e1;

  /* Texto */
  --text-main: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-placeholder: #94a3b8;
  --ink: #1e293b;
  --muted: #64748b;

  /* Mapeos semánticos */
  --brand: #e11d48;
  --brand-pressed: #be123c;
  --black: #1e293b;
  --black-pressed: #020617;
  --black-soft: #f1f5f9;
  --red: #e11d48;
  --red-pressed: #be123c;
  --red-deep: #9f1239;
  --red-soft: #ffe4e6;
  --red-quiet: #fff1f2;
  --pink-alert: #e11d48;
  --green: #10b981;
  --green-deep: #047857;
  --green-soft: #d1fae5;
  --green-quiet: #ecfdf5;
  --amber: #f59e0b;
  --amber-soft: #fef3c7;
  --focus: rgba(225, 29, 72, 0.14);
  --input-focus-border: var(--brand, #e11d48);
  --input-focus-ring: rgba(225, 29, 72, 0.14);
  --shadow: 0 4px 14px rgba(15, 23, 42, .07);
  --shadow-card: 0 6px 20px rgba(15, 23, 42, 0.05);
  --shadow-card-hover: 0 12px 28px rgba(15, 23, 42, 0.09);
  --shadow-dock: 0 10px 30px rgba(15, 23, 42, 0.12);
}

body[data-theme="classic"],
body[data-theme="red"] {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Componentes en Tema Clásico / Rojo */
[data-theme="classic"] .app-header,
[data-theme="red"] .app-header {
  background: #e11d48 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 4px 18px rgba(225, 29, 72, 0.25) !important;
}

[data-theme="classic"] .brand-wordmark .mi,
[data-theme="red"] .brand-wordmark .mi {
  color: #FFE4E6 !important;
  font-weight: 600 !important;
}

[data-theme="classic"] .brand-wordmark .app,
[data-theme="red"] .brand-wordmark .app {
  color: #FFFFFF !important;
  font-weight: 700 !important;
}

[data-theme="classic"] .nav-item.active,
[data-theme="red"] .nav-item.active {
  color: #e11d48 !important;
}

[data-theme="classic"] .nav-item.active svg,
[data-theme="red"] .nav-item.active svg {
  color: #e11d48 !important;
}

[data-theme="classic"] .nav-item:hover,
[data-theme="red"] .nav-item:hover,
[data-theme="classic"] .nav-item.active:hover,
[data-theme="red"] .nav-item.active:hover {
  color: #e11d48 !important;
  background: #fff1f2 !important;
  box-shadow: none !important;
  transform: translateY(-1px) !important;
}

[data-theme="classic"] .nav-item:hover svg,
[data-theme="red"] .nav-item:hover svg {
  color: #e11d48 !important;
  transform: scale(1.05) !important;
}

[data-theme="classic"] .beer-card.is-in-cart,
[data-theme="red"] .beer-card.is-in-cart,
[data-theme="white"] .beer-card.is-in-cart {
  border-color: #e11d48 !important;
  box-shadow: 0 10px 26px rgba(225, 29, 72, 0.14) !important;
}

[data-theme="classic"] .beer-card:hover,
[data-theme="red"] .beer-card:hover,
[data-theme="white"] .beer-card:hover {
  border-color: #fecdd3;
}

[data-theme="classic"] .category-chip.active,
[data-theme="red"] .category-chip.active,
[data-theme="white"] .category-chip.active {
  background: #e11d48 !important;
  border-color: #e11d48 !important;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25) !important;
}

[data-theme="classic"] .table-filter-btn.active,
[data-theme="red"] .table-filter-btn.active,
[data-theme="white"] .table-filter-btn.active {
  background: #e11d48 !important;
  border-color: #e11d48 !important;
}

[data-theme="classic"] .cart-prep-badge.is-add-trigger,
[data-theme="red"] .cart-prep-badge.is-add-trigger,
[data-theme="white"] .cart-prep-badge.is-add-trigger {
  background: #ffe4e6 !important;
  color: #e11d48 !important;
  border-color: #fecdd3 !important;
}

[data-theme="classic"] .cart-prep-badge.is-add-trigger:hover,
[data-theme="red"] .cart-prep-badge.is-add-trigger:hover,
[data-theme="white"] .cart-prep-badge.is-add-trigger:hover {
  background: #e11d48 !important;
  color: #ffffff !important;
}

[data-theme="classic"] .field-control:not(.auth-input):focus,
[data-theme="red"] .field-control:not(.auth-input):focus,
[data-theme="white"] .field-control:not(.auth-input):focus {
  border-color: var(--brand, #e11d48) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14) !important;
}

/* ==========================================================================
   TEMA BLANCO PURO (WHITE THEME) — BASADO EN MIAPP_LOGO_FONDO_BLANCO.PNG
   ========================================================================== */
:root[data-theme="white"],
html[data-theme="white"],
body[data-theme="white"],
[data-theme="white"] {
  color-scheme: light;

  /* Superficies Blancas Luminosas y Limpias */
  --bg-app: #F8FAFC;
  --cream: #F8FAFC;
  --surface: #FFFFFF;
  --surface-card: #FFFFFF;
  --surface-muted: #F8FAFC;
  --surface-soft: #F1F5F9;
  --surface-add: #E2E8F0;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --line: #E2E8F0;

  /* Tipografía Corporativa miapp (#0B1430) */
  --text-main: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-placeholder: #94A3B8;
  --ink: #1e293b;
  --muted: #64748B;

  /* Acentos rojos sobre superficies blancas */
  --navy: #1e293b;
  --navy-hover: #15224A;
  --purple: #e11d48;
  --purple-hover: #be123c;
  --purple-soft: #ffe4e6;
  --purple-border: #fecdd3;

  --pink: #e11d48;
  --occupied-text: #e11d48;
  --occupied-bg: #fff1f2;
  --occupied-border: #fecdd3;
  --occupied-hover-border: #E11D48;

  --orange: #FF8A00;
  --orange-soft: #FFF7ED;
  --orange-border: #FED7AA;

  --cyan: #00C2FF;
  --cyan-text: #0084B8;

  --free-text: #059669;
  --free-bg: #ECFDF5;
  --free-border: #A7F3D0;
  --free-hover-border: #10B981;

  /* Mapeos semánticos */
  --brand: #e11d48;
  --brand-pressed: #be123c;
  --black: #1e293b;
  --black-pressed: #020617;
  --black-soft: #F1F5F9;
  --red: #e11d48;
  --red-pressed: #be123c;
  --red-deep: #9f1239;
  --red-soft: #ffe4e6;
  --red-quiet: #fff1f2;
  --pink-alert: #e11d48;
  --green: #10B981;
  --green-deep: #059669;
  --green-soft: #D1FAE5;
  --green-quiet: #ECFDF5;
  --amber: #FF8A00;
  --amber-soft: #FFF7ED;
  --focus: rgba(124, 58, 237, 0.14);
  --shadow: 0 4px 14px rgba(11, 20, 48, .05);
  --shadow-card: 0 4px 16px rgba(11, 20, 48, 0.04);
  --shadow-card-hover: 0 10px 24px rgba(11, 20, 48, 0.08);
  --shadow-dock: 0 10px 30px rgba(11, 20, 48, 0.08);
}

body[data-theme="white"] {
  background: #F8FAFC !important;
  color: #0B1430 !important;
}

/* Reglas específicas para componentes en Tema Blanco */
[data-theme="white"] .app-header {
  background: #FFFFFF !important;
  border-bottom: 2px solid #e11d48 !important;
  color: #0B1430 !important;
  box-shadow: 0 2px 14px rgba(11, 20, 48, 0.06) !important;
}

[data-theme="white"] .header-item {
  color: #0B1430 !important;
}

[data-theme="white"] .header-btn:hover {
  background: #F1F5F9 !important;
  color: #7A3CFF !important;
}

[data-theme="white"] .header-btn:active {
  background: #E2E8F0 !important;
}

[data-theme="white"] .connection-copy {
  color: #0B1430 !important;
}

[data-theme="white"] .header-status .status-dot {
  border-color: #FFFFFF !important;
}

[data-theme="white"] .brand:hover {
  background: #F1F5F9 !important;
}

[data-theme="white"] .brand-wordmark .mi {
  color: #7A3CFF !important;
  font-weight: 600 !important;
}

[data-theme="white"] .brand-wordmark .app {
  color: #0B1430 !important;
  font-weight: 700 !important;
}

[data-theme="white"] .bottom-nav {
  background: #FFFFFF !important;
  border: 1.5px solid #E2E8F0 !important;
  box-shadow: 0 10px 30px rgba(11, 20, 48, 0.08) !important;
}

[data-theme="white"] .nav-item {
  color: #64748B !important;
}

[data-theme="white"] .nav-item:hover,
[data-theme="white"] .nav-item.active:hover {
  color: #e11d48 !important;
  background: #fff1f2 !important;
  box-shadow: none !important;
  transform: translateY(-1px) !important;
}

[data-theme="white"] .nav-item:hover svg,
[data-theme="white"] .nav-item.active:hover svg {
  color: #e11d48 !important;
  transform: scale(1.05) !important;
}

[data-theme="white"] .nav-item.active {
  color: #e11d48 !important;
}

[data-theme="white"] .nav-item.active .nav-icon {
  background: #ffe4e6 !important;
  color: #e11d48 !important;
}

[data-theme="white"] .panel-card,
[data-theme="white"] .summary-card,
[data-theme="white"] .stat-card,
[data-theme="white"] .orders-stat-card,
[data-theme="white"] .admin-product-card,
[data-theme="white"] .cart-summary-dock,
[data-theme="white"] .cart-items {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}

/* ==========================================================================
   TEMA DE ALTO CONTRASTE (OPTIMIZADO PARA MONITORES VGA, PANTALLAS LCD ANTIGUAS Y TERMINALES POS)
   Diseñado especialmente para pantallas con bajo rango dinámico, lavado de blanco o gamma baja.
   ========================================================================== */
:root[data-theme="vga"],
html[data-theme="vga"],
body[data-theme="vga"],
[data-theme="vga"] {
  color-scheme: light;

  /* Superficies estilo programa de escritorio clásico / Terminal POS de almacén de cadena */
  --bg-app: #eef2f6;
  --cream: #eef2f6;
  --surface: #ffffff;
  --surface-card: #ffffff;
  --surface-muted: #f1f5f9;
  --surface-soft: #dbe2ea;
  --surface-add: #94a3b8;
  --border: #94a3b8;
  --border-strong: #475569;
  --line: #cbd5e1;

  /* Tipografía oscura y de máxima legibilidad estilo sistema ERP / POS */
  --text-main: #0f172a;
  --text-secondary: #1e293b;
  --text-muted: #475569;
  --text-placeholder: #64748b;
  --ink: #0f172a;
  --muted: #475569;

  /* Colores de estado POS clásico de escritorio */
  --navy: #112b4a;
  --navy-hover: #0b1d33;
  --purple: #1d4ed8;
  --purple-hover: #1e40af;
  --purple-soft: #dbeafe;
  --purple-border: #2563eb;

  --pink: #dc2626;
  --occupied-text: #991b1b;
  --occupied-bg: #fee2e2;
  --occupied-border: #ef4444;
  --occupied-hover-border: #b91c1c;

  --orange: #c2410c;
  --orange-soft: #ffedd5;
  --orange-border: #ea580c;

  --cyan: #0284c7;
  --cyan-text: #0369a1;

  --free-text: #14532d;
  --free-bg: #dcfce7;
  --free-border: #22c55e;
  --free-hover-border: #16a34a;

  /* Mapeos semánticos */
  --brand: #1d4ed8;
  --brand-pressed: #1e40af;
  --black: #0f172a;
  --black-pressed: #020617;
  --black-soft: #cbd5e1;
  --red: #dc2626;
  --red-pressed: #b91c1c;
  --red-deep: #991b1b;
  --red-soft: #fee2e2;
  --red-quiet: #fef2f2;
  --pink-alert: #dc2626;
  --green: #15803d;
  --green-deep: #166534;
  --green-soft: #bbf7d0;
  --green-quiet: #dcfce7;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --focus: rgba(29, 78, 216, 0.45);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 1px 4px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 4px 12px rgba(15, 23, 42, 0.12);
  --shadow-dock: 0 -3px 12px rgba(15, 23, 42, 0.09);
}

body[data-theme="vga"] {
  background: #eef2f6 !important;
  color: #0f172a !important;
}

/* Cabecera institucional clásica estilo almacén de cadena / POS retail */
[data-theme="vga"] .app-header {
  background: #112b4a !important;
  border-bottom: 2px solid #0b1d33 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25) !important;
}

[data-theme="vga"] .header-item,
[data-theme="vga"] .connection-copy {
  color: #ffffff !important;
  font-weight: 600 !important;
}

[data-theme="vga"] .header-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}

[data-theme="vga"] .brand-wordmark .mi {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}

[data-theme="vga"] .brand-wordmark .app {
  color: #ffffff !important;
  font-weight: 800 !important;
}

[data-theme="vga"] .header-user-badge,
[data-theme="vga"] .header-business-badge {
  background: #ffffff !important;
  color: #112b4a !important;
  border: none !important;
  font-weight: 800 !important;
}

/* Barra de navegación de escritorio */
[data-theme="vga"] .app-nav {
  background: #ffffff !important;
  border-bottom: 1.5px solid #cbd5e1 !important;
}

[data-theme="vga"] .nav-item {
  color: #475569 !important;
  font-weight: 600 !important;
}

[data-theme="vga"] .nav-item:hover {
  background: #f0f7ff !important;
  color: #1d4ed8 !important;
}

[data-theme="vga"] .nav-item.active {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
  border-bottom: 3px solid #1d4ed8 !important;
}

[data-theme="vga"] .nav-item.active svg {
  color: #1d4ed8 !important;
}

/* Tarjetas, Paneles y Contenedores definidos de software de escritorio */
[data-theme="vga"] .panel-card,
[data-theme="vga"] .summary-card,
[data-theme="vga"] .stat-card,
[data-theme="vga"] .orders-stat-card,
[data-theme="vga"] .admin-product-card,
[data-theme="vga"] .beer-card,
[data-theme="vga"] .table-card,
[data-theme="vga"] .category-chip,
[data-theme="vga"] .modal-content,
[data-theme="vga"] .form-modal-card {
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07) !important;
  border-radius: 12px !important;
}

/* Mesas Libres y Ocupadas con códigos de color de alto reconocimiento visual */
[data-theme="vga"] .table-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

[data-theme="vga"] .table-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12) !important;
}

[data-theme="vga"] .table-card.is-libre,
[data-theme="vga"] .table-card.is-disponible {
  border: 1.5px solid #22c55e !important;
  background: #f0fdf4 !important;
}

[data-theme="vga"] .table-card.is-libre .table-card-status,
[data-theme="vga"] .table-card.is-disponible .table-card-status {
  background: #16a34a !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 1px 2px rgba(22, 163, 74, 0.2) !important;
}

[data-theme="vga"] .table-card.is-libre .table-card-name {
  color: #14532d !important;
}

[data-theme="vga"] .table-card.is-ocupada,
[data-theme="vga"] .table-card.is-occupied,
[data-theme="vga"] .table-card.has-open-account {
  border: 1.5px solid #ef4444 !important;
  background: #fef2f2 !important;
}

[data-theme="vga"] .table-card.is-ocupada .table-card-status,
[data-theme="vga"] .table-card.is-occupied .table-card-status,
[data-theme="vga"] .table-card.has-open-account .table-card-status {
  background: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.2) !important;
}

[data-theme="vga"] .table-card.is-ocupada .table-card-name {
  color: #7f1d1d !important;
}

[data-theme="vga"] .table-card-name {
  font-weight: 800 !important;
  font-size: 14.5px !important;
}

[data-theme="vga"] .table-card-total {
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 1.15rem !important;
  font-variant-numeric: tabular-nums !important;
}

/* Catálogo de Productos y Botones de Venta */
[data-theme="vga"] .beer-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

[data-theme="vga"] .beer-card:hover {
  border-color: #2563eb !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12) !important;
  transform: translateY(-1px);
}

[data-theme="vga"] .beer-card.is-in-cart {
  border: 2px solid #1d4ed8 !important;
  background: #f0f7ff !important;
}

[data-theme="vga"] .beer-name {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="vga"] .beer-price {
  color: #112b4a !important;
  font-weight: 800 !important;
  font-size: 1.05rem !important;
  font-variant-numeric: tabular-nums !important;
}

[data-theme="vga"] .beer-category {
  color: #64748b !important;
  font-weight: 600 !important;
}

[data-theme="vga"] .category-chip {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  transition: all 0.14s ease;
}

[data-theme="vga"] .category-chip:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

[data-theme="vga"] .category-chip.active {
  background: #112b4a !important;
  color: #ffffff !important;
  border-color: #112b4a !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 5px rgba(17, 43, 74, 0.25) !important;
}

/* Botones de acción principales de caja (Verde POS ergonómico para cobrar/confirmar) */
[data-theme="vga"] .primary-action,
[data-theme="vga"] .charge-button,
[data-theme="vga"] .new-order-button {
  background: #15803d !important;
  border: 1px solid #166534 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 4px rgba(21, 128, 61, 0.25) !important;
  transition: all 0.14s ease;
}

[data-theme="vga"] .primary-action:hover,
[data-theme="vga"] .charge-button:hover,
[data-theme="vga"] .new-order-button:hover {
  background: #166534 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(21, 128, 61, 0.3) !important;
}

[data-theme="vga"] .primary-action:active,
[data-theme="vga"] .charge-button:active,
[data-theme="vga"] .new-order-button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(21, 128, 61, 0.2) !important;
}

[data-theme="vga"] .danger-action {
  background: #dc2626 !important;
  border: 1px solid #b91c1c !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

[data-theme="vga"] .danger-action:hover {
  background: #b91c1c !important;
}

/* Pestañas segmentadas de filtro de mesas y pedidos estilo software de escritorio */
[data-theme="vga"] .table-filter-btn,
[data-theme="vga"] .status-filter {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #334155 !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  transition: all 0.14s ease;
}

[data-theme="vga"] .table-filter-btn:hover,
[data-theme="vga"] .status-filter:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

[data-theme="vga"] .table-filter-btn.active,
[data-theme="vga"] .status-filter.active {
  background: #112b4a !important;
  border-color: #112b4a !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 5px rgba(17, 43, 74, 0.25) !important;
}

[data-theme="vga"] .table-filter-badge,
[data-theme="vga"] .status-filter span {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
}

[data-theme="vga"] .table-filter-btn.active .table-filter-badge,
[data-theme="vga"] .status-filter.active span {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}

/* Campos de Formulario y Entradas de texto estilo ventana de software */
[data-theme="vga"] .field-control,
[data-theme="vga"] input[type="text"],
[data-theme="vga"] input[type="password"],
[data-theme="vga"] input[type="number"],
[data-theme="vga"] input[type="search"],
[data-theme="vga"] select,
[data-theme="vga"] textarea {
  border: 1.5px solid #94a3b8 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
}

[data-theme="vga"] .field-control:focus,
[data-theme="vga"] input:focus,
[data-theme="vga"] select:focus,
[data-theme="vga"] textarea:focus {
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.22) !important;
}

/* Carrito y dock de comanda con aspecto de recibo y display numérico de caja */
[data-theme="vga"] .cart-summary-dock,
[data-theme="vga"] .cart-sheet,
[data-theme="vga"] .desktop-cart {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 -3px 12px rgba(15, 23, 42, 0.09) !important;
}

[data-theme="vga"] .cart-item {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="vga"] .cart-item-name {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="vga"] .cart-item-price,
[data-theme="vga"] .cart-item-qty {
  color: #0f172a !important;
  font-variant-numeric: tabular-nums !important;
}

[data-theme="vga"] .cart-qty-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  border-radius: 6px !important;
}

[data-theme="vga"] .cart-qty-btn:hover {
  background: #e2e8f0 !important;
}

[data-theme="vga"] .cart-table-pill {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
  font-weight: 700 !important;
}

[data-theme="vga"] .cart-total-value {
  color: #0f172a !important;
  font-weight: 900 !important;
  font-size: 1.45rem !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: -0.02em !important;
}

/* Modal de Cobro y Métodos de Pago POS */
[data-theme="vga"] .payment-method {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #334155 !important;
  border-radius: 10px !important;
  transition: all 0.14s ease;
}

[data-theme="vga"] .payment-method:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

[data-theme="vga"] .payment-method[data-payment-method="cash"].active,
[data-theme="vga"] .payment-method.is-cash.active {
  background: #f0fdf4 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
  box-shadow: 0 0 0 1.5px #10b981 !important;
}

[data-theme="vga"] .payment-method[data-payment-method="cash"].active > span,
[data-theme="vga"] .payment-method.is-cash.active > span {
  background: #10b981 !important;
  color: #ffffff !important;
}

[data-theme="vga"] .payment-method[data-payment-method="card"].active,
[data-theme="vga"] .payment-method.is-card.active {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
  color: #1e40af !important;
  box-shadow: 0 0 0 1.5px #3b82f6 !important;
}

[data-theme="vga"] .payment-method[data-payment-method="card"].active > span,
[data-theme="vga"] .payment-method.is-card.active > span {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

[data-theme="vga"] .payment-method[data-payment-method="transfer"].active,
[data-theme="vga"] .payment-method.is-transfer.active {
  background: #f5f3ff !important;
  border-color: #8b5cf6 !important;
  color: #5b21b6 !important;
  box-shadow: 0 0 0 1.5px #8b5cf6 !important;
}

[data-theme="vga"] .payment-method[data-payment-method="transfer"].active > span,
[data-theme="vga"] .payment-method.is-transfer.active > span {
  background: #8b5cf6 !important;
  color: #ffffff !important;
}

[data-theme="vga"] .payment-balance-block {
  border-bottom: 1.5px solid #e2e8f0 !important;
  color: #475569 !important;
}

[data-theme="vga"] .payment-balance-value {
  color: #0f172a !important;
  font-weight: 900 !important;
  font-variant-numeric: tabular-nums !important;
}

[data-theme="vga"] .payment-clean-input {
  border: 1.5px solid #94a3b8 !important;
  color: #0f172a !important;
  background: #ffffff !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums !important;
}

[data-theme="vga"] .payment-clean-input:focus {
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.22) !important;
}

[data-theme="vga"] .payment-inline-calc.is-change {
  color: #15803d !important;
  font-weight: 800 !important;
}

[data-theme="vga"] .payment-inline-calc.is-remaining {
  color: #dc2626 !important;
  font-weight: 800 !important;
}

[data-theme="vga"] .payment-partial-history {
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
}

/* Modales y Ventanas de diálogo estilo aplicación nativa */
[data-theme="vga"] .picker-card,
[data-theme="vga"] .success-card,
[data-theme="vga"] .form-modal-card,
[data-theme="vga"] .profile-modal-card {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.22) !important;
  border-radius: 14px !important;
}

[data-theme="vga"] .modal-close {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  border-radius: 8px !important;
}

[data-theme="vga"] .modal-close:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Comprobante de Venta Térmico en pantalla LCD */
[data-theme="vga"] .thermal-receipt-modal-inner {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12) !important;
}

/* Selector de Mesas modal */
[data-theme="vga"] .picker-tabs {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
}

[data-theme="vga"] .picker-tab {
  color: #475569 !important;
  font-weight: 600 !important;
}

[data-theme="vga"] .picker-tab.active {
  background: #112b4a !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(17, 43, 74, 0.2) !important;
}

[data-theme="vga"] .picker-table {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="vga"] .picker-table:hover {
  border-color: #1d4ed8 !important;
  background: #f0f7ff !important;
}

/* Botones secundarios y acciones */
[data-theme="vga"] .secondary-action {
  border: 1.5px solid #cbd5e1 !important;
  color: #1e293b !important;
  font-weight: 600 !important;
  background: #ffffff !important;
  border-radius: 8px !important;
}

[data-theme="vga"] .secondary-action:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

/* Modales y Drawer con fondo oscuro translúcido ergonómico */
[data-theme="vga"] .modal-overlay,
[data-theme="vga"] .drawer-overlay {
  background: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(2px) !important;
  -webkit-backdrop-filter: blur(2px) !important;
}

/* Barra de desplazamiento ergonómica para monitores y terminales de escritorio */
[data-theme="vga"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

[data-theme="vga"] ::-webkit-scrollbar-track {
  background: #eef2f6;
}

[data-theme="vga"] ::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

[data-theme="vga"] ::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Compatibilidad automática para sistemas o monitores configurados con alto contraste */
@media (prefers-contrast: more) {
  body {
    --bg-app: #e2e8f0;
    --border: #64748b;
    --text-main: #000000;
    --text-secondary: #0f172a;
    --text-muted: #1e293b;
    background: #e2e8f0 !important;
  }

  .panel-card,
  .summary-card,
  .stat-card,
  .orders-stat-card,
  .admin-product-card,
  .beer-card,
  .table-card,
  .modal-content {
    border: 1.5px solid #64748b !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16) !important;
  }

  .field-control,
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  select,
  textarea {
    border: 1.5px solid #475569 !important;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg-app);
  font-family: var(--font-sans);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@supports (overflow: clip) {

  html,
  body {
    overflow-x: clip;
  }
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.stat-value,
.balance-amount,
.due-amount,
.table-number,
.order-card-total strong,
.cart-line-total,
.subtotal-row strong,
.summary-total strong,
.cash-summary-total strong,
.daily-summary-total strong,
.admin-product-price,
.receipt-total strong {
  font-variant-numeric: tabular-nums;
}

.app-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  width: 100%;
  height: 62px;
  background: var(--purple);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 0 24px;
  margin: 0;
  box-shadow: 0 4px 18px var(--focus) !important;
  display: flex;
  align-items: center;
}

.app-header-inner {
  max-width: 1400px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-shell {
  max-width: 1400px;
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 16px 24px calc(100px + env(safe-area-inset-bottom));
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: transform .12s ease;
  color: #FFFFFF;
  text-decoration: none;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-official-logo,
.brand-official-symbol {
  box-sizing: content-box;
  background: #fff;
  border-radius: 6px;
  object-fit: contain;
  user-select: none;
}

.brand-official-logo {
  display: block;
  height: 36px;
  width: auto;
  padding: 2px 6px;
}

.brand-official-symbol {
  display: none;
  width: 30px;
  height: 30px;
  padding: 3px;
}

.brand-header-light-symbol,
.brand-header-light-wordmark {
  display: none;
  object-fit: contain;
  user-select: none;
}

[data-theme="classic"] .brand-official-logo,
[data-theme="classic"] .brand-official-symbol,
[data-theme="corporate"] .brand-official-logo,
[data-theme="corporate"] .brand-official-symbol {
  display: none;
}

[data-theme="classic"] .brand-header-light-symbol,
[data-theme="corporate"] .brand-header-light-symbol {
  display: block;
  width: 36px;
  height: 36px;
}

[data-theme="classic"] .brand-header-light-wordmark,
[data-theme="corporate"] .brand-header-light-wordmark {
  display: block;
  height: 24px;
  width: auto;
}

.brand-logo {
  display: block;
  height: 36px;
  width: 36px;
  border-radius: 0;
  object-fit: contain;
  filter: none !important;
  box-shadow: none;
  background: transparent;
}

.brand-logo-red {
  display: none;
}

[data-theme="white"] .brand-logo-light {
  display: none;
}

[data-theme="white"] .brand-logo-red {
  display: block;
}

[data-theme="classic"] .brand-logo,
[data-theme="red"] .brand-logo,
[data-theme="corporate"] .brand-logo {
  filter: none !important;
}

.brand-wordmark-img {
  display: block;
  height: 24px;
  width: auto;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.brand-wordmark-light {
  display: block;
}

.brand-wordmark-color {
  display: none;
}

[data-theme="white"] .brand-wordmark-light {
  display: none;
}

[data-theme="white"] .brand-wordmark-color {
  display: block;
}

.brand-wordmark {
  font-family: 'Montserrat', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  user-select: none;
}

.brand-wordmark .mi {
  color: #FFE4E6;
  font-weight: 600;
  margin-right: 0.5px;
  transition: color .2s ease;
}

.brand-wordmark .app {
  color: #FFFFFF;
  font-weight: 700;
  transition: color .2s ease;
}

@media (max-width: 768px) {
  .brand-official-logo {
    display: none;
  }

  .brand-official-symbol {
    display: block;
    background: transparent;
  }

  [data-theme="vga"] .brand-official-symbol {
    display: none;
  }

  [data-theme="vga"] .brand-header-light-symbol {
    display: block;
    width: 36px;
    height: 36px;
  }

  [data-theme="classic"] .brand-header-light-wordmark,
  [data-theme="corporate"] .brand-header-light-wordmark {
    display: none;
  }

  .brand-wordmark,
  .brand-wordmark-img {
    display: none !important;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  gap: 20px;
  min-width: 0;
}

.header-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 46px;
  min-height: 40px;
  padding: 4px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: normal;
  text-decoration: none;
  box-shadow: none !important;
  user-select: none;
  transition: background-color .18s ease, color .18s ease;
}

.header-btn {
  cursor: pointer;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.header-btn:active {
  background: rgba(255, 255, 255, 0.16) !important;
}

.header-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* Insignia circular con iniciales del usuario logueado en el botón de cuenta */
.header-user-badge,
.header-business-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--red, #e11d48);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.2px;
  text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, background-color 0.15s ease;
  flex-shrink: 0;
  user-select: none;
}

.header-btn:hover .header-user-badge,
.header-btn:hover .header-business-badge {
  transform: scale(1.08);
}

[data-theme="white"] .header-user-badge,
[data-theme="white"] .header-business-badge {
  background: #0f172a;
  color: #ffffff;
}

[data-theme="corporate"] .header-user-badge,
[data-theme="corporate"] .header-business-badge {
  background: #ffffff;
  color: var(--purple, #7a3cff);
}

[data-theme="vga"] .header-user-badge,
[data-theme="vga"] .header-business-badge {
  background: #ffffff;
  color: #1e3a8a;
}

@media (max-width: 480px) {

  .header-user-badge,
  .header-business-badge {
    width: 18px;
    height: 18px;
    font-size: 8.5px;
  }
}

/* Estado de conexión (En línea: icono arriba, texto debajo, alineado con los botones) */
.header-status {
  background: transparent !important;
  cursor: default;
}

.header-status .status-dot-wrap {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.header-status .status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2.5px rgba(16, 185, 129, .25);
}

.header-status.offline .status-dot {
  background: #fbbf24;
  box-shadow: 0 0 0 2.5px rgba(251, 191, 36, .25);
}

.connection-copy {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.92);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .screen.active {
    animation: fade-in .22s ease-out;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.orders-hero {
  margin: 0 0 14px;
}

.orders-hero h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.7px;
  line-height: 1.15;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--purple);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-top: 0;
}

h1 {
  max-width: 580px;
  margin-bottom: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.7px;
}

h2 {
  margin-bottom: 4px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.4px;
}

h3 {
  margin-bottom: 4px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

h4 {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
}

h5 {
  font-size: 14px;
  font-weight: 700;
}

h6 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

p {
  margin-top: 0;
}

.subtle,
.section-heading p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 500;
}

/* ==========================================================================
   SISTEMA UNIFICADO DE BOTONES (SÓLIDOS, ESTRUCTURADOS, SIN SOMBRAS)
   ========================================================================== */
.new-order-button,
.primary-action,
.secondary-action,
.pending-order-button,
.pay-now-button,
.close-account-button,
.serve-button,
.outline-action,
.admin-btn,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  box-shadow: none !important;
  text-shadow: none !important;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
  user-select: none;
}

.new-order-button:hover:not(:disabled),
.primary-action:hover:not(:disabled),
.secondary-action:hover:not(:disabled),
.pending-order-button:hover:not(:disabled),
.pay-now-button:hover:not(:disabled),
.close-account-button:hover:not(:disabled),
.serve-button:hover:not(:disabled),
.outline-action:hover:not(:disabled),
.admin-btn:hover:not(:disabled),
.danger-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: none !important;
}

.new-order-button:active:not(:disabled),
.primary-action:active:not(:disabled),
.secondary-action:active:not(:disabled),
.pending-order-button:active:not(:disabled),
.pay-now-button:active:not(:disabled),
.close-account-button:active:not(:disabled),
.serve-button:active:not(:disabled),
.outline-action:active:not(:disabled),
.admin-btn:active:not(:disabled),
.danger-button:active:not(:disabled) {
  transform: translateY(0);
}

.new-order-button:disabled,
.primary-action:disabled,
.secondary-action:disabled,
.pending-order-button:disabled,
.pay-now-button:disabled,
.close-account-button:disabled,
.serve-button:disabled,
.outline-action:disabled,
.admin-btn:disabled,
.danger-button:disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* 1. Botón Primario Sólido (Rojo de marca unificado: Registrar pago, Nuevo pedido, Guardar, Reimprimir) */
.new-order-button,
.primary-action,
.pay-now-button,
.close-account-button,
.print-order-button,
.danger-button {
  background: var(--red);
  color: #ffffff !important;
  border: 0;
  min-height: 46px;
  padding: 0 18px;
  font-size: 13.5px;
}

.new-order-button span {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
}

.new-order-button:hover:not(:disabled),
.primary-action:hover:not(:disabled),
.pay-now-button:hover:not(:disabled),
.close-account-button:hover:not(:disabled),
.print-order-button:hover:not(:disabled),
.danger-button:hover:not(:disabled) {
  background: var(--red-pressed);
  color: #ffffff !important;
}

.new-order-button:active:not(:disabled),
.primary-action:active:not(:disabled),
.pay-now-button:active:not(:disabled),
.close-account-button:active:not(:disabled),
.print-order-button:active:not(:disabled),
.danger-button:active:not(:disabled) {
  background: var(--red-deep);
}

/* 2. Botón Operativo Despacho / Entrega (Negro tinta sólido) */
.serve-button {
  background: var(--ink);
  color: #ffffff !important;
  border: 0;
  min-height: 44px;
  padding: 0 16px;
  font-size: 12.5px;
}

.serve-button:hover:not(:disabled) {
  background: #1e293b;
  color: #ffffff !important;
}

.serve-button:active:not(:disabled) {
  background: #020617;
}

/* 3. Botón Secundario / Neutro Sólido (Blanco con borde) */
.secondary-action,
.pending-order-button,
.outline-action,
.admin-btn.edit {
  background: var(--surface);
  color: var(--ink) !important;
  border: 1.5px solid var(--line);
  min-height: 46px;
  padding: 0 16px;
  font-size: 13px;
}

.secondary-action:hover:not(:disabled),
.pending-order-button:hover:not(:disabled),
.outline-action:hover:not(:disabled),
.admin-btn.edit:hover:not(:disabled) {
  background: var(--surface-soft);
  border-color: #94a3b8;
  color: var(--ink) !important;
}

.secondary-action:active:not(:disabled),
.pending-order-button:active:not(:disabled),
.outline-action:active:not(:disabled) {
  background: #e2e8f0;
}

.pending-order-button.is-primary-cta {
  background: var(--red);
  color: #ffffff !important;
  border-color: var(--red);
  font-weight: 600;
}

.pending-order-button.is-primary-cta:hover:not(:disabled) {
  background: var(--red-deep);
  border-color: var(--red-deep);
  color: #ffffff !important;
}

/* 4. Botón de Alerta / Cancelar / Anular */
.outline-action.cancel-order-button,
.cancel-order-button,
.admin-btn.delete {
  background: var(--surface, #ffffff);
  color: var(--muted) !important;
  border: 1.5px solid var(--line);
  min-height: 44px;
  padding: 0 14px;
  font-size: 12.5px;
}

.outline-action.cancel-order-button:hover:not(:disabled),
.cancel-order-button:hover:not(:disabled),
.admin-btn.delete:hover:not(:disabled) {
  background: var(--occupied-bg);
  color: var(--pink) !important;
  border-color: var(--occupied-border);
}

/* 5. Botón de Acción Operativa Sólido (Servir / Despachar) */
.serve-button {
  background: var(--ink);
  color: #ffffff !important;
  border: 0;
  min-height: 40px;
  padding: 0 14px;
  font-size: 12px;
  border-radius: 11px;
}

.serve-button:hover:not(:disabled) {
  background: #334155;
  color: #ffffff !important;
}

/* 6. Botones de Icono (.icon-button, modales, hojas y controles) */
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(11, 20, 48, .04);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.icon-button:hover:not(:disabled) {
  background: var(--surface-soft);
  border-color: #94a3b8;
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(11, 20, 48, .08);
}

.icon-button:active:not(:disabled) {
  transform: translateY(0.5px) scale(0.96);
  background: #e2e8f0;
  box-shadow: none;
}

.icon-button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.icon-button:disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Regla universal para SVGs dentro de botones de icono y modales */
.icon-button svg,
.back-button svg,
.modal-close svg,
.picker-close svg,
.receipt-modal-close svg,
.cancel-order-modal-close svg,
.sheet-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  flex-shrink: 0;
}

/* Botón de cierre unificado en todas las modales, selectores y carrito */
.modal-close,
.picker-close,
.receipt-modal-close,
.cancel-order-modal-close,
#closeCartButton {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  color: var(--muted);
  background: var(--surface);
  border: 1.5px solid var(--line);
}

.modal-close,
.picker-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
}

.receipt-modal-close,
.cancel-order-modal-close {
  position: static;
}

.modal-close:hover:not(:disabled),
.picker-close:hover:not(:disabled),
.receipt-modal-close:hover:not(:disabled),
.cancel-order-modal-close:hover:not(:disabled),
#closeCartButton:hover:not(:disabled) {
  background: var(--occupied-bg);
  border-color: var(--occupied-border);
  color: var(--pink);
}

.shift-refresh-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  color: var(--muted);
}

.shift-refresh-btn svg {
  width: 18px;
  height: 18px;
}

.shift-refresh-btn.is-spinning svg {
  animation: shift-refresh-spin .75s linear infinite;
}

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

.admin-daily-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.shift-closure-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 10px;
  min-height: 34px;
}

.shift-closure-tool-btn.is-excel {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.shift-closure-tool-btn.is-excel:hover:not(:disabled) {
  background: #dcfce7;
  border-color: #86efac;
}

.shift-closure-tool-btn.is-busy {
  opacity: 0.65;
  cursor: wait;
}

.thermal-closure-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  margin: 4px 0 6px;
}

.thermal-closure-grid {
  display: grid;
  gap: 3px;
  font-size: 10.5px;
}

.thermal-closure-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 0.9fr;
  gap: 4px;
  align-items: center;
  text-align: right;
}

.thermal-closure-row> :first-child {
  text-align: left;
}

.thermal-closure-row.is-head {
  font-weight: 700;
  font-size: 10px;
  border-bottom: 1px dashed #94a3b8;
  padding-bottom: 2px;
}

.thermal-closure-row.is-total {
  border-top: 1px dashed #94a3b8;
  padding-top: 3px;
  margin-top: 2px;
}

.thermal-closure-shift-item {
  padding: 4px 0;
  border-bottom: 1px dotted #cbd5e1;
  font-size: 10.5px;
}

.thermal-closure-shift-item:last-child {
  border-bottom: 0;
}

.thermal-closure-shift-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.thermal-closure-note {
  margin-top: 6px;
  padding: 4px 6px;
  font-size: 10.5px;
  border: 1px dashed #94a3b8;
  border-radius: 4px;
}

.thermal-closure-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0 8px;
  text-align: center;
  font-size: 10px;
}

.thermal-closure-signatures.is-single {
  grid-template-columns: 1fr;
  max-width: 72%;
  margin-left: auto;
  margin-right: auto;
}

.thermal-closure-signatures .sig-line {
  display: block;
  border-top: 1px solid #0f172a;
  margin-bottom: 3px;
}

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

.tables-toolbar-info {
  min-width: 0;
}

.tables-toolbar h1 {
  margin: 0;
  font-size: clamp(22px, 4.5vw, 26px);
  font-weight: 600;
  line-height: 1.15;
}

.tables-toolbar-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.tables-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.tables-toolbar .new-order-button {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tables-toolbar+.quick-stats {
  margin-top: 0;
}

/* Filtros segmentados para mesas (Píldoras idénticas a la plantilla) */
.tables-filter-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tables-filter-tabs::-webkit-scrollbar {
  display: none;
}

.table-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1.5px solid var(--border-strong, #cbd5e1);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all .18s ease;
  cursor: pointer;
}

.table-filter-btn:hover {
  border-color: var(--purple);
  color: var(--text-main);
  background: var(--surface);
}

.table-filter-btn.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  box-shadow: 0 4px 12px var(--focus);
}

.table-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: #f1f5f9;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  transition: all .18s ease;
}

.table-filter-btn.active .table-filter-badge {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background-color .15s ease, box-shadow .15s ease;
}

.status-indicator-dot.occupied {
  background: var(--pink, #FF3D8F);
}

.status-indicator-dot.free {
  background: var(--free-text, #059669);
}

.status-indicator-dot.particular {
  background: #8B5CF6;
}

.status-indicator-dot.takeaway {
  background: var(--orange, #FF8A00);
}

.status-indicator-dot.delivery {
  background: var(--cyan, #00C2FF);
}

.table-filter-btn.active .status-indicator-dot.occupied {
  background: #fff;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .4);
}

.table-filter-btn.active .status-indicator-dot.free {
  background: #a7f3d0;
}

.table-filter-btn.active .status-indicator-dot.particular {
  background: #ddd6fe;
}

.table-filter-btn.active .status-indicator-dot.takeaway {
  background: #fef3c7;
}

.table-filter-btn.active .status-indicator-dot.delivery {
  background: #cffafe;
}

.table-filter-btn#filterParticularBtn.has-active-orders {
  border-color: #c4b5fd;
  color: #6d28d9;
}

.table-filter-btn#filterParticularBtn.has-active-orders .table-filter-badge {
  background: #ede9fe;
  color: #7c3aed;
}

.table-filter-btn#filterParticularBtn.active.has-active-orders {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.table-filter-btn#filterParticularBtn.active.has-active-orders .table-filter-badge {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}

.table-filter-btn#filterTakeawayBtn.has-active-orders {
  border-color: #fde68a;
  color: #b45309;
}

.table-filter-btn#filterTakeawayBtn.has-active-orders .table-filter-badge {
  background: #fef3c7;
  color: #b45309;
}

.table-filter-btn#filterTakeawayBtn.active.has-active-orders {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

.table-filter-btn#filterTakeawayBtn.active.has-active-orders .table-filter-badge {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}

.table-filter-btn#filterDeliveryBtn.has-active-orders {
  border-color: #a5f3fc;
  color: #0e7490;
}

.table-filter-btn#filterDeliveryBtn.has-active-orders .table-filter-badge {
  background: #cffafe;
  color: #0e7490;
}

.table-filter-btn#filterDeliveryBtn.active.has-active-orders {
  background: #0891b2;
  border-color: #0891b2;
  color: #fff;
}

.table-filter-btn#filterDeliveryBtn.active.has-active-orders .table-filter-badge {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}

.quick-stats {
  display: none !important;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(11, 20, 48, .03);
  transition: border-color .15s;
}

.stat-card:hover {
  border-color: #94a3b8;
}

.stat-icon {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}

.stat-icon.amber {
  background: var(--red-soft);
  color: var(--red-deep);
}

.stat-icon.green {
  background: var(--green-soft);
  color: var(--green-deep);
}

.stat-icon.ink {
  background: var(--surface-soft);
  color: var(--ink);
}

.stat-card strong,
.stat-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

.stat-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 2px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-bottom: 3px;
}

.text-button {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button:hover {
  color: var(--ink);
}

.category-row,
.order-status-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-row::-webkit-scrollbar,
.order-status-tabs::-webkit-scrollbar {
  display: none;
}

.category-row.is-dragging,
.order-status-tabs.is-dragging {
  cursor: grabbing !important;
}

.category-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
  transition: all .16s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
}

.category-chip-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke-width: 2.1;
  color: inherit;
  display: inline-block;
  vertical-align: middle;
}

.category-chip-icon.category-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

.category-chip:hover {
  border-color: #94a3b8;
  background: var(--surface-soft);
  color: var(--ink);
}

.category-chip.active {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 12px var(--focus);
}

.category-chip.active .category-chip-icon {
  color: #fff;
}

/* REORDENAR CATEGORÍAS (DRAG & DROP) */
.category-chip.is-draggable {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.category-chip.is-dragging-chip {
  opacity: 0.95;
  transform: scale(1.08) translateY(-4px) !important;
  border-color: var(--purple) !important;
  background: var(--purple-soft) !important;
  color: var(--purple) !important;
  box-shadow: 0 10px 28px var(--focus) !important;
  z-index: 100;
  cursor: grabbing !important;
  pointer-events: none !important;
}

.category-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1;
  margin-right: 2px;
  opacity: 0.45;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity .15s ease, color .15s ease;
}

.category-chip:hover .category-grip,
.is-reordering-mode .category-grip {
  opacity: 1;
  color: var(--ink);
}

.category-reorder-toggle-btn {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: all .16s ease;
}

.category-reorder-toggle-btn:hover {
  border-color: #94a3b8;
  color: var(--ink);
  background: var(--surface-soft);
}

.category-reorder-toggle-btn.is-active {
  border-color: #059669;
  border-style: solid;
  background: #ecfdf5;
  color: #047857;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.15);
}

.category-reorder-reset-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: all .15s ease;
}

.category-reorder-reset-btn:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: var(--occupied-bg);
}

.category-row.is-reordering-mode .category-chip {
  touch-action: none;
}

/* Modal y selector interactivo de categorías e iconos personalizados */
.category-modal-card {
  max-width: 460px;
  width: 100%;
}

.category-inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 14px;
}

.category-inline-form .field-control {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
}

.category-search-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.category-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.category-search-wrap .field-control {
  width: 100%;
  padding-left: 36px;
}

.category-inline-form .primary-action,
.category-inline-form .secondary-action {
  min-height: 42px;
  padding: 0 14px;
  flex-shrink: 0;
}

.category-simple-table-wrap {
  max-height: 300px;
  overflow-y: auto;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.category-simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.category-simple-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1.5px solid var(--line);
}

.category-simple-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.category-simple-table tbody tr:last-child td {
  border-bottom: 0;
}

.category-simple-table tbody tr.is-selected {
  background: rgba(124, 58, 237, 0.06);
}

.category-simple-name {
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.category-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
}

.category-row-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-row-btn:hover {
  background: var(--surface-soft);
  color: var(--ink);
  transform: scale(1.1);
}

.category-row-btn:active {
  transform: scale(0.95);
}

.category-row-btn.is-delete {
  color: var(--muted);
}

.category-row-btn.is-delete:hover {
  background: var(--occupied-bg, #fff1f2);
  color: var(--pink, #be123c);
}

.category-system-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.category-simple-empty {
  padding: 20px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Sección superior para Barra / Particulares */
.quick-orders-section {
  margin: 4px 0 16px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(11, 20, 48, .03);
}

.quick-orders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.quick-orders-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
}

.quick-orders-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1 1 260px;
  min-width: 0;
}

.quick-orders-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 320px;
  min-width: 0;
}

.quick-orders-search-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
  transition: color .15s ease;
}

.quick-orders-search-input {
  width: 100%;
  height: 36px;
  padding: 0 34px 0 36px;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.quick-orders-search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.quick-orders-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.quick-orders-search-input:hover {
  border-color: #cbd5e1;
}

.quick-orders-search-input:focus {
  border-color: var(--brand, #e11d48);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14);
}

.quick-orders-search:focus-within .quick-orders-search-icon {
  color: var(--brand);
}

.quick-orders-search-clear {
  position: absolute;
  right: 8px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.quick-orders-search-clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.quick-orders-search-clear[hidden] {
  display: none;
}

.quick-orders-clear-btn {
  margin-top: 10px;
  padding: 7px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.quick-orders-clear-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

@media (max-width: 640px) {
  .quick-orders-header {
    gap: 10px;
  }

  .quick-orders-tools {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .quick-orders-search {
    max-width: none;
    flex: 1 1 auto;
  }
}

[data-theme="vga"] .quick-orders-search-input,
[data-theme="vga"] .quick-orders-clear-btn {
  border-radius: 4px;
}

/* Buscador rápido / lector láser de productos en Ajuste de Inventario */
.adjust-product-combobox {
  position: relative;
}

.adjust-product-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.adjust-product-search-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
}

.adjust-product-search-input {
  padding-left: 36px !important;
  padding-right: 34px !important;
}

.adjust-product-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.adjust-product-clear-btn {
  position: absolute;
  right: 8px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.adjust-product-clear-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.adjust-product-clear-btn[hidden] {
  display: none;
}

.adjust-product-selected-pill {
  margin-top: 6px;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.adjust-pill-name {
  font-weight: 700;
}

.adjust-pill-meta {
  color: #15803d;
}

.adjust-product-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 80;
  max-height: 230px;
  overflow-y: auto;
  padding: 5px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}

.adjust-product-option {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.adjust-product-option:hover,
.adjust-product-option.is-active {
  background: #f1f5f9;
}

.adjust-opt-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.adjust-opt-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adjust-opt-code {
  padding: 1px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.adjust-opt-stock {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  flex-shrink: 0;
}

.adjust-product-empty {
  padding: 12px;
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
}

[data-theme="vga"] .adjust-product-dropdown,
[data-theme="vga"] .adjust-product-selected-pill {
  border-radius: 4px;
}

/* Buscador y botón +/- stock en Valoración y Tabla de Productos */
.valuation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 10px;
}

.valuation-toolbar h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
}

.valuation-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1 1 260px;
  justify-content: flex-end;
}

.valuation-search {
  max-width: 280px;
  min-width: 200px;
  flex: 1 1 200px;
  height: 36px;
}

.admin-icon-btn.adjust,
.admin-btn.adjust {
  color: var(--muted);
  border-color: transparent;
  background: transparent;
}

.admin-icon-btn.adjust:hover,
.admin-btn.adjust:hover {
  background: #f0f9ff;
  border-color: transparent;
  color: #0369a1;
}

@media (max-width: 640px) {
  .valuation-toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .valuation-search {
    max-width: none;
  }
}

/* Modal de carga masiva CSV de productos y categorías */
.product-import-modal-card {
  max-width: 660px;
}

.import-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.import-step-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #f8fafc;
}

.import-upload-box {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.import-dropzone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.import-dropzone:hover,
.import-dropzone.is-dragover {
  border-color: var(--brand);
  background: #fff1f2;
  box-shadow: 0 4px 14px rgba(225, 29, 72, .08);
}

.import-dropzone.has-file {
  border-style: solid;
  border-color: #86efac;
  background: #f0fdf4;
}

.import-dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.import-dropzone.has-file .import-dropzone-icon {
  color: #16a34a;
  border-color: #bbf7d0;
}

.import-dropzone-text {
  flex: 1 1 auto;
  min-width: 0;
}

.import-dropzone-text strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 2px;
}

.import-dropzone-text small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
}

.import-dropzone-cta {
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .import-dropzone {
    flex-wrap: wrap;
  }

  .import-dropzone-cta {
    width: 100%;
    text-align: center;
  }
}

.import-step-info {
  flex: 1 1 240px;
  min-width: 0;
}

.import-step-info strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.import-step-info small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}

.import-preview-area {
  margin: 8px 0 14px;
}

.import-loading {
  padding: 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.import-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.import-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.import-pill.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.import-pill.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.import-pill.warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.import-pill.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.import-new-cats {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
}

.import-errors-box {
  margin-bottom: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 12px;
}

.import-errors-box ul {
  margin: 4px 0 0 16px;
  padding: 0;
}

.import-preview-table-wrap {
  max-height: 210px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.import-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.import-preview-table th,
.import-preview-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.import-preview-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  font-weight: 700;
}

.import-preview-table .num {
  text-align: right;
}

.import-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
}

.import-badge.create {
  background: #dcfce7;
  color: #166534;
}

.import-badge.update {
  background: #fef3c7;
  color: #92400e;
}

.import-badge.skip {
  background: #f1f5f9;
  color: #475569;
}

.import-badge.error {
  background: #fee2e2;
  color: #991b1b;
}

.quick-orders-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #ede9fe;
  color: #7c3aed;
  flex-shrink: 0;
}

.quick-orders-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.quick-orders-subtitle {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  display: block;
}

.quick-orders-count-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.quick-orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

@media (max-width: 580px) {
  .quick-orders-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (min-width: 1180px) {
  .quick-orders-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* .quick-order-card hereda la estética y estructura de .table-card.is-ocupada */

.quick-order-card:has(.quick-name-wrap):hover,
.quick-order-card:has(.quick-name-wrap):focus-within {
  overflow: visible;
  content-visibility: visible;
  z-index: 30;
}

.quick-order-card .table-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-name-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.quick-name-wrap .table-name {
  display: block;
  width: 100%;
}

.quick-name-wrap[data-full-name]::after {
  content: attr(data-full-name);
  position: absolute;
  left: 0;
  bottom: calc(100% + 9px);
  z-index: 60;
  max-width: 240px;
  width: max-content;
  padding: 6px 10px;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .24);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.quick-name-wrap[data-full-name]::before {
  content: "";
  position: absolute;
  left: 14px;
  bottom: calc(100% + 3px);
  z-index: 60;
  border: 6px solid transparent;
  border-top-color: #0f172a;
  border-bottom: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.quick-name-wrap[data-full-name]:hover::after,
.quick-name-wrap[data-full-name]:hover::before,
.quick-order-card:focus-visible .quick-name-wrap[data-full-name]::after,
.quick-order-card:focus-visible .quick-name-wrap[data-full-name]::before {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.quick-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.quick-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
}

.quick-type-tag.bar {
  background: #ede9fe;
  color: #7c3aed;
}

.quick-type-tag.takeaway {
  background: #fef3c7;
  color: #b45309;
}

.quick-type-tag.delivery {
  background: #e0f2fe;
  color: #0369a1;
}

.quick-order-main {
  margin: 3px 0 6px;
}

.quick-order-name {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.quick-order-summary {
  margin: 3px 0 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quick-order-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}

.quick-order-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.quick-orders-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 16px;
  background: #fff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
}

.quick-orders-empty .empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--muted);
  margin-bottom: 8px;
}

.quick-orders-empty h3 {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.quick-orders-empty p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* Grilla de Mesas */
.table-grid-section {
  width: 100%;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

@media (max-width: 580px) {
  .table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .table-card {
    min-height: 118px;
    padding: 10px 10px 8px;
    border-radius: 16px;
  }

  .table-card-top {
    gap: 4px;
    margin-bottom: 4px;
    align-items: center;
    min-width: 0;
  }

  .table-card-top .table-name,
  .table-name {
    font-family: var(--font-sans);
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    white-space: nowrap !important;
    word-break: normal !important;
    flex: 0 1 auto;
    min-width: 0;
  }

  .table-card-top-actions {
    gap: 3px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
  }

  .table-share-toggle {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
  }

  .table-share-toggle svg {
    width: 11px;
    height: 11px;
  }

  .table-status-pill {
    padding: 1.5px 5px;
    font-size: 8.5px;
    font-weight: 600;
    gap: 3px;
    letter-spacing: 0;
    white-space: nowrap !important;
  }

  .table-status-pill .pulse-dot {
    width: 4px;
    height: 4px;
  }
}

@media (min-width: 1180px) {
  .table-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tarjeta moderna interactiva de mesa */
.table-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 144px;
  content-visibility: auto;
  contain-intrinsic-size: 0 144px;
  padding: 16px 18px 14px;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 16px -2px rgba(11, 20, 48, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.table-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px -4px rgba(11, 20, 48, 0.09);
}

.table-card.is-ocupada,
.table-card.is-occupied,
.table-card.has-open-account {
  border-color: var(--line, #cbd5e1);
  background: var(--surface, #ffffff);
}

.table-card.is-ocupada:hover,
.table-card.is-occupied:hover,
.table-card.has-open-account:hover,
.table-card.is-ocupada:focus-visible,
.table-card.is-occupied:focus-visible,
.table-card.has-open-account:focus-visible {
  border-color: var(--occupied-hover-border, #e11d48) !important;
  box-shadow: 0 10px 24px -4px rgba(225, 29, 72, 0.22) !important;
  transform: translateY(-2px);
}

.table-card.is-disponible,
.table-card.is-libre {
  background: var(--surface);
  border-color: var(--line, #e2e8f0);
}

.table-card.is-disponible:hover,
.table-card.is-libre:hover,
.table-card.is-disponible:focus-visible,
.table-card.is-libre:focus-visible {
  border-color: var(--free-hover-border, #10b981) !important;
  box-shadow: 0 10px 24px -4px rgba(16, 185, 129, 0.22) !important;
  transform: translateY(-2px);
}

/* Card Gris para Crear Nueva Mesa / Nuevo Pedido (+) */
.table-card.table-card-add {
  background: var(--surface-add, #e2e8f0);
  border: 2px dashed #94a3b8;
  box-shadow: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  border-radius: 18px;
  min-height: 144px;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.table-card.table-card-add:hover {
  background: #cbd5e1;
  border-color: var(--text-secondary, #475569);
  transform: translateY(-2px);
}

.table-add-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #cbd5e1;
  color: var(--text-main, #0b1430);
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.table-card.table-card-add:hover .table-add-circle {
  background: var(--purple);
  color: #ffffff;
}

.table-add-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary, #475569);
}

/* Marca de agua neutra y sutil de mesa */
.table-card-watermark {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  pointer-events: none;
  opacity: .05;
  color: var(--ink);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 0;
}

.table-card-watermark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.table-card:hover .table-card-watermark {
  opacity: .09;
  transform: translateY(-50%) scale(1.06);
}

.table-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.table-card-top .table-name {
  margin: 0;
  line-height: 1.2;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.015em;
  min-width: 0;
  white-space: nowrap !important;
  word-break: normal !important;
  flex: 0 1 auto;
}

.table-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 9px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
}

.table-status-pill.free {
  background: var(--free-bg, #ecfdf5);
  color: var(--free-text, #059669);
  border: 1px solid var(--free-border, #a7f3d0);
}

.table-status-pill.occupied {
  background: var(--occupied-bg, #fff0f6);
  color: var(--occupied-text, #e11d74);
  border: 1px solid var(--occupied-border, #ffcce0);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.table-status-pill.free .pulse-dot {
  background: var(--free-text, #059669);
}

.table-status-pill.occupied .pulse-dot {
  background: var(--pink, #ff3d8f);
  box-shadow: 0 0 0 2px var(--occupied-border, rgba(255, 61, 143, .25));
}

.table-card-top-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Botón directo de Historial en mesa desocupada con movimientos */
.table-history-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: #f5f3ff;
  color: #7c3aed;
  border: 1.5px solid #ddd6fe;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .18s cubic-bezier(0.34, 1.56, 0.64, 1), background .18s ease, border-color .18s ease, box-shadow .2s ease;
  user-select: none;
  flex-shrink: 0;
}

.table-history-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.table-history-btn:hover {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #6d28d9;
  transform: scale(1.12);
  box-shadow: 0 3px 10px rgba(124, 58, 237, .25);
}

.table-history-btn:active {
  transform: scale(0.96);
}

.table-history-badge-hint {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  font-size: 9.5px;
  font-weight: 600;
  color: #7c3aed;
  background: rgba(124, 58, 237, .08);
  padding: 1.5px 6px;
  border-radius: 6px;
  margin-top: 2px;
  width: fit-content;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .table-history-btn {
    width: 25px;
    height: 25px;
  }

  .table-history-btn svg {
    width: 13px;
    height: 13px;
  }
}

/* Menú orbital interactivo de Compartir (Planetas alrededor del Sol) */
.table-card:has(.table-share-menu.is-open),
.table-card.has-share-open,
.quick-order-card:has(.table-share-menu.is-open),
.quick-order-card.has-share-open,
.order-card:has(.table-share-menu.is-open),
.order-card.has-share-open,
.admin-product-card:has(.table-share-menu.is-open),
.admin-product-card.has-share-open,
.comanda-card:has(.table-share-menu.is-open),
.comanda-link-strip:has(.table-share-menu.is-open) {
  z-index: 60 !important;
  overflow: visible !important;
  transform: none !important;
}

.table-card:has(.table-share-menu.is-open),
.table-card.has-share-open,
.order-card:has(.table-share-menu.is-open),
.order-card.has-share-open,
.admin-product-card:has(.table-share-menu.is-open),
.admin-product-card.has-share-open {
  content-visibility: visible;
}

.table-card:has(.table-share-menu.is-open) .table-card-top,
.table-card.has-share-open .table-card-top,
.quick-order-card:has(.table-share-menu.is-open) .quick-order-top,
.quick-order-card.has-share-open .quick-order-top,
.order-card:has(.table-share-menu.is-open) .order-card-footer,
.order-card.has-share-open .order-card-footer,
.admin-product-card:has(.table-share-menu.is-open) .admin-product-body,
.admin-product-card.has-share-open .admin-product-body {
  position: relative;
  z-index: 50 !important;
  overflow: visible !important;
}

.table-share-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.table-share-menu.is-open {
  z-index: 60 !important;
}

/* Órbita celestial sutil */
.table-share-orbit-track {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 92px;
  height: 92px;
  margin-top: -46px;
  margin-left: -46px;
  border-radius: 50%;
  border: 1.5px dashed rgba(245, 158, 11, .45);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.2);
  transition: transform .32s cubic-bezier(0.34, 1.56, 0.64, 1), opacity .22s ease;
  z-index: 15;
}

.table-share-menu.is-open .table-share-orbit-track {
  opacity: 1;
  transform: scale(1);
}

/* El Sol (Botón principal con efecto Zoom) */
.table-share-toggle {
  position: relative;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: transform .32s cubic-bezier(0.34, 1.56, 0.64, 1), background-color .2s ease, border-color .2s ease, box-shadow .25s ease, color .2s ease;
  flex-shrink: 0;
}

.table-share-toggle svg {
  width: 13px;
  height: 13px;
  pointer-events: none;
}

.table-share-toggle:hover {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #d97706;
  transform: scale(1.1);
}

.table-share-menu.is-open .table-share-toggle {
  background: #f59e0b;
  color: #ffffff;
  border-color: #f59e0b;
  transform: scale(1.18);
  box-shadow: 0 0 18px rgba(245, 158, 11, .6);
}

/* Contenedor centralizado para los planetas */
.table-share-options {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 30;
}

.table-share-menu.is-open .table-share-options {
  pointer-events: auto !important;
  z-index: 70 !important;
}

.table-share-menu.is-open .share-opt-btn {
  pointer-events: auto !important;
  z-index: 80 !important;
}

/* Planetas en zoom expansivo hacia la derecha (radio compacto 46px, separación exacta de 4px entre botones) */
.share-opt-btn {
  position: absolute;
  top: -16px;
  left: -16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  cursor: pointer;
  transform: translate(0, 0) scale(0.1);
  opacity: 0;
  transition: transform .32s cubic-bezier(0.34, 1.56, 0.64, 1), opacity .22s ease, box-shadow .2s ease, width .2s ease, border-radius .2s ease, background-color .15s ease;
  white-space: nowrap;
  user-select: none;
}

.share-opt-btn svg {
  width: 17px;
  height: 17px;
  pointer-events: none;
}

/* Planeta 1: WhatsApp (-69° en órbita compacta de 4 iconos) */
.share-whatsapp-opt {
  background: #25D366;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37, 211, 102, .38);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.share-whatsapp-opt svg {
  width: 18px;
  height: 18px;
  display: block;
}

.table-share-menu.is-open .share-whatsapp-opt,
.table-share-menu.is-open .share-prod-addons {
  transform: translate(16px, -43px) scale(1);
  opacity: 1;
  transition-delay: .02s;
}

.share-whatsapp-opt:hover,
.share-prod-addons:hover {
  background: #20BA5A;
  transform: translate(16px, -43px) scale(1.1) !important;
  box-shadow: 0 5px 14px rgba(37, 211, 102, .55);
}

/* Planeta 2: Transferir cuenta (-23° en órbita compacta de 4 iconos) */
.share-transfer-opt,
.share-qr-opt {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(2, 132, 199, .38);
}

.table-share-menu.is-open .share-transfer-opt,
.table-share-menu.is-open .share-qr-opt,
.table-share-menu.is-open .share-prod-edit {
  transform: translate(42px, -18px) scale(1);
  opacity: 1;
  transition-delay: .04s;
}

.share-transfer-opt:hover,
.share-qr-opt:hover,
.share-prod-edit:hover {
  background: #0369a1;
  transform: translate(42px, -18px) scale(1.1) !important;
  box-shadow: 0 5px 14px rgba(2, 132, 199, .55);
}

/* Planeta 3: Imprimir Cuenta (+23° en órbita compacta de 4 iconos) */
.share-print-opt {
  background: #ea580c;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(234, 88, 12, .38);
}

.table-share-menu.is-open .share-print-opt,
.table-share-menu.is-open .share-prod-adjust {
  transform: translate(42px, 18px) scale(1);
  opacity: 1;
  transition-delay: .06s;
}

.share-print-opt:hover,
.share-prod-adjust:hover {
  background: #c2410c;
  transform: translate(42px, 18px) scale(1.1) !important;
  box-shadow: 0 5px 14px rgba(234, 88, 12, .55);
}

/* Planeta 4: Historial / Auditoría de Mesa (+69° en órbita compacta de 4 iconos) */
.share-history-opt {
  background: #7c3aed;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(124, 58, 237, .38);
}

.table-share-menu.is-open .share-history-opt,
.table-share-menu.is-open .share-prod-delete {
  transform: translate(16px, 43px) scale(1);
  opacity: 1;
  transition-delay: .08s;
}

.share-history-opt:hover,
.share-prod-delete:hover {
  background: #6d28d9;
  transform: translate(16px, 43px) scale(1.1) !important;
  box-shadow: 0 5px 14px rgba(124, 58, 237, .55);
}

/* Distribución simétrica para 3 iconos (cualquier combinación) */
.table-share-menu.is-open .table-share-options>.share-opt-btn:first-child:nth-last-child(3) {
  transform: translate(32px, -33px) scale(1);
}

.table-share-menu.is-open .table-share-options>.share-opt-btn:first-child:nth-last-child(3):hover {
  transform: translate(32px, -33px) scale(1.1) !important;
}

.table-share-menu.is-open .table-share-options>.share-opt-btn:nth-child(2):nth-last-child(2) {
  transform: translate(46px, 0px) scale(1);
}

.table-share-menu.is-open .table-share-options>.share-opt-btn:nth-child(2):nth-last-child(2):hover {
  transform: translate(46px, 0px) scale(1.1) !important;
}

.table-share-menu.is-open .table-share-options>.share-opt-btn:nth-child(3):last-child {
  transform: translate(32px, 33px) scale(1);
}

.table-share-menu.is-open .table-share-options>.share-opt-btn:nth-child(3):last-child:hover {
  transform: translate(32px, 33px) scale(1.1) !important;
}

/* Distribución simétrica para 2 iconos (ej. Comanda o sin transferir) */
.table-share-menu.is-open .table-share-options>.share-opt-btn:first-child:nth-last-child(2) {
  transform: translate(38px, -21px) scale(1);
}

.table-share-menu.is-open .table-share-options>.share-opt-btn:first-child:nth-last-child(2):hover {
  transform: translate(38px, -21px) scale(1.1) !important;
}

.table-share-menu.is-open .table-share-options>.share-opt-btn:nth-child(2):last-child {
  transform: translate(38px, 21px) scale(1);
}

.table-share-menu.is-open .table-share-options>.share-opt-btn:nth-child(2):last-child:hover {
  transform: translate(38px, 21px) scale(1.1) !important;
}

/* Variante del menú orbital dentro de Pedidos */
.table-share-menu--order .table-share-toggle {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 50%;
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--line, #cbd5e1);
  color: var(--muted, #475569);
}

.table-share-menu--order .table-share-toggle svg {
  width: 17px;
  height: 17px;
}

[data-theme="vga"] .table-share-menu--order .table-share-toggle {
  border-radius: 4px;
}

.table-share-menu--order.is-open .table-share-toggle {
  border-radius: 50%;
}

/* Órbita invertida a la izquierda cuando el botón queda en el borde derecho de la tarjeta */
.table-share-menu--orbit-left.is-open .share-whatsapp-opt,
.table-share-menu--orbit-left.is-open .share-prod-addons {
  transform: translate(-16px, -43px) scale(1);
}

.table-share-menu--orbit-left .share-whatsapp-opt:hover,
.table-share-menu--orbit-left .share-prod-addons:hover {
  transform: translate(-16px, -43px) scale(1.1) !important;
}

.table-share-menu--orbit-left.is-open .share-transfer-opt,
.table-share-menu--orbit-left.is-open .share-qr-opt,
.table-share-menu--orbit-left.is-open .share-prod-edit {
  transform: translate(-42px, -18px) scale(1);
}

.table-share-menu--orbit-left .share-transfer-opt:hover,
.table-share-menu--orbit-left .share-qr-opt:hover,
.table-share-menu--orbit-left .share-prod-edit:hover {
  transform: translate(-42px, -18px) scale(1.1) !important;
}

.table-share-menu--orbit-left.is-open .share-print-opt,
.table-share-menu--orbit-left.is-open .share-prod-adjust {
  transform: translate(-42px, 18px) scale(1);
}

.table-share-menu--orbit-left .share-print-opt:hover,
.table-share-menu--orbit-left .share-prod-adjust:hover {
  transform: translate(-42px, 18px) scale(1.1) !important;
}

.table-share-menu--orbit-left.is-open .share-history-opt,
.table-share-menu--orbit-left.is-open .share-prod-delete {
  transform: translate(-16px, 43px) scale(1);
}

.table-share-menu--orbit-left .share-history-opt:hover,
.table-share-menu--orbit-left .share-prod-delete:hover {
  transform: translate(-16px, 43px) scale(1.1) !important;
}

.admin-product-header-status {
  margin-left: auto;
  align-self: flex-start;
  flex-shrink: 0;
}

.admin-product-card .admin-product-status-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-product-card .admin-prices-col {
  margin-left: auto;
  align-items: flex-end;
  text-align: right;
}

.admin-product-orbit .table-share-toggle {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  border-radius: 999px;
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  color: #64748b;
}

.admin-product-orbit .table-share-toggle svg {
  width: 15px;
  height: 15px;
}

.admin-product-orbit.is-open .share-opt-btn {
  opacity: 1;
}

.admin-product-orbit.is-open .share-prod-addons {
  transition-delay: .02s;
}

.admin-product-orbit.is-open .share-prod-edit {
  transition-delay: .05s;
}

.admin-product-orbit.is-open .share-prod-adjust {
  transition-delay: .08s;
}

.admin-product-orbit.is-open .share-prod-delete {
  transition-delay: .11s;
}

.admin-product-orbit .share-prod-addons {
  color: #ffffff;
  background: #d97706;
  border-color: #ffffff;
  box-shadow: 0 3px 10px rgba(217, 119, 6, .38);
}

.admin-product-orbit .share-prod-addons:hover {
  background: #b45309;
  border-color: #ffffff;
  box-shadow: 0 5px 14px rgba(217, 119, 6, .55);
}

.admin-product-orbit .share-prod-edit {
  color: #ffffff;
  background: #4f46e5;
  border-color: #ffffff;
  box-shadow: 0 3px 10px rgba(79, 70, 229, .38);
}

.admin-product-orbit .share-prod-edit:hover {
  background: #4338ca;
  border-color: #ffffff;
  box-shadow: 0 5px 14px rgba(79, 70, 229, .55);
}

.admin-product-orbit .share-prod-adjust {
  color: #ffffff;
  background: #0284c7;
  border-color: #ffffff;
  box-shadow: 0 3px 10px rgba(2, 132, 199, .38);
}

.admin-product-orbit .share-prod-adjust:hover {
  background: #0369a1;
  border-color: #ffffff;
  box-shadow: 0 5px 14px rgba(2, 132, 199, .55);
}

.admin-product-orbit .share-prod-delete {
  color: #ffffff;
  background: #dc2626;
  border-color: #ffffff;
  box-shadow: 0 3px 10px rgba(220, 38, 38, .38);
}

.admin-product-orbit .share-prod-delete:hover {
  background: #b91c1c;
  border-color: #ffffff;
  box-shadow: 0 5px 14px rgba(220, 38, 38, .55);
}

/* Inventario rediseñado: pestañas segmentadas, filtros de stock y tarjetas móviles */
.inv-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.inv-subtabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface-soft, #f1f5f9);
  border: 1.5px solid var(--line);
  gap: 4px;
}

.inv-subtab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.inv-subtab.is-active {
  background: var(--surface, #fff);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.inv-kardex-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.inv-kardex-search {
  flex: 1 1 220px;
  min-width: 0;
}

.inv-kardex-select {
  flex: 0 1 210px;
  min-width: 170px;
}

.inv-kardex-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}

.inv-valuation-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 12px;
}

.inv-valuation-controls .valuation-search {
  flex: 1 1 240px;
  min-width: 0;
}

.inv-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inv-filter-pill {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface, #fff);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.inv-filter-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.inv-filter-pill.is-out.is-active {
  background: #dc2626;
  border-color: #dc2626;
}

.inv-filter-pill.is-low.is-active {
  background: #d97706;
  border-color: #d97706;
}

.inv-filter-pill.is-ok.is-active {
  background: #16a34a;
  border-color: #16a34a;
}

.inv-stock-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.inv-stock-badge.is-out {
  background: #fef2f2;
  color: #dc2626;
}

.inv-stock-badge.is-low {
  background: #fffbeb;
  color: #b45309;
}

.inv-stock-badge.is-ok {
  background: #f0fdf4;
  color: #15803d;
}

.inv-stock-cards,
.inv-kardex-cards {
  display: none;
  gap: 10px;
}

.inv-stock-card,
.inv-kardex-card {
  background: var(--surface, #fff);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}

.inv-stock-card-top,
.inv-kardex-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.inv-stock-card-top h4,
.inv-kardex-prod {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
}

.inv-stock-card-top small {
  color: var(--muted);
  font-size: 12px;
}

.inv-stock-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.inv-stock-metrics small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.inv-stock-metrics strong {
  font-size: 13.5px;
}

.inv-stock-adjust-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.inv-kardex-qty.is-in {
  color: var(--green-deep);
  font-size: 14px;
}

.inv-kardex-qty.is-out {
  color: var(--red-deep);
  font-size: 14px;
}

.inv-kardex-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.inv-kardex-meta strong {
  color: var(--ink);
}

.inv-kardex-reason {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink);
  background: var(--surface-soft, #f8fafc);
  padding: 6px 9px;
  border-radius: 8px;
}

.inv-kardex-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.inv-empty-state {
  padding: 26px 16px;
  text-align: center;
  background: var(--surface, #fff);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 899px) {
  .inv-desktop-table {
    display: none;
  }

  .inv-stock-cards,
  .inv-kardex-cards {
    display: grid;
  }

  .inv-subtabs {
    width: 100%;
  }

  .inv-subtab {
    flex: 1 1 0;
    justify-content: center;
    padding: 8px 10px;
    font-size: 12.5px;
  }

  .inv-adjust-cta {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  .inv-kardex-select,
  .inv-kardex-refresh {
    flex: 1 1 calc(50% - 4px);
  }
}

.table-share-menu--orbit-left.is-open .table-share-options>.share-opt-btn:first-child:nth-last-child(3) {
  transform: translate(-32px, -33px) scale(1);
}

.table-share-menu--orbit-left.is-open .table-share-options>.share-opt-btn:first-child:nth-last-child(3):hover {
  transform: translate(-32px, -33px) scale(1.1) !important;
}

.table-share-menu--orbit-left.is-open .table-share-options>.share-opt-btn:nth-child(2):nth-last-child(2) {
  transform: translate(-46px, 0px) scale(1);
}

.table-share-menu--orbit-left.is-open .table-share-options>.share-opt-btn:nth-child(2):nth-last-child(2):hover {
  transform: translate(-46px, 0px) scale(1.1) !important;
}

.table-share-menu--orbit-left.is-open .table-share-options>.share-opt-btn:nth-child(3):last-child {
  transform: translate(-32px, 33px) scale(1);
}

.table-share-menu--orbit-left.is-open .table-share-options>.share-opt-btn:nth-child(3):last-child:hover {
  transform: translate(-32px, 33px) scale(1.1) !important;
}

.table-share-menu--orbit-left.is-open .table-share-options>.share-opt-btn:first-child:nth-last-child(2) {
  transform: translate(-38px, -21px) scale(1);
}

.table-share-menu--orbit-left.is-open .table-share-options>.share-opt-btn:first-child:nth-last-child(2):hover {
  transform: translate(-38px, -21px) scale(1.1) !important;
}

.table-share-menu--orbit-left.is-open .table-share-options>.share-opt-btn:nth-child(2):last-child {
  transform: translate(-38px, 21px) scale(1);
}

.table-share-menu--orbit-left.is-open .table-share-options>.share-opt-btn:nth-child(2):last-child:hover {
  transform: translate(-38px, 21px) scale(1.1) !important;
}

/* Modal de Código QR de la cuenta */
.order-qr-modal {
  align-items: center;
}

.order-qr-destination-block {
  text-align: center;
  margin: 4px 0 12px;
}

.order-qr-destination-block h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.order-qr-header {
  margin-bottom: 8px;
}

.order-qr-pill-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.order-qr-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: #ede9fe;
  color: #6d28d9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}

.order-qr-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: #dcfce7;
  color: #15803d;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
}

.success-card .order-qr-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.order-qr-header p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.order-qr-display-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 12px;
}

.order-qr-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
}

.order-qr-box svg {
  display: block;
  width: min(156px, 46vw);
  height: auto;
  aspect-ratio: 1;
  shape-rendering: crispEdges;
}

.order-share-wa-box {
  margin-top: 12px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  text-align: left;
}

.order-share-wa-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-share-wa-row .mini-phone-group {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

.order-share-wa-row .phone-input-group .field-control.phone-input {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.order-share-wa-row .phone-input-group .field-control.phone-input:hover:not(:disabled):not(:focus) {
  border-color: #94a3b8;
}

.order-share-wa-row .phone-input-group .field-control.phone-input:focus {
  border-color: var(--brand, #e11d48) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14) !important;
}

.order-share-wa-submit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  flex: 0 0 auto !important;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1 !important;
  white-space: nowrap;
}

.order-share-wa-submit svg,
.whatsapp-primary-btn svg {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  min-height: 17px !important;
  fill: currentColor !important;
  stroke: none !important;
  stroke-width: 0 !important;
  flex-shrink: 0 !important;
  display: block !important;
  margin: 0 !important;
}

.order-share-wa-submit span,
.whatsapp-primary-btn span {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
}

.order-qr-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
  margin-bottom: 0;
  text-align: left;
  flex-wrap: wrap;
}

.order-qr-meta-bar>div {
  min-width: 0;
}

.order-qr-meta-bar>div:last-child {
  margin-left: auto;
}

#orderQrOrderNumber {
  overflow-wrap: anywhere;
}

.order-qr-meta-bar small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.order-qr-meta-bar strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.order-qr-total-amount {
  color: #059669 !important;
  font-size: 15px !important;
}

.success-actions.order-qr-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 8px;
  margin-top: 2px;
}

.order-qr-print-btn,
.order-qr-copy-btn,
.order-qr-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.order-qr-copy-btn,
.order-qr-copy-fallback {
  grid-column: 1 / -1;
}

.order-qr-copy-btn {
  justify-self: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--brand, var(--red, #e11d48));
  font-size: 13.5px;
  font-weight: 700;
  transition: all .15s ease;
}

.order-qr-copy-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.order-qr-copy-btn:hover {
  background: var(--red-soft, #ffe4e6);
  color: var(--brand-pressed, #be123c);
  text-decoration: none;
}

.order-qr-copy-fallback {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
}

.order-qr-copy-fallback .field-control {
  width: 100%;
  margin-top: 4px;
}

.order-qr-thermal-ticket {
  display: none;
}

.thermal-qr-section {
  text-align: center;
  padding: 6px 0;
}

.thermal-qr-heading {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.thermal-qr-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px auto;
}

.thermal-qr-box svg {
  display: block;
  width: 140px;
  height: 140px;
  shape-rendering: crispEdges;
}

.thermal-qr-instructions {
  margin: 4px 0 0;
  font-size: 10px;
  line-height: 1.35;
}

.share-whatsapp-qr-hint {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  text-align: center;
}

.share-whatsapp-qr-hint button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6366f1;
}

.share-whatsapp-qr-hint button:hover {
  color: #4f46e5;
  text-decoration: underline;
}

/* Si la mesa solo tiene historial (ej. mesas libres) */
.table-share-menu.is-open.has-only-history .share-history-opt {
  transform: translate(48px, 0px) scale(1) !important;
}

.table-order-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-soft);
  padding: 1.5px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.comanda-link-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px 0 14px;
  padding: 8px 16px;
  padding-right: 48px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  position: relative;
  overflow: visible;
}

.comanda-link-caption {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

/* Mini modal ultra compacto de WhatsApp */
.share-whatsapp-card-mini {
  width: min(90vw, 320px);
  padding: 18px 16px 16px;
  border-radius: 18px;
  text-align: left;
}

.share-whatsapp-mini-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.whatsapp-mini-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #25D366;
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.share-whatsapp-mini-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.share-whatsapp-mini-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.mini-phone-group {
  margin-bottom: 14px;
}

.mini-phone-input {
  min-height: 42px !important;
  font-size: 15px !important;
}

.mini-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-cancel-btn {
  min-height: 40px;
  border: 1.5px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.mini-submit-btn {
  min-height: 40px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 600;
  gap: 5px;
}

.phone-input-group {
  display: flex;
  align-items: center;
  position: relative;
}

.phone-prefix-tag {
  position: absolute;
  left: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #059669;
  pointer-events: none;
  user-select: none;
}

.phone-input-group .field-control.phone-input {
  padding-left: 48px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
}

.field-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.whatsapp-primary-btn {
  background: #25D366 !important;
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, .28);
  transition: all .15s ease;
}

.whatsapp-primary-btn:hover {
  background: #20BA5A !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, .38);
}

.table-card-main,
.table-card-mid {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  margin-top: 2px;
  margin-bottom: auto;
}

.table-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary, #475569);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.table-watermark {
  width: 34px;
  height: 34px;
  color: #cbd5e1;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.table-card:hover .table-watermark {
  transform: scale(1.1);
  color: #94a3b8;
}

.table-name {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(16px, 2.8vw, 18px);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.2;
}

.table-free-caption {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.table-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
}

.table-waiter {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
}

.table-items-count {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface-soft);
  padding: 1px 5px;
  border-radius: 4px;
}

.table-card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 10px;
  margin-top: auto;
}

.table-card-footer.free {
  justify-content: flex-end;
}

.table-card-footer.free .table-action-pill.abrir {
  margin-left: auto;
}

.table-due-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.table-due-box small {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 2px;
}

.table-due-box strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--occupied-text, #e11d48) !important;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.table-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  transition: all .16s ease;
}

.table-action-pill.atender,
.table-action-pill.cobrar {
  background: var(--occupied-bg, #fff1f2);
  color: var(--occupied-text, #e11d48);
  border: 1.5px solid var(--occupied-border, #fecdd3);
}

.table-card:hover .table-action-pill.atender,
.table-card:hover .table-action-pill.cobrar {
  background: var(--occupied-text, #e11d48);
  color: #fff;
  border-color: var(--occupied-text, #e11d48);
}

.table-action-pill.abrir {
  background: var(--surface-soft, #f1f5f9);
  color: var(--text-secondary, #475569);
  border: 1.5px solid var(--line, #cbd5e1);
}

.table-card:hover .table-action-pill.abrir {
  background: var(--free-hover-border, #10b981);
  color: #fff;
  border-color: var(--free-hover-border, #10b981);
}

.table-empty-hint {
  grid-column: 1 / -1;
  padding: 32px 16px;
  background: var(--surface);
  border: 1.5px dashed var(--line);
  border-radius: 16px;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--line, #E2E8F0);
  border-radius: 16px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 20px rgba(11, 20, 48, 0.08);
  width: fit-content;
  max-width: calc(100% - 32px);
}

.nav-item {
  background: transparent !important;
  border: none;
  box-shadow: none !important;
  color: var(--muted, #64748B);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
  padding: 5px 9px;
  border-radius: 10px;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--brand, var(--purple, #7A3CFF)) !important;
  background: var(--purple-soft, #F3EEFF) !important;
  transform: translateY(-1px);
  box-shadow: none !important;
}

.nav-item:active {
  transform: scale(0.96);
}

.nav-item.active {
  background: transparent !important;
  box-shadow: none !important;
  color: var(--brand, var(--purple, #7A3CFF)) !important;
  font-weight: 700;
}

.nav-item.active:hover {
  background: var(--purple-soft, #F3EEFF) !important;
  color: var(--brand, var(--purple, #7A3CFF)) !important;
  transform: translateY(-1px);
  box-shadow: none !important;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  transition: transform 0.16s ease;
}

.nav-item:hover svg,
.nav-item.active:hover svg {
  transform: scale(1.05);
  color: inherit !important;
}

.nav-item.active svg {
  stroke-width: 2.25;
  color: var(--brand, var(--purple, #7A3CFF)) !important;
}

@media (max-width: 780px) {
  .bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    border-top: 1px solid var(--line, #E2E8F0) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) 8px !important;
    margin: 0 !important;
    background: var(--surface, #FFFFFF) !important;
    box-shadow: 0 -2px 12px rgba(11, 20, 48, 0.07) !important;
    justify-content: space-around !important;
    gap: 0 !important;
    z-index: 60 !important;
  }

  .nav-item {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 4px 2px 2px !important;
    font-size: 10.5px !important;
    gap: 2px !important;
    flex-direction: column !important;
    border-radius: 8px !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .nav-item:hover {
    transform: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .nav-item:active {
    transform: scale(0.92) !important;
    background: var(--surface-soft, rgba(0, 0, 0, 0.04)) !important;
  }

  .nav-item svg {
    width: 22px !important;
    height: 22px !important;
  }

  .nav-item:hover svg {
    transform: none !important;
  }
}

.orders-hero {
  margin-bottom: 16px;
}

.status-filter {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 13px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.orders-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.orders-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 240px;
  min-width: 0;
}

.orders-search-icon {
  position: absolute;
  left: 14px;
  color: var(--muted, #64748b);
  pointer-events: none;
}

.orders-search-input {
  padding-left: 38px !important;
  min-height: 42px !important;
  font-size: 13.5px !important;
  border-radius: 12px !important;
}

.orders-kpi-date-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(118px, 0.85fr);
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}

.orders-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.orders-hero .orders-date-card {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .orders-hero {
    margin-bottom: 10px;
  }
  #ordersPeriodSubtitle {
    display: none;
  }
  .orders-hero .orders-date-card {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 12px;
    gap: 6px;
  }
  .orders-hero .orders-date-card-head {
    display: none;
  }
  .orders-hero .orders-date-card-value {
    font-size: 13.5px;
    font-weight: 700;
  }
  #ordersFilterSummary.orders-filter-summary {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px 12px;
    margin: 10px 0 12px;
    padding: 10px 13px;
    border-radius: 14px;
    border: 1.5px solid var(--line);
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  }
  #ordersFilterSummary .orders-kpi-head {
    grid-column: 1;
    grid-row: 1;
  }
  #ordersFilterSummary .orders-kpi-amount {
    grid-column: 1;
    grid-row: 2;
    font-size: 18px;
  }
  #ordersFilterSummary .orders-kpi-chips {
    grid-column: 2;
    grid-row: 1 / 3;
    justify-content: flex-end;
    border-left: 1px solid var(--line);
    padding-left: 10px;
  }
}

.orders-date-card,
.orders-single-date-wrap {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--line, #cbd5e1);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}

.orders-date-card:hover:not(.orders-date-card--readonly) {
  border-color: #94a3b8;
}

.orders-date-card:active:not(.orders-date-card--readonly) {
  transform: scale(0.985);
}

.orders-date-card.is-custom-date {
  border-color: var(--brand, #e11d48);
  background: linear-gradient(135deg, #fff5f7, #ffffff);
}

.orders-date-card--readonly {
  cursor: default;
}

.orders-date-card-head {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.orders-date-card-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--surface-soft, #f1f5f9);
  color: var(--brand, #e11d48);
  flex-shrink: 0;
}

.orders-date-card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  white-space: nowrap;
}

.orders-date-badge {
  margin-left: auto;
  padding: 1.5px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.orders-date-card.is-custom-date .orders-date-badge {
  background: #ffe4e6;
  color: #be123c;
}

.orders-date-card-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}

.orders-date-card-value {
  font-size: clamp(14.5px, 3.8vw, 17px);
  font-weight: 800;
  color: var(--ink, #0f172a);
  letter-spacing: -0.015em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orders-date-chevron {
  color: var(--muted, #64748b);
  flex-shrink: 0;
}

.orders-date-card .orders-date-input {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  opacity: 0;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  cursor: pointer;
  z-index: 2;
}

.order-card.is-cancelled-card {
  cursor: pointer;
  border-color: #fecdd3;
  background: #fffafb;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.order-card.is-cancelled-card:hover {
  border-color: #fda4af;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.08);
}

.order-cancelled-audit {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  font-size: 12px;
  color: #881337;
}

.order-cancelled-audit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.order-cancelled-audit-row span,
.order-cancelled-audit-reason span {
  font-weight: 600;
  color: #9f1239;
}

.order-cancelled-audit-reason {
  padding-top: 4px;
  margin-top: 2px;
  border-top: 1px dashed #fda4af;
  line-height: 1.4;
}

.order-cancelled-audit-reason em {
  font-style: normal;
  font-weight: 600;
  color: #be123c;
}

.view-cancelled-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid #fda4af !important;
  background: #ffffff !important;
  color: #be123c !important;
}

.cancelled-detail-card {
  max-width: 440px;
  text-align: left;
}

.cancelled-eyebrow {
  color: var(--occupied-text, #e11d48) !important;
  margin-bottom: 2px;
}

.cancelled-detail-sub {
  margin: 0 0 14px !important;
  font-size: 12.5px !important;
  color: var(--muted, #64748b) !important;
}

.cancelled-audit-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff1f2;
  border: 1.5px solid #fecdd3;
  margin-bottom: 14px;
}

.cancelled-audit-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
}

.cancelled-audit-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9f1239;
}

.cancelled-audit-value {
  color: #881337;
  font-weight: 700;
  text-align: right;
}

.cancelled-audit-reason {
  padding-top: 8px;
  border-top: 1px dashed #fda4af;
}

.cancelled-audit-reason p {
  margin: 4px 0 0 !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #be123c !important;
}

.cancelled-items-section {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-soft, #f8fafc);
  border: 1.5px solid var(--line, #cbd5e1);
}

.cancelled-section-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #475569);
  margin-bottom: 8px;
}

.cancelled-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cancelled-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}

.cancelled-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cancelled-item-note {
  font-size: 11px;
  color: #be123c;
}

.cancelled-item-price {
  font-weight: 700;
  color: var(--text-main, #1e293b);
  font-variant-numeric: tabular-nums;
}

.cancelled-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--occupied-text, #e11d48);
}

.status-filter span {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  margin-left: 3px;
  place-items: center;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 10px;
}

.status-filter.active {
  border-color: var(--red);
  color: var(--red);
}

.status-filter.active span {
  background: var(--red);
  color: #fff;
}

.orders-filter-summary {
  display: grid;
  align-content: space-between;
  gap: 5px;
  min-width: 0;
  margin-top: 0;
  padding: 10px 12px;
  border: 1.5px solid #b2d6c1;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3fbf6, #ffffff);
  box-shadow: 0 2px 8px rgba(35, 127, 87, .07);
}

.orders-filter-summary[data-tone="open"] {
  border-color: #fcd34d;
  background: linear-gradient(135deg, #fffbeb, #ffffff);
  box-shadow: 0 2px 8px rgba(217, 119, 6, .08);
}

.orders-filter-summary[data-tone="cancelled"] {
  border-color: #fecdd3;
  background: linear-gradient(135deg, #fff1f2, #ffffff);
  box-shadow: 0 2px 8px rgba(225, 29, 72, .07);
}

.orders-kpi-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.orders-kpi-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #dcfce7;
  color: #15803d;
  flex-shrink: 0;
}

.orders-filter-summary[data-tone="open"] .orders-kpi-icon {
  background: #fef3c7;
  color: #b45309;
}

.orders-filter-summary[data-tone="cancelled"] .orders-kpi-icon {
  background: #ffe4e6;
  color: #be123c;
}

.orders-kpi-label {
  color: var(--muted, #64748b);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orders-kpi-amount {
  display: block;
  color: var(--green-deep, #166534);
  font-size: clamp(17px, 4.4vw, 22px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orders-filter-summary[data-tone="open"] .orders-kpi-amount {
  color: #b45309;
}

.orders-filter-summary[data-tone="cancelled"] .orders-kpi-amount {
  color: #be123c;
}

.orders-kpi-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.orders-kpi-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.orders-kpi-chip.is-open {
  background: #fef3c7;
  color: #b45309;
}

.orders-kpi-chip.is-closed {
  background: #dcfce7;
  color: #15803d;
}

.orders-kpi-chip.is-cancelled {
  background: #ffe4e6;
  color: #be123c;
}

.orders-notice-reset-btn {
  justify-self: start;
  min-height: 30px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  margin-top: 2px;
}

[data-theme="vga"] .orders-filter-summary,
[data-theme="vga"] .orders-date-card {
  border-radius: 6px;
}

@media (min-width: 768px) {
  .orders-kpi-date-row {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
    gap: 12px;
  }

  .orders-filter-summary,
  .orders-date-card {
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .orders-hero {
    margin: 0 0 8px !important;
  }

  .orders-hero h1 {
    font-size: 22px;
  }

  .orders-hero .subtle {
    font-size: 11.5px;
  }

  .order-status-tabs {
    gap: 6px;
    padding: 2px 1px 6px;
  }

  .status-filter {
    min-height: 38px;
    padding: 0 11px;
    font-size: 11.5px;
  }
}

@media (max-width: 360px) {
  .orders-kpi-date-row {
    grid-template-columns: minmax(0, 1.32fr) minmax(104px, 0.88fr);
    gap: 6px;
  }

  .orders-filter-summary,
  .orders-date-card {
    padding: 9px 10px;
  }

  .orders-kpi-icon,
  .orders-date-card-icon {
    width: 20px;
    height: 20px;
  }

  .orders-kpi-chip {
    padding: 1.5px 5px;
    font-size: 10px;
  }

  .orders-date-badge {
    display: none;
  }
}

.orders-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.order-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
  content-visibility: auto;
  contain-intrinsic-size: 0 100px;
}

.order-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.order-card-top>div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.order-card-top>.table-status,
.order-card-top-right {
  flex: 0 0 auto;
}

.order-card-top-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.order-more-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .18s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}

.order-more-btn:hover {
  background: var(--surface-soft);
  color: var(--ink);
  transform: scale(1.1);
}

.order-more-btn:active {
  transform: scale(0.95);
}

.order-card-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  padding-top: 2px;
  min-width: 0;
}

.order-card-bottom .order-card-time {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-card-bottom-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.order-card-amount {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .order-card {
    padding: 12px;
    gap: 8px;
  }
  .order-card-amount {
    font-size: 15px;
  }
  .order-card-bottom .order-action-attend,
  .order-card-bottom .order-action-view {
    height: 34px;
    min-height: 34px;
    padding: 0 13px;
    font-size: 12px;
  }
}

.order-card h3 {
  margin: 0 0 2px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.25;
}

.order-card h3,
.order-card p {
  overflow-wrap: anywhere;
}

.order-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.order-card-meta {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-transfer-note {
  font-size: 11px !important;
  color: #475569 !important;
  background: var(--surface-soft, #f8fafc);
  padding: 4px 8px;
  border-radius: 8px;
}

.order-card-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0 9px;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}

.order-card-total span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-card-total strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-card-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11.5px;
  min-width: 0;
}

.order-card-time svg {
  flex-shrink: 0;
  opacity: .75;
}

.order-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-shrink: 0;
}

.order-action-eye {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid var(--line, #cbd5e1);
  border-radius: 11px;
  background: var(--surface-soft, #f8fafc);
  color: var(--ink, #0f172a);
  cursor: pointer;
  flex: 0 0 40px;
  transition: background-color .15s ease, border-color .15s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}

.order-action-eye:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.order-action-eye:active {
  transform: scale(0.95);
}

.order-action-eye.is-cancelled {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.order-action-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 38px;
  min-height: 38px;
  padding: 0 13px;
  border: 1.5px solid var(--line, #cbd5e1);
  border-radius: 999px;
  background: var(--surface, #ffffff);
  color: var(--muted, #475569);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}

.order-action-cancel:hover {
  background: var(--occupied-bg, #fff1f2);
  border-color: var(--occupied-border, #fecdd3);
  color: var(--pink, #be123c);
}

.order-action-cancel:active {
  transform: scale(0.96);
}

.order-action-attend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--purple, #7a3cff);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: opacity .15s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}

.order-action-attend:hover {
  opacity: .94;
}

.order-action-attend:active {
  transform: scale(0.97);
}

.order-action-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  min-height: 38px;
  padding: 0 15px;
  border: 1.5px solid var(--line, #cbd5e1);
  border-radius: 999px;
  background: var(--surface, #ffffff);
  color: var(--ink, #0f172a);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}

.order-action-view:hover {
  background: var(--surface-soft, #f8fafc);
  border-color: #94a3b8;
}

.order-action-view:active {
  transform: scale(0.97);
}

[data-theme="classic"] .order-action-attend,
[data-theme="red"] .order-action-attend {
  background: var(--red, #e11d48);
  box-shadow: 0 4px 12px rgba(225, 29, 72, .24);
}

[data-theme="vga"] .order-action-eye,
[data-theme="vga"] .order-action-cancel,
[data-theme="vga"] .order-action-attend {
  border-radius: 4px;
}

.empty-state {
  padding: 42px 22px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 17px;
  color: var(--muted);
  text-align: center;
}

.empty-state span {
  display: block;
  margin-bottom: 7px;
  font-size: 26px;
}

.empty-state h3 {
  margin-bottom: 5px;
  color: var(--ink);
}

.empty-state p {
  margin: 0;
  font-size: 13px;
}

.order-screen {
  padding-bottom: 10px;
}

.order-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 3px 0 25px;
}

.order-header.compact-order-header {
  margin: 0 0 14px;
  align-items: center;
  gap: 12px;
}

.order-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.compact-order-header h1 {
  margin: 0;
  font-size: clamp(22px, 4.5vw, 26px);
  font-weight: 600;
  line-height: 1.2;
}

.order-header-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.compact-order-header .menu-context {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.back-button {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(11, 20, 48, .04);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.back-button:hover:not(:disabled) {
  background: var(--purple-soft);
  border-color: var(--purple);
  color: var(--purple);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px var(--focus);
}

.back-button:active:not(:disabled) {
  transform: translateY(0.5px) scale(0.96);
  background: #e2e8f0;
  box-shadow: none;
}

.back-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.order-header h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 600;
}

.menu-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}

.menu-intro h2 {
  margin: 0;
  font-weight: 600;
}

.menu-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.menu-search-row .back-button {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

.menu-search-row .search-field {
  flex: 1 1 auto;
  min-width: 0;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--border-strong, #cbd5e1);
  border-radius: 12px;
  background: var(--surface, #ffffff);
  box-shadow: none;
  transition: all 0.15s ease;
}

.search-field:hover:not(:focus-within) {
  border-color: #94a3b8;
}

.search-field:focus-within {
  border-color: var(--brand, #e11d48);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14);
}

.search-field svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font-size: 15px;
}

.search-field input::placeholder {
  color: #94a3b8;
}

.category-row {
  margin: 15px 0 14px;
}

.beer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 18px;
  padding: 10px 8px 40px 8px;
  box-sizing: border-box;
  contain: layout style;
}

@media (min-width: 680px) and (max-width: 899px) {
  .beer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 10px 4px calc(110px + env(safe-area-inset-bottom)) 4px;
  }
}

@media (min-width: 480px) and (max-width: 679px) {
  .beer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 10px 4px calc(110px + env(safe-area-inset-bottom)) 4px;
  }
}

@media (max-width: 479px) {
  .beer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 10px 4px calc(110px + env(safe-area-inset-bottom)) 4px;
  }
}

.beer-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 18px 14px 18px;
  border: 1.5px solid transparent;
  border-radius: 20px;
  background: var(--surface-card, #ffffff);
  box-shadow: 0 8px 24px rgba(11, 20, 48, 0.055);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  content-visibility: auto;
  contain-intrinsic-size: 0 236px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-sizing: border-box;
  outline: none;
  min-height: 236px;
}

.beer-card,
.beer-card * {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.beer-card[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.beer-card[aria-disabled="true"]:hover {
  transform: none !important;
  box-shadow: 0 4px 14px rgba(11, 20, 48, 0.05) !important;
  border-color: transparent !important;
}

.beer-card.is-touch-pressing {
  transform: scale(0.96) !important;
  border-color: var(--brand, var(--purple, #7A3CFF)) !important;
  box-shadow: 0 4px 16px rgba(122, 60, 255, 0.22) !important;
}

@media (hover: hover) and (pointer: fine) {
  .beer-card:hover {
    border-color: var(--purple-border, #D8C7FF);
    box-shadow: 0 14px 32px rgba(11, 20, 48, 0.10);
    transform: translateY(-4px);
    z-index: 4;
  }

  .beer-card:hover .beer-visual {
    transform: scale(1.04);
  }

  .beer-card.is-in-cart:hover {
    border-color: var(--purple-hover, #7A3CFF);
    box-shadow: 0 14px 32px var(--focus);
  }
}

.beer-card:active,
.beer-card.is-card-tapped {
  transform: scale(0.98);
}

.beer-card.is-in-cart {
  border-color: var(--purple, #7A3CFF);
  background: var(--surface, #ffffff);
  box-shadow: 0 10px 26px var(--focus, rgba(122, 60, 255, 0.20));
}

.beer-card.is-last-ordered {
  border-color: var(--orange, #FF8A00);
  box-shadow: 0 8px 20px rgba(255, 138, 0, 0.15);
}

.beer-card.is-just-updated {
  animation: cardTouchPop 0.22s ease-out;
}

@keyframes cardTouchPop {
  0% {
    transform: scale(0.96);
  }

  60% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

/* Badge flotante de cantidad en pedido */
.beer-cart-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--purple, #7A3CFF);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px var(--focus, rgba(122, 60, 255, 0.25));
  pointer-events: none;
}

.beer-card-more-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted, #64748b);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
  transition: opacity .15s ease, transform .18s cubic-bezier(0.34, 1.56, 0.64, 1), background .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.beer-card.is-in-cart .beer-card-more-btn {
  right: 44px;
}

.beer-card:hover .beer-card-more-btn,
.beer-card:focus-within .beer-card-more-btn,
.beer-card-more-btn:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.beer-card-more-btn:hover {
  background: var(--surface, #ffffff);
  color: var(--ink, #0f172a);
  transform: scale(1.08);
}

@media (hover: none), (pointer: coarse), (max-width: 768px) {
  .beer-card-more-btn {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

.beer-cart-badge.is-just-updated {
  animation: badgePop 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Badge flotante de adicional en la tarjeta (limón u otro) */
.beer-addon-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.20);
  transition: transform 0.14s ease, background 0.14s ease;
  max-width: calc(100% - 60px);
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
}

.beer-addon-badge:hover {
  transform: scale(1.08);
  background: #fde68a;
}

.beer-addon-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

/* Botón flotante para abrir menú de adicionales cuando totalQuantity > 0 */
.beer-addon-trigger-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.20);
  transition: transform 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
  max-width: calc(100% - 60px);
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
}

.beer-addon-trigger-btn:hover {
  transform: scale(1.06);
  background: #fde68a;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.30);
}

.beer-addon-trigger-btn:active {
  transform: scale(0.96);
}

.beer-addon-trigger-btn .beer-addon-emoji {
  font-size: 12px;
  line-height: 1;
}

.beer-addon-trigger-btn .beer-addon-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.beer-corner-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.last-ordered-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Visual circular de producto con profundidad de luz */
.beer-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f1f5f9 100%);
  border: 1.5px solid #eef2f7;
  box-shadow: inset 0 2px 6px rgba(11, 20, 48, 0.04), 0 6px 14px rgba(11, 20, 48, 0.05);
  margin-bottom: 10px;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  padding: 8px;
}

.beer-card:hover .beer-visual {
  transform: scale(1.04);
}

.beer-visual svg,
.beer-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.beer-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.10));
}

.beer-image[hidden] {
  display: none;
}

.beer-image-fallback {
  font-size: 34px;
  line-height: 1;
}

/* Contenido centrado de la tarjeta */
.beer-card-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.beer-category-tag {
  display: block !important;
  font-size: 11.5px;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 2px;
  text-transform: capitalize;
  letter-spacing: normal;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beer-title {
  font-size: 15px;
  font-weight: 700;
  color: #0b1430;
  line-height: 1.25;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  max-width: 100%;
  text-align: center;
  word-break: break-word;
}

.beer-divider {
  width: 44px;
  height: 2px;
  border-radius: 2px;
  background: #dce3ee;
  margin: 6px auto 8px;
}

.beer-divider-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 130px;
  margin: 3px auto 5px;
}

.beer-divider-row .beer-divider-line {
  flex: 1;
  height: 1.5px;
  background: #dce3ee;
  border-radius: 1px;
}

.beer-price {
  font-size: 15.5px;
  font-weight: 700;
  color: #0b1430;
  letter-spacing: -0.2px;
  margin-top: 0;
}

.btn-extra-chip {
  background: var(--surface-muted, #f8fafc);
  border: 1px dashed var(--line, #cbd5e1);
  color: var(--text-secondary, #475569);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.btn-extra-chip:hover {
  border-color: #f59e0b;
  color: #b45309;
  background: #fef3c7;
}

@media (max-width: 580px) {
  .beer-card {
    padding: 16px 10px 14px;
    min-height: 220px;
    border-radius: 18px;
  }

  .beer-visual {
    width: 76px;
    height: 76px;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 50%;
  }

  .beer-visual svg,
  .beer-visual img {
    max-height: 100%;
  }

  .beer-category-tag {
    display: block !important;
    font-size: 11px;
    margin-bottom: 2px;
  }

  .beer-title {
    font-size: 13.5px;
    min-height: 34px;
    max-height: 34px;
    line-height: 1.25;
  }

  .beer-divider {
    width: 32px;
    height: 2px;
    margin: 8px auto;
  }

  .beer-price {
    font-size: 14.5px;
  }

  .beer-addon-badge,
  .beer-addon-trigger-btn {
    top: 8px;
    left: 8px;
    height: 22px;
    padding: 0 6px;
    font-size: 10.5px;
  }

  .beer-cart-badge {
    top: 8px;
    right: 8px;
    min-width: 22px;
    height: 22px;
    font-size: 11px;
  }
}

.quantity-control {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.quantity-control button {
  display: grid;
  width: 31px;
  height: 31px;
  padding: 0;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transition: all .14s ease;
}

.quantity-control button.add {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.quantity-control button:hover:not(:disabled) {
  background: #e2e8f0;
  transform: scale(1.05);
}

.quantity-control button.add:hover {
  background: var(--red-pressed);
}

.quantity-control button:disabled {
  cursor: not-allowed;
  border-color: transparent;
  background: transparent;
  color: #94a3b8;
  opacity: .7;
  transform: none;
}

.quantity-control button.add:disabled {
  border-color: var(--purple-border);
  background: var(--purple-soft);
  color: var(--purple);
}

.quantity-control output {
  display: grid;
  min-width: 22px;
  place-items: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.quantity-control .quantity-input {
  width: 32px;
  min-width: 32px;
  height: 31px;
  padding: 0 2px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
  transition: all .15s ease;
}

.quantity-control .quantity-input::-webkit-outer-spin-button,
.quantity-control .quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-control .quantity-input:hover:not(:disabled) {
  background: #ffffff;
  border-color: #cbd5e1;
}

.quantity-control .quantity-input:focus {
  background: #ffffff;
  border-color: var(--purple);
  box-shadow: 0 0 0 2.5px var(--focus);
}

.quantity-control .quantity-input:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.menu-empty {
  padding: 35px 20px;
  border: 1.5px dashed var(--line);
  border-radius: 15px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 64;
  background: rgba(11, 20, 48, .60);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  touch-action: none;
  overscroll-behavior: none;
}

.cart-sheet:not(.desktop-cart) {
  position: fixed;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 12px;
  z-index: 65;
  display: flex;
  flex-direction: column;
  width: calc(100% - 24px);
  max-width: 480px;
  max-height: min(88dvh, 720px);
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 20px 40px rgba(11, 20, 48, .24);
  transform: translateY(calc(100% + 24px));
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}

.cart-sheet:not(.desktop-cart).open {
  transform: translateY(0);
}

.cart-sheet:not(.desktop-cart) .sheet-handle,
.cart-sheet:not(.desktop-cart) .sheet-heading,
.cart-sheet:not(.desktop-cart) .cart-footer {
  touch-action: none;
  overscroll-behavior: none;
}

.sheet-handle {
  width: 40px;
  height: 5px;
  margin: 12px auto 8px;
  border-radius: 999px;
  background: #cbd5e1;
  flex-shrink: 0;
}

.sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1.5px solid var(--line);
  flex-shrink: 0;
  background: var(--surface);
}

.sheet-title-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.sheet-heading h2,
#cartSheetTable {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap !important;
  letter-spacing: -0.01em;
  flex-shrink: 0 !important;
}

.sheet-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
}

.sheet-customer-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.sheet-customer-sub span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-order-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.cart-sheet-order-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 2.5px 7px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  max-width: 95px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-sheet-order-badge.is-new {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.cart-sheet-order-badge.is-registered {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}

.table-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2.5px 8.5px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.cart-empty {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 40px 18px 24px;
  text-align: center;
}

.cart-empty h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.cart-empty p {
  max-width: 270px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.cart-items {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  display: grid;
  gap: 6px;
  padding: 10px 14px;
}

.cart-line-group {
  display: grid;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cart-line-group+.cart-line-group {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.cart-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.cart-group-heading span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-group-heading strong {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 600;
  white-space: nowrap;
}

.cart-group-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cart-all-courtesy-btn {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease;
}

.cart-all-courtesy-btn:hover {
  background: #ccfbf1;
}

.cart-line {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 10px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color .15s ease, background-color .15s ease;
}

.cart-line-existing {
  background: #f8fafc;
  padding: 6px 10px;
}

.cart-line-existing h3 {
  color: var(--ink);
}

.cart-line-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.cart-line-name {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-line-total {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

.cart-line-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.cart-line-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--muted);
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.cart-line-meta span,
.cart-line-meta em {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.cart-courtesy-reason-tag {
  display: inline-block;
  max-width: 105px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  font-style: italic;
  min-width: 0;
  color: #0f766e;
}

.cart-prep-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 4px;
  background: #fef3c7;
  color: #b45309;
  font-size: 9px;
  font-weight: 600;
  border: 1px solid #fde68a;
  white-space: nowrap;
  flex-shrink: 0;
}

button.cart-prep-badge {
  cursor: pointer;
  border: 1px solid #fde68a;
  background: #fef3c7;
  color: #b45309;
  font-family: inherit;
  transition: all .15s ease;
}

button.cart-prep-badge:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

button.cart-prep-badge.is-add-trigger {
  background: #f3eeff;
  color: var(--purple, #7a3cff);
  border: 1px dashed #d8c7ff;
}

button.cart-prep-badge.is-add-trigger:hover {
  background: var(--purple, #7a3cff);
  color: #ffffff;
  border-style: solid;
}

.cart-courtesy-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #99f6e4;
  border-radius: 6px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s ease;
}

.cart-courtesy-icon-btn:hover {
  background: #ccfbf1;
  border-color: #2dd4bf;
  transform: scale(1.08);
}

.cart-courtesy-icon-btn.is-revert {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 600;
}

.cart-courtesy-icon-btn.is-revert:hover {
  background: #ffedd5;
  border-color: #fb923c;
}

.cart-line-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0 !important;
  margin-left: auto;
}

.cart-line-actions .quantity-control {
  gap: 2px !important;
  padding: 2px !important;
  border-radius: 7px !important;
  flex-shrink: 0;
}

.cart-line-actions .quantity-control button {
  width: 24px !important;
  height: 24px !important;
  font-size: 13px !important;
  border-radius: 5px !important;
}

.cart-line-actions .quantity-control .quantity-input {
  width: 26px !important;
  min-width: 26px !important;
  height: 24px !important;
  font-size: 11px !important;
  padding: 0 !important;
}

.cart-line-status {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1.5px 6px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.cart-line-fallback {
  margin: 0;
  padding: 8px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.cart-courtesy-pass-btn,
.cart-courtesy-revert-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1.5px 6px;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}

.cart-courtesy-pass-btn:hover,
.cart-courtesy-revert-btn:hover {
  background: #ccfbf1;
  border-color: #5eead4;
}

.cart-remove-item-btn {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border: none !important;
  border-radius: 6px;
  background: transparent !important;
  box-shadow: none !important;
  color: #94a3b8 !important;
  cursor: pointer;
  flex-shrink: 0 !important;
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), color .18s ease;
  user-select: none;
}

/* Animación de destello al añadir / actualizar ítem en la cuenta */
@keyframes cartItemAddedGlow {
  0% {
    background-color: #fef08a !important;
    border-color: #eab308 !important;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, .35), 0 4px 12px rgba(234, 179, 8, .2) !important;
    transform: scale(1.02);
  }

  30% {
    background-color: #fef9c3 !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 2px rgba(234, 179, 8, .2) !important;
    transform: scale(1.01);
  }

  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

.cart-line.is-newly-added {
  animation: cartItemAddedGlow 1.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  z-index: 2;
}

@keyframes cartCourtesyAddedGlow {
  0% {
    background-color: #ccfbf1 !important;
    border-color: #14b8a6 !important;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .35), 0 4px 12px rgba(20, 184, 166, .2) !important;
    transform: scale(1.02);
  }

  30% {
    background-color: #e6fffa !important;
    border-color: #2dd4bf !important;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, .2) !important;
    transform: scale(1.01);
  }

  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

.cart-line.is-courtesy-line.is-newly-added {
  animation: cartCourtesyAddedGlow 1.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  z-index: 2;
}

/* Barras de scroll elegantes estilo aplicación de escritorio */
.beer-grid::-webkit-scrollbar,
.cart-items::-webkit-scrollbar,
.screen::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.beer-grid::-webkit-scrollbar-track,
.cart-items::-webkit-scrollbar-track,
.screen::-webkit-scrollbar-track {
  background: transparent;
}

.beer-grid::-webkit-scrollbar-thumb,
.cart-items::-webkit-scrollbar-thumb,
.screen::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.beer-grid::-webkit-scrollbar-thumb:hover,
.cart-items::-webkit-scrollbar-thumb:hover,
.screen::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.cart-remove-item-btn:hover:not(:disabled) {
  background: transparent !important;
  border: none !important;
  color: #ef4444 !important;
  transform: scale(1.22);
}

.cart-remove-item-btn:active:not(:disabled) {
  transform: scale(1.05);
  color: #dc2626 !important;
}

.cart-remove-item-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.cart-remove-item-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  pointer-events: none;
}

.danger-icon-btn svg,
.cancel-order-button svg {
  pointer-events: none;
}

.cart-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 10px 14px max(12px, env(safe-area-inset-bottom));
  border-top: 1.5px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -4px 16px rgba(11, 20, 48, .06);
}

.cart-balance-details {
  display: grid;
  gap: 3px;
  margin: 0 0 8px;
  padding: 6px 10px;
  border: 1px solid #a7f3d0;
  border-radius: 9px;
  background: #f0fdf4;
}

.cart-balance-details>div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.cart-balance-details strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.cart-balance-details>div:last-child strong {
  color: var(--green-deep);
}

.subtotal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.subtotal-row span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.subtotal-row strong {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.cart-payment-hint {
  display: none !important;
}

.cart-checkout-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.cart-checkout-actions .pending-order-button,
.cart-checkout-actions .pay-now-button {
  min-height: 44px;
  padding: 10px 14px;
  font-size: 13.5px;
  border-radius: var(--radius-md);
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
}

.cart-checkout-actions .pending-order-button {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-main) !important;
}

.cart-checkout-actions .pending-order-button:hover:not(:disabled) {
  background: var(--surface-muted);
  border-color: var(--border-strong);
}

.cart-checkout-actions .pay-now-button {
  background: var(--purple);
  border: 1.5px solid var(--purple);
  color: #ffffff !important;
  box-shadow: 0 4px 14px var(--focus);
}

.cart-checkout-actions .pay-now-button:hover:not(:disabled) {
  background: var(--purple-hover);
  border-color: var(--purple-hover);
  box-shadow: 0 6px 18px var(--focus);
}

.table-picker-modal,
.success-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(11, 20, 48, .60);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.picker-card,
.success-card {
  position: relative;
  width: min(100%, 470px);
  max-height: min(92dvh, 720px);
  overflow-y: auto;
  padding: 24px 20px 21px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 20px 40px rgba(11, 20, 48, .24);
  animation: pop-in .22s ease-out;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(13px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.picker-card h2,
.success-card h2 {
  margin-bottom: 7px;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 19px;
}

.picker-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.picker-tab {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: all .15s ease;
}

.picker-tab.active {
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(11, 20, 48, .08);
  color: var(--red);
}

.picker-form {
  margin-top: 4px;
}

.picker-submit {
  width: 100%;
  margin-top: 18px;
  justify-content: center;
}

.quick-orders {
  margin-top: 22px;
}

.quick-orders-title {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0;
  font-weight: 600;
}

.picker-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.picker-table {
  min-height: 63px;
  padding: 6px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  transition: all .14s ease;
}

.picker-table strong,
.picker-table span {
  display: block;
}

.picker-table strong {
  font-size: 14px;
  font-weight: 600;
}

.picker-table span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}

.picker-table:hover {
  border-color: var(--red);
  background: var(--red-soft);
}

.success-modal {
  place-items: center;
}

.success-card {
  text-align: center;
}

.success-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 16px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 26px;
  font-weight: 700;
}

.success-card p:not(.eyebrow) {
  max-width: 305px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}

.success-actions {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: calc(78px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  max-width: 440px;
  margin: auto;
  padding: 12px 18px;
  border-radius: var(--radius-md, 12px);
  border-left: 4px solid var(--purple);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 12px 28px rgba(11, 20, 48, .25);
  font-size: 13px;
  font-weight: 600;
  animation: toast-in .2s ease-out;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in-top {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 600px) {

  .toast,
  .has-floating-cart .toast {
    top: 76px;
    right: 24px;
    bottom: auto !important;
    left: auto;
    margin: 0;
    max-width: 380px;
    animation: toast-in-top .22s ease-out;
  }

  .app-shell {
    padding-right: 32px;
    padding-left: 32px;
  }

  .table-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bottom-nav {
    gap: 8px;
  }

  .table-picker-modal {
    place-items: center;
  }
}

@media (min-width: 1024px) {
  .app-shell {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .table-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .quick-stats {
    max-width: 580px;
  }
}

@media (max-width: 480px) {
  .app-header {
    padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
    margin: 0;
    border-radius: 0;
  }

  .app-shell {
    padding-right: 14px;
    padding-left: 14px;
    padding-top: 12px;
  }

  .app-header-inner {
    gap: 8px;
  }

  .brand {
    padding: 2px 3px;
  }

  .brand-logo {
    height: 34px;
    width: 34px;
  }

  .header-actions {
    flex: 0 0 auto;
    margin-left: auto;
    justify-content: flex-end;
    gap: 4px;
  }

  .header-item {
    flex: 0 0 auto;
    min-width: 46px;
    min-height: 40px;
    padding: 2px 5px;
    font-size: 9.5px;
  }

  .header-item svg {
    width: 18px;
    height: 18px;
  }

  .header-status .status-dot-wrap {
    width: 18px;
    height: 18px;
  }

  .connection-copy {
    font-size: 9px;
  }
}

@media (max-width: 380px) {
  .app-header {
    padding: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));
  }

  .app-shell {
    padding-right: 10px;
    padding-left: 10px;
    padding-top: 10px;
  }

  .brand-logo {
    height: 30px;
    width: 30px;
  }

  .header-actions {
    flex: 0 0 auto;
    margin-left: auto;
    gap: 3px;
  }

  .header-item {
    flex: 0 0 auto;
    min-width: 40px;
    min-height: 36px;
    padding: 2px 3px;
    font-size: 8.5px;
  }

  .header-item svg {
    width: 16px;
    height: 16px;
  }

  .header-status .status-dot-wrap {
    width: 16px;
    height: 16px;
  }

  .quick-stats {
    gap: 6px;
  }

  .stat-card {
    padding: 10px 7px;
    gap: 5px;
  }

  .stat-icon {
    display: none;
  }
}

@media (max-width: 479px) {
  .app-shell {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-row {
    flex-direction: column;
    gap: 12px;
    margin: 0 0 10px;
  }

  .orders-hero {
    flex-direction: row;
    margin: 0 0 10px;
  }

  .hero-row .new-order-button {
    width: 100%;
    justify-content: center;
  }

  .tables-toolbar {
    gap: 8px;
    margin: 0 0 10px;
  }

  .tables-toolbar .new-order-button {
    width: auto;
    min-height: 42px;
    padding: 0 12px;
  }

  .tables-toolbar-actions {
    gap: 6px;
  }

  .shift-heading {
    margin: 0 0 10px;
  }

  .compact-order-header {
    margin: 0 0 10px;
    gap: 10px;
  }

  .compact-order-header .back-button {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .compact-order-header h1 {
    font-size: 20px;
  }

  .category-row {
    margin: 10px 0 12px;
  }

  .search-field {
    height: 42px;
  }

  .menu-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .beer-card {
    padding: 14px 8px 12px;
    min-height: 200px;
    border-radius: 14px;
  }

  .beer-visual {
    width: 70px;
    height: 70px;
    margin-bottom: 8px;
    padding: 6px;
    border-radius: 50%;
  }

  .beer-visual svg,
  .beer-visual img {
    max-height: 100%;
  }

  .beer-category-tag {
    display: block !important;
    font-size: 10.5px;
    margin-bottom: 2px;
  }

  .beer-title {
    font-size: 13px;
    min-height: 32px;
  }

  .beer-divider {
    width: 28px;
    height: 2px;
    margin: 6px auto;
  }

  .beer-price {
    font-size: 14px;
  }

  .beer-addon-badge,
  .beer-addon-trigger-btn {
    top: 6px;
    left: 6px;
    height: 20px;
    font-size: 10px;
    padding: 0 5px;
  }

  .beer-addon-trigger-btn .beer-addon-label {
    display: none;
  }

  .beer-cart-badge {
    top: 8px;
    right: 8px;
    min-width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .cart-line {
    gap: 3px;
    padding: 6px 9px;
  }

  .cart-line-actions .quantity-control button {
    width: 24px !important;
    height: 24px !important;
    font-size: 13px !important;
  }

  .cart-line-actions .quantity-control .quantity-input {
    width: 26px !important;
    min-width: 26px !important;
    height: 24px !important;
    font-size: 11px !important;
  }

  .table-grid {
    gap: 10px;
  }

  .table-card {
    min-height: 118px;
    padding: 10px 10px 8px;
    border-radius: 16px;
  }

  .table-card-top {
    gap: 4px;
    margin-bottom: 4px;
    align-items: center;
    min-width: 0;
  }

  .table-name {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    white-space: nowrap !important;
    word-break: normal !important;
    flex: 0 1 auto;
    min-width: 0;
  }

  .table-card-top-actions {
    gap: 3px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
  }

  .table-share-toggle {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
  }

  .table-share-toggle svg {
    width: 11px;
    height: 11px;
  }

  .table-status-pill {
    padding: 1.5px 5px;
    font-size: 8.5px;
    font-weight: 500;
    gap: 3px;
    letter-spacing: 0;
    white-space: nowrap !important;
  }

  .table-status-pill .pulse-dot {
    width: 4px;
    height: 4px;
  }

  .table-card-watermark {
    width: 42px;
    height: 42px;
    right: 8px;
  }

  .table-action-pill {
    padding: 3px 7px;
    font-size: 10px;
  }

  .table-due-box small {
    font-size: 9px;
  }

  .table-due-box strong {
    font-size: 13.5px;
  }

  .table-free-caption {
    font-size: 10.5px;
  }
}

@media (max-width: 380px) {
  .table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .table-card {
    padding: 8px 8px 7px;
    min-height: 112px;
  }

  .table-name {
    font-size: 12.5px;
    white-space: nowrap !important;
    word-break: normal !important;
  }

  .table-status-pill {
    padding: 1px 4px;
    font-size: 8px;
    white-space: nowrap !important;
  }

  .beer-card {
    padding: 12px 6px 10px;
    min-height: 190px;
    border-radius: 12px;
  }

  .beer-visual {
    width: 62px;
    height: 62px;
    margin-bottom: 6px;
    padding: 5px;
    border-radius: 50%;
  }

  .beer-visual svg,
  .beer-visual img {
    max-height: 100%;
  }

  .beer-category-tag {
    display: block !important;
    font-size: 10px;
    margin-bottom: 2px;
  }

  .beer-title {
    font-size: 12px;
    min-height: 30px;
  }

  .beer-divider {
    width: 24px;
    height: 2px;
    margin: 5px auto;
  }

  .beer-price {
    font-size: 13px;
  }
}

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

@media (max-width: 420px) {
  .quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  .app-shell {
    max-width: 900px;
    padding-right: 28px;
    padding-left: 28px;
  }

  .table-card {
    min-height: 146px;
  }

  .picker-card {
    width: min(100%, 650px);
  }

  .picker-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Keep dialogs and transient UI out of the layout until JavaScript opens them. */
.sheet-backdrop[hidden],
.table-picker-modal[hidden],
.success-modal[hidden],
.toast[hidden] {
  display: none !important;
}

/* Superficies claras y acceso flotante al pedido. */
.stat-card {
  background: var(--surface);
}

.stat-icon.ink {
  background: var(--black);
  color: #fff;
}

.table-status.servido,
.table-status.cerrada {
  background: var(--surface-soft);
  color: var(--muted);
}

.order-card-products {
  color: var(--ink);
}

.serve-button {
  border-color: var(--line);
  background: var(--black-soft);
  color: var(--ink);
}

.empty-state,
.menu-empty {
  border-color: var(--line);
}

.sheet-handle {
  background: #d8ccce;
}

.order-screen {
  padding-bottom: 76px;
}

.floating-cart {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 205px;
  min-height: 60px;
  padding: 9px 14px 9px 12px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  background: var(--purple);
  color: #fff;
  box-shadow: 0 10px 28px var(--focus);
  text-align: left;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.floating-cart:hover {
  background: var(--purple-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px var(--focus);
}

.floating-cart-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, .18);
}

.floating-cart-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.floating-cart-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.floating-cart-count {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  opacity: .88;
}

.floating-cart-copy strong {
  font-size: 16px;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.floating-cart-action {
  margin-left: 2px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, .3);
  font-size: 11px;
  font-weight: 600;
}

.floating-cart.is-entering {
  animation: floating-cart-in .22s ease-out;
}

.floating-cart.is-updated {
  animation: cart-bump .34s cubic-bezier(.2, .8, .2, 1);
}

.has-floating-cart .toast {
  bottom: calc(152px + env(safe-area-inset-bottom));
}

@keyframes floating-cart-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cart-bump {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.045) translateY(-3px);
  }

  100% {
    transform: scale(1) translateY(0);
  }
}

@media (min-width: 1024px) {
  .floating-cart {
    right: 32px;
    bottom: calc(100px + env(safe-area-inset-bottom));
  }

  .has-floating-cart .toast {
    bottom: calc(178px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 479px) {
  .floating-cart {
    right: 16px;
    left: 16px;
    justify-content: space-between;
  }
}

@media (max-width: 380px) {
  .floating-cart {
    right: 14px;
    left: 14px;
  }
}

/* Mantiene el desplazamiento táctil y desactiva los gestos de zoom de la interfaz. */
html,
body {
  touch-action: pan-x pan-y;
}

.app-shell,
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

/* Caja y turno */
.shift-screen {
  padding-bottom: 20px;
}

.shift-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
}

.shift-heading>div {
  min-width: 0;
}

.shift-heading h1 {
  margin: 0;
  font-size: clamp(22px, 4.5vw, 26px);
  font-weight: 600;
}

.shift-heading .subtle {
  margin-top: 3px;
  font-size: 13px;
}

/* Profile Trigger en el header de Mi Turno */
.profile-trigger {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 5px 12px 5px 6px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 1px 3px rgba(11, 20, 48, .04);
  transition: all .15s ease;
  cursor: pointer;
}

.profile-trigger:hover {
  border-color: #94a3b8;
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.profile-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.profile-trigger-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.profile-trigger-copy strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-trigger-copy small {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

/* Tarjeta Hero Principal de Turno */
.shift-hero-panel {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(11, 20, 48, .04);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shift-hero-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.shift-hero-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.shift-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.shift-hero-badge.is-warning,
.shift-hero-badge.is-rejected {
  background: var(--orange-soft, #fef3c7);
  border-color: var(--orange-border, #fde68a);
  color: #b45309;
}

.shift-hero-badge.is-warning .pulse-indicator,
.shift-hero-badge.is-rejected .pulse-indicator {
  background: var(--orange, #f59e0b);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.shift-hero-badge.is-clickable {
  cursor: pointer;
  border: 1px solid var(--orange-border, #fde68a);
  background: var(--orange-soft, #fef3c7);
  color: #b45309;
  font-family: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  text-decoration: none;
  max-width: 100%;
}

.shift-hero-badge.is-clickable:hover {
  background: #fde68a;
  border-color: #fcd34d;
  color: #92400e;
  box-shadow: 0 1px 4px rgba(180, 83, 9, 0.18);
}

.shift-hero-badge.is-clickable:active {
  transform: translateY(1px);
}

.shift-hero-badge-note {
  font-weight: 500;
  color: #92400e;
  max-width: 440px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .shift-hero-badge-note {
    max-width: 220px;
  }
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .25);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

.shift-hero-title {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.shift-hero-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.shift-hero-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.meta-separator {
  color: #cbd5e1;
}

/* Dashboard de KPIs en Hero */
.shift-hero-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.shift-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  background: var(--surface-soft);
  border: 1.5px solid var(--line);
  border-radius: 14px;
}

.shift-kpi-card.highlight {
  background: #f0fdf4;
  border-color: #a7f3d0;
}

.shift-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.shift-kpi-val {
  font-size: clamp(20px, 4.5vw, 26px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.shift-kpi-card.highlight .shift-kpi-val {
  color: #047857;
}

.shift-kpi-sub {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.3;
}

/* Acciones principales de caja integradas */
.shift-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.shift-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.shift-quick-btn.movement {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.shift-quick-btn.movement:hover {
  border-color: #94a3b8;
  background: var(--surface-soft);
}

.shift-quick-btn.close-shift {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  box-shadow: 0 4px 12px var(--focus);
}

.shift-quick-btn.close-shift:hover {
  background: var(--purple-hover);
  border-color: var(--purple-hover);
  box-shadow: 0 6px 16px var(--focus);
}

/* Secciones / Bloques del Turno */
.shift-block {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(11, 20, 48, .03);
  margin-bottom: 16px;
}

.shift-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.shift-block-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.shift-net-pill {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 8.5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.shift-net-pill.pos {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.shift-net-pill.neg {
  background: var(--occupied-bg);
  color: var(--occupied-text);
  border: 1px solid var(--occupied-border);
}

.shift-hero-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.shift-formula-note {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}

.shift-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.shift-quick-btn.is-withdrawal,
.shift-quick-btn.movement.is-withdrawal {
  background: #dc2626 !important;
  border: 1.5px solid #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.2);
}

.shift-quick-btn.is-withdrawal svg,
.shift-quick-btn.movement.is-withdrawal svg {
  stroke: #ffffff !important;
}

.shift-quick-btn.is-withdrawal:hover,
.shift-quick-btn.movement.is-withdrawal:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.28);
  transform: translateY(-1px);
}

.shift-quick-btn.is-withdrawal:active,
.shift-quick-btn.movement.is-withdrawal:active {
  background: #991b1b !important;
  transform: translateY(0);
}

.shift-quick-btn.is-income,
.shift-quick-btn.movement.is-income {
  background: #059669 !important;
  border: 1.5px solid #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.2);
}

.shift-quick-btn.is-income svg,
.shift-quick-btn.movement.is-income svg {
  stroke: #ffffff !important;
}

.shift-quick-btn.is-income:hover,
.shift-quick-btn.movement.is-income:hover {
  background: #047857 !important;
  border-color: #047857 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.28);
  transform: translateY(-1px);
}

.shift-quick-btn.is-income:active,
.shift-quick-btn.movement.is-income:active {
  background: #065f46 !important;
  transform: translateY(0);
}

.payment-summary-grid.is-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface, #ffffff);
  overflow: hidden;
}

.payment-summary-grid.is-list .payment-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  text-align: left;
  width: 100%;
}

.payment-summary-grid.is-list .payment-card:last-child {
  border-bottom: 0;
}

.payment-summary-grid.is-list .payment-card:hover {
  background: var(--surface-soft);
}

.payment-summary-grid.is-list .payment-card.is-active-filter {
  background: rgba(122, 60, 255, 0.06);
}

.payment-card-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.payment-card-amount {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.payment-card-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  min-width: 34px;
  text-align: right;
}

.payment-card-pct.is-cash {
  color: var(--green-deep, #15803d);
}

.payment-row-chevron {
  color: var(--muted);
  opacity: .7;
}

.shift-close-footer {
  margin-top: 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.shift-close-outline-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 340px;
  padding: 13px 24px;
  border: 1.5px solid var(--brand, #e11d48);
  border-radius: 14px;
  background: var(--brand, #e11d48);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.22);
  transition: all .15s ease;
}

.shift-close-outline-btn:hover {
  background: #be123c;
  border-color: #be123c;
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.32);
  transform: translateY(-1px);
}

.shift-close-outline-btn:active {
  transform: translateY(0);
}

.shift-close-btn-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.shift-close-btn-top svg {
  stroke: #ffffff;
}

.shift-close-outline-btn small {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
}

@media (max-width: 720px) {
  .shift-heading #openProfileButton,
  .shift-heading #shiftStatusCopy {
    display: none;
  }
  .shift-heading {
    margin-bottom: 10px;
  }
  .shift-hero-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }
  .shift-hero-dashboard .shift-kpi-card {
    padding: 10px 12px;
  }
  .shift-hero-dashboard .shift-kpi-val {
    font-size: 18px;
  }
}

/* Grilla de Medios de Pago */
.payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.payment-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  transition: all .15s ease;
}

.payment-card:hover {
  border-color: #94a3b8;
  background: #fff;
}

.payment-summary-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
}

.payment-summary-icon.cash {
  background: #d1fae5;
  color: #065f46;
}

.payment-summary-icon.card {
  background: #eff6ff;
  color: #1d4ed8;
}

.payment-summary-icon.transfer {
  background: #ffedd5;
  color: #c2410c;
}

.payment-card div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.payment-card small {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
}

.payment-card strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Lista de Actividad / Movimientos */
.shift-activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shift-activity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: background .15s ease;
}

.shift-activity:hover {
  background: var(--surface-soft);
}

.activity-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
}

.shift-activity.income .activity-icon {
  background: #ecfdf5;
  color: #047857;
}

.shift-activity.withdrawal .activity-icon {
  background: var(--occupied-bg);
  color: var(--occupied-text);
}

.activity-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-info strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-info small {
  font-size: 11px;
  color: var(--muted);
}

.activity-amount {
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.shift-activity.income .activity-amount {
  color: #047857;
}

.shift-activity.withdrawal .activity-amount {
  color: var(--red);
}

.shift-activity-empty {
  padding: 24px 16px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.shift-activity-empty span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.shift-activity-empty p {
  margin: 0;
  font-weight: 600;
}

/* Card Empty State (Sin Turno) */
.shift-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 24px;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(11, 20, 48, .04);
  margin-bottom: 20px;
}

.shift-empty-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 18px;
  background: #f0fdf4;
  border: 1.5px solid #a7f3d0;
  color: #047857;
  margin-bottom: 16px;
}

.shift-empty-body h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.shift-empty-body p {
  margin: 0 auto 20px;
  max-width: 420px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.shift-open-hero-btn {
  min-height: 48px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
}

/* Sección Cierre Diario Admin */
.admin-daily-section {
  border-color: #fde68a;
  background: linear-gradient(160deg, #fffbeb, #ffffff);
}

.admin-daily-section .shift-block-header h3 {
  color: #92400e;
}

.daily-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.daily-summary-grid div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: rgba(255, 255, 255, .8);
}

.daily-summary-grid small {
  color: #92400e;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.daily-summary-grid strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-daily-note {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.admin-daily-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  border: 1.5px solid transparent;
}

.admin-daily-btn.is-ready {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.admin-daily-btn.is-ready:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
}

.admin-daily-btn.is-pending {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.admin-daily-btn.is-pending:hover {
  background: #fef3c7;
}

.admin-daily-btn.reopen {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.admin-daily-btn.reopen:hover {
  background: var(--surface-soft);
  border-color: #94a3b8;
}

.stale-shift-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1.5px solid #fcd34d;
  border-radius: 18px;
  background: linear-gradient(145deg, #fffbeb, #fff);
  box-shadow: 0 4px 16px rgba(245, 158, 11, .10);
}

.stale-shift-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stale-shift-heading .eyebrow {
  margin-bottom: 3px;
  color: #b45309;
}

.stale-shift-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.stale-shift-card>p {
  margin: -3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.stale-shift-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stale-shift-facts div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 9px;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: rgba(255, 255, 255, .8);
}

.stale-shift-facts span {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.25;
  text-transform: uppercase;
}

.stale-shift-facts strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stale-shift-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stale-shift-actions .outline-action,
.stale-shift-actions .primary-action {
  flex: 1 1 180px;
  margin: 0;
}

.stale-shift-card>small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

/* Modal de cobro, arqueo, pagos mixtos y perfil */
.pay-mode-selector {
  display: flex;
  gap: 8px;
  margin: 14px 0 12px;
  background: var(--surface-soft, #f1f5f9);
  padding: 4px;
  border-radius: 12px;
}

.pay-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted, #64748b);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.pay-mode-btn:hover {
  color: var(--ink, #0f172a);
}

.pay-mode-btn.active {
  background: #ffffff;
  color: var(--purple);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pay-preset-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--surface, #ffffff);
  color: var(--ink, #0f172a);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.pay-preset-chip:hover,
.pay-preset-chip.active {
  border-color: var(--purple);
  background: var(--purple-soft);
  color: var(--purple);
}

.pay-mixed-row {
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 10px 12px;
  transition: border-color 0.15s ease;
}

.pay-mixed-row:focus-within {
  border-color: var(--purple);
  background: #ffffff;
}

.pay-mixed-input {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  height: 40px !important;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 14px;
}

.payment-method {
  display: grid;
  min-height: 70px;
  place-items: center;
  gap: 5px;
  padding: 10px 6px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  transition: all .15s ease;
}

.payment-method:hover {
  border-color: #94a3b8;
  background: var(--surface-soft);
  color: var(--ink);
}

.payment-method>span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 600;
}

.payment-method strong {
  font-size: 10.5px;
  font-weight: 600;
}

/* Colores de métodos de pago POS alineados con #shift */
.payment-method.is-cash > span,
.payment-method[data-payment-method="cash"] > span {
  background: #ecfdf5;
  color: #059669;
}

.payment-method.is-cash:hover,
.payment-method[data-payment-method="cash"]:hover {
  border-color: #10b981;
  background: #f0fdf4;
  color: #065f46;
}

.payment-method.is-cash.active,
.payment-method[data-payment-method="cash"].active {
  border-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
  box-shadow: 0 0 0 1.5px #10b981;
}

.payment-method.is-cash.active > span,
.payment-method[data-payment-method="cash"].active > span {
  background: #10b981;
  color: #ffffff;
}

.payment-method.is-card > span,
.payment-method[data-payment-method="card"] > span {
  background: #eff6ff;
  color: #2563eb;
}

.payment-method.is-card:hover,
.payment-method[data-payment-method="card"]:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1e40af;
}

.payment-method.is-card.active,
.payment-method[data-payment-method="card"].active {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1e40af;
  box-shadow: 0 0 0 1.5px #3b82f6;
}

.payment-method.is-card.active > span,
.payment-method[data-payment-method="card"].active > span {
  background: #3b82f6;
  color: #ffffff;
}

.payment-method.is-transfer > span,
.payment-method[data-payment-method="transfer"] > span {
  background: #f5f3ff;
  color: #7c3aed;
}

.payment-method.is-transfer:hover,
.payment-method[data-payment-method="transfer"]:hover {
  border-color: #8b5cf6;
  background: #f5f3ff;
  color: #5b21b6;
}

.payment-method.is-transfer.active,
.payment-method[data-payment-method="transfer"].active {
  border-color: #8b5cf6;
  background: #f5f3ff;
  color: #5b21b6;
  box-shadow: 0 0 0 1.5px #8b5cf6;
}

.payment-method.is-transfer.active > span,
.payment-method[data-payment-method="transfer"].active > span {
  background: #8b5cf6;
  color: #ffffff;
}

.payment-unified-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
  text-align: left;
}

.payment-block-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.payment-block-label small {
  font-size: 10px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted, #64748b);
}

.payment-balance-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line, #cbd5e1);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.payment-balance-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.payment-receive-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.payment-receive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
  margin-bottom: 6px;
}

.payment-receive-header .payment-block-label {
  margin-bottom: 0;
}

.payment-receive-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.payment-inline-calc {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.payment-inline-calc.is-exact {
  color: var(--muted, #64748b);
  font-weight: 600;
}

.payment-inline-calc.is-remaining {
  color: var(--occupied-text, #e11d48);
}

.payment-inline-calc.is-change {
  color: #059669;
}

.payment-inline-calc.is-error {
  color: #b91c1c;
}

.payment-currency-field {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.payment-currency-prefix {
  position: absolute;
  left: 16px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary, #475569);
  pointer-events: none;
}

.payment-clean-input {
  width: 100%;
  min-height: 52px !important;
  padding: 0 16px 0 36px !important;
  text-align: left;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--text-main, #1e293b) !important;
  font-variant-numeric: tabular-nums;
  border-radius: 12px !important;
}

.payment-step-block {
  display: flex;
  flex-direction: column;
}

.payment-step-block .payment-methods {
  margin: 4px 0 0;
}

.payment-partial-history {
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid var(--line, #cbd5e1);
  text-align: left;
}

.payment-partial-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  color: var(--text-secondary, #475569);
}

.payment-partial-summary .is-paid {
  color: #059669;
  font-weight: 700;
}

.payment-partial-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.payment-partial-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12.5px;
}

.payment-partial-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.payment-partial-index {
  font-weight: 700;
  color: var(--text-main, #1e293b);
}

.payment-partial-method {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.payment-partial-method.is-cash {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.payment-partial-method.is-card {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.payment-partial-method.is-transfer {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.payment-partial-time {
  color: var(--muted, #64748b);
  font-size: 11px;
}

.payment-partial-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.payment-partial-amount {
  color: #047857;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.payment-void-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid #fecdd3;
  background: #fff1f2;
  color: #be123c;
  cursor: pointer;
  transition: all .15s ease;
}

.payment-void-btn:hover {
  background: #ffe4e6;
  border-color: #fda4af;
}

.payment-voided-audit-block {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.payment-voided-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9f1239;
}

.payment-voided-row {
  padding: 6px 8px;
  border-radius: 7px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  font-size: 11.5px;
  color: #881337;
}

.payment-voided-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-weight: 600;
}

.payment-voided-top small {
  color: #9f1239;
  font-size: 10.5px;
}

.payment-voided-reason {
  margin-top: 2px;
  font-size: 11px;
  color: #be123c;
}

.payment-voided-reason em {
  font-style: normal;
  font-weight: 600;
}

.payment-live-calc {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.payment-live-calc.is-remaining {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.payment-live-calc.is-change {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.payment-live-calc.is-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.payment-single-action {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.payment-single-action .primary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.payment-single-action .primary-action,
.payment-single-action .primary-action.is-full-pay,
.payment-single-action .primary-action.is-partial-pay {
  background: var(--red, #e11d48) !important;
  color: #ffffff !important;
  border: 1.5px solid var(--red, #e11d48) !important;
}

.toast[data-kind='warning'] {
  background: #1e293b;
  border-left: 4px solid #f59e0b;
  color: #fef3c7;
}

.toast #toastAction {
  color: inherit;
  margin-left: 10px;
  font-weight: 700;
  text-decoration: underline;
}

.form-modal-card {
  max-height: min(88dvh, 740px);
  overflow-y: auto;
  text-align: left;
}

.form-modal-card .success-icon {
  margin: 0 0 14px;
}

.form-modal-card h2 {
  margin-bottom: 6px;
  font-weight: 600;
}

.form-modal-card p:not(.eyebrow) {
  max-width: none;
  margin: 0;
  text-align: left;
}

.field-label {
  display: flex;
  justify-content: space-between;
  margin: 15px 0 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.field-label span {
  color: var(--muted);
  font-weight: 600;
}

.field-control {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  background: var(--surface, #ffffff);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  box-sizing: border-box;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.field-control:hover:not(:disabled):not(:focus) {
  border-color: #94a3b8;
}

.field-control:not(.auth-input):focus,
.field-control:not(.auth-input):focus-visible {
  border-color: var(--brand, #e11d48) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14) !important;
  outline: none !important;
}

select.field-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 38px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
}

select.field-control:hover:not(:disabled) {
  border-color: #94a3b8;
  background-color: #fafbfc;
}

.danger-action {
  width: 100%;
  min-height: 40px;
  border: 0;
  background: none;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
}

.danger-action:hover {
  color: var(--red-pressed);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-avatar-large {
  width: 55px;
  height: 55px;
  margin-bottom: 16px;
  border-radius: 18px;
  font-size: 16px;
}

.close-shift-warning {
  display: flex;
  gap: 11px;
  margin-top: 15px;
  padding: 13px;
  border: 1.5px solid var(--occupied-border);
  border-radius: 13px;
  background: var(--occupied-bg);
  text-align: left;
}

.close-shift-warning>span {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--pink);
  color: #fff;
  font-weight: 700;
}

.close-shift-warning strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.close-shift-warning p,
.close-shift-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

.close-shift-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 12px;
  text-align: left;
}

@media (max-width: 520px) {
  .close-shift-summary {
    grid-template-columns: 1fr;
  }
}

.close-shift-kpi-card {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  padding: 10px 12px;
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 12px;
  background: #ffffff; /* Las tarjetas inician en fondo blanco */
  min-height: 82px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.close-shift-kpi-label {
  color: var(--muted, #64748b);
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-right: 24px; /* Espacio para el icono arriba a la derecha */
  line-height: 1.25;
}

.close-shift-kpi-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink, #0f172a);
  letter-spacing: -0.02em;
}

.close-shift-kpi-diff {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 15px;
  display: block;
  visibility: hidden;
}

.close-shift-kpi-diff.is-diff {
  visibility: visible;
}

.close-shift-kpi-status {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* Estado cuadra: check verde */
.close-shift-kpi-card.is-match {
  border-color: #10b981;
}

.close-shift-kpi-card.is-match .close-shift-kpi-status {
  background: #ecfdf5;
  border: 1.5px solid #10b981;
}

/* Estado no cuadra: X roja */
.close-shift-kpi-card.is-mismatch {
  border-color: #ef4444;
}

.close-shift-kpi-card.is-mismatch .close-shift-kpi-status {
  background: #fef2f2;
  border: 1.5px solid #ef4444;
}

/* Modal compacta y amigable de Anular cuenta */
.cancel-order-modal-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px 16px;
}

.cancel-order-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cancel-order-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cancel-order-modal-title-wrap .eyebrow {
  margin: 0 0 1px;
  font-size: 10px;
}

.cancel-order-modal-title-wrap h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.cancel-order-modal-badge {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  background: #fff1f2;
  color: var(--red, #e11d48);
  border: 1px solid #fecdd3;
}

.cancel-order-modal-badge.is-transfer {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #bae6fd;
}

.cancel-order-modal-badge.is-payment {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
  font-size: 18px;
  font-weight: 800;
}

.payment-clean-card {
  text-align: left;
}

.payment-clean-copy {
  margin: 8px 0 12px !important;
  text-align: left !important;
  font-size: 13px;
  color: var(--muted);
}

.cancel-order-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 11px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.cancel-order-notice svg {
  flex-shrink: 0;
}

.cancel-order-summary-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.cancel-order-summary-strip>div {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft, #f8fafc);
  min-width: 0;
}

.cancel-order-summary-strip>div:last-child {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cancel-order-summary-strip span {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}

.cancel-order-summary-strip strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.cancel-order-reason-block {
  display: grid;
  gap: 7px;
}

.cancel-order-reason-block .field-label {
  margin: 0;
}

.cancel-order-quick-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cancel-reason-chip {
  padding: 5px 10px;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 999px;
  background: var(--surface-soft, #f8fafc);
  color: var(--ink, #334155);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.cancel-reason-chip:not(.is-active):hover {
  background: #fff1f2;
  border-color: #fda4af;
  color: #be123c;
}

.cancel-order-modal-actions {
  margin-top: 2px;
}

.cancel-order-notice.is-info {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

.cancel-order-summary-strip.is-two-col>div:last-child {
  grid-column: auto;
  display: grid;
  gap: 2px;
}

.transfer-order-subtitle-pill {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink, #0f172a);
}

.transfer-order-fields {
  display: grid;
  gap: 10px;
}

.transfer-order-field {
  display: grid;
  gap: 5px;
}

.transfer-order-field .field-label {
  margin: 0;
}

.transfer-order-history-box {
  padding: 10px 11px;
  border-radius: 11px;
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
}

.transfer-history-heading {
  margin: 0 0 6px !important;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}

.transfer-history-list {
  display: grid;
  gap: 6px;
}

.transfer-history-entry {
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
}

.transfer-history-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.transfer-history-route span {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.transfer-history-reason {
  margin-top: 2px !important;
  font-size: 11.5px;
  color: var(--muted);
}

.transfer-history-empty {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 360px) {
  .cancel-order-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cancel-order-summary-strip>div:last-child {
    grid-column: 1 / -1;
  }
}

.close-shift-note {
  margin-top: 12px;
}

.is-balanced {
  color: var(--green-deep);
}

.is-positive {
  color: #a9680d;
}

.is-negative {
  color: var(--occupied-text);
}

.session-gate {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(11, 20, 48, .75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.session-gate-card {
  width: min(100%, 360px);
  padding: 28px 23px 23px;
  border-radius: 23px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.session-gate-card .brand-mark {
  margin: 0 auto 19px;
}

.session-gate-card .eyebrow {
  margin-bottom: 6px;
}

.session-gate-card h1 {
  margin-bottom: 9px;
  font-size: 27px;
}

.session-gate-card p:not(.eyebrow) {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 479px) {
  .shift-heading {
    align-items: center;
  }

  .profile-trigger {
    min-height: 40px;
    padding: 4px;
  }

  .profile-avatar {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .profile-trigger-copy {
    display: none;
  }

  .shift-hero-panel {
    padding: 16px;
    gap: 14px;
    border-radius: 18px;
  }

  .shift-hero-dashboard {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .shift-kpi-card {
    padding: 12px 14px;
  }

  .shift-hero-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }

  .shift-block {
    padding: 14px 14px;
    border-radius: 16px;
  }

  .payment-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .payment-card {
    padding: 10px 12px;
    gap: 8px;
  }

  .payment-summary-icon {
    width: 28px;
    height: 28px;
  }

  .payment-card strong {
    font-size: 13.5px;
  }

  .daily-summary-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .stale-shift-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stale-shift-facts div:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .shift-heading h1 {
    font-size: 25px;
  }

  .payment-summary-grid strong {
    font-size: 10px;
  }

  .reconciliation-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .outline-action {
    width: 100%;
  }
}

/* Acceso, formularios administrativos y resúmenes de caja del backend PHP. */
.logout-form {
  margin: 0;
}

html.guest-html,
body.guest-layout {
  min-height: 100% !important;
  min-height: 100dvh !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: var(--bg-light, #FCFAFF) !important;
  color: var(--navy, #1E1B4B) !important;
  font-family: 'Poppins', 'Montserrat', var(--font-sans, system-ui, sans-serif) !important;
  -webkit-font-smoothing: antialiased;
}

.auth-page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  overflow-x: hidden;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 12% 18%, rgba(225, 29, 72, 0.10) 0%, transparent 46%),
    radial-gradient(circle at 88% 82%, rgba(126, 34, 206, 0.12) 0%, transparent 46%),
    linear-gradient(135deg, #FFF5F8 0%, #FFFFFF 48%, #F6F0FC 100%) !important;
}

[data-theme="white"] .auth-page {
  background:
    radial-gradient(circle at 12% 18%, rgba(225, 29, 72, 0.10) 0%, transparent 46%),
    radial-gradient(circle at 88% 82%, rgba(126, 34, 206, 0.12) 0%, transparent 46%),
    linear-gradient(135deg, #FFF5F8 0%, #FFFFFF 48%, #F6F0FC 100%) !important;
}

.auth-ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.65;
}

.auth-ambient-glow.glow-1 {
  width: 380px;
  height: 380px;
  top: -80px;
  right: -80px;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.18), transparent 70%);
}

.auth-ambient-glow.glow-2 {
  width: 360px;
  height: 360px;
  bottom: -60px;
  left: -60px;
  background: radial-gradient(circle, rgba(126, 34, 206, 0.20), transparent 70%);
}

.auth-top-nav {
  position: relative;
  z-index: 3;
  width: min(100%, 420px);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #5B5876;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid #ECE5F6;
  box-shadow: 0 2px 8px rgba(126, 34, 206, 0.05);
  transition: all 0.2s ease;
}

.auth-back-link:hover {
  color: #7E22CE;
  background: #ffffff;
  border-color: rgba(126, 34, 206, 0.35);
  transform: translateX(-2px);
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 32px 30px 24px;
  border: 1.5px solid #F1E5E9;
  border-radius: 24px;
  background: #ffffff;
  box-shadow:
    0 24px 60px rgba(225, 29, 72, 0.06),
    0 6px 20px rgba(30, 27, 75, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  box-sizing: border-box;
  animation: auth-card-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes auth-card-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 22px;
}

.auth-logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 12px;
  padding: 0;
  box-sizing: border-box;
}

.auth-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
}

.auth-brand-wordmark {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-wordmark-img {
  height: 30px;
  width: auto;
  object-fit: contain;
  display: block;
}

.auth-wordmark-color {
  display: block;
}

.auth-brand-wordmark .accent,
.auth-brand-wordmark .mi {
  color: var(--purple, #7A3CFF);
  font-weight: 600;
}

.auth-brand-wordmark .app {
  color: var(--ink, #0B1430);
  font-weight: 600;
}

.auth-subtitle {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field-group {
  display: flex;
  flex-direction: column;
}

.auth-field-group .field-label {
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary, #475569);
  letter-spacing: 0.01em;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  gap: 8px;
}

.field-label-row .field-label {
  margin-bottom: 0;
}

.auth-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.auth-forgot-link {
  font-size: 11.5px;
  font-weight: 600;
  color: #e11d48;
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.auth-forgot-link:hover {
  color: #be123c;
  text-decoration: underline;
}

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

.auth-input-icon {
  position: absolute;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.15s ease;
}

.auth-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px 0 42px;
  border: 1.5px solid var(--border-strong, #cbd5e1);
  border-radius: 12px;
  background: var(--surface, #ffffff);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.auth-input:hover:not(:disabled):not(:focus),
body.guest-layout .auth-input:hover:not(:disabled):not(:focus),
.auth-card .auth-input:hover:not(:disabled):not(:focus) {
  border-color: rgba(225, 29, 72, 0.45) !important;
}

.auth-input:focus,
.auth-input:focus-visible,
body.guest-layout .auth-input:focus,
body.guest-layout .auth-input:focus-visible,
body.guest-layout .field-control:focus,
body.guest-layout .field-control:focus-visible,
.auth-card .auth-input:focus,
.auth-card .auth-input:focus-visible,
.auth-card .field-control:focus,
.auth-card .field-control:focus-visible,
[data-theme] body.guest-layout .auth-input:focus,
[data-theme] body.guest-layout .field-control:focus,
[data-theme="classic"] body.guest-layout .field-control:focus,
[data-theme="red"] body.guest-layout .field-control:focus,
[data-theme="white"] body.guest-layout .field-control:focus {
  border-color: #e11d48 !important;
  box-shadow: 0 0 0 3.5px rgba(225, 29, 72, 0.16) !important;
  outline: none !important;
}

.auth-input-wrap:focus-within .auth-input-icon,
body.guest-layout .auth-input-wrap:focus-within .auth-input-icon {
  color: #e11d48 !important;
}

.password-control .auth-input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s ease;
  box-shadow: none !important;
}

.password-toggle:hover {
  background: transparent !important;
  border: none !important;
  color: #e11d48 !important;
}

.password-toggle:focus-visible {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  color: #e11d48 !important;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.auth-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 60%, #7E22CE 100%) !important;
  color: #ffffff !important;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.32) !important;
  transition: all 0.2s ease;
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #be123c 0%, #9f1239 60%, #6B21A8 100%) !important;
  transform: translateY(-1.5px);
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.40) !important;
}

.auth-submit-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3.5px rgba(225, 29, 72, 0.4), 0 8px 24px rgba(225, 29, 72, 0.32) !important;
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 12px;
  border: 1.5px solid var(--occupied-border);
  border-radius: 11px;
  background: var(--occupied-bg);
  color: var(--occupied-text);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
}

.auth-feedback svg {
  flex-shrink: 0;
  color: var(--pink);
}

.auth-feedback.is-success {
  border-color: rgba(16, 185, 129, 0.35);
  background: #ECFDF5;
  color: #065F46;
}

.auth-feedback.is-success svg {
  color: #10B981;
}

.auth-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #ECE5F6;
}

.auth-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #5B5876;
  font-weight: 600;
}

.auth-security-badge svg {
  color: #10b981;
}

.auth-help-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #5B5876;
  font-weight: 500;
}

.auth-help-row a {
  color: #e11d48;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.auth-help-row a:hover {
  color: #be123c;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 22px 20px 18px;
    border-radius: 20px;
  }

  .auth-logo-badge {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    margin-bottom: 10px;
  }

  .auth-brand-wordmark {
    font-size: 23px;
  }
}

.form-modal-card form {
  margin: 0;
}

.form-modal-card .primary-action {
  margin-top: 20px;
}

.form-modal-card .success-actions .primary-action,
.form-modal-card .user-modal-actions .primary-action {
  margin-top: 0 !important;
}

.form-modal-card .field-control+.field-label {
  margin-top: 16px;
}

.form-modal-card textarea.field-control {
  min-height: 76px;
  padding-top: 10px;
  resize: vertical;
}

.form-modal-card input[type='number'] {
  font-variant-numeric: tabular-nums;
}

.form-modal-card button[disabled],
.primary-action[aria-busy='true'] {
  cursor: wait;
  opacity: .58;
}

/* Invalid validation state */
.field-control:user-invalid {
  border-color: var(--red);
}

.field-error,
.form-error {
  margin: 7px 0 0;
  color: var(--red-deep);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
}

.form-success {
  margin: 9px 0 0;
  color: var(--green-deep);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
}

.summary-panel,
.cash-summary,
.daily-summary {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}

.summary-row,
.cash-summary-row,
.daily-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1.5px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.summary-row strong,
.cash-summary-row strong,
.daily-summary-row strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-align: right;
}

.summary-total,
.cash-summary-total,
.daily-summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding: 14px;
  border: 1.5px solid #a7f3d0;
  border-radius: 14px;
  background: #ecfdf5;
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 600;
}

.summary-total strong,
.cash-summary-total strong,
.daily-summary-total strong {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
}

.summary-total.is-difference,
.cash-summary-total.is-difference,
.daily-summary-total.is-difference {
  background: var(--occupied-bg);
  border-color: var(--occupied-border);
  color: var(--occupied-text);
}

.shift-close-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

.shift-close-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.shift-close-row div {
  min-width: 0;
}

.shift-close-row strong,
.shift-close-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-close-row strong {
  font-size: 12.5px;
  font-weight: 600;
}

.shift-close-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.shift-close-row b {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}

.users-modal-card {
  width: min(100%, 560px);
}

.user-form {
  display: grid;
  padding: 1px 0 20px;
  border-bottom: 1.5px solid var(--line);
}

.roles-fieldset {
  display: grid;
  gap: 8px;
  margin: 17px 0 0;
  padding: 0;
  border: 0;
}

.roles-fieldset legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

#roleCheckboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-option {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  transition: all .15s ease;
}

.role-option:has(input:checked) {
  border-color: #059669;
  background: #ecfdf5;
  color: var(--green-deep);
  box-shadow: 0 0 0 1px #059669;
}

.role-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--green);
}

.users-list {
  display: grid;
  gap: 9px;
  margin-top: 17px;
}

.user-row,
.user-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(11, 20, 48, .04);
}

.user-row>div:first-child,
.user-list-item>div:first-child {
  min-width: 0;
}

.user-row strong,
.user-row small,
.user-list-item strong,
.user-list-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row strong,
.user-list-item strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.user-row small,
.user-list-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.role-badges,
.user-role-badges {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.role-badge,
.user-role-badges span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .025em;
}

.user-status {
  flex: 0 0 auto;
  color: var(--green-deep);
  font-size: 10.5px;
  font-weight: 600;
}

.user-status.is-inactive {
  color: var(--red);
}

@media (max-width: 479px) {
  .form-modal-card {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 22px 16px 18px;
    border-radius: 20px;
  }

  .success-modal {
    align-items: end;
    padding: 12px;
  }

  .success-modal .form-modal-card {
    border-radius: 20px 20px 14px 14px;
  }

  #profileModal {
    align-items: start;
  }

  #profileModal .form-modal-card {
    border-radius: 14px 14px 20px 20px;
  }

  .payment-methods {
    gap: 6px;
  }

  .payment-method {
    min-height: 66px;
  }

  .payment-method strong {
    font-size: 9.5px;
  }

  .shift-close-row {
    align-items: flex-start;
  }

  .user-row,
  .user-list-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .role-badges,
  .user-role-badges {
    justify-content: flex-start;
  }
}

/* Elementos dinámicos de la operación PHP y bloqueo de scroll de fondo */
html.modal-is-open,
body.modal-is-open {
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100vh !important;
  overscroll-behavior: none !important;
}

body.modal-is-open .app-shell,
body.modal-is-open .screen {
  overflow: hidden !important;
  pointer-events: none !important;
}

body.modal-is-open .cart-sheet,
body.modal-is-open .table-picker-modal,
body.modal-is-open .success-modal,
body.modal-is-open .receipt-modal,
body.modal-is-open .sheet-backdrop {
  pointer-events: auto !important;
}

.order-card-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 7px;
}

.daily-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.daily-summary-grid>div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 11px 9px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.daily-summary-grid span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.daily-summary-grid strong {
  overflow: hidden;
  font-size: 13px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-daily-section {
  padding: 16px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(11, 20, 48, .04);
}

.admin-daily-section .close-shift-button {
  margin-bottom: 0;
}

.admin-daily-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.admin-users-trigger {
  display: block;
  width: 100%;
  margin: 9px 0 17px;
  text-align: center;
}

/* Modal de Perfil - Diseño Limpio, Compacto con Fondo Blanco */
.profile-modal-card {
  width: min(100%, 415px) !important;
  background: #ffffff !important;
  border-radius: 20px !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  padding: 22px 20px 18px !important;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
  text-align: center;
}

.profile-modal-card #profileModalBody {
  padding: 0;
}

.profile-modal-card .profile-avatar-large {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.profile-modal-card h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a !important;
  letter-spacing: -0.2px;
}

.profile-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.profile-role-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(225, 29, 72, 0.08);
  color: var(--red, #e11d48);
}

[data-theme="corporate"] .profile-role-tag {
  background: rgba(122, 60, 255, 0.09);
  color: var(--purple, #7a3cff);
}

.profile-email-text {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
}

/* Tarjeta unificada de información (Empresa, Sede, NIT, Caja, Acceso, Versión) */
.profile-info-card {
  margin: 10px 0;
  padding: 4px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  text-align: left;
}

.profile-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #edf2f7;
  font-size: 12px;
}

.profile-info-row:last-child {
  border-bottom: none;
}

.profile-info-label {
  color: #64748b;
  font-weight: 500;
  flex-shrink: 0;
}

.profile-info-value {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 230px;
}

.profile-version-tag {
  font-family: monospace;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.06);
  padding: 1.5px 7px;
  border-radius: 5px;
  color: #0f172a;
  letter-spacing: 0;
}

/* Selector de Tema Visual en Perfil */
.profile-theme-selector {
  margin: 10px 0;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  text-align: left;
}

.profile-theme-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}

.profile-theme-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.profile-theme-current {
  font-size: 11px;
  font-weight: 700;
  color: var(--red, #e11d48);
}

[data-theme="corporate"] .profile-theme-current {
  color: var(--purple, #7a3cff);
}

.profile-pin-card {
  margin: 10px 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  text-align: left;
}

.profile-pin-display-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 8px 12px;
  margin-top: 8px;
  margin-bottom: 6px;
}

.profile-pin-display-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-pin-display-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  letter-spacing: 0.05em;
}

.profile-pin-display-val {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--ink, #0f172a);
}

.profile-pin-actions-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-pin-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--surface-muted, #f1f5f9);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  color: var(--muted, #64748b);
  cursor: pointer;
  transition: all 0.15s ease;
}

.profile-pin-tool-btn:hover {
  background: #e2e8f0;
  color: var(--ink, #0f172a);
}

.profile-pin-tool-btn.is-danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.profile-pin-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.profile-pin-status.configured {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.profile-pin-description {
  margin: 0 0 10px !important;
  font-size: 11.5px;
  line-height: 1.45;
  color: #64748b;
}

.profile-pin-triggers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-pin-action-btn {
  flex: 1;
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.profile-pin-remove-link {
  border: none;
  background: transparent;
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

.profile-pin-remove-link:hover {
  background: rgba(220, 38, 38, 0.08);
}

.profile-pin-form {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.profile-pin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 479px) {
  .profile-pin-grid {
    grid-template-columns: 1fr;
  }
}

.profile-pin-field .field-label {
  margin: 0 0 5px;
  font-size: 11px;
}

.profile-pin-field .field-control {
  min-height: 44px;
  font-size: 14px;
  border-radius: 12px;
}

.profile-pin-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.profile-pin-form-actions .secondary-action,
.profile-pin-form-actions .primary-action,
.profile-pin-form-actions .danger-action {
  flex: 1;
  min-height: 38px;
  margin-top: 0;
  font-size: 12.5px;
}

.profile-modal-card .danger-action {
  margin-top: 8px;
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.theme-switch-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.theme-switch-group.theme-switch-grid-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.theme-switch-group.theme-switch-grid-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

@media (max-width: 640px) {
  .theme-switch-group.theme-switch-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.theme-switch-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 6px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  text-align: left;
  min-width: 0;
}

.theme-switch-btn:hover {
  border-color: var(--purple-border);
  color: var(--text-main);
  transform: translateY(-1px);
}

.theme-switch-btn.active {
  border-color: var(--purple);
  background: var(--purple-soft);
  color: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}

.theme-switch-btn.active strong {
  color: var(--purple);
}

.theme-switch-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: inherit;
  flex-shrink: 0;
}

.theme-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}

.theme-color-dot.purple {
  background: #7A3CFF;
  box-shadow: 0 0 0 2px rgba(122, 60, 255, 0.25);
}

.theme-color-dot.red {
  background: #e11d48;
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.25);
}

.theme-color-dot.white {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  box-shadow: 0 0 0 2px rgba(11, 20, 48, 0.08);
}

.theme-switch-btn[data-theme-choice="corporate"].active {
  border-color: #7A3CFF;
  background: #F3EEFF;
  color: #7A3CFF;
  box-shadow: 0 0 0 1px #7A3CFF;
}

.theme-switch-btn[data-theme-choice="corporate"].active strong {
  color: #7A3CFF;
}

.theme-switch-btn[data-theme-choice="corporate"].active .theme-switch-icon {
  background: #7A3CFF;
}

.theme-switch-btn[data-theme-choice="corporate"].active .theme-color-dot.purple {
  background: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.theme-switch-btn[data-theme-choice="classic"].active {
  border-color: #e11d48;
  background: #ffe4e6;
  color: #e11d48;
  box-shadow: 0 0 0 1px #e11d48;
}

.theme-switch-btn[data-theme-choice="classic"].active strong {
  color: #e11d48;
}

.theme-switch-btn[data-theme-choice="classic"].active .theme-switch-icon {
  background: #e11d48;
}

.theme-switch-btn[data-theme-choice="classic"].active .theme-color-dot.red {
  background: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.theme-switch-btn[data-theme-choice="white"].active {
  border-color: #e11d48;
  background: #F8FAFC;
  color: #0B1430;
  box-shadow: 0 0 0 1px #e11d48;
}

.theme-switch-btn[data-theme-choice="white"].active strong {
  color: #0B1430;
}

.theme-switch-btn[data-theme-choice="white"].active .theme-switch-icon {
  background: #e11d48;
}

.theme-switch-btn[data-theme-choice="white"].active .theme-color-dot.white {
  background: #FFFFFF;
  border-color: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.theme-switch-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
  overflow: hidden;
}

.theme-switch-text strong {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-switch-text small {
  font-size: 9.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.theme-color-dot.vga {
  background: #1e3a8a;
  border: 1.5px solid #38bdf8;
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.25);
}

.theme-switch-btn[data-theme-choice="vga"].active {
  border-color: #1e3a8a;
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: 0 0 0 1.5px #1e3a8a;
}

.theme-switch-btn[data-theme-choice="vga"].active strong {
  color: #1e3a8a;
}

.theme-switch-btn[data-theme-choice="vga"].active .theme-switch-icon {
  background: #1e3a8a;
}

.theme-switch-btn[data-theme-choice="vga"].active .theme-color-dot.vga {
  background: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.role-option small {
  color: currentColor;
  opacity: .7;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .04em;
}

.toast[data-kind='error'] {
  background: #991b1b;
}

.menu-context {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.menu-order-card {
  display: grid;
  gap: 9px;
  margin: 0 0 12px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(11, 20, 48, .04);
}

.menu-order-card>div,
.menu-order-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.menu-order-card>div strong {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-order-card p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-order-card footer {
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1.5px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.menu-order-card footer b {
  margin-right: auto;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.menu-order-card .serve-button,
.menu-order-card .close-account-button {
  min-height: 34px;
}

@media (max-width: 560px) {
  .daily-summary-grid {
    gap: 6px;
  }

  .daily-summary-grid>div {
    padding: 9px 7px;
  }

  .daily-summary-grid strong {
    font-size: 11px;
  }

  .order-card-footer.has-primary-action {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .order-card-footer.is-compact-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .order-card-footer>p {
    margin: 0;
    font-size: 11px;
    color: var(--muted);
  }

  .order-card-footer.has-primary-action .order-card-actions {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: stretch;
  }

  .order-card-footer.has-primary-action .order-action-attend,
  .order-card-footer.has-primary-action .order-action-view {
    flex: 1 1 0;
    min-width: 0;
  }

  .order-card-footer.has-primary-action .order-action-cancel {
    flex: 0 0 auto;
    padding: 0 11px;
  }

  .order-card-footer.has-primary-action .order-action-eye,
  .order-card-footer.has-primary-action .table-share-menu--order {
    flex: 0 0 40px;
  }
}

/* Venta directa: cuenta pendiente, cobro inmediato y comanda. */
.menu-layout,
.menu-catalog {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.menu-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.table-status.por-cobrar,
.table-status.pending-payment {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.table-status.paid {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.table-status.preparando {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.table-status.listo {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.table-status.servido,
.table-status.cerrada {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.michelada-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  margin-top: 7px;
  padding: 3px 7px;
  border: 1px solid #d9ced0;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.michelada-toggle:hover:not(:disabled) {
  border-color: #cf8c37;
  background: #fff8ed;
  color: #8c5304;
  transform: translateY(-1px);
}

.michelada-toggle b {
  color: currentColor;
  font-size: 9px;
}

.michelada-toggle.is-active,
.michelada-toggle[aria-pressed='true'] {
  border-color: #e0a44c;
  background: #fff1d8;
  color: #955804;
}

.michelada-toggle:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.cart-sheet.desktop-cart.is-updated {
  animation: direct-cart-bump .34s ease-out;
}

@keyframes direct-cart-bump {
  45% {
    box-shadow: 0 13px 31px rgba(35, 127, 87, .23);
  }

  100% {
    box-shadow: 0 8px 24px rgba(48, 29, 33, .12);
  }
}

.receipt-card {
  width: min(100%, 420px);
  text-align: left;
  padding: 12px 16px 18px;
}

.receipt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.receipt-modal-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.receipt-card>.success-icon,
.receipt-card>.eyebrow,
.receipt-card>h2 {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.receipt-card>.success-icon {
  margin-bottom: 13px;
}

#receiptModal .receipt-card>.success-icon,
#receiptModal .receipt-card>.eyebrow,
#receiptModal .receipt-card>h2#receiptTitle {
  display: none !important;
}

#receiptModal .receipt-content {
  margin: 0 0 16px !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  display: block !important;
}

.thermal-receipt-modal-inner {
  position: relative;
  background: #fafaf8;
  color: #1a1a1a;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-family: 'SF Mono', 'Courier New', Courier, Menlo, Consolas, monospace;
  overflow: hidden;
  line-height: 1.35;
  padding: 12px 16px 18px;
}

.thermal-receipt-modal-inner .receipt-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.thermal-receipt-modal-inner .receipt-cut-space {
  display: none;
}

.thermal-receipt-modal-inner .receipt-payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #333333;
}

.thermal-receipt-modal-inner .receipt-payment-row strong {
  color: #111111;
  font-weight: 600;
}

.item-unit-calc {
  font-size: 10.5px;
  color: #666666;
  margin-top: 1px;
}

.item-prep.is-michelada {
  font-weight: 600;
  color: #c2410c;
}

.receipt-content {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px dashed #d8ccce;
  border-radius: 14px;
  background: #fffdfd;
}

.receipt-content p {
  max-width: none !important;
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: 11px !important;
  text-align: left !important;
}

.receipt-meta {
  display: grid;
  gap: 4px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.receipt-meta strong {
  color: var(--ink);
  font-size: 12px;
}

.receipt-state {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 10px;
}

.receipt-state span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.receipt-state strong {
  font-size: 12px;
}

.receipt-state small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.receipt-state.is-pending {
  border-color: #f0ca90;
  background: #fff8ec;
  color: #925908;
}

.receipt-state.is-paid {
  border-color: #bfe4ce;
  background: #f0fbf4;
  color: var(--green-deep);
}

.receipt-lines {
  display: grid;
  gap: 8px;
}

.receipt-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  font-size: 11px;
}

.receipt-line>div {
  min-width: 0;
}

.receipt-line strong,
.receipt-line span {
  display: block;
}

.receipt-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-line span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.receipt-line b {
  font-size: 11px;
  letter-spacing: 0;
  white-space: nowrap;
}

.receipt-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
  padding-top: 11px;
  border-top: 1.5px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.receipt-total strong {
  color: var(--green-deep);
  font-size: 18px;
  letter-spacing: 0;
}

.receipt-payment {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
}

.receipt-payment strong {
  color: var(--ink);
  font-size: 11px;
}

.receipt-print-title,
.receipt-footer-ticket,
.receipt-cut-space {
  display: none;
}

/* ==========================================================================
   MODAL DE HISTORIAL Y AUDITORÍA DE MESA
   ========================================================================== */
.table-history-card {
  width: min(100%, 540px);
  max-height: min(92dvh, 740px);
  padding: 22px 20px 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#receiptModal.receipt-over-table-history {
  z-index: 71;
}

.table-history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--line);
  flex-shrink: 0;
}

.table-history-title-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.table-history-table-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #6d28d9;
  background: #ede9fe;
  padding: 2.5px 10px;
  border-radius: 999px;
  width: fit-content;
  letter-spacing: .02em;
}

.table-history-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.table-history-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.table-history-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.table-history-stat small {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.table-history-stat strong {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.table-history-body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 4px;
  padding-right: 4px;
}

.table-history-timeline {
  display: flex;
  flex-direction: column;
  gap: 11px;
  position: relative;
  padding-left: 22px;
}

.table-history-timeline::before {
  content: '';
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 7px;
  width: 2px;
  background: linear-gradient(180deg, var(--line) 0%, rgba(148, 163, 184, 0.25) 100%);
  border-radius: 999px;
}

.table-history-event {
  position: relative;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}

.table-history-event:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
}

.table-history-event::before {
  content: '';
  position: absolute;
  top: 15px;
  left: -21px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
  border: 2.5px solid var(--surface);
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.22);
}

.table-history-event.type-payment::before {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.table-history-event.type-cancel::before {
  background: var(--pink);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.table-history-event.type-close::before {
  background: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16);
}

.table-history-event.type-items::before {
  background: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.16);
}

.table-history-event.type-open::before {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.table-history-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.table-history-badge {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.table-history-badge.blue {
  background: #e0f2fe;
  color: #0369a1;
}

.table-history-badge.green {
  background: #ecfdf5;
  color: #047857;
}

.table-history-badge.purple {
  background: #f3e8ff;
  color: #7e22ce;
}

.table-history-badge.red {
  background: var(--occupied-bg);
  color: var(--occupied-text);
}

.table-history-badge.indigo {
  background: #e0e7ff;
  color: #4338ca;
}

.table-history-badge.slate {
  background: #f1f5f9;
  color: #475569;
}

.table-history-items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0 3px;
}

.history-item-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 8px;
  color: var(--ink);
  line-height: 1.3;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.history-item-pill strong {
  color: #4338ca;
  font-weight: 600;
}

.history-item-pill small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  margin-left: 2px;
}

.table-history-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.table-history-event-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.table-history-event-detail {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.table-history-event-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--muted);
}

.table-history-actor {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.table-history-reprint-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
  flex-shrink: 0;
}

@media (max-width: 380px) {
  .table-history-card {
    padding: 18px 14px;
  }

  .table-history-summary {
    gap: 6px;
    padding: 9px;
  }

  .table-history-stat small {
    font-size: 9px;
  }

  .table-history-stat strong {
    font-size: 12px;
  }
}

.table-history-reprint-btn:hover {
  background: var(--surface-soft);
  border-color: #94a3b8;
}

.table-history-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--muted);
}

.table-history-empty svg {
  width: 36px;
  height: 36px;
  margin-bottom: 6px;
  color: #94a3b8;
}

.table-history-loading {
  text-align: center;
  padding: 32px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ==========================================================================
   VISTA PREVIA Y FORMATO DE COMANDA
   ========================================================================== */
.comanda-card,
.order-qr-card {
  width: min(100%, 420px);
}

.comanda-card {
  text-align: left;
}

.comanda-card>.success-icon,
.comanda-card>.eyebrow,
.comanda-card>h2,
.comanda-card>p {
  text-align: center;
}

.comanda-preview {
  margin: 14px 0 18px;
}

.comanda-preview-card {
  background: #ffffff;
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.comanda-preview-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.comanda-badge {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comanda-preview-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.comanda-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  padding: 8px 0;
}

.comanda-preview-row:first-child {
  padding-top: 2px;
}

.comanda-preview-row:last-child {
  padding-bottom: 4px;
}

.comanda-preview-row + .comanda-preview-row {
  border-top: 1px solid rgba(226, 232, 240, 0.75);
}

.comanda-preview-left {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.comanda-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.comanda-qty {
  color: var(--purple);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
}

.comanda-name {
  color: var(--navy);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comanda-item-unit {
  font-size: 11px;
  color: var(--muted, #64748b);
  font-weight: 500;
}

.comanda-item-price {
  flex-shrink: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main, #1e293b);
  font-variant-numeric: tabular-nums;
}

.comanda-preview-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line, #cbd5e1);
  font-size: 13.5px;
}

.comanda-preview-total-row span {
  font-weight: 600;
  color: var(--text-secondary, #475569);
}

.comanda-preview-total-row strong {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--occupied-text, #e11d48);
  font-variant-numeric: tabular-nums;
}

.comanda-prep {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.comanda-prep.is-michelada {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  border-radius: 999px;
  padding: 1.5px 7px;
}

.comanda-thermal-ticket {
  display: none;
}

.back-to-tables-success-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #ffffff !important;
  color: var(--ink, #0b1430) !important;
  border: 1.5px solid var(--line, #cbd5e1) !important;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.back-to-tables-success-btn:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

.back-to-tables-success-btn svg {
  flex-shrink: 0;
}

.print-comanda-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.print-comanda-button svg {
  flex-shrink: 0;
}

/* ==========================================================================
   VISTA DE PEDIDOS / TOMA DE PEDIDO (#menuScreen)
   Flujo responsive limpio: 1 columna natural en móvil, 2 columnas fijas en desktop
   ========================================================================== */
.menu-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.menu-catalog {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.menu-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 6px 0 10px;
  scrollbar-width: none;
}

.category-row::-webkit-scrollbar {
  display: none;
}

@media (min-width: 900px) {

  html.is-order-mode,
  html:has(body.is-order-mode),
  body.is-order-mode {
    height: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  body.is-order-mode {
    display: flex;
    flex-direction: column;
  }

  body.is-order-mode .app-header {
    flex-shrink: 0;
  }

  body.is-order-mode .app-shell {
    flex: 1 1 auto;
    min-height: 0;
    height: calc(100vh - 62px);
    height: calc(100dvh - 62px);
    max-height: calc(100vh - 62px);
    max-height: calc(100dvh - 62px);
    padding: 6px 14px 6px;
    margin: 0 auto;
    width: 100%;
    max-width: 1440px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  body.is-order-mode .bottom-nav {
    bottom: 6px !important;
  }

  body.is-order-mode #mainContent {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  body.is-order-mode #menuScreen {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
  }

  body.is-order-mode .menu-layout,
  .menu-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 320px !important;
    grid-template-rows: 100% !important;
    gap: 12px;
    align-items: stretch;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
  }

  body.is-order-mode .menu-catalog,
  .menu-catalog {
    display: flex;
    flex-direction: column;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
  }

  .menu-search-row {
    flex-shrink: 0;
    margin-bottom: 4px;
  }

  .category-row {
    flex-shrink: 0;
    margin: 4px 0 6px;
  }

  body.is-order-mode .beer-grid,
  .menu-catalog .beer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding-top: 8px;
    padding-left: 6px;
    padding-right: 8px;
    padding-bottom: 30px;
    align-content: start;
    gap: 16px !important;
    box-sizing: border-box;
  }

  .menu-catalog .beer-card {
    padding: 18px 14px 18px;
    border-radius: 20px;
    min-height: 236px;
  }

  .menu-catalog .beer-visual {
    width: 90px;
    height: 90px;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 50%;
  }

  .menu-catalog .beer-visual svg,
  .menu-catalog .beer-visual img {
    max-height: 100%;
  }

  .menu-catalog .beer-image-fallback {
    font-size: 34px;
  }

  .menu-catalog .beer-category-tag {
    display: block !important;
    font-size: 11.5px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 2px;
  }

  .menu-catalog .beer-title {
    font-size: 15px;
    font-weight: 700;
    color: #0b1430;
    min-height: 36px;
    line-height: 1.25;
    text-align: center;
    word-break: break-word;
    margin: 0;
  }

  .menu-catalog .beer-divider {
    margin: 6px auto 8px;
    width: 44px;
    height: 2px;
    border-radius: 2px;
    background: #dce3ee;
  }

  .menu-catalog .beer-divider-row {
    margin: 3px auto 5px;
  }

  .menu-catalog .beer-price {
    font-size: 15.5px;
    font-weight: 700;
    color: #0b1430;
  }

  .menu-catalog .beer-cart-badge {
    top: 6px;
    right: 6px;
    min-width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .cart-sheet.desktop-cart {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 25;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 4px 16px rgba(11, 20, 48, .06);
    transform: none !important;
    box-sizing: border-box;
  }

  .cart-sheet.desktop-cart.open {
    transform: none !important;
  }

  .cart-sheet.desktop-cart .sheet-handle,
  .cart-sheet.desktop-cart #closeCartButton {
    display: none !important;
  }

  .cart-sheet.desktop-cart .sheet-heading {
    padding: 8px 12px 6px;
    border-bottom: 1.5px solid var(--line);
    background: #f8fafc;
    flex-shrink: 0;
  }

  .cart-sheet.desktop-cart .sheet-heading h2 {
    font-size: 14px;
  }

  .cart-sheet.desktop-cart .cart-empty {
    padding: 24px 14px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  .cart-sheet.desktop-cart .cart-items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: 6px 8px;
    display: grid;
    gap: 4px;
    align-content: start;
  }

  .cart-sheet.desktop-cart .cart-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 8px 10px max(8px, env(safe-area-inset-bottom));
    border-top: 1.5px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -4px 16px rgba(11, 20, 48, .06);
    z-index: 5;
  }

  .cart-sheet.desktop-cart .cart-checkout-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    width: 100%;
  }

  .cart-sheet.desktop-cart .pending-order-button,
  .cart-sheet.desktop-cart .pay-now-button {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: var(--radius-md);
    font-weight: 700;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
  }

  .floating-cart {
    display: none !important;
  }

  /* Líneas del carrito compactas para optimizar pantallas LCD */
  .cart-line {
    gap: 3px;
    padding: 5px 8px;
  }

  .cart-line-name {
    font-size: 11.5px !important;
    line-height: 1.2 !important;
  }

  .cart-line-existing .cart-line-name {
    font-size: 11.5px !important;
  }

  .cart-line-meta {
    font-size: 9.5px;
  }

  .cart-line-total {
    font-size: 11.5px;
  }

  .cart-line-actions .quantity-control button {
    width: 24px;
    height: 24px;
    font-size: 13px;
    border-radius: 5px;
  }

  .cart-line-actions .quantity-control .quantity-input {
    width: 26px;
    min-width: 26px;
    height: 24px;
    font-size: 11px;
  }

  .cart-remove-item-btn {
    width: 24px;
    height: 24px;
  }

  .cart-remove-item-btn svg {
    width: 12px;
    height: 12px;
  }
}

@media (min-width: 1400px) {

  body.is-order-mode .menu-layout,
  .menu-layout {
    grid-template-columns: minmax(0, 1fr) 360px !important;
    gap: 16px;
  }

  body.is-order-mode .beer-grid,
  .menu-catalog .beer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}

/* Botón interactivo para cambiar variante Normal / Michelada en la línea del pedido */
.cart-prep-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--surface-soft, #f1f5f9);
  color: var(--text-secondary, #64748b);
  transition: all 0.14s ease;
  user-select: none;
}

.cart-prep-btn:hover {
  border-color: #f59e0b;
  color: #b45309;
  background: #fef3c7;
}

.cart-prep-btn.is-michelada {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.18);
}

.cart-prep-btn .cart-lemon-icon {
  font-size: 11px;
  line-height: 1;
}

@media (max-width: 479px) {
  .cart-sheet:not(.desktop-cart) {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    width: calc(100% - 16px);
    max-height: min(92dvh, 680px);
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
  }

  .sheet-handle {
    margin: 8px auto 6px;
  }

  .sheet-heading {
    padding: 0 12px 10px;
  }

  .sheet-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  .sheet-heading h2 {
    font-size: 14.5px;
    white-space: nowrap;
  }

  .cart-empty {
    padding: 24px 14px 20px;
  }

  .cart-items {
    padding: 10px 14px;
  }

  .cart-footer {
    padding: 9px 12px max(10px, env(safe-area-inset-bottom));
  }

  .cart-checkout-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .pending-order-button,
  .pay-now-button {
    min-height: 40px;
    font-size: 11.5px;
    padding: 0 6px;
    width: 100%;
    white-space: nowrap;
  }

  .receipt-card {
    padding: 12px 14px 16px;
  }
}

@media print {
  @page {
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    size: auto;
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box !important;
    text-shadow: none !important;
    box-shadow: none !important;
  }

  html,
  body {
    width: 80mm !important;
    max-width: 80mm !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 9.5pt !important;
    line-height: 1.25 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    overflow: visible !important;
  }

  /* Ocultar toda la interfaz que no pertenezca al comprobante, comanda o QR activo */
  body:not(.client-body)>*:not(#receiptModal):not(#successModal):not(#orderQrModal),
  [hidden],
  #receiptModal[hidden],
  #successModal[hidden],
  #orderQrModal[hidden],
  body.is-printing-comanda #receiptModal,
  body.is-printing-comanda #orderQrModal,
  body.is-printing-receipt #successModal,
  body.is-printing-receipt #orderQrModal,
  body.is-printing-qr #receiptModal,
  body.is-printing-qr #successModal,
  body.is-printing-qr #shareWhatsAppForm,
  body.is-printing-qr .order-share-wa-box {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
  }

  body:not(.client-body) * {
    visibility: hidden !important;
  }

  /* Solo hacer visible el modal que NO esté oculto */
  #receiptModal:not([hidden]),
  #receiptModal:not([hidden]) *,
  #successModal:not([hidden]),
  #successModal:not([hidden]) *,
  #orderQrModal:not([hidden]),
  #orderQrModal:not([hidden]) * {
    visibility: visible !important;
    color: #000000 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border-color: #000000 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    -webkit-text-stroke: 0.22px #000000 !important;
    opacity: 1 !important;
    letter-spacing: 0 !important;
  }

  /* Los modales activos en impresion deben estar en el flujo normal (relative) para dar altura al body y evitar hojas en blanco */
  #receiptModal:not([hidden]),
  #successModal:not([hidden]),
  #orderQrModal:not([hidden]) {
    position: relative !important;
    left: auto !important;
    top: 0 !important;
    width: 72mm !important;
    max-width: 72mm !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: block !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  #successModal .comanda-card,
  #successModal .comanda-preview,
  #successModal .comanda-preview-card,
  #orderQrModal .order-qr-card {
    width: 72mm !important;
    max-width: 72mm !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Lucida Console', 'JetBrains Mono', monospace !important;
    font-size: 9pt !important;
    color: #000000 !important;
    animation: none !important;
    overflow: visible !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  #successModal .modal-header-compact,
  #successModal .comanda-destination-block,
  #successModal .success-icon,
  #successModal .comanda-actions,
  #successModal .eyebrow,
  #successModal #successTitle,
  #successModal #successCopy,
  #successModal .comanda-screen-view,
  #successModal .comanda-link-strip,
  #orderQrModal .modal-close,
  #orderQrModal .modal-header-compact,
  #orderQrModal .order-qr-destination-block,
  #orderQrModal .order-qr-header,
  #orderQrModal .order-qr-display-wrap,
  #orderQrModal .order-qr-meta-bar,
  #orderQrModal .order-share-wa-box,
  #orderQrModal #shareWhatsAppForm,
  #orderQrModal .order-qr-actions {
    display: none !important;
  }

  #successModal .comanda-thermal-ticket,
  #orderQrModal .order-qr-thermal-ticket {
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    visibility: visible !important;
  }

  .thermal-qr-section {
    display: block !important;
    text-align: center !important;
    padding: 2mm 0 !important;
    margin: 0 auto !important;
  }

  .thermal-qr-heading {
    display: block !important;
    font-size: 9.5pt !important;
    font-weight: 900 !important;
    letter-spacing: 0.04em !important;
    margin: 0 0 1.5mm !important;
    text-align: center !important;
  }

  .thermal-qr-box {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 1mm auto 2mm !important;
    background: #ffffff !important;
  }

  .thermal-qr-box svg {
    display: block !important;
    width: 44mm !important;
    height: 44mm !important;
    margin: 0 auto !important;
    shape-rendering: crispEdges !important;
  }

  .thermal-qr-box svg rect {
    fill: #ffffff !important;
  }

  .thermal-qr-box svg path {
    fill: #000000 !important;
  }

  .thermal-qr-instructions {
    display: block !important;
    font-size: 8pt !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0 auto !important;
    padding: 0 2mm !important;
    text-align: center !important;
  }

  #successModal .receipt-cut-space,
  .thermal-receipt-modal-inner .receipt-cut-space {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
    height: 65mm !important;
    min-height: 65mm !important;
    max-height: 65mm !important;
    width: 100% !important;
    visibility: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border: none !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  #successModal .receipt-cut-mark,
  .thermal-receipt-modal-inner .receipt-cut-mark {
    display: block !important;
    width: 1.5mm !important;
    height: 0 !important;
    border-bottom: 1px solid #000000 !important;
    margin: 0 auto !important;
    visibility: visible !important;
  }

  #successModal .receipt-cut-space::after,
  .thermal-receipt-modal-inner .receipt-cut-space::after {
    display: none !important;
  }

  .comanda-thermal-meta {
    text-align: center !important;
    border-bottom: 1.5px dashed #000000 !important;
    padding-bottom: 2mm !important;
    margin-bottom: 2mm !important;
  }

  .comanda-thermal-title {
    display: block !important;
    font-size: 14pt !important;
    font-weight: 950 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    line-height: 1.1 !important;
  }

  .comanda-thermal-dest {
    display: block !important;
    font-size: 20pt !important;
    font-weight: 950 !important;
    margin: 2mm 0 !important;
    text-transform: uppercase !important;
    line-height: 1.1 !important;
  }

  .comanda-thermal-order,
  .comanda-thermal-waiter {
    display: block !important;
    font-size: 9.5pt !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
  }

  .comanda-thermal-items {
    display: flex !important;
    flex-direction: column !important;
    gap: 2mm !important;
    padding: 2mm 0 !important;
    border-bottom: 1.5px dashed #000000 !important;
  }

  .comanda-thermal-row {
    display: flex !important;
    align-items: flex-start !important;
    gap: 2.5mm !important;
    font-size: 11pt !important;
    line-height: 1.25 !important;
  }

  .comanda-thermal-qty {
    font-size: 14pt !important;
    font-weight: 950 !important;
    min-width: 8mm !important;
  }

  .comanda-thermal-name {
    font-weight: 850 !important;
    font-size: 11pt !important;
  }

  .comanda-prep-highlight {
    display: inline-block !important;
    font-size: 10pt !important;
    font-weight: 950 !important;
    margin-left: 2px !important;
  }

  .comanda-thermal-footer {
    text-align: center !important;
    font-size: 9.5pt !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    margin-top: 2.5mm !important;
    padding: 1.5mm 0 !important;
  }

  #receiptModal .receipt-card {
    width: 72mm !important;
    max-width: 72mm !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Lucida Console', 'JetBrains Mono', monospace !important;
    font-size: 9pt !important;
    color: #000000 !important;
    animation: none !important;
    overflow: visible !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  #receiptModal .receipt-modal-header,
  #receiptModal .success-icon,
  #receiptModal .receipt-actions,
  #receiptModal .eyebrow,
  #receiptModal .receipt-card>h2 {
    display: none !important;
  }

  #receiptModal .receipt-content {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .thermal-receipt-modal-inner {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 1.5mm 3mm !important;
    border: none !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .thermal-receipt-modal-inner * {
    -webkit-text-stroke: 0.22px #000000 !important;
    opacity: 1 !important;
  }

  .thermal-receipt-modal-inner .receipt-header {
    text-align: center !important;
    padding: 0 0 1.5mm !important;
    margin: 0 !important;
  }

  .thermal-receipt-modal-inner .receipt-logo-wrap {
    display: flex !important;
    justify-content: center !important;
    margin: 0 0 1.5mm 0 !important;
    padding: 0 !important;
  }

  .thermal-receipt-modal-inner .receipt-logo-img {
    width: 40px !important;
    height: 40px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    border: 1.5px solid #000000 !important;
    padding: 1.5px !important;
    background: #ffffff !important;
    display: block !important;
    margin: 0 auto !important;
  }

  .thermal-receipt-modal-inner .receipt-store-title {
    font-size: 14pt !important;
    font-weight: 950 !important;
    color: #000000 !important;
    letter-spacing: 0.04em !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    -webkit-text-stroke: 0.35px #000000 !important;
  }

  .thermal-receipt-modal-inner .receipt-store-title.store-title-prominent {
    font-size: 15pt !important;
    font-weight: 950 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    margin: 1mm 0 0.5mm !important;
    -webkit-text-stroke: 0.35px #000000 !important;
  }

  .thermal-receipt-modal-inner .receipt-store-sub {
    font-size: 8.5pt !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    color: #000000 !important;
    margin: 0.8mm 0 0.4mm !important;
    line-height: 1.25 !important;
  }

  .thermal-receipt-modal-inner .receipt-store-desc {
    font-size: 9pt !important;
    font-weight: 900 !important;
    color: #000000 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin: 1mm 0 0 !important;
  }

  .thermal-receipt-modal-inner .receipt-divider {
    font-size: 8pt !important;
    font-weight: 950 !important;
    color: #000000 !important;
    letter-spacing: 1px !important;
    margin: 1mm 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }

  .thermal-receipt-modal-inner .receipt-meta-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1mm !important;
    font-size: 9pt !important;
    margin: 1mm 0 !important;
  }

  .thermal-receipt-modal-inner .receipt-meta-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    color: #000000 !important;
    line-height: 1.3 !important;
  }

  .thermal-receipt-modal-inner .receipt-meta-row .meta-label {
    color: #000000 !important;
    font-weight: 800 !important;
    font-size: 8.5pt !important;
  }

  .thermal-receipt-modal-inner .receipt-meta-row .meta-val {
    color: #000000 !important;
    font-weight: 900 !important;
    font-size: 9pt !important;
    text-align: right !important;
  }

  .thermal-receipt-modal-inner .receipt-meta-row .meta-val.highlight {
    font-size: 10.5pt !important;
    font-weight: 950 !important;
    -webkit-text-stroke: 0.3px #000000 !important;
  }

  .thermal-receipt-modal-inner .receipt-col-headers {
    display: grid !important;
    grid-template-columns: 36px 1fr 70px !important;
    font-size: 8.5pt !important;
    font-weight: 950 !important;
    color: #000000 !important;
    padding: 1mm 0 !important;
    border-top: 1.5px dashed #000000 !important;
    border-bottom: 1.5px dashed #000000 !important;
    margin: 1mm 0 !important;
  }

  .thermal-receipt-modal-inner .receipt-items-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5mm !important;
    padding: 1mm 0 !important;
  }

  .thermal-receipt-modal-inner .receipt-item-row {
    display: grid !important;
    grid-template-columns: 36px 1fr 70px !important;
    align-items: baseline !important;
    font-size: 9pt !important;
    color: #000000 !important;
    line-height: 1.25 !important;
  }

  .thermal-receipt-modal-inner .item-qty {
    font-weight: 950 !important;
    font-size: 10pt !important;
    color: #000000 !important;
  }

  .thermal-receipt-modal-inner .item-info {
    display: flex !important;
    flex-direction: column !important;
    padding-right: 2mm !important;
  }

  .thermal-receipt-modal-inner .item-name {
    font-weight: 850 !important;
    font-size: 9.5pt !important;
    color: #000000 !important;
    word-break: break-word !important;
  }

  .thermal-receipt-modal-inner .item-prep {
    font-size: 8pt !important;
    font-weight: 800 !important;
    color: #000000 !important;
    font-style: normal !important;
    margin-top: 0.3mm !important;
  }

  .thermal-receipt-modal-inner .item-prep.is-michelada {
    font-weight: 950 !important;
    font-size: 8.5pt !important;
  }

  .thermal-receipt-modal-inner .item-unit-calc {
    font-size: 8pt !important;
    font-weight: 700 !important;
    color: #000000 !important;
  }

  .thermal-receipt-modal-inner .item-price {
    text-align: right !important;
    font-weight: 900 !important;
    font-size: 9.5pt !important;
    color: #000000 !important;
  }

  .thermal-receipt-modal-inner .receipt-totals {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.2mm !important;
    font-size: 9pt !important;
    padding: 1.5mm 0 !important;
  }

  .thermal-receipt-modal-inner .receipt-total-line,
  .thermal-receipt-modal-inner .receipt-payment-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    color: #000000 !important;
    font-size: 9pt !important;
    font-weight: 800 !important;
  }

  .thermal-receipt-modal-inner .receipt-payment-row strong {
    font-weight: 950 !important;
  }

  .thermal-receipt-modal-inner .receipt-total-line.grand-total {
    font-size: 11.5pt !important;
    font-weight: 950 !important;
    border-top: 2px dashed #000000 !important;
    border-bottom: 2px dashed #000000 !important;
    padding: 2mm 0 !important;
    margin: 1.5mm 0 !important;
  }

  .thermal-receipt-modal-inner .receipt-total-line.grand-total .grand-amount {
    font-size: 13.5pt !important;
    font-weight: 950 !important;
    color: #000000 !important;
    -webkit-text-stroke: 0.35px #000000 !important;
  }

  .thermal-receipt-modal-inner .receipt-barcode-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 2mm 0 1mm !important;
    gap: 1mm !important;
  }

  .thermal-receipt-modal-inner .barcode-num {
    font-size: 8pt !important;
    font-weight: 800 !important;
    color: #000000 !important;
    letter-spacing: 0.12em !important;
  }

  .thermal-receipt-modal-inner .receipt-footer {
    text-align: center !important;
    padding-top: 2mm !important;
    color: #000000 !important;
  }

  .thermal-receipt-modal-inner .receipt-thankyou {
    font-size: 9.5pt !important;
    font-weight: 950 !important;
    color: #000000 !important;
    margin: 0 !important;
  }

  .thermal-receipt-modal-inner .receipt-enjoy {
    font-size: 8pt !important;
    font-weight: 800 !important;
    color: #000000 !important;
    margin: 0.5mm 0 0 !important;
  }

  /* Espacio de avance en blanco para que la cuchilla no corte el texto */
  .thermal-receipt-modal-inner .receipt-cut-space {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
    height: 65mm !important;
    min-height: 65mm !important;
    max-height: 65mm !important;
    width: 100% !important;
    visibility: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border: none !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .thermal-receipt-modal-inner .receipt-cut-mark {
    display: block !important;
    width: 1.5mm !important;
    height: 0 !important;
    border-bottom: 1px solid #000000 !important;
    margin: 0 auto !important;
    visibility: visible !important;
  }

  .thermal-receipt-modal-inner .receipt-cut-space::after {
    display: none !important;
  }
}

/* ==========================================================================
   MÓDULO DE ADMINISTRACIÓN (CRUD PRODUCTOS Y USUARIOS)
   ========================================================================== */
.admin-hero {
  margin-bottom: 14px;
}

/* Segmented Control Tabs */
.admin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  padding: 6px;
  background: var(--surface-soft);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.admin-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s ease;
  user-select: none;
  white-space: nowrap;
}

.admin-tab:hover:not(.active) {
  color: var(--ink);
  background: rgba(255, 255, 255, .7);
}

.admin-tab.active {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(11, 20, 48, .07);
  font-weight: 600;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(11, 20, 48, .07);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.admin-tab.active .admin-badge {
  background: var(--red-soft);
  color: var(--red);
}

/* Toolbar de Administración */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-search {
  flex: 1;
  min-width: 220px;
  height: 46px;
  margin: 0;
}

.admin-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-btn-action {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.admin-toolbar .new-order-button {
  min-height: 46px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 12px;
}

/* Filtro de Categorías horizontal (no acumulable / no desbordado) */
.admin-category-filter {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  gap: 8px;
  margin: 0 0 16px;
  padding: 2px 2px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.admin-category-filter::-webkit-scrollbar {
  display: none;
}

.admin-category-filter .category-chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.admin-category-filter .category-chip:hover {
  border-color: #94a3b8;
  background: var(--surface-soft);
  color: var(--ink);
}

.admin-category-filter .category-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 2px 8px rgba(11, 20, 48, .12);
}

.admin-category-filter .category-chip.active .category-chip-icon {
  color: #fff;
}

/* Grilla de Productos de Administración */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.admin-product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(11, 20, 48, .04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  min-width: 0;
  box-sizing: border-box;
}

.admin-product-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px rgba(11, 20, 48, .07);
}

.admin-product-header {
  display: flex;
  gap: 10px;
  padding: 11px 12px 8px;
  align-items: center;
  background: #fff;
  min-width: 0;
}

.admin-card-thumb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.admin-card-thumb img,
.admin-card-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.admin-card-thumb-fallback {
  font-size: 20px;
}

.admin-product-info {
  min-width: 0;
  flex: 1 1 auto;
}

.admin-product-info h3 {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
}

.admin-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.admin-product-body {
  padding: 2px 12px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #fff;
}

.admin-product-desc {
  display: none;
}

.admin-product-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-prices-col {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-product-price {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--red);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.admin-price-note {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.admin-takeaway-price {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.admin-takeaway-price strong {
  color: var(--ink);
  font-weight: 600;
}

.admin-status-badges {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
}

.status-pill.active {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.status-pill.inactive {
  background: #f8fafc;
  color: var(--muted);
  border: 1px solid var(--line);
}

.status-pill.available {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.status-pill.unavailable {
  background: var(--occupied-bg);
  color: var(--occupied-text);
  border: 1px solid var(--occupied-border);
}

.status-pill.is-pending-review,
.status-pill.warning {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.admin-card-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 7px 10px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  box-sizing: border-box;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  transition: all .15s ease;
  min-width: 0;
  text-overflow: ellipsis;
}

.admin-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.admin-btn.edit {
  background: #fff;
  color: var(--ink);
}

.admin-btn.edit:hover {
  border-color: #94a3b8;
  background: var(--surface-soft);
}

.admin-btn.delete {
  background: #fff;
  color: var(--muted);
}

.admin-btn.delete:hover {
  background: var(--occupied-bg);
  border-color: var(--occupied-border);
  color: var(--pink);
}

/* Grilla de Usuarios */
.admin-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.admin-user-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(11, 20, 48, .04);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.admin-user-card:hover {
  transform: translateY(-2px);
  border-color: #94a3b8;
  box-shadow: 0 8px 24px rgba(11, 20, 48, .08);
}

.admin-user-header {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.admin-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--purple-soft);
  border: 1.5px solid var(--purple-border);
  color: var(--purple);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}

.admin-user-info {
  min-width: 0;
  flex: 1;
}

.admin-user-info h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.admin-user-body {
  padding: 12px 16px;
  flex: 1;
  display: grid;
  gap: 8px;
  font-size: 12px;
  background: #fff;
}

.admin-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.admin-contact-item svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
  flex-shrink: 0;
}

.admin-contact-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-contact-item .muted-label {
  color: var(--muted);
  font-size: 11px;
  margin-right: 4px;
  font-weight: 600;
}

/* Panel Reportes */
.admin-reports-toolbar {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(11, 20, 48, .03);
}

.reports-filter-group {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.reports-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

.reports-field.reports-field-time {
  min-width: 110px;
  max-width: 130px;
}

.reports-field .field-control {
  height: 44px;
  min-height: 44px;
  border-radius: 12px;
  font-size: 13.5px;
  padding: 0 12px;
  border: 1.5px solid var(--border-strong, #cbd5e1);
  transition: all 0.15s ease;
}

.reports-field .field-control:hover:not(:disabled):not(:focus) {
  border-color: #94a3b8;
}

.reports-submit-btn {
  min-height: 42px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.admin-reports-content {
  margin-top: 16px;
}

.admin-reports-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.admin-reports-empty span {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

/* Selector de imágenes de productos */
.product-image-picker-section {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  margin-top: 8px;
}

.product-picker-preview {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.product-picker-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-picker-preview .preview-fallback-icon {
  font-size: 32px;
}

.product-picker-controls {
  flex: 1;
  min-width: 0;
}

.image-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.small-btn {
  min-height: 34px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  cursor: pointer;
}

.danger-icon-btn {
  color: var(--occupied-text) !important;
  width: 34px !important;
  height: 34px !important;
  border-color: var(--occupied-border) !important;
}

.danger-icon-btn:hover {
  background: var(--occupied-bg) !important;
  border-color: var(--pink) !important;
}

/* Galería desplegable de imágenes precargadas */
.preset-gallery-collapse {
  margin-top: 12px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.preset-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.text-button {
  background: none;
  border: 0;
  color: var(--purple);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}

.text-button:hover {
  text-decoration: underline;
}

.preset-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}

.preset-thumb-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: all .15s ease;
}

.preset-thumb-btn:hover {
  border-color: #94a3b8;
  background: #fff;
}

.preset-thumb-btn.selected {
  border-color: var(--purple);
  background: var(--purple-soft);
}

.preset-thumb-btn img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.preset-thumb-btn span {
  font-size: 9px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Form helpers */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.category-select-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.category-select-wrap select.field-control {
  flex: 1;
  min-width: 0;
}

.add-category-btn {
  display: inline-grid;
  place-items: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 11px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(11, 20, 48, .03);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  user-select: none;
}

.add-category-btn:hover {
  background: var(--purple-soft);
  border-color: var(--purple);
  color: var(--purple);
  transform: translateY(-1px);
}

.add-category-btn:active {
  transform: translateY(0);
}

.add-category-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.role-selector-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.role-pill-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}

.role-pill-label input {
  accent-color: var(--purple);
}

.role-pill-label.checked {
  background: var(--purple-soft);
  border-color: var(--purple);
  color: var(--purple);
}

.product-status-group {
  margin-top: 14px;
}

.status-segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.status-segment-label {
  cursor: pointer;
  margin: 0;
  position: relative;
}

.status-segment-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.status-segment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: all .16s ease;
  user-select: none;
}

.status-segment-label:hover .status-segment-btn {
  border-color: #94a3b8;
  color: var(--ink);
}

.status-segment-label input[type="radio"]:checked+.status-segment-btn.available {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(16, 185, 129, .15);
}

.status-segment-label input[type="radio"]:checked+.status-segment-btn.unavailable {
  background: var(--occupied-bg);
  border-color: var(--occupied-border);
  color: var(--occupied-text);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 61, 143, .12);
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
}

.form-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.admin-modal-card {
  max-width: 540px;
}

.admin-modal-card.user-modal-card {
  max-width: 540px;
}

/* Compact Modal Header (Check / Icon + Title + Close Button on one row) */
.modal-header-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  text-align: left;
}

.modal-header-compact .modal-header-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 12px;
  background: var(--red-soft, #fee2e2);
  color: var(--red, #ef4444);
  flex-shrink: 0;
}

.modal-header-compact .modal-header-badge.is-payment {
  background: #ecfdf5;
  color: #059669;
}

.modal-header-compact .modal-header-badge.is-danger {
  background: #fef2f2;
  color: #dc2626;
}

.modal-header-compact .modal-header-badge.is-share {
  background: var(--red-soft, #ffe4e6);
  color: var(--brand, var(--red, #e11d48));
}

.modal-header-compact .modal-header-badge svg {
  width: 20px;
  height: 20px;
}

.modal-header-compact .modal-header-text {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.modal-header-compact .modal-header-text .eyebrow {
  margin: 0 0 2px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--red, #ef4444);
  line-height: 1.2;
}

.modal-header-compact .modal-header-text h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--red, #e11d48);
  line-height: 1.25;
  text-align: center;
}

.modal-header-compact .modal-header-text .eyebrow + h2 {
  color: var(--ink, #0f172a);
}

#orderQrModal .modal-header-text h2 {
  color: var(--brand, var(--red, #e11d48));
}

.modal-header-compact .modal-close {
  position: static !important;
  flex-shrink: 0;
  margin: 0;
  width: 40px;
  height: 40px;
}

#openShiftModal .field-label,
#closeShiftModal .field-label,
#shiftVerifyModal .field-label {
  justify-content: flex-start;
  gap: 4px;
}

#shiftVerifyModal .close-shift-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  background: var(--surface-subtle, #f8fafc);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line, #e2e8f0);
}

#shiftVerifyModal .close-shift-summary > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#shiftVerifyModal .close-shift-summary span {
  font-size: 0.72rem;
  color: var(--muted, #64748b);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
}

#shiftVerifyModal .close-shift-summary strong {
  font-size: 0.95rem;
  color: var(--ink, #0f172a);
  font-weight: 600;
}

/* User Modal Header */
.user-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}

.user-modal-icon {
  margin: 0 !important;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--purple-soft, #f3e8ff);
  color: var(--purple, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-modal-header-text {
  flex: 1;
  min-width: 0;
}

.user-modal-header-text h2 {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink, #0f172a);
}

.user-modal-header-text p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted, #64748b);
}

.user-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.08);
  color: var(--purple, #7c3aed);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
  border: 1px solid rgba(124, 58, 237, 0.16);
}

/* User Form Groups & Responsive Inputs */
.user-modal-card .form-group-block {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.user-modal-card .field-item {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.user-modal-card .field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 12px 0 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink, #0f172a);
  line-height: 1.25;
}

.user-modal-card .field-label span {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted, #64748b);
}

.user-modal-card .field-control {
  width: 100%;
  min-height: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--border-strong, #cbd5e1);
  border-radius: 12px;
  box-sizing: border-box;
  font-size: 14px;
  background: #ffffff;
  color: var(--ink, #0f172a);
  transition: all .15s ease;
}

.user-modal-card .field-control:hover:not(:disabled):not(:focus) {
  border-color: #94a3b8;
}

.user-modal-card .field-control:focus {
  border-color: var(--brand, #e11d48);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14);
  outline: none;
}

.user-modal-card .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  align-items: start;
}

@media (max-width: 480px) {
  .user-modal-card .form-row-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Password Toggle Input */
.password-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.password-wrapper .field-control {
  padding-right: 42px !important;
}

.password-wrapper .password-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--muted, #94a3b8);
  cursor: pointer;
  border-radius: 6px;
  transition: all .15s ease;
  z-index: 2;
}

.password-wrapper .password-toggle-btn:hover {
  color: var(--ink, #0f172a);
  background: rgba(0, 0, 0, 0.05);
}

/* Toggle Extra Fields */
.user-toggle-extra-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--purple, #7c3aed);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  align-self: flex-start;
  transition: all .15s ease;
}

.user-toggle-extra-btn:hover {
  background: var(--purple-soft, #f3e8ff);
}

.user-toggle-extra-btn .chevron-icon {
  transition: transform .2s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-toggle-extra-btn[aria-expanded="true"] .chevron-icon {
  transform: rotate(180deg);
}

.user-extra-fields {
  margin-top: 6px;
  padding: 8px 12px 6px;
  background: var(--surface-soft, #f8fafc);
  border: 1px dashed var(--line, #e2e8f0);
  border-radius: 10px;
}

.user-extra-fields .field-item:first-child .field-label {
  margin-top: 4px;
}

/* Compact Role Selection Grid */
.user-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 480px) {
  .user-role-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
}

.user-role-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 10px;
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: all .15s ease;
  position: relative;
  box-sizing: border-box;
}

.user-role-item:hover {
  border-color: #cbd5e1;
  background: var(--surface-soft, #f8fafc);
}

.user-role-item.selected {
  border-color: var(--role-color, var(--purple, #7c3aed));
  background: var(--role-bg-soft, #faf5ff);
  box-shadow: 0 2px 8px var(--role-glow, rgba(124, 58, 237, 0.12));
}

.role-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--role-icon-bg, #f1f5f9);
  color: var(--role-color, var(--ink, #0f172a));
  flex-shrink: 0;
}

.role-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #0f172a);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-item-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line, #cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: transparent;
  flex-shrink: 0;
  transition: all .15s ease;
}

.user-role-item.selected .role-item-check {
  background: var(--role-color, var(--purple, #7c3aed));
  border-color: var(--role-color, var(--purple, #7c3aed));
  color: #ffffff;
}

/* Role Themes */
.role-theme-admin {
  --role-color: #7c3aed;
  --role-bg-soft: #faf5ff;
  --role-icon-bg: #f3e8ff;
  --role-glow: rgba(124, 58, 237, 0.14);
}

.role-theme-supervisor {
  --role-color: #d97706;
  --role-bg-soft: #fffbeb;
  --role-icon-bg: #fef3c7;
  --role-glow: rgba(217, 119, 6, 0.14);
}

.role-theme-cashier {
  --role-color: #059669;
  --role-bg-soft: #f0fdf4;
  --role-icon-bg: #dcfce7;
  --role-glow: rgba(5, 150, 105, 0.14);
}

.role-theme-waiter {
  --role-color: #0284c7;
  --role-bg-soft: #f0f9ff;
  --role-icon-bg: #e0f2fe;
  --role-glow: rgba(2, 132, 199, 0.14);
}

.role-theme-bar {
  --role-color: #db2777;
  --role-bg-soft: #fdf2f8;
  --role-icon-bg: #fce7f3;
  --role-glow: rgba(219, 39, 119, 0.14);
}

/* User Account Status Card */
.user-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--surface-soft, #f8fafc);
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s ease;
}

.user-status-card:hover {
  border-color: #cbd5e1;
}

.user-status-info {
  display: flex;
  flex-direction: column;
}

.user-status-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink, #0f172a);
}

.user-status-desc {
  font-size: 11px;
  color: var(--muted, #64748b);
  margin-top: 1px;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
  background-color: #10b981;
}

.toggle-switch input:checked+.toggle-slider:before {
  transform: translateX(20px);
}

.user-modal-actions {
  margin-top: 24px !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.user-modal-actions .primary-action,
.user-modal-actions .secondary-action {
  margin: 0 !important;
  min-height: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  box-sizing: border-box;
  vertical-align: middle;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Turno y regularización */
.danger-button {
  background: var(--red) !important;
  color: #fff !important;
}

.danger-button:hover {
  background: var(--red-pressed) !important;
}

.outline-action.cancel-order-button {
  color: var(--occupied-text);
  border-color: var(--occupied-border);
}

.outline-action.cancel-order-button:hover {
  background: var(--occupied-bg);
  border-color: var(--pink);
}

.stale-shift-orders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 16px;
  text-align: left;
}

.stale-order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
}

.stale-order-info {
  flex: 1;
  min-width: 0;
}

.stale-order-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stale-order-info small {
  color: var(--muted);
  font-size: 11px;
  display: block;
}

.stale-order-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.stale-order-actions button {
  min-height: 34px !important;
  padding: 0 12px !important;
  font-size: 11px !important;
  border-radius: 10px !important;
}

.stale-shift-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
}

@media (max-width: 520px) {
  .stale-order-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .stale-order-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .stale-order-actions button {
    flex: 1 1 0;
    min-height: 38px !important;
    font-size: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
  }

  .stale-shift-actions {
    flex-direction: column;
    gap: 10px;
  }

  .stale-shift-actions .outline-action,
  .stale-shift-actions .primary-action {
    flex: 1 1 100%;
    width: 100%;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .admin-search {
    width: 100%;
    min-width: 0;
  }

  .admin-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .admin-btn-action,
  .admin-toolbar .new-order-button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .admin-grid,
  .admin-users-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-product-header {
    padding: 10px 12px 6px;
    gap: 10px;
  }

  .admin-product-body {
    padding: 2px 12px 9px;
  }

  .admin-card-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 10px;
  }

  .admin-card-actions .admin-btn {
    min-height: 38px;
    padding: 0;
  }

  .admin-btn.addons {
    grid-column: auto;
  }

  .reports-filter-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .reports-field {
    min-width: 0;
  }

  .reports-field.reports-field-status {
    grid-column: 1 / -1;
  }

  .reports-submit-btn {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .reports-excel-btn {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
}

/* ==========================================================================
   CONSULTA RÁPIDA DE PRECIOS (PRICE CHECKER MODAL)
   ========================================================================== */
.price-checker-card {
  max-width: 460px;
  width: min(100%, 460px);
  padding: 22px 20px 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.22);
  text-align: left;
}

.price-checker-header {
  margin-bottom: 14px;
}

.price-checker-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink, #0f172a);
  margin: 0;
  letter-spacing: -0.01em;
}

.price-checker-input-wrap {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 0;
}

.price-checker-barcode-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  color: var(--text-placeholder, #94a3b8);
  pointer-events: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.price-checker-input-wrap:focus-within .price-checker-barcode-icon {
  color: var(--brand, #2563eb);
  transform: translateY(-50%) scale(1.08);
}

.price-checker-input-wrap .field-control {
  padding-left: 44px;
  flex: 1;
  min-width: 0;
  height: 48px;
  font-size: 15px;
  border-radius: 12px;
  font-weight: 500;
  border: 1.5px solid var(--border, #cbd5e1);
  background: var(--surface, #ffffff);
  color: var(--ink, #0f172a);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.price-checker-input-wrap .field-control:focus {
  border-color: var(--brand, #e11d48);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14);
}

.cancel-items-checklist {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cancel-items-comanda-card {
  background: #ffffff;
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.cancel-items-comanda-card .comanda-preview-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.cancel-items-comanda-card .comanda-preview-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: min(38vh, 250px);
  overflow-y: auto;
  padding-right: 2px;
}

.cancel-items-toggle-all {
  padding: 3px 10px;
  border: 1px solid rgba(225, 29, 72, 0.25);
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.06);
  color: var(--red, #e11d48);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}

.cancel-items-toggle-all:hover {
  background: rgba(225, 29, 72, 0.12);
  border-color: rgba(225, 29, 72, 0.4);
}

.cancel-item-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  user-select: none;
  transition: opacity .15s ease;
}

.cancel-item-check-row + .cancel-item-check-row {
  border-top: 1px solid rgba(226, 232, 240, 0.75);
}

.cancel-item-check-row:not(.is-checked) {
  opacity: 0.5;
}

.cancel-item-check-row .cancel-item-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.cancel-item-check-row input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--red, #e11d48);
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.cancel-item-check-row .comanda-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cancel-item-check-row .comanda-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink, #1e293b);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cancel-item-check-row .cancel-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.cancel-item-check-row .cancel-item-price {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main, #1e293b);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.cancel-item-check-row:not(.is-checked) .cancel-item-price {
  color: var(--muted, #94a3b8);
}

.cancel-item-unit-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-soft, #f1f5f9);
  border: 1px solid var(--line, #e2e8f0);
  color: var(--muted, #64748b);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1.3;
}

.cancel-qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  border: 1px solid var(--line, #cbd5e1);
  background: var(--surface-soft, #f8fafc);
  flex-shrink: 0;
}

.cancel-qty-step-btn {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink, #0f172a);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cancel-qty-step-btn:hover:not(:disabled) {
  background: var(--red, #e11d48);
  color: #ffffff;
}

.cancel-qty-step-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.cancel-item-check-qty {
  width: 28px;
  height: 26px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  padding: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.cancel-item-check-qty::-webkit-outer-spin-button,
.cancel-item-check-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cancel-item-check-qty:disabled {
  color: var(--muted, #94a3b8);
  cursor: not-allowed;
}

.cancel-qty-step-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: var(--surface, #ffffff);
  color: var(--ink, #0f172a);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: background .15s ease, color .15s ease, opacity .15s ease;
}

.cancel-qty-step-btn:hover:not(:disabled) {
  background: rgba(124, 58, 237, 0.1);
  color: var(--purple, #7c3aed);
}

.cancel-qty-step-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cancel-item-check-qty {
  width: 38px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 2px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center;
  font-size: 13px !important;
  font-weight: 700 !important;
  flex-shrink: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.cancel-item-check-qty::-webkit-outer-spin-button,
.cancel-item-check-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cancel-single-qty-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--surface-soft, #f8fafc);
}

.cancel-single-qty-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cancel-single-qty-copy .field-label {
  margin: 0;
  font-size: 13px;
}

.cancel-single-qty-hint {
  font-size: 11.5px;
  color: var(--muted);
}

.cancel-reason-chip.is-active {
  background: var(--red, #e11d48) !important;
  border-color: var(--red, #e11d48) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.25);
}

.cancel-reason-chip.is-active:hover {
  background: #be123c !important;
  border-color: #be123c !important;
  color: #ffffff !important;
}

.cancel-order-summary-strip strong.is-danger-amount {
  color: var(--red, #e11d48);
}

.cancel-order-modal-actions.success-actions {
  display: grid;
  grid-template-columns: minmax(96px, 0.85fr) 1.35fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .cancel-order-modal-card {
    padding: 16px 14px 14px;
    gap: 10px;
  }

  .cancel-item-check-row {
    padding: 8px 10px;
    gap: 8px;
  }

  .cancel-item-check-name strong {
    font-size: 13px;
  }

  .cancel-order-modal-actions.success-actions {
    grid-template-columns: minmax(88px, 0.8fr) 1.2fr;
  }
}

.price-checker-submit-btn {
  height: 48px;
  padding: 0 18px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

.price-checker-result {
  animation: fade-in 0.2s ease-out;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(52vh, 400px);
  overflow-y: auto;
  padding-right: 2px;
}

.price-checker-result:not([hidden]) {
  margin-top: 14px;
}

.price-checker-card-product {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--line, #e2e8f0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, border-color 0.15s ease;
  text-align: left;
}

.price-checker-visual {
  width: 76px;
  height: 82px;
  border-radius: 10px;
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.price-checker-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.price-checker-details {
  flex: 1;
  min-width: 0;
}

.price-checker-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.price-checker-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink, #0f172a);
  line-height: 1.25;
}

.price-checker-price-tag {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 6px;
}

.price-checker-price-currency {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand, #2563eb);
}

.price-checker-price-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand, #2563eb);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.price-checker-stock-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.price-checker-not-found {
  padding: 18px 14px;
  text-align: center;
  border-radius: 12px;
  background: var(--occupied-bg, #fee2e2);
  border: 1.5px solid var(--occupied-border, #ef4444);
  color: var(--occupied-text, #991b1b);
}

.price-checker-not-found strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.price-checker-not-found p {
  margin: 0;
  font-size: 12px;
  color: var(--muted, #64748b);
}

@media (max-width: 480px) {
  .price-checker-card {
    padding: 18px 14px 16px;
  }

  .price-checker-submit-btn {
    padding: 0 14px;
    font-size: 13px;
  }
}


/* Adaptación del Verificador de Precios en Pantalla LCD / POS Clásico */
[data-theme="vga"] .price-checker-card {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
}

[data-theme="vga"] .price-checker-input-wrap .field-control {
  background: #ffffff !important;
  border: 1.5px solid #94a3b8 !important;
  color: #0f172a !important;
}

[data-theme="vga"] .price-checker-card-product {
  background: #ffffff !important;
  border: 2px solid #1d4ed8 !important;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.12) !important;
}

[data-theme="vga"] .price-checker-visual {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="vga"] .price-checker-name {
  color: #0f172a !important;
}

[data-theme="vga"] .price-checker-price-currency {
  color: #112b4a !important;
}

[data-theme="vga"] .price-checker-price-val {
  color: #112b4a !important;
  font-variant-numeric: tabular-nums !important;
}

[data-theme="vga"] .price-checker-not-found {
  background: #fef2f2 !important;
  border: 1.5px solid #ef4444 !important;
  color: #991b1b !important;
}

/* ==========================================================================
   Turnos y Reportes Administrativos (Caja Sencilla)
   ========================================================================== */
.shift-diff-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.shift-diff-badge.is-balanced {
  background: #dcfce7;
  color: #15803d;
}

.shift-diff-badge.is-negative {
  background: #fee2e2;
  color: #b91c1c;
}

.shift-diff-badge.is-positive {
  background: #fef3c7;
  color: #b45309;
}

.reports-quick-presets {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.reports-quick-presets .preset-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.preset-pill-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-pill {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 9999px;
  background: var(--surface-muted);
  color: var(--ink);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .15s ease;
}

.preset-pill:hover {
  background: var(--purple-soft);
  color: var(--purple);
  border-color: var(--purple-border);
}

.preset-pill.active {
  background: var(--brand, var(--purple));
  color: #ffffff !important;
  border-color: var(--brand, var(--purple));
  box-shadow: 0 2px 8px rgba(122, 60, 255, 0.25);
}

.reports-excel-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #107c41 !important;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .18s ease;
  box-shadow: 0 2px 6px rgba(16, 124, 65, 0.25);
}

.reports-excel-btn:hover {
  background: #0b5e31 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 124, 65, 0.35);
}

.reports-excel-btn svg {
  flex-shrink: 0;
}

.reports-period-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--surface-muted);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}

.reports-period-badge svg {
  color: var(--brand, #7a3cff);
  flex-shrink: 0;
}

.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.report-kpi-card {
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(11, 20, 48, .04);
  transition: transform .15s ease, box-shadow .15s ease;
}

.report-kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11, 20, 48, .07);
}

.report-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--line);
  border-radius: 4px 0 0 4px;
}

.report-kpi-card.kpi-accent-total::before {
  background: var(--brand, #7a3cff);
}

.report-kpi-card.kpi-accent-cash::before {
  background: #10b981;
}

.report-kpi-card.kpi-accent-card::before {
  background: #0284c7;
}

.report-kpi-card.kpi-accent-transfer::before {
  background: #8b5cf6;
}

.report-kpi-card.kpi-accent-movements::before {
  background: #f59e0b;
}

.report-kpi-card.kpi-accent-diffs::before {
  background: #64748b;
}

.report-kpi-card.is-courtesy-kpi::before {
  background: #0d9488;
}

.report-kpi-card span {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 5px;
}

.report-kpi-card strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.report-kpi-card small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.kpi-badge-method {
  display: inline-block;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 6px;
  text-transform: uppercase;
}

.kpi-badge-method.is-cash {
  background: #dcfce7;
  color: #15803d;
}

.kpi-badge-method.is-card {
  background: #e0f2fe;
  color: #0369a1;
}

.kpi-badge-method.is-transfer {
  background: #ede9fe;
  color: #6d28d9;
}

.admin-table-container {
  overflow-x: auto;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 24px;
}

.admin-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.admin-report-table th {
  background: var(--surface-muted);
  padding: 11px 13px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1.5px solid var(--line);
  white-space: nowrap;
  text-transform: uppercase;
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.admin-report-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}

.admin-report-table tr:last-child td {
  border-bottom: none;
}

.admin-report-table tr:hover td {
  background: var(--surface-soft);
}

.admin-report-table .admin-btn-action {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #fee2e2;
  color: #b91c1c;
  transition: all .15s ease;
}

.admin-report-table .admin-btn-action:hover {
  background: #fca5a5;
  color: #7f1d1d;
}

/* ==========================================================================
   INDICADORES Y BANNERS DE TURNO
   ========================================================================== */
.header-shift-btn {
  cursor: pointer;
  border-radius: 999px;
  padding: 3px 10px;
  min-width: unset;
  min-height: 34px;
  flex-direction: row;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
}

.header-shift-btn.is-open {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(52, 211, 153, 0.5);
  color: #a7f3d0 !important;
}

.header-shift-btn.is-open .status-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.header-shift-btn.is-closed {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca !important;
  animation: pulse-border 2s infinite ease-in-out;
}

.header-shift-btn.is-closed .status-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.9);
}

@keyframes pulse-border {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
  }
}

.shift-nav-dot {
  position: absolute;
  top: 5px;
  right: calc(50% - 14px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
}

.shift-nav-dot.is-closed {
  background: #ef4444;
  box-shadow: 0 0 5px rgba(239, 68, 68, 0.7);
}

.shift-nav-dot.is-open {
  background: #10b981;
}

.orders-nav-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 22px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red, #e11d48);
  color: #ffffff;
  border: 1.5px solid #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 5px rgba(225, 29, 72, 0.35);
  pointer-events: none;
}

.orders-nav-badge[hidden] {
  display: none !important;
}

.header-floating-badge {
  position: absolute;
  top: 1px;
  right: calc(50% - 17px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red, #e11d48);
  color: #ffffff;
  border: 1.5px solid #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 5px rgba(225, 29, 72, 0.45);
  pointer-events: none;
  z-index: 2;
}

.header-floating-badge[hidden] {
  display: none !important;
}

/* Modales de Autorizaciones (Cajeros, Meseros y Administradores) */
.approval-modal-card {
  max-width: 420px;
  width: 92vw;
  padding: 24px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.22);
  position: relative;
  box-sizing: border-box;
}

.approval-icon-badge {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #fef2f2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
}

.approval-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
  text-align: center;
}

.approval-summary-chip {
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  margin: 6px 0 16px;
  line-height: 1.4;
  word-break: break-word;
  text-align: center;
}

.approval-pin-box {
  margin-bottom: 16px;
}

.approval-pin-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  margin-bottom: 8px;
  text-align: center;
}

.approval-pin-input {
  width: 100%;
  box-sizing: border-box;
  height: 50px;
  text-align: center;
  font-size: 1.85rem;
  letter-spacing: 10px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 800;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-text-security: disc;
}

.approval-pin-input:focus {
  outline: none;
  border-color: var(--brand, #e11d48);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14);
  background: #ffffff;
}

.approval-pin-hint {
  display: block;
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 6px;
  text-align: center;
}

.approval-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.approval-btn-icon-only {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.approval-btn-icon-only:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.approval-btn-icon-only svg {
  pointer-events: none;
}

.approval-btn-cancel-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569 !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.approval-btn-cancel-white:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border-color: #94a3b8 !important;
}

.approval-btn-pin-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #dc2626 !important;
  color: #ffffff !important;
  border: 1px solid #dc2626 !important;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.approval-btn-pin-red:hover {
  opacity: 0.92;
}

.approval-footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.approval-footer-btn-danger {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
}

.approval-footer-btn-danger:hover {
  text-decoration: underline;
}

.approval-footer-btn-dismiss {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
}

.approval-footer-btn-dismiss:hover {
  color: #1e293b;
}

.no-shift-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fde68a;
  border-radius: 14px;
  padding: 13px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.08);
  animation: fade-in 0.2s ease-out;
}

.no-shift-banner[hidden] {
  display: none !important;
}

.no-shift-banner-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #fef08a;
  border-radius: 10px;
  color: #b45309;
}

.no-shift-banner-icon svg {
  width: 22px;
  height: 22px;
}

.no-shift-banner-content {
  flex: 1;
  min-width: 180px;
}

.no-shift-banner-content strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 2px;
}

.no-shift-banner-content p {
  margin: 0;
  font-size: 12px;
  color: #78350f;
  line-height: 1.35;
}

.no-shift-banner-btn {
  flex-shrink: 0;
  background: #b45309;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 15px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.25);
  transition: all 0.15s ease;
}

.no-shift-banner-btn:hover {
  background: #92400e;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(180, 83, 9, 0.35);
}

.no-shift-banner-btn:active {
  transform: translateY(0);
}

.no-shift-banner.is-recount {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #fecdd3;
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.08);
}

.no-shift-banner.is-recount .no-shift-banner-icon {
  background: #fecdd3;
  color: #be123c;
}

.no-shift-banner.is-recount .no-shift-banner-content strong {
  color: #9f1239;
}

.no-shift-banner.is-recount .no-shift-banner-content p {
  color: #881337;
}

.no-shift-banner.is-recount .no-shift-banner-btn {
  background: #e11d48;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.25);
}

.no-shift-banner.is-recount .no-shift-banner-btn:hover {
  background: #be123c;
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.35);
}

.no-shift-banner.is-pending-verification {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #bfdbfe;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
}

.no-shift-banner.is-pending-verification .no-shift-banner-icon {
  background: #bfdbfe;
  color: #1d4ed8;
}

.no-shift-banner.is-pending-verification .no-shift-banner-content strong {
  color: #1e40af;
}

.no-shift-banner.is-pending-verification .no-shift-banner-content p {
  color: #1e3a8a;
}

.no-shift-banner.is-pending-verification .no-shift-banner-btn {
  background: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.no-shift-banner.is-pending-verification .no-shift-banner-btn:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

@media (max-width: 520px) {
  .header-shift-btn {
    flex: 0 0 28px;
    width: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border-color: transparent;
    background: transparent !important;
  }

  .header-shift-btn #headerShiftStatusText {
    display: none;
  }

  .no-shift-banner-content {
    min-width: 0;
  }

  .no-shift-banner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }

  .no-shift-banner-btn {
    width: 100%;
    text-align: center;
    padding: 10px 14px;
  }
}

/* ==========================================================================
   PÁGINA PÚBLICA DE SEGUIMIENTO DE COMANDA (TIRA DE PAGO TÉRMICA CLIENTE)
   ========================================================================== */
html.client-html,
body.client-body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #0d0f14 !important;
  color: #1a1a1a;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Encabezado Oficial de miapp en la Vista del Cliente */
.client-app-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25;
  width: 100%;
  background: var(--red);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25) !important;
}

body.client-body .client-app-header {
  --client-header-height: 62px;
  height: auto;
  min-height: calc(var(--client-header-height) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(14px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px));
}

.client-app-header .app-header-inner {
  min-height: var(--client-header-height);
}

@media (max-width: 768px) {
  body.client-body .client-app-header {
    --client-header-height: 58px;
  }
}

@media (max-width: 380px) {
  body.client-body .client-app-header {
    padding-right: max(10px, env(safe-area-inset-right, 0px));
    padding-left: max(10px, env(safe-area-inset-left, 0px));
  }

  .client-app-header .header-actions {
    gap: 2px;
  }
}

.client-app-header .brand {
  cursor: default !important;
  pointer-events: none;
}

.client-main-shell {
  min-height: calc(100dvh - 64px);
  box-sizing: border-box;
  padding: 22px 12px max(36px, env(safe-area-inset-bottom)) 12px;
  background: radial-gradient(circle at 50% 10%, #1e222d 0%, #0d0f14 100%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.thermal-container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Banner interactivo para activar notificaciones de mesa */
.client-alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(122, 60, 255, 0.25) 0%, rgba(11, 20, 48, 0.96) 100%);
  border: 1.5px solid rgba(122, 60, 255, 0.55);
  box-shadow: 0 10px 25px -5px rgba(122, 60, 255, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 4px;
  color: #ffffff;
  animation: bannerSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-banner-icon {
  font-size: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(122, 60, 255, 0.28);
  border: 1px solid rgba(122, 60, 255, 0.6);
  animation: bellWiggle 2.4s infinite ease-in-out;
}

@keyframes bellWiggle {

  0%,
  100% {
    transform: rotate(0);
  }

  10%,
  30% {
    transform: rotate(14deg);
  }

  20%,
  40% {
    transform: rotate(-14deg);
  }

  50% {
    transform: rotate(0);
  }
}

.alert-banner-text {
  flex: 1;
  min-width: 0;
}

.alert-banner-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.25;
}

.alert-banner-desc {
  font-size: 11px;
  color: #cbd5e1;
  margin: 3px 0 0 0;
  line-height: 1.35;
}

.alert-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.alert-banner-btn {
  background: var(--purple);
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(122, 60, 255, 0.4);
  transition: transform 0.15s, background 0.15s;
}

.alert-banner-btn:active {
  transform: scale(0.96);
  background: var(--purple-hover);
}

.alert-banner-dismiss {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-banner-dismiss:hover {
  color: #ffffff;
}

/* Botón de Campana / Alertas del Cliente y del Sistema */
.client-bell-btn,
.notif-header-btn {
  position: relative;
  transition: all 0.18s ease;
}

.client-bell-btn .active-icon,
.notif-header-btn .bell-icon-active {
  display: block;
}

.client-bell-btn .muted-icon,
.notif-header-btn .bell-icon-muted {
  display: none;
}

.client-bell-btn.is-muted .active-icon,
.notif-header-btn.is-muted .bell-icon-active {
  display: none !important;
}

.client-bell-btn.is-muted .muted-icon,
.notif-header-btn.is-muted .bell-icon-muted {
  display: block !important;
  color: #fca5a5 !important;
}

.client-bell-btn.is-muted,
.notif-header-btn.is-muted {
  opacity: 0.88;
}

.client-bell-btn.is-active,
.notif-header-btn.is-active {
  opacity: 1;
}

.expense-support-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-bell-btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

/* 2. Tira de Pago Térmica (Thermal Receipt Strip) */
.thermal-receipt {
  position: relative;
  background: #fafaf8;
  color: #1a1a1a;
  border-radius: 4px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.15);
  font-family: 'SF Mono', 'Courier New', Courier, Menlo, Consolas, monospace;
  overflow: hidden;
  line-height: 1.35;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

/* Corte dentado (sawtooth) realista arriba y abajo */
.receipt-sawtooth {
  height: 10px;
  width: 100%;
}

.receipt-sawtooth.top {
  background: radial-gradient(circle at 10px -5px, transparent 10px, #fafaf8 11px);
  background-size: 20px 10px;
}

.receipt-sawtooth.bottom {
  background: radial-gradient(circle at 10px 15px, transparent 10px, #fafaf8 11px);
  background-size: 20px 10px;
}

.receipt-body {
  padding: 16px 20px 22px;
}

/* Encabezado */
.receipt-header {
  text-align: center;
  padding-bottom: 6px;
}

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

.receipt-logo-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #1a1a1a;
  padding: 3px;
  background: #ffffff;
}

.receipt-store-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #111111;
  font-family: inherit;
}

.receipt-store-title.store-title-prominent {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  text-transform: uppercase;
  margin: 6px 0 4px;
  line-height: 1.2;
}

.receipt-header.receipt-no-logo,
.thermal-receipt-modal-inner.receipt-no-logo .receipt-header {
  padding-top: 4px;
}

.receipt-store-sub {
  margin: 3px 0 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #555555;
}

.receipt-store-desc {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: #777777;
}

/* Separadores de ticket térmico */
.receipt-divider {
  user-select: none;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 2px;
  color: #888888;
  text-align: center;
  margin: 10px 0;
  white-space: nowrap;
  overflow: hidden;
}

.receipt-divider.dashed {
  opacity: 0.8;
}

.receipt-divider.dots {
  letter-spacing: 3px;
  opacity: 0.7;
}

.receipt-divider.double {
  font-weight: bold;
  letter-spacing: 1px;
  color: #333333;
}

/* Metadatos */
.receipt-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  margin: 4px 0;
}

.receipt-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.receipt-meta-row .meta-label {
  color: #666666;
  font-weight: 600;
}

.receipt-meta-row .meta-val {
  color: #111111;
  font-weight: 700;
}

.receipt-meta-row .meta-val.highlight {
  font-size: 14px;
  font-weight: 700;
}

.receipt-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  border: 1px dashed #111;
  background: #f0f0eb;
}

.receipt-badge.preparando {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
}

.receipt-badge.servida {
  background: #d1fae5;
  border-color: #059669;
  color: #065f46;
}

.receipt-badge.cerrada {
  background: #e5e7eb;
  border-color: #4b5563;
  color: #1f2937;
}

/* Encabezados de Columnas */
.receipt-col-headers {
  display: grid;
  grid-template-columns: 46px 1fr 85px;
  font-size: 11.5px;
  font-weight: 700;
  color: #333333;
  padding: 2px 0;
}

.receipt-col-headers .col-qty {
  text-align: left;
}

.receipt-col-headers .col-desc {
  text-align: left;
}

.receipt-col-headers .col-total {
  text-align: right;
}

/* Rondas y Productos */
.receipt-rounds {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.receipt-round-block {
  padding: 6px 0;
}

.receipt-round-block.new-round {
  background: rgba(254, 240, 138, 0.28);
  border-left: 3px solid #ca8a04;
  padding-left: 8px;
  border-radius: 2px;
}

.receipt-round-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 8px;
}

.round-star-pill {
  background: #ca8a04;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.receipt-round-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.receipt-item-row {
  display: grid;
  grid-template-columns: 46px 1fr 85px;
  align-items: baseline;
  font-size: 12.5px;
}

.item-qty {
  font-weight: 600;
  color: #111111;
}

.item-info {
  display: flex;
  flex-direction: column;
  padding-right: 6px;
}

.item-name {
  font-weight: 700;
  color: #111111;
  word-break: break-word;
}

.item-prep {
  font-size: 10.5px;
  color: #666666;
  font-style: italic;
  margin-top: 1px;
}

.item-price {
  text-align: right;
  font-weight: 600;
  color: #111111;
}

.receipt-round-sub {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #555555;
  border-top: 1px dotted #ccc;
  padding-top: 5px;
  margin-top: 6px;
}

/* Totales */
.receipt-totals {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  padding: 4px 0;
}

.receipt-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #444444;
}

.receipt-total-line.grand-total {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin-top: 4px;
  padding-top: 4px;
}

.receipt-total-line.grand-total .grand-amount {
  font-size: 19px;
  color: #0f172a;
}

/* Sección Wi-Fi en el Ticket */
.receipt-wifi-section {
  background: #f0f0eb;
  border: 1px dashed #444444;
  border-radius: 4px;
  padding: 12px;
  margin: 6px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wifi-ticket-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #111111;
}

.wifi-ticket-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.wifi-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wifi-label {
  color: #555555;
  font-weight: 700;
}

.wifi-val {
  color: #111111;
  font-weight: 600;
}

.wifi-val.code {
  background: #e2e2dc;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 12.5px;
  border: 1px solid #c9c9c1;
}

.receipt-wifi-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: #1e293b;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  font-family: inherit;
  margin-top: 2px;
}

.receipt-wifi-copy-btn:hover {
  background: #0f172a;
}

.receipt-wifi-copy-btn:active {
  transform: scale(0.99);
}

.receipt-wifi-copy-btn.copied {
  background: #059669;
}

/* Botón de Sonido */
.receipt-sound-box {
  text-align: center;
  padding: 4px 0;
}

.sound-box-desc {
  font-size: 11px;
  color: #666666;
  margin: 0 0 8px;
}

.receipt-sound-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f5f5f2;
  border: 1px solid #333333;
  color: #111111;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.receipt-sound-btn:hover {
  background: #eaeae5;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.receipt-sound-btn:active {
  transform: translateY(1px);
}

/* Código de Barras Decorativo */
.receipt-barcode-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0 6px;
  gap: 4px;
}

.barcode-lines {
  height: 42px;
  width: 72%;
  background: repeating-linear-gradient(90deg,
      #111111,
      #111111 2px,
      transparent 2px,
      transparent 4px,
      #111111 4px,
      #111111 7px,
      transparent 7px,
      transparent 9px,
      #111111 9px,
      #111111 10px,
      transparent 10px,
      transparent 13px,
      #111111 13px,
      #111111 16px,
      transparent 16px,
      transparent 18px);
}

.barcode-num {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: #333333;
  font-weight: 700;
}

/* Pie del Ticket */
.receipt-footer {
  text-align: center;
  padding-top: 6px;
  color: #444444;
}

.receipt-thankyou {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  margin: 0 0 3px;
  color: #111111;
}

.receipt-enjoy {
  font-size: 11.5px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #555555;
}

.receipt-live-notice {
  display: block;
  font-size: 10px;
  color: #888888;
  font-style: italic;
  max-width: 280px;
  margin: 0 auto;
}

/* Toast flotante para cliente */
.client-toast {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12);
  z-index: 99999;
  opacity: 0;
  transition: all 0.22s ease-out;
  pointer-events: none;
  max-width: calc(100% - 32px);
  text-align: center;
}

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

/* ==========================================================================
   NOTIFICACIÓN PERSONALIZADA FLOTANTE (ESTILO MIAPP PARA COMPUTADORA / MÓVIL)
   ========================================================================== */
.ls-custom-notif {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  width: 390px;
  max-width: calc(100vw - 32px);
  pointer-events: auto;
  font-family: var(--font-sans);
  animation: lsNotifSlideIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

@media (max-width: 640px) {
  .ls-custom-notif {
    top: 14px;
    left: 14px;
    right: 14px;
    width: auto;
  }
}

.ls-custom-notif.ls-closing {
  animation: lsNotifSlideOut 0.25s ease forwards;
}

@keyframes lsNotifSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-24px) scale(0.95);
  }

  70% {
    transform: translateY(3px) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes lsNotifSlideOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-18px) scale(0.96);
  }
}

.ls-notif-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #151a30 0%, #0b1430 100%);
  border: 1px solid rgba(122, 60, 255, 0.55);
  border-radius: 16px;
  padding: 16px 18px 14px;
  box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.75), 0 0 30px rgba(122, 60, 255, 0.3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
}

.ls-notif-accent-glow {
  position: absolute;
  top: -40px;
  left: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(122, 60, 255, 0.35) 0%, rgba(122, 60, 255, 0) 70%);
  pointer-events: none;
  border-radius: 50%;
}

.ls-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ls-notif-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ls-notif-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 12px rgba(122, 60, 255, 0.6);
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  animation: lsPulseIcon 2s infinite ease-in-out;
}

@keyframes lsPulseIcon {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.ls-notif-badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-border);
  background: rgba(122, 60, 255, 0.22);
  border: 1px solid rgba(122, 60, 255, 0.4);
  padding: 3px 8px;
  border-radius: 999px;
}

.ls-notif-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ls-notif-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.ls-notif-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.ls-notif-close:hover {
  background: rgba(122, 60, 255, 0.4);
  color: #ffffff;
  transform: scale(1.08);
}

.ls-notif-body {
  margin-bottom: 8px;
}

.ls-notif-title {
  margin: 0 0 3px 0;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.25;
}

.ls-notif-desc {
  margin: 0;
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.4;
}

.ls-notif-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 10px;
}

.ls-notif-footer-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ls-notif-footer-val {
  font-size: 15px;
  font-weight: 700;
  color: #34d399;
  letter-spacing: -0.01em;
}

.ls-notif-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.ls-notif-progress-bar {
  height: 100%;
  width: 100%;
  background: var(--purple);
  transition: width 6.5s linear;
}

/* ==========================================================================
   IMPRESIÓN LIMPIA DE COMANDA CLIENTE (TIRA TÉRMICA BLANCA SIN SOMBRAS)
   ========================================================================== */
.client-share-btn,
.client-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.receipt-print-box {
  margin: 14px 0 16px;
  text-align: center;
}

.receipt-print-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #1e222d;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.receipt-print-btn:hover {
  background: var(--purple);
  border-color: var(--purple);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(122, 60, 255, 0.3);
}

.receipt-print-btn:active {
  transform: translateY(0);
}

@media print {

  /* 1. Forzar fondo blanco y dimensiones de impresión térmica */
  html.client-html,
  body.client-body {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #000000 !important;
    width: 80mm !important;
    max-width: 80mm !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
  }

  html.client-html *,
  body.client-body * {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
  }

  /* 2. Ocultar interfaz web no deseada en el papel */
  body.client-body .client-app-header,
  body.client-body .ls-custom-notif,
  body.client-body .client-toast,
  body.client-body .receipt-wifi-copy-btn,
  body.client-body .receipt-print-box,
  body.client-body .receipt-sawtooth {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 3. Contenedor principal: blanco plano y sin altura fija */
  body.client-body .client-main-shell {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    width: 100% !important;
  }

  body.client-body .thermal-container {
    background: #ffffff !important;
    background-color: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* 4. Tira térmica: VISIBLE, blanca, sin sombras ni filtro drop-shadow */
  body.client-body .thermal-receipt {
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    border-radius: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    width: 100% !important;
    overflow: visible !important;
  }

  body.client-body .thermal-receipt,
  body.client-body .thermal-receipt * {
    visibility: visible !important;
    color: #000000 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    -webkit-text-stroke: 0.22px #000000 !important;
    opacity: 1 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Lucida Console', 'JetBrains Mono', monospace !important;
  }

  body.client-body .receipt-body {
    padding: 2mm 3mm 4mm !important;
  }

  body.client-body .receipt-header {
    margin: 0 !important;
    padding: 0 0 2mm !important;
  }

  body.client-body .receipt-logo-wrap {
    margin: 0 0 2mm 0 !important;
    padding: 0 !important;
  }

  body.client-body .barcode-lines,
  #receiptModal .barcode-lines {
    background: repeating-linear-gradient(90deg,
        #000000,
        #000000 2.5px,
        transparent 2.5px,
        transparent 4.5px,
        #000000 4.5px,
        #000000 8px,
        transparent 8px,
        transparent 10px,
        #000000 10px,
        #000000 13px,
        transparent 13px,
        transparent 14px,
        #000000 14px,
        #000000 16px,
        transparent 16px,
        transparent 19px) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 5. Eliminar dientes superior e inferior para evitar cortes con sombras */
  body.client-body .receipt-sawtooth.top,
  body.client-body .receipt-sawtooth.bottom {
    display: none !important;
    height: 0 !important;
    background: none !important;
  }

  /* 6. Espacio de avance de papel en blanco para que la cuchilla corte después del texto (65mm idéntico al POS) */
  body.client-body .receipt-cut-space {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
    height: 65mm !important;
    min-height: 65mm !important;
    max-height: 65mm !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    overflow: hidden !important;
    visibility: visible !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.client-body .receipt-cut-mark {
    display: block !important;
    width: 1.5mm !important;
    height: 0 !important;
    border-bottom: 1px solid #000000 !important;
    margin: 0 auto !important;
    visibility: visible !important;
  }
}


/* ==========================================================================
   CORTESÍAS Y CONSUMO INTERNO
   ========================================================================== */
.cart-group-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cart-all-courtesy-btn,
.cart-courtesy-pass-btn,
.cart-courtesy-revert-btn,
.courtesy-preset-chip {
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.cart-all-courtesy-btn {
  font-size: 11px;
  padding: 4px 10px;
}

.cart-courtesy-pass-btn,
.cart-courtesy-revert-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.2;
  padding: 4px 10px;
  white-space: nowrap;
}

.cart-all-courtesy-btn:hover,
.cart-courtesy-pass-btn:hover,
.cart-courtesy-revert-btn:hover,
.courtesy-preset-chip:hover {
  background: #ccfbf1;
}

.cart-all-courtesy-btn:active,
.cart-courtesy-pass-btn:active,
.cart-courtesy-revert-btn:active,
.courtesy-preset-chip:active {
  transform: scale(0.95);
}

.cart-courtesy-group {
  border: 1.5px dashed #5eead4;
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
  border-radius: 14px;
  padding: 8px 10px 10px;
  margin-top: 10px;
}

.cart-group-heading.is-courtesy-heading span {
  color: #0f766e;
  font-weight: 600;
}

.courtesy-ref-total {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.courtesy-zero-pill {
  background: #0f766e;
  color: #ffffff;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
}

.cart-line.is-courtesy-line h3,
.cart-line.is-courtesy-line .cart-line-name,
.cart-line-existing.is-courtesy-existing .cart-line-name {
  color: #0f766e;
}

.courtesy-strike {
  text-decoration: line-through;
  color: #94a3b8;
}

.courtesy-free-tag {
  color: #0f766e;
  font-weight: 600;
}

.cart-line-total.is-courtesy-zero {
  color: #0f766e;
  font-weight: 600;
}

.cart-courtesy-reason-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #99f6e4;
}

.cart-courtesy-reason-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #134e4a;
  margin-bottom: 6px;
}

.cart-courtesy-reason-input {
  width: 100%;
  font-size: 14px;
}

.cart-courtesy-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.courtesy-preset-chip {
  font-size: 11px;
  padding: 4px 10px;
}

.cart-courtesy-existing-sub {
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.cart-courtesy-sub-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #0f766e;
  margin-bottom: 4px;
}

.cart-line-status.is-courtesy-badge {
  background: #ccfbf1;
  color: #0f766e;
}

.comanda-preview-tags {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.comanda-prep.is-courtesy-tag {
  background: #ccfbf1;
  color: #0f766e;
  font-weight: 600;
}

.comanda-preview-row.is-courtesy-comanda-row .comanda-name {
  color: #0f766e;
}

.comanda-courtesy-note {
  margin-top: 8px;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 8px;
  background: #f0fdfa;
  color: #134e4a;
}

.table-history-event.type-courtesy::before {
  background: #0d9488;
}

.table-history-badge.amber {
  background: #ccfbf1;
  color: #0f766e;
}

.report-kpi-card.is-courtesy-kpi {
  border-color: #5eead4;
  background: #f0fdfa;
}

.report-kpi-card.is-courtesy-kpi strong {
  color: #0f766e;
}

/* ==========================================================================
   ADICIONALES & CONTEXT MENUS
   ========================================================================== */

.custom-context-menu {
  position: fixed;
  z-index: 10050;
  min-width: 190px;
  background: var(--surface-card, #ffffff);
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 14px 34px -4px rgba(11, 20, 48, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: contextMenuFadeIn 0.12s ease-out;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@keyframes contextMenuFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.context-menu-header {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #64748b);
  border-bottom: 1px solid var(--line, #e2e8f0);
  margin-bottom: 4px;
}

.context-menu-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}

.context-menu-item:hover,
.context-menu-item:focus-visible {
  background: var(--surface-sunken, #f1f5f9);
  outline: none;
}

.context-menu-item.active {
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
}

.context-menu-item.danger {
  color: var(--pink, #FF3D8F);
}

.context-menu-item.danger:hover {
  background: var(--occupied-bg, #FFF0F6);
  color: var(--occupied-text, #E11D74);
}

.context-menu-icon {
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.context-menu-text {
  flex: 1;
}

.context-menu-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent, #d97706);
}

.context-menu-divider {
  height: 1px;
  background: var(--line, #e2e8f0);
  margin: 4px 0;
}

/* POS Card: Adicional Pills & Triggers */
.card-addon-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  user-select: none;
  margin-top: 2px;
}

.card-addon-active-pill:hover {
  transform: scale(1.04);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.card-addon-active-pill .addon-clear-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  font-size: 9px;
  font-weight: 600;
}

.card-addon-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-sunken, #f8fafc);
  border: 1px dashed var(--line-strong, #cbd5e1);
  color: var(--text-secondary, #64748b);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  margin-top: 2px;
}

.card-addon-trigger:hover {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
}

/* Admin: Adicionales button in product card */
.admin-btn.addons {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.admin-btn.addons:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

/* Modal: Product Addons List */
.product-addons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px 1px;
}

.product-addon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface-sunken, #f8fafc);
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.product-addon-item:hover {
  border-color: #f59e0b;
  background: #fffbeb;
}

.product-addon-item.selected {
  border-color: #f59e0b;
  background: #fef3c7;
}

.product-addon-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-addon-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #d97706;
  cursor: pointer;
}

.product-addon-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
}

.product-addon-price {
  font-size: 13px;
  font-weight: 600;
  color: #b45309;
}

/* ========================================================
   MEJORAS MIAPP: ACTUALIZACIÓN PWA & SERVICE WORKER
   ======================================================== */

/* --- AVISO FLOTANTE DE ACTUALIZACIÓN SW --- */
.sw-update-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10005;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: swSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sw-update-toast[hidden] {
  display: none !important;
}

@keyframes swSlideIn {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sw-update-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sw-update-icon {
  font-size: 22px;
}

.sw-update-text strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
}

.sw-update-text p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #94a3b8;
}

.sw-update-btn {
  padding: 7px 14px;
  border-radius: 10px;
  background: #7a3cff;
  color: #ffffff;
  border: none;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.sw-update-btn:hover {
  background: #682ce2;
}

.sw-update-dismiss {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 15px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.sw-update-dismiss:hover {
  color: #ffffff;
}

@media (max-width: 600px) {
  .sw-update-toast {
    left: 12px;
    right: 12px;
    bottom: 80px;
    justify-content: space-between;
  }
}

/* ==========================================================================
   SISTEMA UNIFICADO DE TIPOGRAFÍA, ICONOGRAFÍA, BOTONES Y RESPONSIVIDAD
   ========================================================================== */

/* 1. Base tipográfica limpia, legible y sin exceso de negrita */
html,
body,
html.guest-html,
body.guest-layout {
  font-family: var(--font-sans) !important;
  color: var(--text-main, #1e293b);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 2. Jerarquía de títulos equilibrada y adaptable por pantalla */
h1,
.orders-hero h1,
.tables-toolbar h1,
.shift-heading h1,
.order-header h1,
.admin-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-main, #1e293b);
}

h2,
.picker-card h2,
.success-card h2,
.form-modal-card h2,
.profile-modal-card h2,
.stale-shift-heading h2 {
  font-family: var(--font-heading);
  font-size: clamp(17px, 1.9vw, 19.5px);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--text-main, #1e293b);
}

h3,
.quick-orders-title,
.admin-product-info h3,
.admin-user-info h3,
.cart-empty h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--text-main, #1e293b);
}

h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-main, #1e293b);
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple, #e11d48);
}

.subtle,
.tables-toolbar-subtitle,
.quick-orders-subtitle,
.section-heading p,
.auth-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted, #64748b);
  line-height: 1.45;
}

/* 3. Etiquetas de formulario e inputs uniformes (desde Login hasta Modales) */
.field-label,
.auth-field-group .field-label,
.roles-fieldset legend,
.reports-field>span {
  font-size: 12.5px;
  font-weight: 500 !important;
  color: var(--text-secondary, #475569) !important;
  letter-spacing: 0;
  line-height: 1.35;
}

.field-label span {
  font-weight: 400;
  color: var(--text-muted, #64748b);
}

.field-control,
.auth-input,
.search-field input {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400 !important;
  color: var(--text-main, #1e293b);
  border-radius: 11px;
}

.field-control::placeholder,
.auth-input::placeholder,
.search-field input::placeholder {
  color: var(--text-placeholder, #94a3b8);
  font-weight: 400;
}

/* 4. Unificación de Botones en toda la aplicación */
.new-order-button,
.primary-action,
.secondary-action,
.pending-order-button,
.pay-now-button,
.close-account-button,
.serve-button,
.outline-action,
.admin-btn,
.danger-button,
.auth-submit-btn,
.no-shift-banner-btn,
.shift-quick-btn {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600 !important;
  letter-spacing: -0.005em;
  border-radius: 11px;
  gap: 7px;
  line-height: 1.2;
}

.new-order-button span,
.primary-action span,
.secondary-action span,
.auth-submit-btn span {
  font-weight: 600 !important;
}

/* Iconos SVG dentro de botones y pestañas: trazo y tamaño consistentes */
.new-order-button svg,
.primary-action svg,
.secondary-action svg,
.outline-action svg,
.danger-button svg,
.auth-submit-btn svg,
.shift-quick-btn svg,
.admin-btn-action svg,
.reports-submit-btn svg,
.reports-excel-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.95;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.admin-btn svg,
.admin-icon-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.95;
  flex-shrink: 0;
}

/* 5. Píldoras de filtro, categorías y pestañas de administración */
.table-filter-btn,
.category-chip,
.status-filter,
.admin-tab,
.picker-tab,
.pay-mode-btn,
.preset-pill {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.table-filter-btn.active,
.category-chip.active,
.status-filter.active,
.admin-tab.active,
.picker-tab.active,
.pay-mode-btn.active,
.preset-pill.active {
  font-weight: 600;
}

.table-filter-badge,
.admin-badge,
.status-filter span {
  font-size: 11.5px;
  font-weight: 600;
}

/* 6. Iconos de cabecera, navegación inferior y modales (.success-icon) */
.header-item {
  font-size: 11px;
  font-weight: 500;
}

.header-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

.bottom-nav .nav-item {
  font-size: 11.5px;
  font-weight: 500;
}

.bottom-nav .nav-item.active {
  font-weight: 600;
}

.bottom-nav .nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.9;
}

.success-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 14px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 22px;
  font-weight: 600;
}

.success-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.payment-method>span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-soft);
  font-size: 14px;
  font-weight: 600;
}

.payment-method>span svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.95;
}

.payment-method strong {
  font-size: 11.5px;
  font-weight: 600;
}

/* 7. Tarjetas de mesas, productos y cuentas con contraste equilibrado */
.table-number {
  font-weight: 700;
}

.table-card .table-name,
.beer-card h3,
.order-card h3 {
  font-weight: 600;
  color: var(--text-main, #1e293b);
}

.table-card-top .table-name {
  font-weight: 700;
}

/* 8. Adaptación responsiva multi-pantalla (Desktop, Tablet, Móvil) */
@media (min-width: 1200px) {
  .app-shell {
    padding: 20px 28px calc(100px + env(safe-area-inset-bottom));
  }

  .auth-card {
    width: min(100%, 400px);
    padding: 32px 30px 24px;
  }
}

@media (max-width: 1024px) {
  .app-header {
    padding: 0 18px;
  }

  .app-shell {
    padding: 14px 18px calc(96px + env(safe-area-inset-bottom));
  }

  .admin-toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 13.5px;
  }

  .app-header {
    height: 58px;
    padding: 0 14px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-item {
    min-width: 42px;
    padding: 4px 5px;
    font-size: 10.5px;
  }

  .app-shell {
    padding: 12px 14px calc(92px + env(safe-area-inset-bottom));
  }

  .tables-toolbar {
    gap: 10px;
    margin-bottom: 8px;
  }

  .new-order-button,
  .primary-action,
  .secondary-action,
  .pending-order-button,
  .pay-now-button {
    min-height: 42px;
    padding: 0 14px;
    font-size: 13px;
  }

  .table-filter-btn,
  .category-chip,
  .admin-tab {
    font-size: 12.5px;
    padding: 7px 13px;
  }

  .success-card,
  .picker-card,
  .form-modal-card {
    border-radius: 18px;
  }
}

@media (max-width: 480px) {
  .header-actions {
    gap: 4px;
  }

  .header-item {
    min-width: 38px;
    padding: 3px 4px;
    font-size: 10px;
  }

  .header-item svg {
    width: 17px;
    height: 17px;
  }

  .tables-toolbar .new-order-button {
    min-height: 40px;
    padding: 0 13px;
    font-size: 12.5px;
  }

  .auth-card {
    padding: 24px 20px 20px;
    border-radius: 20px;
  }

  .auth-input,
  .auth-submit-btn {
    min-height: 44px;
    font-size: 13.5px;
  }
}

/* ==========================================================================
   PANEL EJECUTIVO — DASHBOARD ADMINISTRADOR (.dashboard-screen / .exec-*)
   ========================================================================== */
.dashboard-screen {
  padding-bottom: 32px;
}

.exec-dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.exec-dash-title-wrap .eyebrow {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand, #E11D48);
  margin: 0 0 2px;
}

.exec-dash-title-wrap h1 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--text, #0F172A);
}

.exec-dash-title-wrap .subtle {
  margin: 0;
  font-size: 13px;
  color: var(--muted, #64748B);
}

.exec-dash-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.exec-dash-presets {
  display: inline-flex;
  align-items: center;
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--line, #E2E8F0);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}

.exec-preset-btn {
  border: none;
  background: transparent;
  color: var(--muted, #64748B);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.exec-preset-btn:hover {
  color: var(--text, #0F172A);
  background: var(--surface-soft, #F1F5F9);
}

.exec-preset-btn.active {
  background: var(--brand, #E11D48);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.22);
}

.exec-dash-date-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--line, #E2E8F0);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #64748B);
}

.exec-dash-date-input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 2px 0 !important;
  min-height: 28px !important;
  height: 28px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: var(--text, #0F172A) !important;
  width: auto !important;
}

.exec-dash-refresh-btn {
  width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line, #E2E8F0);
  background: var(--surface, #FFFFFF);
  color: var(--text, #0F172A);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.exec-dash-refresh-btn:hover {
  border-color: var(--brand, #E11D48);
  color: var(--brand, #E11D48);
}

.exec-dash-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 1. KPIs Principales */
.exec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.exec-kpi-card {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--line, #E2E8F0);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.exec-kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.exec-kpi-card-action {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.exec-kpi-card-action:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.dashboard-outflows-card {
  width: min(100%, 560px);
  text-align: left;
}

.dashboard-outflows-card h2,
.dashboard-outflows-card>p:not(.eyebrow) {
  margin-left: 0;
  margin-right: 36px;
}

.dashboard-outflows-content {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.dashboard-outflows-total,
.dashboard-outflows-section summary,
.dashboard-outflows-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-outflows-total {
  align-items: center;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink);
}

.dashboard-outflows-total strong {
  font-size: 19px;
  white-space: nowrap;
}

.dashboard-outflows-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.dashboard-outflows-section summary {
  padding: 12px;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.dashboard-outflows-section summary strong,
.dashboard-outflows-row>b {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dashboard-outflows-section ul {
  list-style: none;
  padding: 0 12px;
  margin: 0;
}

.dashboard-outflows-row {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.dashboard-outflows-row>div {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-outflows-row span,
.dashboard-outflows-message {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-outflows-content .dashboard-outflows-message {
  max-width: none;
  margin: 0;
  padding: 12px;
  text-align: left;
}

.dashboard-outflows-content .dashboard-outflows-message.is-error {
  color: var(--red-deep);
}

.exec-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.exec-kpi-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #64748B);
}

.exec-kpi-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

.exec-kpi-icon.is-green {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.exec-kpi-icon.is-slate {
  background: var(--surface-soft, #F1F5F9);
  color: var(--muted, #64748B);
}

.exec-kpi-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.exec-kpi-badge.is-positive {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.exec-kpi-badge.is-danger {
  background: rgba(225, 29, 72, 0.12);
  color: #E11D48;
}

.exec-kpi-link {
  border: none;
  background: transparent;
  color: var(--brand, #E11D48);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 6px;
}

.exec-kpi-link:hover {
  text-decoration: underline;
}

.exec-kpi-value {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text, #0F172A);
}

.exec-kpi-value.is-green {
  color: #059669;
}

.exec-kpi-value.is-blue {
  color: #2563EB;
}

.exec-kpi-value.is-red {
  color: #E11D48;
}

.exec-kpi-value.is-slate {
  color: var(--text, #0F172A);
}

.exec-kpi-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: var(--muted, #64748B);
  padding-top: 6px;
  border-top: 1px dashed var(--line, #E2E8F0);
}

.exec-kpi-foot b {
  color: var(--text, #0F172A);
  font-weight: 700;
}

/* 2. Paneles de dos columnas */
.exec-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.exec-panel-card {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--line, #E2E8F0);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.exec-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line, #E2E8F0);
}

.exec-panel-header h2 {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 2px;
  color: var(--text, #0F172A);
}

.exec-panel-header p {
  margin: 0;
  font-size: 12px;
  color: var(--muted, #64748B);
}

.exec-panel-header strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--text, #0F172A);
}

/* Barras de medios de pago */
.exec-methods-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exec-method-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exec-method-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.exec-method-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.exec-method-label strong {
  font-weight: 700;
  color: var(--text, #0F172A);
}

.exec-method-label small {
  color: var(--muted, #64748B);
  font-size: 11.5px;
}

.exec-method-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.exec-method-dot.is-cash {
  background: #10B981;
}

.exec-method-dot.is-transfer {
  background: #6366F1;
}

.exec-method-dot.is-card {
  background: #F59E0B;
}

.exec-method-val {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.exec-method-val strong {
  font-weight: 700;
  color: var(--text, #0F172A);
}

.exec-method-val span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted, #64748B);
  min-width: 34px;
  text-align: right;
}

.exec-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-soft, #F1F5F9);
  overflow: hidden;
}

.exec-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.exec-progress-fill.is-cash {
  background: #10B981;
}

.exec-progress-fill.is-transfer {
  background: #6366F1;
}

.exec-progress-fill.is-card {
  background: #F59E0B;
}

/* Grid de Control Operativo y Auditoría */
.exec-pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.exec-pulse-tile {
  background: var(--surface-soft, #F8FAFC);
  border: 1px solid var(--line, #E2E8F0);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.exec-pulse-tile span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #64748B);
}

.exec-pulse-tile strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #0F172A);
}

.exec-pulse-tile strong.is-positive {
  color: #059669;
}

.exec-pulse-tile strong.is-danger {
  color: #E11D48;
}

.exec-pulse-tile strong.is-warning {
  color: #D97706;
}

.exec-courtesy-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 12px;
  color: var(--text, #0F172A);
}

/* Listas de Ranking (Productos y Colaboradores) */
.exec-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exec-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 11px;
  background: var(--surface-soft, #F8FAFC);
  border: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.exec-list-row:hover {
  border-color: var(--line, #E2E8F0);
}

.exec-list-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.exec-list-left div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.exec-list-left strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #0F172A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exec-list-left small {
  font-size: 11.5px;
  color: var(--muted, #64748B);
}

.exec-rank-badge {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(225, 29, 72, 0.1);
  color: var(--brand, #E11D48);
  font-size: 11.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.exec-avatar-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand, #E11D48);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.exec-list-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.exec-list-right strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--text, #0F172A);
}

.exec-list-right strong.is-profit {
  color: #059669;
}

.exec-margin-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.exec-empty-copy {
  margin: 12px 0;
  font-size: 13px;
  color: var(--muted, #64748B);
  text-align: center;
}

/* Alertas de Stock Bajo */
.exec-low-stock-box {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--line, #E2E8F0);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exec-sub-heading {
  font-size: 11.5px;
  font-weight: 700;
  color: #D97706;
}

.exec-low-stock-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exec-stock-pill {
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 8px;
  font-weight: 600;
}

.exec-stock-pill.is-low {
  background: rgba(245, 158, 11, 0.12);
  color: #B45309;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.exec-stock-pill.is-out {
  background: rgba(225, 29, 72, 0.12);
  color: #E11D48;
  border: 1px solid rgba(225, 29, 72, 0.28);
}

/* Responsividad del Dashboard Ejecutivo */
.exec-kpi-grid.is-three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.exec-daily-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exec-daily-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--surface-soft, #F8FAFC);
}

.exec-daily-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.exec-daily-meta strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text, #0F172A);
  white-space: nowrap;
}

.exec-daily-meta small {
  font-size: 11px;
  color: var(--muted, #64748B);
}

.exec-daily-bar-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
}

.exec-daily-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--line, #E2E8F0);
  overflow: hidden;
}

.exec-daily-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand, #E11D48), #FB7185);
  transition: width 0.35s ease;
}

.exec-daily-amount {
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  min-width: 82px;
}

.exec-daily-amount.has-sales {
  color: var(--text, #0F172A);
}

.exec-daily-amount.is-zero {
  color: var(--muted, #94A3B8);
  font-weight: 600;
}

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

@media (max-width: 1080px) {

  .exec-kpi-grid,
  .exec-kpi-grid.is-three-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {

  .exec-two-col,
  .exec-products-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .exec-dash-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .exec-dash-controls {
    justify-content: space-between;
  }

  .exec-dash-presets {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .exec-preset-btn {
    flex: 1 1 0;
    text-align: center;
    padding: 6px 8px;
  }

  .exec-dash-date-wrap {
    flex: 1 1 auto;
  }

  .exec-kpi-grid,
  .exec-kpi-grid.is-three-col {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .exec-daily-row {
    grid-template-columns: 108px 1fr auto;
    gap: 8px;
  }

  .exec-pulse-grid {
    grid-template-columns: 1fr;
  }

  .exec-panel-card {
    padding: 14px;
  }
}

/* ==========================================================================
   MI TURNO — FILTRO POR MEDIO DE PAGO Y ETIQUETAS DE MÉTODO
   ========================================================================== */
.payment-card.is-filterable {
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.payment-card.is-filterable:hover {
  transform: translateY(-1px);
  border-color: var(--brand, #E11D48);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.payment-card.is-filterable.is-active-filter {
  border-color: var(--brand, #E11D48) !important;
  background: rgba(225, 29, 72, 0.05) !important;
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.18) !important;
}

.shift-filter-hint {
  font-size: 11.5px;
  color: var(--muted, #64748B);
  font-weight: 500;
}

.shift-filter-reset-btn {
  border: 1px solid var(--line, #E2E8F0);
  background: var(--surface, #FFFFFF);
  color: var(--brand, #E11D48);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.shift-filter-reset-btn:hover {
  border-color: var(--brand, #E11D48);
  background: rgba(225, 29, 72, 0.06);
}

.activity-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.shift-method-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.shift-method-pill.is-cash {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.shift-method-pill.is-card {
  background: rgba(245, 158, 11, 0.15);
  color: #B45309;
}

.shift-method-pill.is-transfer {
  background: rgba(99, 102, 241, 0.15);
  color: #4338CA;
}

.shift-activity.is-clickable-receipt {
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.shift-activity.is-clickable-receipt:hover {
  transform: translateY(-1px);
  border-color: var(--brand, #E11D48);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.shift-receipt-link {
  color: var(--brand, #E11D48);
  font-weight: 700;
}

/* ==========================================================================
   TOGGLE DE TEXTO "MICHELADA" INTEGRADO EN LA BARRA DIVISORA
   ========================================================================== */
.beer-michelada-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 18px;
  box-sizing: border-box;
  margin: 0;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
  flex-shrink: 0;
}

.beer-michelada-toggle .toggle-lemon {
  font-size: 10px;
  line-height: 1;
}

.beer-michelada-toggle.is-inactive {
  background: var(--surface-card, #ffffff);
  border: 1px solid var(--line, #E2E8F0);
  color: var(--muted, #64748B);
}

.beer-michelada-toggle.is-inactive:hover {
  border-color: #CBD5E1;
  color: var(--text-secondary, #334155);
  background: #F1F5F9;
}

.beer-michelada-toggle.is-active {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  color: #B45309;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.22);
}

.beer-michelada-toggle:active {
  transform: scale(0.95);
}

.beer-michelada-spacer {
  display: none !important;
}

@media (max-width: 640px) {
  .beer-michelada-toggle {
    height: 17px;
    padding: 0 6px;
    font-size: 9px;
  }
}

/* ==========================================================================
   INDICADOR DE MICHELADA EN LÍNEA DE PEDIDO / CARRITO
   ========================================================================== */
.cart-line-michelada-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1.5px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  color: #92400E;
}

.cart-line-michelada-indicator .cart-lemon-icon {
  font-size: 11px;
  line-height: 1;
}

/* ==========================================================================
   AJUSTES: navegación por secciones, vista tabla/tarjetas y tarjeta responsiva
   ========================================================================== */
/* ==========================================================================
   AJUSTES: pestañas en escritorio y menú agrupado táctil en móvil
   ========================================================================== */
.admin-hero {
  margin-bottom: 14px;
}

/* --- VISTA ESCRITORIO (por defecto >= 721px): Pestañas clásicas --- */
.admin-mobile-settings-groups {
  display: none;
}

.admin-desktop-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  white-space: normal;
}

.admin-desktop-tabs .admin-tab {
  position: relative;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  text-align: left;
  white-space: normal;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-desktop-tabs .admin-tab:hover:not(.active) {
  background: var(--surface-soft);
  border-color: #94a3b8;
}

.admin-desktop-tabs .admin-tab.active {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.admin-desktop-tabs .admin-tab-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
}

.admin-desktop-tabs .admin-tab.active .admin-tab-icon {
  background: var(--red-soft);
  color: var(--red);
}

.admin-desktop-tabs .admin-tab-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.admin-desktop-tabs .admin-tab-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.admin-desktop-tabs .admin-tab-desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.2;
}

.admin-desktop-tabs .admin-tab .admin-badge {
  position: absolute;
  top: 8px;
  right: 10px;
}

/* --- VISTA MÓVIL (<= 720px): Grupos de opciones limpias estilo iOS / App nativa --- */
@media (max-width: 720px) {
  .admin-desktop-tabs,
  .admin-desktop-subtitle {
    display: none !important;
  }

  .admin-mobile-settings-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 0 24px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }

  .admin-settings-group {
    background: var(--surface, #ffffff);
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 18px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  }

  .admin-settings-group-header {
    padding: 8px 12px;
    border-radius: 11px;
    background: var(--surface-soft, #f8fafc);
    color: var(--ink, #1e1b4b);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 2px;
  }

  .admin-settings-list {
    display: flex;
    flex-direction: column;
  }

  .admin-settings-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 10px 12px;
    background: transparent;
    border: 0;
    border-radius: 12px;
    text-align: left;
    white-space: normal;
    box-shadow: none !important;
    cursor: pointer;
    transition: background-color 0.15s ease;
  }

  .admin-settings-row + .admin-settings-row {
    border-top: 1px solid rgba(226, 232, 240, 0.7);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  .admin-settings-row:hover,
  .admin-settings-row:active {
    background: var(--surface-soft, #f8fafc);
  }

  .admin-settings-row .admin-tab-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink, #334155);
  }

  .admin-settings-row .admin-tab-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    gap: 2px;
  }

  .admin-settings-row .admin-tab-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink, #1e293b);
    line-height: 1.25;
  }

  .admin-settings-row .admin-tab-desc {
    font-size: 11.5px;
    font-weight: 400;
    color: var(--muted, #64748b);
    line-height: 1.2;
  }

  .admin-row-trail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .admin-row-meta {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted, #64748b);
    background: var(--surface-soft, #f1f5f9);
    padding: 3px 8px;
    border-radius: 999px;
  }

  .admin-settings-row .admin-badge {
    position: static;
    transform: none;
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--surface-soft, #f1f5f9);
    color: var(--muted, #475569);
  }

  .admin-settings-row .admin-badge.is-alert {
    background: #fee2e2;
    color: #dc2626;
  }

  .admin-row-chevron {
    color: #94a3b8;
    flex-shrink: 0;
  }

  /* Control de pantallas en móvil: o se ve el menú o se ve el panel activo */
  .admin-screen:not(.mobile-section-open) .admin-panel {
    display: none !important;
  }

  .admin-screen.mobile-section-open .admin-mobile-settings-groups,
  .admin-screen.mobile-section-open .admin-hero {
    display: none !important;
  }
}

/* En escritorio, los paneles siempre siguen la visibilidad de state.adminTab */
@media (min-width: 721px) {
  .admin-back-btn,
  .admin-mobile-bar {
    display: none !important;
  }
}

/* Alternar vista */
.admin-view-toggle {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  height: 46px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.admin-view-btn {
  display: grid;
  place-items: center;
  width: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.admin-view-btn:hover:not(.active) {
  color: var(--ink);
}

.admin-view-btn.active {
  background: var(--surface);
  color: var(--red);
  box-shadow: 0 1px 4px rgba(11, 20, 48, .12);
}

/* Vista tabla */
.admin-grid.is-table {
  display: block;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.admin-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}

.admin-products-table th {
  position: sticky;
  top: 0;
  padding: 10px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-soft);
  border-bottom: 1.5px solid var(--line);
  white-space: nowrap;
}

.admin-products-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink);
}

.admin-products-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-products-table tbody tr:hover {
  background: var(--surface-soft);
}

.admin-products-table .num {
  text-align: right;
  white-space: nowrap;
}

.admin-products-table .actions {
  text-align: right;
  width: 1%;
}

.admin-table-product {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-table-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.admin-table-thumb .admin-card-thumb-fallback {
  font-size: 18px;
}

.admin-table-product-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-table-product-info strong {
  font-weight: 600;
  line-height: 1.25;
}

.admin-table-product-info small {
  color: var(--muted);
  font-size: 11px;
}

.admin-table-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
}

.admin-icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.admin-icon-btn:hover {
  background: var(--surface-soft);
  color: var(--ink);
  transform: scale(1.1);
}

.admin-icon-btn:active {
  transform: scale(0.95);
}

.admin-icon-btn.addons {
  color: var(--muted);
  background: transparent;
}

.admin-icon-btn.addons:hover {
  background: #fffbeb;
  color: #b45309;
}

.admin-icon-btn.danger {
  color: var(--muted);
}

.admin-icon-btn.danger:hover {
  background: var(--occupied-bg);
  color: var(--pink);
}

.admin-product-header-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.admin-product-header-status .status-pill {
  padding: 3px 8px;
  font-size: 11px;
  gap: 4px;
}

.admin-prod-more-btn {
  width: 26px;
  height: 26px;
}

@media (max-width: 720px) {
  #adminPanelProducts .admin-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-product-header {
    align-items: flex-start;
    padding: 12px 12px 8px;
  }

  .admin-product-body {
    padding: 4px 12px 12px;
  }

  .admin-product-info h3 {
    font-size: 14.5px;
    line-height: 1.28;
  }
}

.admin-product-prices-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.admin-price-col {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.admin-price-col.is-takeaway {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.admin-price-col small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.admin-price-col strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.admin-product-card .admin-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.admin-product-card .admin-card-meta .status-pill {
  padding: 2px 7px;
  font-size: 10.5px;
  gap: 3px;
}

.admin-product-card .admin-product-info h3 {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-price-col strong.is-site,
.admin-product-card .admin-product-price.is-site {
  font-size: 16px;
  font-weight: 800;
  color: var(--purple, #7a3cff);
}

/* Tarjeta de producto responsiva: barra de 4 acciones contenida sin desbordes */
.admin-product-card {
  max-width: 100%;
}

.admin-card-actions .admin-btn {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.admin-card-actions .admin-btn[data-tooltip],
.admin-table-actions .admin-icon-btn[data-tooltip] {
  position: relative;
  overflow: visible;
}

.admin-card-actions .admin-btn[data-tooltip]::after,
.admin-table-actions .admin-icon-btn[data-tooltip]::after,
.admin-product-orbit .share-opt-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translate(-50%, 4px);
  padding: 5px 9px;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 30;
  transition: opacity .16s ease, visibility .16s ease, transform .18s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-card-actions .admin-btn[data-tooltip]::before,
.admin-table-actions .admin-icon-btn[data-tooltip]::before,
.admin-product-orbit .share-opt-btn[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translate(-50%, 4px);
  border: 5px solid transparent;
  border-top-color: #0f172a;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 30;
  transition: opacity .16s ease, visibility .16s ease, transform .18s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-card-actions .admin-btn[data-tooltip]:first-child::after {
  left: 0;
  transform: translate(0, 4px);
}

.admin-card-actions .admin-btn[data-tooltip]:last-child::after,
.admin-table-actions .admin-icon-btn[data-tooltip]:last-child::after {
  left: auto;
  right: 0;
  transform: translate(0, 4px);
}

.admin-card-actions .admin-btn[data-tooltip]:hover::after,
.admin-card-actions .admin-btn[data-tooltip]:hover::before,
.admin-card-actions .admin-btn[data-tooltip]:focus-visible::after,
.admin-card-actions .admin-btn[data-tooltip]:focus-visible::before,
.admin-table-actions .admin-icon-btn[data-tooltip]:hover::after,
.admin-table-actions .admin-icon-btn[data-tooltip]:hover::before,
.admin-table-actions .admin-icon-btn[data-tooltip]:focus-visible::after,
.admin-table-actions .admin-icon-btn[data-tooltip]:focus-visible::before,
.admin-product-orbit .share-opt-btn[data-tooltip]:hover::after,
.admin-product-orbit .share-opt-btn[data-tooltip]:hover::before,
.admin-product-orbit .share-opt-btn[data-tooltip]:focus-visible::after,
.admin-product-orbit .share-opt-btn[data-tooltip]:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.admin-card-actions .admin-btn[data-tooltip]:first-child:hover::after,
.admin-card-actions .admin-btn[data-tooltip]:first-child:focus-visible::after,
.admin-card-actions .admin-btn[data-tooltip]:last-child:hover::after,
.admin-card-actions .admin-btn[data-tooltip]:last-child:focus-visible::after,
.admin-table-actions .admin-icon-btn[data-tooltip]:last-child:hover::after,
.admin-table-actions .admin-icon-btn[data-tooltip]:last-child:focus-visible::after {
  transform: translate(0, 0);
}

/* Tooltips precisos para la tabla de supervisión: orientados hacia la izquierda para cero desborde */
.supervisor-table-actions .supervisor-table-btn[data-tooltip] {
  position: relative;
  overflow: visible;
}

.supervisor-table-actions .supervisor-table-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 9px);
  right: 0;
  left: auto;
  transform: translate(0, 4px);
  padding: 5px 9px;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 50;
  transition: opacity .16s ease, visibility .16s ease, transform .18s cubic-bezier(0.16, 1, 0.3, 1);
}

.supervisor-table-actions .supervisor-table-btn[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  right: 9px;
  left: auto;
  transform: translate(0, 4px);
  border: 5px solid transparent;
  border-top-color: #0f172a;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 50;
  transition: opacity .16s ease, visibility .16s ease, transform .18s cubic-bezier(0.16, 1, 0.3, 1);
}

.supervisor-table-actions .supervisor-table-btn[data-tooltip]:hover::after,
.supervisor-table-actions .supervisor-table-btn[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translate(0, 0);
}

.supervisor-table-actions .supervisor-table-btn[data-tooltip]:hover::before,
.supervisor-table-actions .supervisor-table-btn[data-tooltip]:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translate(0, 0);
}

.admin-product-header,
.admin-product-body {
  box-sizing: border-box;
  max-width: 100%;
}

.admin-card-meta {
  min-width: 0;
}

.admin-product-status-row {
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .admin-toolbar-actions {
    grid-template-columns: auto 1fr;
  }

  #adminPanelProducts .admin-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 10px;
  }

  #adminPanelProducts #adminNewProductButton {
    position: fixed;
    right: 16px;
    bottom: calc(74px + env(safe-area-inset-bottom));
    z-index: 40;
    width: auto;
    height: 46px;
    min-width: 0;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(122, 60, 255, 0.34) !important;
  }

  #adminPanelProducts #adminNewProductButton span {
    display: inline;
  }

  #adminPanelProducts .admin-view-toggle {
    order: 3;
    flex: 0 0 auto;
    height: 40px;
    align-items: center;
  }

  #adminPanelProducts #adminManageCategoriesBtn,
  #adminPanelProducts #adminImportProductsButton {
    order: 1;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 40px;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 11px;
    white-space: nowrap;
  }

  #adminPanelProducts #adminImportProductsButton.is-excel {
    color: #166534;
    border-color: #bbf7d0;
    background: #f0fdf4;
  }

  #adminPanelPurchases .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  #adminPanelPurchases .reports-filter-group {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  #adminPanelPurchases .reports-submit-btn {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  #adminPanelPurchases .admin-toolbar-actions {
    display: flex;
    width: 100%;
  }

  #adminPanelPurchases #adminNewPurchaseButton {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .reports-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
  }

  .reports-kpi-grid>.report-kpi-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px 12px;
  }

  .reports-kpi-grid>.report-kpi-card:last-child:nth-child(odd) span {
    grid-column: 1;
    margin-bottom: 0;
  }

  .reports-kpi-grid>.report-kpi-card:last-child:nth-child(odd) small {
    grid-column: 1;
  }

  .reports-kpi-grid>.report-kpi-card:last-child:nth-child(odd) strong {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 18px;
    text-align: right;
    margin: 0;
  }

  .inv-subtab {
    white-space: nowrap;
  }

  .inv-filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .inv-filter-pills::-webkit-scrollbar {
    display: none;
  }

  .inv-filter-pill {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

.brand-back-arrow {
  display: none;
}

/* Ajustes en móvil: barra y buscador */
.admin-back-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--surface, #ffffff);
  color: var(--ink, #0f172a);
  flex-shrink: 0;
  cursor: pointer;
}

.admin-mobile-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-mobile-bar h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.admin-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.admin-search-row .admin-search {
  flex: 1;
  min-width: 0;
}

@media (max-width: 720px) {
  .admin-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .admin-search-row .admin-search {
    flex: 1;
    min-width: 0;
  }

  .admin-back-btn,
  #backToTables {
    display: none !important;
  }

  #homeButton {
    position: relative;
  }

  #homeButton img {
    transition: opacity .22s ease, transform .28s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  #homeButton .brand-back-arrow {
    display: inline-grid;
    place-items: center;
    position: absolute;
    left: 0;
    top: 50%;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(0.65) rotate(90deg);
    transition: opacity .22s ease, transform .28s cubic-bezier(0.34, 1.56, 0.64, 1), background .15s ease;
  }

  body.mobile-can-go-back #homeButton img {
    opacity: 0 !important;
    transform: scale(0.65) rotate(-90deg);
    pointer-events: none;
  }

  body.mobile-can-go-back #homeButton .brand-back-arrow {
    opacity: 1;
    transform: translateY(-50%) scale(1) rotate(0deg);
  }

  .admin-mobile-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
  }

  .admin-mobile-bar h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
  }
}

/* ============================================================
   Optimizaciones de rendimiento para tablets y pantallas táctiles
   ============================================================ */
@media (hover: none) and (pointer: coarse) {

  /* Aceleración por GPU en capas independientes y sombras optimizadas para evitar caída de FPS */
  .beer-card,
  .table-card,
  .order-card {
    transform: translateZ(0);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08) !important;
  }

  .beer-card:active,
  .table-card:active {
    transform: scale(0.98);
  }

  .beer-card *,
  .table-card *,
  .order-card * {
    -webkit-tap-highlight-color: transparent;
  }

  .beer-cart-badge {
    will-change: transform, opacity;
  }

  .beer-grid,
  .table-grid,
  .orders-list {
    -webkit-overflow-scrolling: touch;
  }
}

/* Pantalla LCD: superficies y controles de escritorio clásico. */
[data-theme="vga"] {
  --font-sans: Arial, Helvetica, sans-serif;
  --font-heading: Arial, Helvetica, sans-serif;
  --bg-app: #e6e9ed;
  --cream: #e6e9ed;
  --surface-soft: #e5e9ef;
  --line: #aab4c1;
  --radius-xl: 4px;
  --radius-lg: 4px;
  --radius-md: 3px;
  --radius-sm: 3px;
}

body[data-theme="vga"] {
  background: #e6e9ed !important;
}

[data-theme="vga"] .app-header {
  background: #17365b !important;
  border-bottom: 3px solid #8797aa !important;
  box-shadow: none !important;
}

[data-theme="vga"] .bottom-nav {
  background: #e5e9ef !important;
  border: 1px solid #8e9baa !important;
  border-radius: 4px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .15) !important;
}

[data-theme="vga"] .nav-item {
  border: 1px solid transparent;
  border-radius: 3px !important;
  transform: none !important;
}

[data-theme="vga"] .nav-item.active,
[data-theme="vga"] .nav-item.active:hover {
  background: #d3deec !important;
  border: 1px solid #7187a2 !important;
  color: #17365b !important;
}

[data-theme="vga"] .panel-card,
[data-theme="vga"] .summary-card,
[data-theme="vga"] .stat-card,
[data-theme="vga"] .orders-stat-card,
[data-theme="vga"] .admin-product-card,
[data-theme="vga"] .admin-tab,
[data-theme="vga"] .order-card,
[data-theme="vga"] .beer-card,
[data-theme="vga"] .table-card,
[data-theme="vga"] .quick-order-card,
[data-theme="vga"] .picker-card,
[data-theme="vga"] .success-card,
[data-theme="vga"] .profile-modal-card,
[data-theme="vga"] .form-modal-card,
[data-theme="vga"] .modal-content,
[data-theme="vga"] .cart-sheet,
[data-theme="vga"] .cart-summary-dock {
  border-radius: 4px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12) !important;
}

[data-theme="vga"] .table-card:hover,
[data-theme="vga"] .beer-card:hover {
  transform: none;
}

[data-theme="vga"] .category-chip,
[data-theme="vga"] .table-filter-btn,
[data-theme="vga"] .status-filter,
[data-theme="vga"] .picker-tab,
[data-theme="vga"] .payment-method,
[data-theme="vga"] .primary-action,
[data-theme="vga"] .secondary-action,
[data-theme="vga"] .danger-action,
[data-theme="vga"] .new-order-button,
[data-theme="vga"] .charge-button,
[data-theme="vga"] .field-control,
[data-theme="vga"] input[type="text"],
[data-theme="vga"] input[type="password"],
[data-theme="vga"] input[type="number"],
[data-theme="vga"] input[type="search"],
[data-theme="vga"] select,
[data-theme="vga"] textarea {
  border-radius: 3px !important;
}

[data-theme="vga"] .table-filter-btn,
[data-theme="vga"] .status-filter,
[data-theme="vga"] .category-chip,
[data-theme="vga"] .secondary-action {
  background: #edf0f4 !important;
  border-color: #9daaba !important;
}

[data-theme="vga"] .table-filter-btn.active,
[data-theme="vga"] .status-filter.active,
[data-theme="vga"] .category-chip.active {
  background: #17365b !important;
  border-color: #102944 !important;
  color: #fff !important;
  box-shadow: none !important;
}

[data-theme="vga"] .primary-action:disabled,
[data-theme="vga"] .secondary-action:disabled,
[data-theme="vga"] .danger-action:disabled,
[data-theme="vga"] .new-order-button:disabled,
[data-theme="vga"] .charge-button:disabled {
  background: #d9dee4 !important;
  border-color: #aab4c1 !important;
  color: #5a6674 !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

[data-theme="vga"] .sheet-backdrop {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@media (max-width: 780px) {
  [data-theme="vga"] .bottom-nav {
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
  }
}

.orders-older-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex: 0 0 auto;
  border-color: #fde68a;
  background: #fffdf5;
  color: #92400e;
  -webkit-tap-highlight-color: transparent;
}

.orders-older-checkbox {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #d97706;
  cursor: pointer;
  flex-shrink: 0;
}

.orders-older-label {
  font-style: normal;
}

.orders-older-toggle span#ordersOlderCount {
  background: #fef3c7;
  color: #92400e;
}

.orders-older-toggle.is-active {
  border-color: #d97706;
  background: #fef3c7;
  color: #78350f;
}

.orders-older-toggle.is-active span#ordersOlderCount {
  background: #d97706;
  color: #ffffff;
}

.orders-older-toggle[hidden] {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* RESPONSIVE FIX: Approval & Admin Modal Cards - Mobile Optimization */
/* ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {

  /* Approval Modal - Responsive Width & Padding */
  .approval-modal-card {
    max-width: 100%;
    width: calc(100vw - 24px);
    padding: 20px 16px;
    margin: 0 auto;
    box-sizing: border-box;
  }

  /* Admin Approval Modal - Full Width on Mobile */
  .admin-modal-card {
    max-width: 100%;
    width: calc(100vw - 24px);
    padding: 16px 14px !important;
    box-sizing: border-box;
  }

  /* PIN Input - Smaller on Mobile */
  .approval-pin-input {
    height: 46px;
    font-size: 1.6rem;
    letter-spacing: 8px;
    padding: 8px 4px;
  }

  /* Actions Row - Stack Vertically on Smaller Screens */
  .approval-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }

  .approval-actions-row .primary-action {
    flex: 1 1 calc(100% - 52px - 8px);
    min-width: 120px;
    height: 40px;
    font-size: 0.85rem;
    gap: 4px;
  }

  .approval-actions-row .approval-btn-icon-only {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  /* Footer Links - Stack Vertically on Mobile */
  .approval-footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
  }

  .approval-footer-links .approval-footer-btn-danger,
  .approval-footer-links .approval-footer-btn-dismiss {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.8rem;
    text-align: center;
  }

  /* Modal Title - Smaller Font on Mobile */
  .approval-modal-title {
    font-size: 1.1rem;
    margin: 0 0 4px;
  }

  /* Summary Chip - Better Text Wrapping */
  .approval-summary-chip {
    font-size: 0.82rem;
    padding: 8px 10px;
    margin: 6px 0 14px;
    line-height: 1.3;
    word-break: break-word;
  }

  /* PIN Box - Smaller Margins */
  .approval-pin-box {
    margin-bottom: 14px;
  }

  /* PIN Label - Adjusted Spacing */
  .approval-pin-label {
    font-size: 0.68rem;
    margin-bottom: 6px;
  }

  /* PIN Hint - Smaller on Mobile */
  .approval-pin-hint {
    font-size: 0.68rem;
    margin-top: 4px;
  }

  /* Icon Badge - Slightly Smaller */
  .approval-icon-badge {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
  }

  .approval-icon-badge svg {
    width: 20px;
    height: 20px;
  }

  /* Close Button - Better Positioning */
  .modal-close {
    top: 12px !important;
    right: 12px !important;
  }
}

@media (max-width: 480px) {

  /* Extra Small Screens - More Aggressive Shrinking */
  .approval-modal-card {
    width: calc(100vw - 16px);
    padding: 16px 12px;
    border-radius: 16px;
  }

  .admin-modal-card {
    width: calc(100vw - 16px);
    padding: 14px 10px !important;
  }

  .approval-pin-input {
    height: 44px;
    font-size: 1.4rem;
    letter-spacing: 6px;
  }

  .approval-actions-row .primary-action {
    font-size: 0.8rem;
  }

  .approval-modal-title {
    font-size: 1rem;
    margin-bottom: 2px;
  }

  .approval-summary-chip {
    font-size: 0.78rem;
    padding: 6px 8px;
    margin: 4px 0 12px;
  }

  .approval-btn-cancel-white,
  .approval-btn-pin-red {
    padding: 8px 12px;
    font-size: 0.75rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* ENSURE NO CONFLICTS: Buttons Don't Overflow in Approval Modals */
/* ═══════════════════════════════════════════════════════════════════════════ */

.approval-modal-card .primary-action {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0 !important;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 10px;
}

.approval-modal-card button {
  box-sizing: border-box;
}

/* Prevent primary-action conflicts with form-modal-card rules */
.form-modal-card.approval-modal-card .primary-action {
  margin-top: 0 !important;
}

/* Ensure admin modal form buttons don't conflict */
.admin-modal-card form button,
.admin-modal-card .primary-action {
  box-sizing: border-box;
}

/* Override potential conflicts with .form-modal-card .primary-action */
.approval-actions-row .primary-action {
  margin: 0 !important;
  flex: 1 1 auto;
}

/* Prevent footer buttons from being affected by form styling */
.approval-footer-links .approval-footer-btn-danger,
.approval-footer-links .approval-footer-btn-dismiss {
  margin: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* MODAL DE AUTORIZACIONES DEL ADMINISTRADOR Y SOLICITUDES DEL MESERO        */
/* ═══════════════════════════════════════════════════════════════════════════ */
.admin-approvals-card {
  max-width: 520px;
  width: 94vw;
  max-height: min(88dvh, 720px);
  padding: 20px 22px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.22);
  text-align: left;
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.admin-approvals-card .modal-header-compact {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.admin-approvals-card .modal-header-compact .modal-header-text {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  padding: 0 88px;
}

.admin-approvals-modal-heading {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand, var(--red, #e11d48)) !important;
  line-height: 1.25;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
}

.modal-header-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.admin-approvals-card .modal-header-badge {
  position: relative;
  z-index: 1;
}

.modal-header-actions-group .icon-button.modal-close {
  position: static !important;
  flex-shrink: 0;
  margin: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.admin-approvals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.admin-approvals-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-approvals-shield {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-approvals-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand, var(--red, #e11d48));
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-approvals-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 9999px;
  background: var(--brand, var(--red, #e11d48));
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
}

.admin-approvals-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-approvals-icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.admin-approvals-icon-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.admin-approvals-icon-btn svg {
  pointer-events: none;
}

.admin-approvals-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 2px;
  min-height: 0;
  max-height: min(65vh, 520px);
}

.admin-approvals-empty {
  text-align: center;
  padding: 32px 16px;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
}

.admin-approvals-empty-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  background: #e0f2fe;
  color: #0284c7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-approvals-empty h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  color: #0f172a;
  font-weight: 700;
}

.admin-approvals-empty p {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
}

.admin-approval-item.comanda-preview-card,
.admin-approval-item {
  background: #ffffff;
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
}

.admin-approval-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-approval-dest-wrap {
  margin-left: auto;
}

.admin-approval-id-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.admin-approval-item .comanda-qty.is-cancel-qty {
  color: var(--brand, var(--red, #e11d48));
}

.admin-approval-item .comanda-qty.is-courtesy-qty {
  color: #0f766e;
}

.comanda-item-price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
  text-align: right;
  line-height: 1.2;
}

.admin-approval-item .comanda-item-price {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main, #1e293b);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.comanda-item-orig-price {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
  text-align: right;
  line-height: 1.1;
  margin-top: 1px;
}

.admin-approval-reason-box {
  margin-top: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--brand, var(--red, #e11d48));
  border-radius: 8px;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.4;
  word-break: break-word;
}

.admin-approval-reason-box.is-courtesy {
  border-left-color: #7e22ce;
  background: #faf5ff;
}

.admin-approval-reason-box strong {
  color: #0f172a;
  font-weight: 700;
  margin-right: 4px;
}

.admin-approval-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
}

.admin-approval-requester {
  font-size: 12px;
  color: #64748b;
}

.admin-approval-requester strong {
  color: #1e293b;
  font-weight: 700;
}

.admin-approval-status-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: #c2410c;
  background: #fff7ed;
  border: 1px solid #ffedd5;
  padding: 2px 8px;
  border-radius: 6px;
}

.admin-approval-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-approval-item-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.admin-approval-type-tag {
  display: inline-block;
  border: 1px solid transparent;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-approval-order-ref {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-approval-time {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-approval-item-mid {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-approval-summary {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
  word-break: break-word;
  flex: 1 1 200px;
}

.admin-approval-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.admin-approval-pin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 5px 10px;
  border-radius: 8px;
}

.admin-approval-pin-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: #1d4ed8;
  letter-spacing: 0.5px;
}

.admin-approval-pin-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #1e40af;
  line-height: 1;
}

.admin-approval-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.admin-approval-btn-reject,
.admin-approval-btn-approve {
  margin: 0;
  height: 36px;
  padding: 0 14px;
  font-size: 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.admin-approval-btn-reject {
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
}

.admin-approval-btn-reject:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #1e293b;
}

.admin-approval-btn-approve {
  font-weight: 700;
  color: #ffffff;
  background: var(--brand, var(--red, #e11d48));
  border: 1px solid var(--brand, var(--red, #e11d48));
}

.admin-approval-btn-approve:hover:not(:disabled) {
  background: var(--red-dark, #be123c);
  border-color: var(--red-dark, #be123c);
}

.admin-approval-btn-reject:disabled,
.admin-approval-btn-approve:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 520px) {
  .admin-approvals-card {
    width: 100%;
    padding: 16px;
    border-radius: 18px 18px 14px 14px;
  }

  .admin-approvals-title {
    font-size: 1.05rem;
  }

  .admin-approval-item {
    padding: 12px;
  }

  .admin-approval-item-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-approval-pin-pill {
    justify-content: center;
  }

  .admin-approval-btn-group {
    width: 100%;
    margin-left: 0;
  }

  .admin-approval-btn-reject,
  .admin-approval-btn-approve {
    flex: 1 1 0;
    height: 40px;
  }
}

/* ==========================================================================
   Pantallas LCD antiguas / baja densidad (1x) y resoluciones compactas
   (cuadradas 1024x768, 1280x1024 y rectangulares 1280x720, 1366x768)
   Sin afectar pantallas Retina (>= 2dppx / > 1366px) ni móviles (< 768px)
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1366px) and (max-resolution: 1.5dppx),
(min-width: 768px) and (max-width: 1366px) and (max-height: 820px) {
  .beer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 8px 4px 32px;
  }

  .beer-card {
    min-height: 162px;
    contain-intrinsic-size: 0 162px;
    padding: 10px 8px;
    border-radius: 14px;
    border-color: rgba(15, 23, 42, 0.09);
    box-shadow: 0 2px 8px rgba(11, 20, 48, 0.05);
  }

  .beer-visual {
    width: 58px;
    height: 58px;
    margin-bottom: 6px;
    padding: 4px;
  }

  .beer-name {
    font-size: 12.5px;
    line-height: 1.25;
  }

  .beer-price {
    font-size: 13px;
  }

  .table-grid {
    gap: 10px;
  }

  .table-card {
    min-height: 126px;
    padding: 12px;
  }

  /* 1. Encabezado y barra de categorías más compactos para ganar altura útil */
  .app-header {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .compact-order-header {
    margin-bottom: 8px;
    gap: 8px;
  }

  .category-row {
    margin: 8px 0 10px;
  }

  .search-field {
    height: 38px;
  }

  /* 2. Sin blur costoso en GPUs antiguas al abrir modales */
  .table-picker-modal,
  .success-modal {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(11, 20, 48, 0.68);
  }

  /* 3. Mayor contraste de textos secundarios en paneles LCD TN */
  .beer-category-tag,
  .search-field input::placeholder,
  .picker-table span {
    color: #475569;
  }

  /* 4. Modales de cobro y selector de mesa más compactos en altura 720p/768p */
  .picker-card,
  .success-card {
    padding: 16px 16px 14px;
    border-radius: 16px;
  }

  .picker-card h2,
  .success-card h2 {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .payment-methods {
    margin: 10px 0;
    gap: 6px;
  }
}

@media (min-width: 1120px) and (max-width: 1366px) and (max-resolution: 1.5dppx),
(min-width: 1120px) and (max-width: 1366px) and (max-height: 820px) {
  .beer-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Preferencias de vista del catálogo (Tarjetas vs Compacta + Columnas)
   ========================================================================== */
@media (min-width: 680px) {

  body.is-order-mode #beerGrid[data-cols="3"],
  #beerGrid[data-cols="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.is-order-mode #beerGrid[data-cols="4"],
  #beerGrid[data-cols="4"] {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.is-order-mode #beerGrid[data-cols="5"],
  #beerGrid[data-cols="5"] {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  body.is-order-mode #beerGrid[data-cols="6"],
  #beerGrid[data-cols="6"] {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

body.is-order-mode #beerGrid.is-compact,
#beerGrid.is-compact {
  gap: 8px !important;
}

#beerGrid.is-compact .beer-card {
  min-height: 108px;
  contain-intrinsic-size: 0 108px;
  padding: 8px 6px;
  border-radius: 12px;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 6px rgba(11, 20, 48, 0.04);
}

#beerGrid.is-compact .beer-visual {
  width: 42px;
  height: 42px;
  margin-bottom: 4px;
  padding: 3px;
}

#beerGrid.is-compact .beer-category-tag,
#beerGrid.is-compact .beer-divider {
  display: none;
}

#beerGrid.is-compact .beer-divider-row {
  margin: 4px 0 2px;
}

#beerGrid.is-compact .beer-name {
  font-size: 12px;
  line-height: 1.2;
}

#beerGrid.is-compact .beer-price {
  font-size: 12.5px;
  margin-top: 2px;
}

.menu-view-popover {
  position: fixed;
  z-index: 120;
  width: 242px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface, #ffffff);
  border: 1px solid #cbd5e1;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-view-popover-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 4px;
}

.menu-view-option-row {
  display: flex;
  gap: 6px;
}

.menu-view-option-btn {
  flex: 1 1 0;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}

.menu-view-option-btn.is-active {
  background: var(--brand, #e11d48);
  border-color: var(--brand, #e11d48);
  color: #ffffff;
}

/* ==========================================================================
   Validación de Cierre de Turno y Control Remoto de Turnos
   ========================================================================== */
.shift-verify-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: left;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
}

.shift-verify-banner.is-pending {
  border-color: #fbbf24;
  background: #fffbeb;
  color: #92400e;
}

.shift-verify-banner.is-rejected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 12px;
  margin-top: 8px;
  background: var(--orange-soft, #fef3c7);
  border: 1px solid var(--orange-border, #fde68a);
  border-radius: 8px;
  color: #92400e;
  font-size: 0.78rem;
  line-height: 1.3;
}

.shift-banner-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.shift-banner-icon {
  font-size: 0.9rem;
  line-height: 1;
  flex-shrink: 0;
}

.shift-banner-text {
  font-size: 0.78rem;
  line-height: 1.3;
  color: #92400e;
}

.shift-banner-text strong {
  font-weight: 600;
  color: #78350f;
}

.shift-banner-reason {
  margin-left: 4px;
  color: #92400e;
  font-size: 0.78rem;
}

.shift-banner-reason em {
  font-style: normal;
  font-weight: 600;
}

.shift-banner-btn {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #92400e;
  background: #ffffff;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.shift-banner-btn:hover {
  background: #f59e0b;
  color: #ffffff;
}

.shift-verify-banner.is-approved,
.shift-verify-banner.is-balanced {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
}

.reconciliation-table {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  text-align: left;
}

.reconciliation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.reconciliation-row.is-mismatch {
  border-color: #fca5a5;
  background: #fff5f5;
}

.reconciliation-row.is-balanced {
  border-color: #86efac;
  background: #f0fdf4;
}

.reconciliation-row-title {
  display: grid;
  gap: 2px;
}

.reconciliation-row-title strong {
  font-size: 13px;
  color: var(--ink);
}

.reconciliation-row-title small {
  font-size: 11.5px;
  color: var(--muted);
}

.team-shifts-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.team-shift-card {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.team-shift-card.is-pending-verify {
  border-color: #f59e0b;
  background: #fffdf5;
}

.team-shift-card.is-rejected {
  border-color: #ef4444;
  background: #fff8f8;
}

.team-shift-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.team-shift-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.team-shift-metric {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 2px;
}

.team-shift-metric small {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}

.team-shift-metric strong {
  font-size: 13px;
  color: var(--ink);
}

.team-shift-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .team-shift-metrics {
    grid-template-columns: 1fr;
  }
}

/* Paginación de movimientos de caja y badges */
.shift-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.shift-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  background: var(--surface-muted, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  color: var(--ink, #0f172a);
  cursor: pointer;
  transition: all 0.15s ease;
}

.shift-page-btn:hover:not(:disabled) {
  background: var(--brand, #7a3cff);
  color: #ffffff;
  border-color: var(--brand, #7a3cff);
}

.shift-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.shift-page-info {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted, #64748b);
}

.shift-drawer-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--surface-muted, #f1f5f9);
  color: var(--muted, #475569);
  border: 1px solid var(--line, #e2e8f0);
  font-weight: 600;
}

/* Acciones en cabecera de turno */
.shift-hero-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shift-print-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink, #1e293b);
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.shift-print-action-btn:hover {
  background: var(--surface-muted, #f8fafc);
  border-color: var(--brand, #e11d48);
  color: var(--brand, #e11d48);
  box-shadow: 0 2px 5px rgba(225, 29, 72, 0.12);
}

.shift-print-action-btn.is-excel {
  color: #047857;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.shift-print-action-btn.is-excel:hover {
  background: #d1fae5;
  border-color: #059669;
  color: #065f46;
}

/* Chips de metadatos ordenados en cabecera */
.shift-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.shift-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface-muted, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  font-size: 0.78rem;
  color: var(--muted, #64748b);
  line-height: 1.25;
}

.shift-meta-chip strong {
  color: var(--ink, #0f172a);
  font-weight: 600;
}

.shift-meta-chip svg {
  color: var(--muted, #64748b);
  flex-shrink: 0;
}

.shift-meta-elapsed {
  color: #047857;
  font-weight: 600;
  font-size: 0.76rem;
}

/* Widgets KPI simétricos, claros y responsivos para cajera, admin y supervisor */
.shift-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 16px 0;
}

@media (max-width: 1200px) {
  .shift-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .shift-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
  }

  .shift-kpi-widget {
    padding: 10px 11px;
    border-radius: 10px;
    min-height: 98px;
  }

  .shift-kpi-val {
    font-size: 1.12rem;
  }

  .shift-kpi-label {
    font-size: 0.68rem;
  }

  .shift-meta-chip {
    padding: 3px 8px;
    font-size: 0.74rem;
  }

  .shift-hero-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
  }

  .shift-hero-actions .shift-quick-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .shift-hero-title-row {
    gap: 8px;
  }

  .shift-hero-title {
    font-size: 1.25rem;
  }

  .shift-hero-meta {
    gap: 5px;
  }

  .shift-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .shift-kpi-widget {
    padding: 9px 10px;
    min-height: 94px;
  }

  .shift-kpi-val {
    font-size: 1.05rem;
  }

  .shift-kpi-icon {
    width: 22px;
    height: 22px;
    font-size: 0.78rem;
  }
}

.shift-kpi-widget {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 94px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.shift-kpi-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.shift-kpi-widget.is-cash {
  border-left: 3.5px solid #10b981;
}

.shift-kpi-widget.is-card {
  border-left: 3.5px solid #3b82f6;
}

.shift-kpi-widget.is-transfer {
  border-left: 3.5px solid #8b5cf6;
}

.shift-kpi-widget.is-withdrawal {
  border-left: 3.5px solid #ef4444;
}

.shift-kpi-widget.is-income {
  border-left: 3.5px solid #059669;
}

.shift-kpi-widget.is-total-collected {
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-left: 3.5px solid #10b981;
}

.shift-kpi-widget.is-total-collected .shift-kpi-val,
.shift-kpi-widget.is-total-collected .shift-kpi-val.is-green {
  color: #059669;
  font-weight: 800;
}

.shift-kpi-widget.is-total-collected:hover {
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}

.shift-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.shift-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift-kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 0.85rem;
  background: var(--surface-muted, #f1f5f9);
  line-height: 1;
  flex-shrink: 0;
}

.shift-kpi-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

.shift-kpi-icon.is-cash {
  color: #059669;
  background: #ecfdf5;
}

.shift-kpi-icon.is-card {
  color: #2563eb;
  background: #eff6ff;
}

.shift-kpi-icon.is-transfer {
  color: #7c3aed;
  background: #f5f3ff;
}

.shift-kpi-icon.is-withdrawal {
  color: #dc2626;
  background: #fef2f2;
}

.shift-kpi-icon.is-income {
  color: #059669;
  background: #ecfdf5;
}

.shift-kpi-icon.is-total {
  color: #059669;
  background: #ecfdf5;
}

.shift-kpi-middle {
  display: flex;
  align-items: center;
  min-height: 18px;
  margin: 3px 0 1px;
}

.shift-kpi-val {
  display: block;
  margin-top: auto;
  padding-top: 2px;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 800;
  color: var(--ink, #0f172a);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift-kpi-widget.is-withdrawal .shift-kpi-val {
  color: #dc2626;
}

.shift-kpi-footer {
  display: flex;
  align-items: center;
  min-height: 22px;
  margin-top: 4px;
}

.shift-kpi-foot-hint {
  font-size: 0.70rem;
  font-weight: 500;
  color: var(--muted, #94a3b8);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift-kpi-detail-pill,
.shift-kpi-caja-pill {
  font-size: 0.67rem;
  font-weight: 500;
  color: var(--muted, #64748b);
  background: transparent;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.shift-kpi-caja-pill strong {
  font-weight: 600;
  color: var(--ink, #1e293b);
}

.shift-kpi-detail-pill:hover,
.shift-kpi-caja-pill:hover,
.shift-kpi-widget.is-cash:hover .shift-kpi-caja-pill,
.shift-kpi-widget.is-total-collected:hover .shift-kpi-detail-pill {
  color: #059669;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.shift-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.shift-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 15px;
  border-radius: 10px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  border: 1.5px solid transparent;
}

.shift-kpi-subnote strong {
  font-weight: 700;
  color: #047857;
}

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

.shift-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink, #334155);
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.shift-tool-btn:hover {
  background: var(--surface-muted, #f8fafc);
  border-color: var(--brand, #e11d48);
  color: var(--brand, #e11d48);
}

.shift-tool-btn.is-excel {
  color: #047857;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.shift-tool-btn.is-excel:hover {
  background: #d1fae5;
  border-color: #059669;
}

.shift-kpi-widget.is-interactive {
  cursor: pointer;
  user-select: none;
}

.shift-kpi-widget.is-interactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.shift-kpi-widget.is-interactive.is-selected-filter {
  outline: 2px solid #059669;
  outline-offset: -1px;
  background: #f0fdf4;
}

.shift-kpi-widget.is-cash.is-selected-filter {
  outline-color: #10b981;
  background: #f0fdf4;
}

.shift-kpi-widget.is-card.is-selected-filter {
  outline-color: #3b82f6;
  background: #eff6ff;
}

.shift-kpi-widget.is-transfer.is-selected-filter {
  outline-color: #8b5cf6;
  background: #f5f3ff;
}

.shift-kpi-widget.is-withdrawal.is-selected-filter {
  outline-color: #ef4444;
  background: #fef2f2;
}

.shift-kpi-widget.is-income.is-selected-filter {
  outline-color: #059669;
  background: #ecfdf5;
}

.shift-filter-chip.is-withdrawal.is-active {
  color: #dc2626;
}

.shift-filter-chip.is-income.is-active {
  color: #059669;
}

/* Modal desglose de total recaudado */
.total-collected-modal-card {
  max-width: 500px !important;
}

.total-breakdown-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.total-breakdown-section {
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 13px 15px;
}

.total-breakdown-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #64748b);
  margin-bottom: 9px;
  border-bottom: 1px solid var(--line, #f1f5f9);
  padding-bottom: 5px;
}

.total-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.total-breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--ink, #0f172a);
}

.total-breakdown-item-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.total-breakdown-item-label .icon {
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.total-breakdown-item-label .icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  vertical-align: middle;
}

.total-breakdown-item-val {
  font-weight: 600;
}

.total-breakdown-item.is-subtotal {
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px dashed var(--line, #cbd5e1);
  font-size: 0.96rem;
}

.total-breakdown-item.is-subtotal .total-breakdown-item-label strong {
  font-weight: 700;
  color: var(--ink, #0f172a);
}

.total-breakdown-item.is-subtotal .total-breakdown-item-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink, #0f172a);
}

.total-breakdown-subtotal-card,
.total-breakdown-net-card {
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-left: 4.5px solid #10b981;
  border-radius: 12px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.total-breakdown-subtotal-card .subtotal-label,
.total-breakdown-net-card .net-label {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink, #0f172a);
  display: block;
}

.total-breakdown-subtotal-card .subtotal-amount,
.total-breakdown-net-card .net-amount {
  font-size: 1.35rem;
  font-weight: 800;
  color: #059669;
}

.total-breakdown-net-card.is-plain {
  border-left: 1px solid var(--line, #e2e8f0);
}

.total-breakdown-net-card.is-plain .net-label {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink, #0f172a);
}

.total-breakdown-net-card.is-plain .net-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink, #0f172a);
}

.total-breakdown-drawer-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted, #64748b);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px dashed var(--line, #e2e8f0);
  background: transparent;
}

.shift-method-filters {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--surface-muted, #f1f5f9);
  padding: 3px;
  border-radius: 9999px;
  border: 1px solid var(--line, #e2e8f0);
}

.shift-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--muted, #64748b);
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.shift-filter-chip svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
  vertical-align: middle;
}

.shift-filter-chip:hover {
  color: var(--ink, #0f172a);
}

.shift-filter-chip.is-active {
  background: var(--surface, #ffffff);
  color: var(--ink, #0f172a);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.shift-filter-chip.is-cash.is-active {
  color: #059669;
}

.shift-filter-chip.is-card.is-active {
  color: #2563eb;
}

.shift-filter-chip.is-transfer.is-active {
  color: #7c3aed;
}

@media (max-width: 640px) {
  .shift-method-filters {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    border-radius: 10px;
    padding: 4px;
  }
  .shift-filter-chip {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}


/* Toolbar de búsqueda y filtros en tabla de turnos */
.shift-table-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.shift-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  background: var(--surface);
  flex-wrap: wrap;
}

.shift-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 240px;
  max-width: 400px;
}

.shift-search-icon {
  position: absolute;
  left: 11px;
  color: var(--muted, #94a3b8);
  pointer-events: none;
}

.shift-search-input {
  width: 100%;
  padding: 7px 32px 7px 34px;
  font-size: 0.84rem;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 9999px;
  background: var(--surface-muted, #f8fafc);
  color: var(--ink, #0f172a);
  transition: all 0.15s ease;
  outline: none;
}

.shift-search-input:focus {
  background: #ffffff;
  border-color: var(--brand, #e11d48);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.shift-search-clear {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--muted, #94a3b8);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}

.shift-search-clear:hover {
  color: var(--ink, #0f172a);
}

.shift-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 460px;
}

.shift-row-placeholder td {
  padding: 11px 14px;
  height: 49px;
  border-bottom: 1px solid var(--line-subtle, #f1f5f9);
  color: transparent;
  user-select: none;
  background: transparent !important;
}

.shift-row-placeholder:last-child td {
  border-bottom: none;
}

.shift-movements-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.shift-movements-table th {
  padding: 10px 14px;
  background: var(--surface-muted, #f8fafc);
  color: var(--muted, #64748b);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line, #e2e8f0);
  white-space: nowrap;
}

.shift-movements-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-subtle, #f1f5f9);
  vertical-align: middle;
  color: var(--ink, #1e293b);
}

.shift-movements-table tbody tr:last-child td {
  border-bottom: none;
}

.shift-movements-table tbody tr:hover td {
  background: var(--surface-muted, #f8fafc);
}

.shift-cell-time {
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--muted, #64748b);
  font-weight: 500;
}

.shift-cell-order {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.shift-order-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  letter-spacing: 0.02em;
}

.shift-table-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.shift-customer-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  font-size: 0.74rem;
  font-weight: 500;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.shift-cell-desc {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shift-cell-desc strong {
  font-size: 0.83rem;
  color: var(--ink, #0f172a);
}

.shift-cell-desc small {
  font-size: 0.75rem;
  color: var(--muted, #64748b);
}

.shift-cell-amount {
  text-align: right;
  white-space: nowrap;
  font-size: 0.86rem;
}

.shift-cell-amount.is-income strong {
  color: #16a34a;
}

.shift-cell-amount.is-withdrawal strong {
  color: #dc2626;
}

.shift-cell-action {
  text-align: center;
  white-space: nowrap;
}

.shift-row-receipt-btn,
.shift-row-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink, #334155);
  background: var(--surface-muted, #f8fafc);
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.shift-row-receipt-btn:hover,
.shift-row-view-btn:hover {
  background: var(--surface, #ffffff);
  border-color: var(--brand, #e11d48);
  color: var(--brand, #e11d48);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.shift-cell-muted {
  color: var(--muted, #94a3b8);
  font-size: 0.78rem;
}

.shift-table-empty {
  text-align: center;
  padding: 32px 16px !important;
}

.shift-empty-state-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted, #64748b);
}

.shift-empty-icon-text {
  font-size: 1.6rem;
  line-height: 1;
}

.shift-empty-state-inner p {
  margin: 0;
  font-size: 0.84rem;
}

/* =============================================================================
   VISTA DEL SUPERVISOR - TABLA DE TURNOS CERRADOS Y AUDITORÍA
   ============================================================================= */
.supervisor-tab-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  padding: 0;
  border: none;
  margin-bottom: 16px;
  max-width: 100%;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .supervisor-tab-toggle {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 6px;
    margin-bottom: 14px;
  }
}

.shift-tab-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 9999px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--surface, #ffffff);
  color: var(--muted, #64748b);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .shift-tab-pill {
    padding: 6px 12px;
    font-size: 12px;
    gap: 6px;
  }
}

.shift-tab-pill:hover {
  background: #f8fafc;
}

.shift-tab-pill .badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* Todos en rojo */
.shift-tab-pill.is-all .badge-count {
  background: #e11d48;
  color: #ffffff;
}
.shift-tab-pill.is-all:hover {
  border-color: #fca5a5;
  color: #e11d48;
}
.shift-tab-pill.is-all.is-active {
  background: #fff1f2;
  border-color: #fda4af;
  color: #e11d48;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.15);
}

/* En curso en amarillo */
.shift-tab-pill.is-open .badge-count {
  background: #eab308;
  color: #ffffff;
}
.shift-tab-pill.is-open:hover {
  border-color: #fde047;
  color: #a16207;
}
.shift-tab-pill.is-open.is-active {
  background: #fefce8;
  border-color: #facc15;
  color: #a16207;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(234, 179, 8, 0.15);
}

/* Por revisar en naranja */
.shift-tab-pill.is-pending .badge-count {
  background: #f97316;
  color: #ffffff;
}
.shift-tab-pill.is-pending:hover {
  border-color: #fed7aa;
  color: #c2410c;
}
.shift-tab-pill.is-pending.is-active {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(249, 115, 22, 0.15);
}

/* Cerrados en verde */
.shift-tab-pill.is-closed .badge-count {
  background: #10b981;
  color: #ffffff;
}
.shift-tab-pill.is-closed:hover {
  border-color: #86efac;
  color: #047857;
}
.shift-tab-pill.is-closed.is-active {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.15);
}

.supervisor-shifts-section {
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.supervisor-shifts-section .shift-table-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.supervisor-shifts-section .shift-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-height: auto;
}

.supervisor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
  min-width: 660px;
}

.supervisor-table th {
  padding: 10px 12px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  border-bottom: 1px solid var(--line, #e2e8f0);
  background: var(--surface-muted, #f8fafc);
  white-space: nowrap;
}

.supervisor-table td {
  padding: 11px 12px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line-subtle, #f1f5f9);
  color: var(--ink, #1e293b);
  font-size: 13px;
}

.supervisor-table tr.supervisor-shift-row {
  transition: background-color 0.15s ease;
}

.supervisor-table tr.supervisor-shift-row:hover {
  background-color: #f8fafc;
}

.supervisor-table tr.is-pending-review {
  background-color: #fffdf5;
}

.supervisor-table tr.is-pending-review:hover {
  background-color: #fef9c3;
}

.supervisor-table tr.is-rejected-row {
  background-color: #fff8f8;
}

.supervisor-table tr.is-rejected-row:hover {
  background-color: #fee2e2;
}

.supervisor-table th:last-child,
.supervisor-table td:last-child,
.supervisor-table .text-right {
  text-align: right !important;
  white-space: nowrap;
}

.supervisor-table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .supervisor-shifts-section {
    padding: 12px;
  }
  .supervisor-shifts-section .shift-block-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
  }
  .supervisor-table th,
  .supervisor-table td {
    padding: 8px 10px;
  }
}

.supervisor-table-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
  text-decoration: none;
  transition: all 0.15s ease;
  user-select: none;
}

.supervisor-table-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
}

.supervisor-table-btn.is-icon-only {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #cbd5e1);
  transition: all 0.15s ease, transform .18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.supervisor-table-btn.is-icon-only:hover {
  transform: scale(1.1);
}

.supervisor-table-btn.is-icon-only:active {
  transform: scale(0.95);
}

.supervisor-table-btn.is-icon-only svg {
  width: 14px;
  height: 14px;
}

/* Botón Imprimir (Naranja menú órbita al hover) */
.supervisor-table-btn.is-print {
  color: var(--muted, #64748b);
}

.supervisor-table-btn.is-print:hover {
  background: #ea580c;
  border-color: #ea580c;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(234, 88, 12, 0.4);
}

.supervisor-table-btn.is-primary {
  background: var(--brand, #e11d48);
  border: 1px solid var(--brand, #e11d48);
  color: #ffffff;
}

.supervisor-table-btn.is-primary:hover {
  background: var(--brand-hover, #be123c);
  border-color: var(--brand-hover, #be123c);
}

/* Botón Ver Detalle (Rojo corporativo al hover) */
.supervisor-table-btn.is-detail,
.supervisor-table-btn.is-secondary {
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #cbd5e1);
  color: var(--ink, #334155);
}

.supervisor-table-btn.is-detail:hover,
.supervisor-table-btn.is-secondary:hover {
  background: var(--brand, #e11d48);
  border-color: var(--brand, #e11d48);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(225, 29, 72, 0.25);
}

.supervisor-back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
}

.supervisor-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand, #e11d48);
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.supervisor-back-btn:hover {
  background: var(--brand, #e11d48);
  color: #ffffff;
  border-color: var(--brand, #e11d48);
}

.supervisor-audit-panel {
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

