/* ============================================================
   PRAXTIA DESIGN SYSTEM — v1.2
   Apple Glass / BLAAS Premium SaaS Style
   Light-first. Dark preserved. KDS exempt.
   ============================================================ */

/* ── Google Fonts already loaded via base.html (Inter) ── */

/* ============================================================
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================ */
:root {
  /* ── Backgrounds ── */
  --bg-base:        #f0f4f8;
  --bg-card:        #ffffff;
  --bg-elevated:    #f8fafc;
  --bg-hover:       #e8f0fe;

  /* ── Glass ── */
  --glass-bg:       rgba(255, 255, 255, 0.72);
  --glass-border:   rgba(255, 255, 255, 0.60);
  --glass-shadow:   0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);

  /* ── Accent Colors ── */
  --accent-primary:   #6366f1;   /* Indigo 500  */
  --accent-secondary: #8b5cf6;   /* Violet 500  */
  --accent-warning:   #f59e0b;   /* Amber 500   */
  --accent-danger:    #ef4444;   /* Red 500     */

  /* ── Gradients ── */
  --gradient-primary: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  --gradient-card:    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);

  /* ── Text ── */
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  /* ── Borders ── */
  --border-default:    #e2e8f0;
  --border-highlight:  rgba(99, 102, 241, 0.15);
  --border-focus:      #6366f1;
  /* Premium shimmer border — subtle indigo-to-violet */
  --border-premium:    rgba(99, 102, 241, 0.18);
  --border-premium-strong: rgba(99, 102, 241, 0.35);

  /* ── Border Radii ── */
  --radius-sm:  8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* ── Box Shadows ── */
  --shadow-card:   0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-float:  0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-modal:  0 24px 64px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.06);
  --glow-primary:  0 0 20px rgba(99, 102, 241, 0.18);
  --glow-secondary:0 0 20px rgba(139, 92, 246, 0.15);

  /* ── Sidebar ── */
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 76px;
}

/* ── Dark Mode Overrides ── */
body.dark-mode,
body:not(.light-mode) {
  --bg-base:        #0a0f1e;
  --bg-card:        #111827;
  --bg-elevated:    #1a2332;
  --bg-hover:       #1f2d3d;
  --glass-bg:       rgba(17, 24, 39, 0.70);
  --glass-border:   rgba(129, 140, 248, 0.12);
  --glass-shadow:   0 8px 32px rgba(0, 0, 0, 0.5);
  --accent-primary:   #818cf8;   /* Indigo 400 — brighter for dark bg */
  --gradient-primary: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
  --gradient-card:    linear-gradient(135deg, #111827 0%, #1a2332 100%);
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;   /* Bumped from #475569 for better dark-mode contrast */
  --border-default: rgba(255, 255, 255, 0.07);
  --border-highlight: rgba(129, 140, 248, 0.12);
  --border-premium:   rgba(129, 140, 248, 0.18);
  --border-premium-strong: rgba(129, 140, 248, 0.35);
  --shadow-card:   0 2px 12px rgba(0, 0, 0, 0.3);
  --glow-primary:  0 0 24px rgba(129, 140, 248, 0.28);
  --glow-secondary:0 0 24px rgba(167, 139, 250, 0.25);
}

/* ============================================================
   2. BASE RESETS & GLOBAL
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Geometric grid pattern for dark mode ── */
body.dark-mode,
body:not(.light-mode) {
  background-image:
    linear-gradient(rgba(129, 140, 248, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 140, 248, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
}

/* ── Light mode subtle pattern ── */
body.light-mode {
  background-image:
    radial-gradient(circle, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── Scrollbar Styling ── */
/* ══════════════════════════════════════════════════════════════════════
   Actions Dropdown (botón unificado ⚙️ Acciones ▾ en Centros de Reportes)
   ══════════════════════════════════════════════════════════════════════ */
.actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 280px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-highlight);
  border-radius: 12px;
  padding: 4px;
  z-index: 1000;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.25), 0 0 0 1px rgba(99,102,241,0.12);
  display: flex; flex-direction: column; gap: 0;
  animation: actions-menu-in 0.12s ease-out;
  overflow: hidden;
}
@keyframes actions-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.actions-menu.hidden { display: none; }
.actions-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  transition: background 0.1s;
  font-family: inherit;
}
.actions-item:hover, .actions-item:focus-visible {
  background: rgba(99,102,241,0.14);
  outline: none;
}
.actions-item .icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  opacity: 0.9;
}
.actions-item .texts { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.actions-item .title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.actions-item .sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: auto;
}
.actions-divider {
  height: 1px;
  background: var(--border-default);
  margin: 4px 6px;
  opacity: 0.6;
}

/* Scrollbars globales: anchos y con buen contraste (visibles sin hover) */
* { scrollbar-width: auto; scrollbar-color: rgba(148, 163, 184, 0.75) rgba(15, 23, 42, 0.25); }
body.light-mode * { scrollbar-color: rgba(71, 85, 105, 0.75) rgba(15, 23, 42, 0.12); }

::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.25);
  border-radius: 10px;
}
body.light-mode ::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.10); }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.80);
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}
body.light-mode ::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.85);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.95);
  background-clip: padding-box;
}
::-webkit-scrollbar-corner { background: transparent; }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ============================================================
   3. TYPOGRAPHY SYSTEM
   ============================================================ */
h1, .text-h1 {
  font-size: 1.75rem !important; /* Reverted to original - Base 16.5px provides the 10% */
  font-weight: 900 !important;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

h2, .text-h2 {
  font-size: 1.5rem !important; /* Reverted to original */
  font-weight: 800 !important;
  line-height: 1.3;
  color: var(--text-primary);
}

h3, .text-h3 {
  font-size: 1.25rem !important; /* Reverted to original */
  font-weight: 700 !important;
  line-height: 1.4;
  color: var(--text-primary);
}

.overline {
  font-size: 0.6rem; /* Reverted */
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.label {
  font-size: 0.75rem; /* Reverted */
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.caption {
  font-size: 0.7rem; /* Reverted */
  color: var(--text-muted);
}

/* ── Reusable Form Label ──
   Replaces: text-[10px] font-black uppercase tracking-widest + color inline styles
   Usage: <label class="form-label">Nombre</label>
*/
.form-label {
  display: block;
  font-size: 0.625rem;        /* ~10px */
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);  /* secondary, NOT muted — ensures readability in both modes */
  margin-bottom: 6px;
}

/* Variant: slightly larger form label */
.form-label-lg {
  display: block;
  font-size: 0.75rem;         /* 12px */
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ── Section Heading ──
   Replaces: text-3xl font-black uppercase tracking-tighter + color inline styles
   Usage: <h2 class="section-heading">Productos</h2>
*/
.section-heading {
  font-size: 1.875rem;        /* 30px / text-3xl */
  font-weight: 900;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--text-primary);
}

.section-heading-sm {
  font-size: 1.25rem;         /* 20px / text-xl */
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--text-primary);
}

/* ── Subtitle / Description Text ──
   Replaces: text-xs/sm + text-slate-400/500 + inline color styles
   Usage: <p class="subtitle">Descripción breve aquí</p>
*/
.subtitle {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
}

.subtitle-sm {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Stat / KPI Value ──
   Replaces: text-3xl font-black + color inline styles for monetary/numeric displays
   Usage: <span class="stat-value">$12,500.00</span>
*/
.stat-value {
  font-size: 1.875rem;        /* 30px / text-3xl */
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
}

.stat-value-sm {
  font-size: 1.25rem;         /* 20px */
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-value-lg {
  font-size: 2.5rem;          /* 40px */
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}

/* ── Text color helpers (use CSS vars, auto light/dark) ── */
.text-base-primary   { color: var(--text-primary); }
.text-base-secondary { color: var(--text-secondary); }
.text-base-muted     { color: var(--text-muted); }
.text-accent         { color: var(--accent-primary); }

/* ============================================================
   4. GLASS MORPHISM UTILITIES
   ============================================================ */

/* True frosted glass — like phone glass or Apple HUD */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Card-style glass — white frosted panel with premium tinted border */
.glass-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border-premium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), 0 0 0 0.5px rgba(99, 102, 241, 0.08) inset;
  transition: box-shadow 0.25s ease, transform 0.2s ease, border-color 0.2s;
}

.glass-card:hover {
  box-shadow: var(--shadow-float), 0 0 0 1px var(--border-premium);
}

body.dark-mode .glass-card,
body:not(.light-mode) .glass-card {
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-color: var(--border-premium);
  box-shadow: var(--shadow-card), 0 0 0 0.5px rgba(129, 140, 248, 0.06) inset;
}

body.dark-mode .glass-card:hover,
body:not(.light-mode) .glass-card:hover {
  box-shadow: var(--shadow-float), 0 0 0 1px var(--border-premium);
}

/* Strong glass — high blur, very translucent */
.glass-strong {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.70);
  box-shadow: var(--shadow-float), 0 0 0 0.5px rgba(99, 102, 241, 0.10) inset;
}

body.dark-mode .glass-strong,
body:not(.light-mode) .glass-strong {
  background: rgba(17, 24, 39, 0.88);
  backdrop-filter: blur(32px) saturate(150%);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
  border: 1px solid rgba(129, 140, 248, 0.12);
  box-shadow: var(--shadow-float), 0 0 0 0.5px rgba(129, 140, 248, 0.06) inset;
}

/* Premium card — convenience class used on tables, panels, feature cards */
.premium-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border-premium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.premium-card:hover {
  border-color: var(--border-premium-strong);
  box-shadow: var(--shadow-float), var(--glow-primary);
  transform: translateY(-2px);
}

body.dark-mode .premium-card,
body:not(.light-mode) .premium-card {
  background: rgba(17, 24, 39, 0.75);
  border-color: var(--border-premium);
}

/* ============================================================
   5. LAYOUT — SIDEBAR
   ============================================================ */
/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: var(--sidebar-width);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-right: 1px solid var(--border-premium);
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
  box-shadow: 2px 0 20px rgba(99, 102, 241, 0.06), 2px 0 4px rgba(0, 0, 0, 0.04);
}

body.dark-mode .sidebar,
body:not(.light-mode) .sidebar {
  background: rgba(13, 17, 28, 0.92);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-right-color: var(--border-premium);
  box-shadow: 2px 0 24px rgba(0, 0, 0, 0.5), 2px 0 4px rgba(129, 140, 248, 0.06);
}

.sidebar.collapsed { width: var(--sidebar-collapsed-width); }

/* ── Sidebar nav: scroll vertical con barra delgada ── */
.sidebar-nav {
  flex: 1 1 0;
  min-height: 0;            /* clave para que flex permita scroll */
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;    /* Firefox */
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.7);
}
/* En modo colapsado escondemos la barra para que no estorbe en 64px */
.sidebar.collapsed .sidebar-nav { scrollbar-width: none; }
.sidebar.collapsed .sidebar-nav::-webkit-scrollbar { display: none; }

/* Sidebar collapsed hiding */
.sidebar.collapsed .nav-link span:not(.nav-icon),
.sidebar.collapsed .brand-name,
.sidebar.collapsed .brand-sub,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .footer-text,
.sidebar.collapsed .nav-badge {
  display: none !important;
  opacity: 0; pointer-events: none;
  width: 0; height: 0; overflow: hidden;
  margin: 0; padding: 0;
}
.sidebar.collapsed .nav-link { justify-content: center; padding: 12px 0; }
.sidebar.collapsed .nav-icon { margin: 0; font-size: 1.3rem; }
.sidebar.collapsed .sidebar-brand { justify-content: center; padding: 0; }
.sidebar.collapsed .sidebar-footer { align-items: center; }
.sidebar.collapsed .sidebar-footer a { justify-content: center; }
.sidebar.collapsed .sidebar-footer .footer-logo-container { display: none; }

/* Sidebar brand — layout VERTICAL: logo arriba + textos centrados debajo */
.sidebar-brand {
  padding: 18px 16px 16px;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  justify-content: center;
  transition: all 0.3s;
}

body.dark-mode .sidebar-brand,
body:not(.light-mode) .sidebar-brand { border-bottom-color: var(--border-highlight); }

/* Logo del negocio: prominente y protagonista */
.brand-logo-img {
  max-width: 120px; max-height: 72px;
  width: auto; height: auto;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 5px;
  filter: drop-shadow(0 0 14px rgba(99, 102, 241, 0.42));
  transition: all 0.3s ease;
}
body.light-mode .brand-logo-img {
  background: rgba(15, 23, 42, 0.04);
  filter: drop-shadow(0 2px 8px rgba(15, 23, 42, 0.18));
}
.brand-logo-img:hover { transform: scale(1.03); }

.brand-logo-box {
  max-width: 140px; max-height: 88px;
  width: auto; height: auto;
  border-radius: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.brand-name {
  font-size: 0.82rem; font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.03em; display: block;
  line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}

body.light-mode .brand-name {
  background: none !important;
  -webkit-text-fill-color: #0f172a !important;
  color: #0f172a !important;
}

.brand-sub {
  font-size: 0.55rem; color: var(--text-muted);
  letter-spacing: 0.16em; font-weight: 700;
  text-transform: uppercase; display: block; margin-top: 2px;
  opacity: 0.7;
  text-align: center;
}

.brand-glow {
  position: absolute; top: -60%; left: -40%;
  width: 180%; height: 180%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.10) 0%, transparent 65%);
  pointer-events: none;
}

.sidebar-icon { font-size: 2.4rem; display: flex; align-items: center; justify-content: center; }

/* ── Modo colapsado: solo el logo en chiquito, textos ocultos ── */
.sidebar.collapsed .sidebar-brand {
  padding: 12px 0;
}
.sidebar.collapsed .brand-content {
  gap: 0 !important;
}
.sidebar.collapsed .brand-logo-img,
.sidebar.collapsed .brand-logo-box {
  max-width: 40px; max-height: 40px;
  width: auto; height: auto;
  padding: 2px;
  border-radius: 10px;
}
.sidebar.collapsed .sidebar-icon { font-size: 1.3rem; }
.sidebar.collapsed .brand-text { display: none; }

/* Nav */
nav { padding: 16px 12px; flex: 1; overflow-y: auto; }

.nav-section-title {
  font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); padding: 12px 12px 6px;
}

.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  color: var(--text-secondary);
  transition: all 0.2s ease; position: relative;
  font-weight: 500; font-size: 0.875rem;
  margin-bottom: 2px; text-decoration: none;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

body.dark-mode .nav-link:hover,
body:not(.light-mode) .nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #fff;
  background: var(--gradient-primary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent-primary) 35%, transparent),
              0 1px 4px  color-mix(in srgb, var(--accent-secondary) 20%, transparent);
  font-weight: 700;
}

body.light-mode .nav-link.active { color: #fff; }

.nav-link:not(.active):hover::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 55%;
  background: var(--accent-primary);
  border-radius: 0 4px 4px 0;
}

.nav-link .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; }

.nav-badge {
  margin-left: auto;
  background: var(--accent-danger); color: white;
  font-size: 0.6rem; font-weight: 800;
  padding: 2px 6px; border-radius: 20px;
}

/* ── Sidebar Accordion ── */
.nav-category {
    margin-bottom: 4px;
}

.nav-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: color 0.2s;
    border-radius: 8px;
}

.nav-category-header:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.nav-category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-category.expanded .nav-category-content {
    max-height: 500px;
}

.nav-category-chevron {
    font-size: 0.6rem;
    transition: transform 0.3s;
}

.nav-category.expanded .nav-category-chevron {
    transform: rotate(90deg);
}

.sidebar.collapsed .nav-category-header {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.collapsed .nav-category-chevron {
    display: none;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border-default);
}

body.dark-mode .sidebar-footer,
body:not(.light-mode) .sidebar-footer { border-top-color: var(--border-highlight); }

.sidebar-footer a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px;
  color: #f87171; font-size: 0.875rem; font-weight: 500;
  transition: all 0.2s; text-decoration: none;
}

.sidebar-footer a:hover { background: rgba(239, 68, 68, 0.08); }

/* ============================================================
   6. LAYOUT — MAIN WRAPPER & HEADER
   ============================================================ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh; display: flex;
  flex-direction: column;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-is-collapsed .main-wrapper {
  margin-left: var(--sidebar-collapsed-width);
}

/* Top header */
.top-header {
  height: 60px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-premium);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 30;
  box-shadow: 0 1px 12px rgba(99, 102, 241, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.dark-mode .top-header,
body:not(.light-mode) .top-header {
  background: rgba(10, 15, 30, 0.90);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-bottom-color: var(--border-premium);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(129, 140, 248, 0.08);
}

.top-header h2 {
  font-size: 0.8rem !important; font-weight: 700 !important;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-secondary);
}

.top-clock {
  font-family: 'Inter', monospace;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
  padding: 4px 12px; border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.18);
}

body.dark-mode .top-clock,
body:not(.light-mode) .top-clock {
  color: #818cf8;
  background: rgba(129, 140, 248, 0.08);
  border-color: rgba(129, 140, 248, 0.22);
}

/* Content area */
.content-area {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
  background: var(--bg-base);
}

body.light-mode .content-area {
  background: linear-gradient(145deg, #f0f4f8 0%, #eef2ff 40%, #ede9fe 100%);
  background-attachment: fixed;
}

/* ============================================================
   7. KPI & CHART CARDS (used by dashboard.html)
   ============================================================ */
.kpi-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border-premium);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative; overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
  box-shadow: var(--shadow-card);
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-premium-strong);
  box-shadow: var(--shadow-float), var(--glow-primary);
}

.kpi-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

body.dark-mode .kpi-card,
body:not(.light-mode) .kpi-card {
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-color: var(--border-premium);
}

body.dark-mode .kpi-card:hover,
body:not(.light-mode) .kpi-card:hover {
  border-color: var(--border-premium-strong);
  box-shadow: var(--shadow-float), var(--glow-primary);
}

.kpi-card .kpi-bg-icon {
  position: absolute; right: -8px; bottom: -10px;
  font-size: 4.5rem; opacity: 0.06; pointer-events: none;
}

.kpi-label {
  font-size: 0.65rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}

.kpi-value {
  font-size: 2rem; font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.kpi-sub { font-size: 0.7rem; color: var(--text-muted); margin-top: 6px; }

.chart-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border-premium);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chart-card:hover {
  border-color: var(--border-premium-strong);
}

body.dark-mode .chart-card,
body:not(.light-mode) .chart-card {
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-color: var(--border-premium);
}

.chart-card-title {
  font-size: 0.65rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-secondary); margin-bottom: 20px;
}

/* ============================================================
   8. BUTTON SYSTEM
   ============================================================ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gradient-primary);
  color: #ffffff; font-weight: 700; font-size: 0.875rem;
  padding: 12px 24px; border-radius: var(--radius-md);
  border: none; cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-primary) 30%, transparent);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent-primary) 40%, transparent);
  opacity: 0.95;
}

.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-primary:disabled {
  background: #e2e8f0; color: #94a3b8;
  box-shadow: none; transform: none; cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary); font-weight: 600; font-size: 0.875rem;
  padding: 12px 24px; border-radius: var(--radius-md);
  border: 1px solid var(--border-default); cursor: pointer;
  transition: all 0.2s ease; text-decoration: none;
}

.btn-secondary:hover { background: var(--bg-hover); border-color: var(--accent-primary); }

.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff; font-weight: 700; font-size: 0.875rem;
  padding: 12px 24px; border-radius: var(--radius-md);
  border: none; cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--text-secondary);
  font-weight: 600; font-size: 0.875rem;
  padding: 10px 20px; border-radius: var(--radius-md);
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.2s ease; text-decoration: none;
}

.btn-ghost:hover {
  background: var(--bg-hover); color: var(--text-primary);
  border-color: var(--border-default);
}

/* ── Cancel Button ──
   Replaces: bg-slate-700 hover:bg-slate-600 text-white font-bold rounded-xl
   Usage: <button class="btn-cancel">Cancelar</button>
*/
.btn-cancel {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary); font-weight: 700; font-size: 0.875rem;
  padding: 12px 24px; border-radius: var(--radius-md);
  border: 1px solid var(--border-default); cursor: pointer;
  transition: all 0.2s ease; text-decoration: none;
}

.btn-cancel:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

body.dark-mode .btn-cancel,
body:not(.light-mode) .btn-cancel {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
  color: var(--text-primary);
}

body.dark-mode .btn-cancel:hover,
body:not(.light-mode) .btn-cancel:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ── Small Button Variant ──
   Usage: <button class="btn-primary btn-sm">Guardar</button>
*/
.btn-sm {
  padding: 8px 16px !important;
  font-size: 0.75rem !important;
  border-radius: var(--radius-sm) !important;
}

/* ── Large Button Variant ──
   Usage: <button class="btn-primary btn-lg">Confirmar</button>
*/
.btn-lg {
  padding: 16px 32px !important;
  font-size: 1rem !important;
  border-radius: var(--radius-lg) !important;
}

/* ============================================================
   9. INPUT SYSTEM
   ============================================================ */
.input-field {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: 'Inter', sans-serif;
}

.input-field::placeholder { color: var(--text-muted); }

.input-field:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 12%, transparent);
}

body.dark-mode .input-field,
body:not(.light-mode) .input-field {
  background: var(--bg-elevated);
  border-color: var(--border-highlight);
  color: var(--text-primary);
}

/* Select fields — same as input-field but with arrow */
select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* Textarea — same as input-field but multi-line */
textarea.input-field {
  min-height: 80px;
  resize: vertical;
}

/* ── Card container for form groups ──
   Usage: <div class="form-card p-6">...</div>
*/
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

body.dark-mode .form-card,
body:not(.light-mode) .form-card {
  background: var(--bg-elevated);
  border-color: var(--border-highlight);
}

/* ============================================================
   10. BADGE SYSTEM
   ============================================================ */
.badge {
  display: inline-flex; align-items: center;
  font-size: 0.65rem; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 99px;
}

.badge-green  { background: rgba(16, 185, 129, 0.12); color: #059669; border: 1px solid rgba(16, 185, 129, 0.25); }
.badge-blue   { background: rgba(59, 130, 246, 0.12); color: #2563eb; border: 1px solid rgba(59, 130, 246, 0.25); }
.badge-amber  { background: rgba(245, 158, 11, 0.12); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.25); }
.badge-red    { background: rgba(239, 68, 68, 0.12);  color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.25); }
.badge-indigo { background: rgba(99, 102, 241, 0.12); color: #4f46e5; border: 1px solid rgba(99, 102, 241, 0.25); }

body.dark-mode .badge-green,  body:not(.light-mode) .badge-green  { color: #34d399; }
body.dark-mode .badge-blue,   body:not(.light-mode) .badge-blue   { color: #60a5fa; }
body.dark-mode .badge-amber,  body:not(.light-mode) .badge-amber  { color: #fbbf24; }
body.dark-mode .badge-red,    body:not(.light-mode) .badge-red    { color: #f87171; }
body.dark-mode .badge-indigo, body:not(.light-mode) .badge-indigo { color: #818cf8; }

/* ============================================================
   11. MODAL SYSTEM
   ============================================================ */

/* ── Modal Overlay (decorative, non-positioned) ── */
.modal-overlay {
  background: rgba(15, 23, 42, 0.60);
  backdrop-filter: blur(6px);
}

/* ── Modal Backdrop (full-screen positioned overlay) ──
   Replaces: fixed inset-0 bg-black/50 + backdrop-blur + inline rgba backgrounds
   Usage: <div class="modal-backdrop z-[100]" id="my-modal">
*/
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Variant: stronger backdrop for critical actions */
.modal-backdrop-strong {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Modal Box ── */
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  max-height: 90vh;
  overflow-y: auto;
}

body.dark-mode .modal-box,
body:not(.light-mode) .modal-box {
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ── Close Button (modal × button) ──
   Replaces: text-2xl leading-none text-slate-400 hover:text-white + inline color styles
   Usage: <button class="close-btn" onclick="closeModal()">×</button>
*/
.close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

body.dark-mode .close-btn:hover,
body:not(.light-mode) .close-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   12. TOAST NOTIFICATIONS
   ============================================================ */
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius-md);
  min-width: 280px; max-width: 380px;
  animation: toastSlideIn 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.toast-success {
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-left: 3px solid #10b981;
  color: #065f46;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
  backdrop-filter: blur(12px);
}

.toast-error {
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-left: 3px solid #ef4444;
  color: #991b1b;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.12);
  backdrop-filter: blur(12px);
}

/* ============================================================
   13. SEGMENTED CONTROL
   ============================================================ */
.segmented-control {
  display: flex;
  background: var(--bg-elevated);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  position: relative;
  gap: 2px;
}

.segmented-control button {
  flex: 1;
  padding: 8px 12px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.segmented-control button.active {
  color: #ffffff;
  background: var(--accent-primary);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-primary) 25%, transparent);
}

body.dark-mode .segmented-control {
  background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .segmented-control button.active {
  background: var(--gradient-primary);
}

body.dark-mode .toast-success,
body:not(.light-mode) .toast-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #a7f3e0;
}

body.dark-mode .toast-error,
body:not(.light-mode) .toast-error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fecaca;
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ============================================================
   13. TABLE SYSTEM
   ============================================================ */
.app-thead {
  background: color-mix(in srgb, var(--accent-primary) 10%, var(--bg-elevated));
  color: var(--accent-primary);
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em;
  border-bottom: 2px solid color-mix(in srgb, var(--accent-primary) 30%, transparent);
}

.app-thead th { padding: 14px 16px; }
.app-thead th:hover { color: var(--accent-secondary); }

.app-tbody tr {
  border-bottom: 1px solid var(--border-default);
  transition: background 0.15s;
}

.app-tbody tr:hover { background: var(--bg-hover); }

body.dark-mode .app-thead,
body:not(.light-mode) .app-thead {
  background: color-mix(in srgb, var(--accent-primary) 12%, rgba(15,23,42,0.9));
  color: var(--accent-primary);
  border-bottom-color: color-mix(in srgb, var(--accent-primary) 25%, transparent);
}

body.dark-mode .app-tbody tr,
body:not(.light-mode) .app-tbody tr {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .app-tbody tr:hover,
body:not(.light-mode) .app-tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ============================================================
   14. ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(15px, -20px) scale(1.04); }
  66%       { transform: translate(-10px, 10px) scale(0.97); }
}

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

.animate-fade-in-up { animation: fadeInUp 0.3s ease forwards; }

.table-row-animate { animation: fadeInUp 0.3s ease forwards; opacity: 0; }

/* ============================================================
   15. SPINNER
   ============================================================ */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ============================================================
   16. RESPONSIVE — SIDEBAR
   ============================================================ */
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
}

/* ============================================================
   17. POS-SPECIFIC LIGHT MODE OVERRIDES
   ============================================================ */

/* --- Product Cards premium tinted borders --- */
body.light-mode .pos-product-card {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(12px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
  border: 1px solid var(--border-premium) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  border-radius: 16px;
  transition: all 0.2s ease;
}

body.light-mode .pos-product-card:hover {
  border-color: var(--border-premium-strong) !important;
  box-shadow: var(--shadow-float), var(--glow-primary) !important;
  transform: translateY(-4px);
}

body.light-mode .pos-product-card.in-cart {
  border-color: #6366f1 !important;
  background: rgba(238, 242, 255, 0.90) !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.20), var(--glow-primary) !important;
}

body.light-mode .product-price { color: #6366f1 !important; }
body.light-mode .product-name  { color: #0f172a !important; }

body.light-mode .qty-controls {
  background: #f1f5f9 !important;
}

body.light-mode .qty-btn {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #374151 !important;
}

body.light-mode .qty-btn:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
}

body.light-mode .qty-btn-add { color: #6366f1 !important; }

body.light-mode .qty-num { color: #1e293b !important; }

body.light-mode .qty-badge {
  background: #6366f1 !important;
  color: #ffffff !important;
}

/* --- Category Tabs --- */
body.light-mode .cat-tab {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
}

body.light-mode .cat-tab:hover {
  background: #f8fafc !important;
  color: #1e293b !important;
}

body.light-mode .cat-tab-active {
  background: var(--gradient-primary) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-primary) 30%, transparent) !important;
}

/* --- POS Summary KPI cards (light mode) --- */
body.light-mode #pos-summary button {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.light-mode #pos-summary button:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-2px);
}

/* Muted gradient backgrounds on KPI cards */
body.light-mode #pos-summary .from-emerald-500\/20  { --tw-gradient-from: rgba(209,250,229,0.6) !important; }
body.light-mode #pos-summary .from-blue-500\/20     { --tw-gradient-from: rgba(219,234,254,0.6) !important; }
body.light-mode #pos-summary .from-indigo-500\/20   { --tw-gradient-from: rgba(224,231,255,0.6) !important; }
body.light-mode #pos-summary .from-fuchsia-500\/20  { --tw-gradient-from: rgba(250,232,255,0.6) !important; }

/* --- POS Cart Panel (light mode) --- */
body.light-mode #cart-items {
  background: #f8fafc !important;
}

body.light-mode .pos-cart-item-bg {
  background: var(--gradient-primary) !important;
}

/* Payment method buttons light mode base (inactive) */
body.light-mode #btn-cash:not([class*="bg-emerald-500"]),
body.light-mode #btn-card:not([class*="bg-emerald-500"]),
body.light-mode #btn-transfer:not([class*="bg-emerald-500"]),
body.light-mode #btn-credit:not([class*="bg-emerald-500"]) {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}

/* Customer selector light mode */
body.light-mode #customer-selector {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.light-mode #customer-selector input {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* --- POS Search & Controls light mode --- */
body.light-mode #pos-search {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

body.light-mode #pos-search:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.10) !important;
}

body.light-mode #pos-category-filter {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* View mode toggle (Grid/List buttons container) */
body.light-mode .view-toggle-container {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

/* ============================================================
   18. KDS DARK OVERRIDE — Kitchen stays dark, always
   ============================================================ */
body.kds-dark-override {
  background-color: #05080f !important;
  --bg-base:    #05080f !important;
  --bg-card:    #0d1117 !important;
  --bg-elevated:#1a2332 !important;
  --text-primary: #f1f5f9 !important;
  --text-secondary: #94a3b8 !important;
  --border-default: rgba(255, 255, 255, 0.06) !important;
  --border-highlight: rgba(255, 255, 255, 0.06) !important;
}

body.kds-dark-override.light-mode {
  /* Force dark even if light-mode is set globally */
  background-color: #05080f !important;
}

/* ============================================================
   19. LOGIN / REGISTER STANDALONE LIGHT MODE
   ============================================================ */
.auth-page-bg {
  background: linear-gradient(135deg, #f0f4f8 0%, #ede9fe 50%, #eef2ff 100%);
  min-height: 100vh;
}

.auth-card {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.10), 0 4px 16px rgba(0, 0, 0, 0.06);
}

.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
}

/* ============================================================
   20. CONFIRM MODAL (global)
   ============================================================ */
body.light-mode #confirm-modal .modal-box,
body.light-mode #confirm-modal [class*="modal-box"] {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light-mode #confirm-message {
  color: #0f172a;
}

/* ============================================================
   21. SCANNER MODAL (global)
   ============================================================ */
body.light-mode #global-scanner-modal > div {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light-mode #global-scanner-modal h3 {
  color: #0f172a;
}

/* ============================================================
   22. USER DROPDOWN MENU (global)
   ============================================================ */
body.light-mode #user-menu {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

body.light-mode #user-menu p.text-\[10px\] { color: #94a3b8; }
body.light-mode #user-menu .text-xs { color: #0f172a; }

/* ============================================================
   23. THEME TOGGLE BUTTON VISUAL STATES
   ============================================================ */
body.light-mode #theme-toggle {
  background: rgba(99, 102, 241, 0.08);
  border-radius: 8px;
  color: #4f46e5;
}

body.dark-mode #theme-toggle,
body:not(.light-mode) #theme-toggle {
  color: #94a3b8;
}

/* Separator in header controls */
body.light-mode .header-controls-divider {
  background: #e2e8f0;
}

/* The controls pill container in the header */
body.light-mode .header-controls-pill {
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* ============================================================
   24. MISC UTILITY OVERRIDES
   ============================================================ */

/* Ensure Inter font for ALL form elements */
input, select, textarea, button {
  font-family: 'Inter', system-ui, sans-serif;
}

/* Focus-visible ring */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Section titles */
.section-title, .modal-title, .nav-section-title {
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

/* ============================================================
   25. PRODUCT CATALOG CARD — Glass premium
   ============================================================ */
.product-card {
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border-premium);
  border-radius: 20px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: var(--shadow-card);
  animation: fadeInUp 0.4s ease forwards;
  opacity: 0;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-premium-strong);
  box-shadow: var(--shadow-float), var(--glow-primary);
}

body.dark-mode .product-card,
body:not(.light-mode) .product-card {
  background: rgba(17, 24, 39, 0.75);
  border-color: var(--border-premium);
}

/* ============================================================
   26. GLOBAL LIGHT-MODE — TAILWIND DARK CLASS OVERRIDE
   ============================================================ */

/* Remove dark hardcoded Tailwind slate backgrounds in light mode */
body.light-mode .bg-slate-950 { background-color: var(--bg-base) !important; }
body.light-mode .bg-slate-900 { background-color: var(--bg-elevated) !important; }
body.light-mode .bg-slate-800 { background-color: var(--bg-card) !important; }
body.light-mode .bg-slate-700 { background-color: var(--bg-elevated) !important; }

/* Tame dark borders in light mode */
body.light-mode .border-slate-700 { border-color: var(--border-default) !important; }
body.light-mode .border-slate-600 { border-color: var(--border-default) !important; }
body.light-mode .border-slate-800 { border-color: var(--border-default) !important; }

/* Cancel buttons using bg-slate-700 in templates */
body.light-mode button.bg-slate-700,
body.light-mode a.bg-slate-700 {
  background-color: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-default) !important;
}
body.light-mode button.bg-slate-700:hover,
body.light-mode a.bg-slate-700:hover {
  background-color: var(--bg-hover) !important;
}

/* Ensure text-white elements get proper color in light mode containers */
body.light-mode .text-white:not(button .text-white):not(.bg-emerald-600 .text-white):not(.bg-indigo-600 .text-white) {
  /* Only override in non-colored-bg contexts — handled by design system text vars */
}

/* text-slate-400/500 light mode readability — bump contrast slightly */
body.light-mode .text-slate-400 { color: #64748b !important; } /* Bump from #94a3b8 to #64748b for readability */
body.light-mode .text-slate-500 { color: #475569 !important; } /* Already decent, small bump */
body.light-mode .text-slate-300 { color: #94a3b8 !important; } /* Light slate → muted but visible */

/* Scanner region visual */
div[id^="scanner-reader__scan_region"] {
  border: 3px solid #ef4444 !important;
  border-radius: 12px !important;
}

/* ============================================================
   27. PREMIUM GRADIENT TOKENS
   ============================================================ */

/* Indigo-Violet Gradient Header */
.admin-header-gradient-navy {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.admin-header-gradient-navy .admin-header-text {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.dark-mode .admin-header-gradient-navy,
body:not(.light-mode) .admin-header-gradient-navy {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%) !important;
}

/* Contrast fixes for header controls */
body.light-mode .admin-header-gradient-navy .admin-search-input {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: #0f172a !important;
}

body.light-mode .admin-header-gradient-navy .admin-new-tenant-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(4px);
}

/* ════════════════════════════════════════════════════════════════════════════
   THEME COLOR PALETTES  —  5 opciones que el inquilino puede escoger
   Uso: <body data-theme="sky"> en base.html, inyectado desde tenant.theme_color
   Cada tema sobreescribe únicamente las variables de acento/color.
   El resto (bg, text, border-radius, shadows neutras) no cambia.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Índigo (default — ya está en :root, se repite para coherencia) ───────── */
body[data-theme="indigo"],
body[data-theme="indigo"].light-mode {
  --accent-primary:           #6366f1;
  --accent-secondary:         #8b5cf6;
  --gradient-primary:         linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  --border-focus:             #6366f1;
  --border-highlight:         rgba(99, 102, 241, 0.15);
  --border-premium:           rgba(99, 102, 241, 0.18);
  --border-premium-strong:    rgba(99, 102, 241, 0.35);
  --glow-primary:             0 0 20px rgba(99, 102, 241, 0.18);
  --glow-secondary:           0 0 20px rgba(139, 92, 246, 0.15);
  --bg-hover:                 #eef2ff;
}
body.dark-mode[data-theme="indigo"],
body:not(.light-mode)[data-theme="indigo"] {
  --accent-primary:           #818cf8;
  --accent-secondary:         #a78bfa;
  --gradient-primary:         linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
  --border-focus:             #818cf8;
  --border-highlight:         rgba(129, 140, 248, 0.12);
  --border-premium:           rgba(129, 140, 248, 0.18);
  --border-premium-strong:    rgba(129, 140, 248, 0.35);
  --glow-primary:             0 0 24px rgba(129, 140, 248, 0.28);
  --glow-secondary:           0 0 24px rgba(167, 139, 250, 0.25);
  --bg-hover:                 #1e2035;
}

/* ── Cielo (Sky Blue) ─────────────────────────────────────────────────────── */
body[data-theme="sky"],
body[data-theme="sky"].light-mode {
  --accent-primary:           #0ea5e9;
  --accent-secondary:         #06b6d4;
  --gradient-primary:         linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  --border-focus:             #0ea5e9;
  --border-highlight:         rgba(14, 165, 233, 0.15);
  --border-premium:           rgba(14, 165, 233, 0.18);
  --border-premium-strong:    rgba(14, 165, 233, 0.35);
  --glow-primary:             0 0 20px rgba(14, 165, 233, 0.20);
  --glow-secondary:           0 0 20px rgba(6, 182, 212, 0.15);
  --bg-hover:                 #e0f2fe;
}
body.dark-mode[data-theme="sky"],
body:not(.light-mode)[data-theme="sky"] {
  --accent-primary:           #38bdf8;
  --accent-secondary:         #22d3ee;
  --gradient-primary:         linear-gradient(135deg, #38bdf8 0%, #22d3ee 100%);
  --border-focus:             #38bdf8;
  --border-highlight:         rgba(56, 189, 248, 0.12);
  --border-premium:           rgba(56, 189, 248, 0.18);
  --border-premium-strong:    rgba(56, 189, 248, 0.35);
  --glow-primary:             0 0 24px rgba(56, 189, 248, 0.28);
  --glow-secondary:           0 0 24px rgba(34, 211, 238, 0.22);
  --bg-hover:                 #0c1f2e;
}

/* ── Esmeralda (Emerald Green) ────────────────────────────────────────────── */
body[data-theme="emerald"],
body[data-theme="emerald"].light-mode {
  --accent-primary:           #10b981;
  --accent-secondary:         #14b8a6;
  --gradient-primary:         linear-gradient(135deg, #34d399 0%, #10b981 100%);
  --border-focus:             #10b981;
  --border-highlight:         rgba(16, 185, 129, 0.15);
  --border-premium:           rgba(16, 185, 129, 0.18);
  --border-premium-strong:    rgba(16, 185, 129, 0.35);
  --glow-primary:             0 0 20px rgba(16, 185, 129, 0.20);
  --glow-secondary:           0 0 20px rgba(20, 184, 166, 0.15);
  --bg-hover:                 #d1fae5;
}
body.dark-mode[data-theme="emerald"],
body:not(.light-mode)[data-theme="emerald"] {
  --accent-primary:           #34d399;
  --accent-secondary:         #2dd4bf;
  --gradient-primary:         linear-gradient(135deg, #34d399 0%, #2dd4bf 100%);
  --border-focus:             #34d399;
  --border-highlight:         rgba(52, 211, 153, 0.12);
  --border-premium:           rgba(52, 211, 153, 0.18);
  --border-premium-strong:    rgba(52, 211, 153, 0.35);
  --glow-primary:             0 0 24px rgba(52, 211, 153, 0.28);
  --glow-secondary:           0 0 24px rgba(45, 212, 191, 0.22);
  --bg-hover:                 #0a2018;
}

/* ── Rosa (Rose / Pink) ───────────────────────────────────────────────────── */
body[data-theme="rose"],
body[data-theme="rose"].light-mode {
  --accent-primary:           #f43f5e;
  --accent-secondary:         #e879f9;
  --gradient-primary:         linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
  --border-focus:             #f43f5e;
  --border-highlight:         rgba(244, 63, 94, 0.15);
  --border-premium:           rgba(244, 63, 94, 0.18);
  --border-premium-strong:    rgba(244, 63, 94, 0.35);
  --glow-primary:             0 0 20px rgba(244, 63, 94, 0.20);
  --glow-secondary:           0 0 20px rgba(232, 121, 249, 0.15);
  --bg-hover:                 #ffe4e6;
}
body.dark-mode[data-theme="rose"],
body:not(.light-mode)[data-theme="rose"] {
  --accent-primary:           #fb7185;
  --accent-secondary:         #f0abfc;
  --gradient-primary:         linear-gradient(135deg, #fb7185 0%, #f0abfc 100%);
  --border-focus:             #fb7185;
  --border-highlight:         rgba(251, 113, 133, 0.12);
  --border-premium:           rgba(251, 113, 133, 0.18);
  --border-premium-strong:    rgba(251, 113, 133, 0.35);
  --glow-primary:             0 0 24px rgba(251, 113, 133, 0.28);
  --glow-secondary:           0 0 24px rgba(240, 171, 252, 0.22);
  --bg-hover:                 #2d0f14;
}

/* ── Ámbar (Amber / Orange) ───────────────────────────────────────────────── */
body[data-theme="amber"],
body[data-theme="amber"].light-mode {
  --accent-primary:           #f59e0b;
  --accent-secondary:         #f97316;
  --gradient-primary:         linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  --border-focus:             #f59e0b;
  --border-highlight:         rgba(245, 158, 11, 0.15);
  --border-premium:           rgba(245, 158, 11, 0.18);
  --border-premium-strong:    rgba(245, 158, 11, 0.35);
  --glow-primary:             0 0 20px rgba(245, 158, 11, 0.20);
  --glow-secondary:           0 0 20px rgba(249, 115, 22, 0.15);
  --bg-hover:                 #fef3c7;
}
body.dark-mode[data-theme="amber"],
body:not(.light-mode)[data-theme="amber"] {
  --accent-primary:           #fbbf24;
  --accent-secondary:         #fb923c;
  --gradient-primary:         linear-gradient(135deg, #fbbf24 0%, #fb923c 100%);
  --border-focus:             #fbbf24;
  --border-highlight:         rgba(251, 191, 36, 0.12);
  --border-premium:           rgba(251, 191, 36, 0.18);
  --border-premium-strong:    rgba(251, 191, 36, 0.35);
  --glow-primary:             0 0 24px rgba(251, 191, 36, 0.28);
  --glow-secondary:           0 0 24px rgba(251, 146, 60, 0.22);
  --bg-hover:                 #2a1a00;
}

/* ══════════════════════════════════════════════════════════════════════════════
   TEMA ADMIN — Oro Real  🏆
   Exclusivo para el Panel Maestro. No disponible para tenants.
   Señala autoridad máxima con un dorado rico y metálico.
   ══════════════════════════════════════════════════════════════════════════════ */
body[data-theme="admin"],
body[data-theme="admin"].light-mode {
  --accent-primary:           #b45309;   /* Amber-700 — oro profundo, legible */
  --accent-secondary:         #d97706;   /* Amber-600 — oro medio            */
  --gradient-primary:         linear-gradient(135deg, #d97706 0%, #b45309 50%, #92400e 100%);
  --border-focus:             #d97706;
  --border-highlight:         rgba(217, 119, 6, 0.18);
  --border-premium:           rgba(217, 119, 6, 0.22);
  --border-premium-strong:    rgba(180, 83, 9, 0.45);
  --glow-primary:             0 0 24px rgba(217, 119, 6, 0.25);
  --glow-secondary:           0 0 20px rgba(180, 83, 9, 0.20);
  --bg-hover:                 #fef3c7;
}
body.dark-mode[data-theme="admin"],
body:not(.light-mode)[data-theme="admin"] {
  --accent-primary:           #fbbf24;   /* Amber-400  — dorado brillante en oscuro */
  --accent-secondary:         #f59e0b;   /* Amber-500  — oro cálido                */
  --gradient-primary:         linear-gradient(135deg, #fcd34d 0%, #f59e0b 50%, #d97706 100%);
  --border-focus:             #fbbf24;
  --border-highlight:         rgba(251, 191, 36, 0.14);
  --border-premium:           rgba(251, 191, 36, 0.22);
  --border-premium-strong:    rgba(251, 191, 36, 0.45);
  --glow-primary:             0 0 28px rgba(251, 191, 36, 0.35);
  --glow-secondary:           0 0 24px rgba(245, 158, 11, 0.28);
  --bg-hover:                 #2a1a00;
}

/* Detalles adicionales del Panel Maestro — sidebar brand y glow especiales */
body[data-theme="admin"] .sidebar-brand .brand-glow {
  background: radial-gradient(ellipse at 50% 0%, rgba(217,119,6,0.35) 0%, transparent 70%);
}
body[data-theme="admin"] .brand-sub {
  color: #d97706 !important;
}
body.dark-mode[data-theme="admin"] .sidebar-brand .brand-glow {
  background: radial-gradient(ellipse at 50% 0%, rgba(251,191,36,0.30) 0%, transparent 70%);
}
body.dark-mode[data-theme="admin"] .brand-sub {
  color: #fbbf24 !important;
}


/* ============================================================
   COMPONENTES REUTILIZABLES — v1.3 (PR#3 UX Polish)
   NOTA: .btn/.btn-primary/.btn-danger/.btn-ghost/.btn-sm/.btn-lg
   ya existían arriba (línea ~927). Eliminamos las duplicaciones
   para que el diseño existente no cambie. Si se necesitan nuevas
   variantes usar prefijo `ps-btn-*` (praxtia-system namespace).
   ============================================================ */

/* ── Empty state ──────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-xl, 1rem);
  background: var(--bg-elevated);
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}
.empty-state-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}
.empty-state-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 28rem;
}
.empty-state-cta {
  margin-top: 1rem;
}

/* ── Modal (patrón NUEVO opt-in con prefijo ps- para evitar colisión) ──────
   BUG CORREGIDO: antes usaba `.modal-backdrop` y `.modal-content` como nombres,
   pero esas clases YA existen (línea 1133) y son usadas por pos.html y otros
   templates con utilidades Tailwind. Mi definición "ganaba" por orden de
   cascade → aplicaba opacity:0 permanente → botón Cobrar no abría modal.
   Solución: renombrar a `ps-modal-backdrop` / `ps-modal-content` (opt-in).
*/
.ps-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.ps-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.ps-modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-2xl, 1.25rem);
  max-width: 32rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.2s;
}
.ps-modal-backdrop.open .ps-modal-content {
  transform: scale(1);
}

/* ── Skeleton loader ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--bg-hover) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-md, 0.75rem);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text { height: 0.9rem; margin-bottom: 0.5rem; }
.skeleton-text:last-child { width: 70%; }

/* ── Touch optimization para POS ─────────────────────────── */
@media (pointer: coarse) {
  .btn, button { touch-action: manipulation; }
}

/* ── Prefers reduced motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .btn-loading::after,
  .skeleton {
    animation: none;
  }
  .btn:hover:not(:disabled) { transform: none; }
}

/* ── Table wrapper (para overflow-x en móvil) ────────────── */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-left: -1rem;
  margin-right: -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px) {
  .table-responsive {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
}


/* ── Tablas: scroll horizontal en móvil para evitar overflow ─── */
/* Tablas responsive: OPT-IN.
   Antes aplicaba display:block a TODAS las tablas en mobile, lo que
   rompía layouts con colspan/sticky/flex existentes. Ahora solo aplica
   a tablas con clase .table-responsive o dentro de .overflow-x-auto.
*/
@media (max-width: 768px) {
  table.table-responsive,
  .overflow-x-auto > table,
  .table-responsive-wrapper > table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
}
