/* =============================================
   GASTROFLOW — Design System & Complete Styles
   Dark Mode OLED | Glassmorphism | Tablet-first
   ============================================= */

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

/* ── TOKENS ── */
:root {
  /* Background scale */
  --bg-0: #020617;
  --bg-1: #0F172A;
  --bg-2: #1E293B;
  --bg-3: #334155;
  --bg-4: #475569;
  --bg-glass: rgba(15, 23, 42, 0.75);
  --bg-glass-light: rgba(30, 41, 59, 0.6);
  --bg-card: rgba(30, 41, 59, 0.8);

  /* Text */
  --tx-1: #F8FAFC;
  --tx-2: #CBD5E1;
  --tx-3: #94A3B8;
  --tx-4: #64748B;

  /* Brand */
  --brand:      #F97316;
  --brand-dim:  rgba(249, 115, 22, 0.15);
  --brand-glow: 0 0 20px rgba(249, 115, 22, 0.3);

  /* Table states */
  --s-libre:    #22C55E;
  --s-libre-bg: rgba(34, 197, 94, 0.12);
  --s-libre-b:  rgba(34, 197, 94, 0.3);

  --s-ocupada:    #F59E0B;
  --s-ocupada-bg: rgba(245, 158, 11, 0.12);
  --s-ocupada-b:  rgba(245, 158, 11, 0.3);

  --s-reservada:    #3B82F6;
  --s-reservada-bg: rgba(59, 130, 246, 0.12);
  --s-reservada-b:  rgba(59, 130, 246, 0.3);

  --s-cocina:    #EAB308;
  --s-cocina-bg: rgba(234, 179, 8, 0.12);
  --s-cocina-b:  rgba(234, 179, 8, 0.35);

  --s-listo:    #A855F7;
  --s-listo-bg: rgba(168, 85, 247, 0.15);
  --s-listo-b:  rgba(168, 85, 247, 0.35);

  --s-cuenta:    #EF4444;
  --s-cuenta-bg: rgba(239, 68, 68, 0.15);
  --s-cuenta-b:  rgba(239, 68, 68, 0.35);

  --s-cerrada:    #64748B;
  --s-cerrada-bg: rgba(100, 116, 139, 0.1);

  /* Borders */
  --border:       rgba(51, 65, 85, 0.8);
  --border-glass: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.12);

  /* Radius */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 24px;

  /* Shadows */
  --sh-sm: 0 2px 8px rgba(0,0,0,0.35);
  --sh-md: 0 4px 20px rgba(0,0,0,0.45);
  --sh-lg: 0 8px 40px rgba(0,0,0,0.55);

  /* Transitions */
  --t-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-normal: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:   350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sidebar-w: 240px;
  --sidebar-collapsed: 72px;
  --topbar-h: 64px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-0);
  color: var(--tx-1);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ── SCROLLBARS ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--bg-4); }

/* ── LAYOUT ── */
.gf-app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── SIDEBAR ── */
.gf-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  transition: width var(--t-normal), min-width var(--t-normal);
  z-index: 100;
  overflow: hidden;
}
.gf-sidebar.collapsed {
  width: var(--sidebar-collapsed);
  min-width: var(--sidebar-collapsed);
}

.sidebar-brand {
  padding: 20px 16px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-glass);
  min-height: 68px;
}
.brand-logo {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: linear-gradient(135deg, var(--brand), #EF4444);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--brand-glow);
}
.brand-logo svg { width: 20px; height: 20px; color: white; }
.brand-text {
  overflow: hidden;
  transition: opacity var(--t-normal), width var(--t-normal);
}
.brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--tx-1);
  white-space: nowrap;
  letter-spacing: -0.3px;
}
.brand-text span {
  font-size: 11px;
  color: var(--tx-4);
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.gf-sidebar.collapsed .brand-text { opacity: 0; width: 0; }

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  overflow-x: hidden;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--tx-4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 8px 8px 4px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--t-normal);
}
.gf-sidebar.collapsed .nav-section-label { opacity: 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: var(--r-md);
  color: var(--tx-3);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  position: relative;
  margin-bottom: 2px;
  min-height: 44px;
}
.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--tx-1);
}
.nav-item.active {
  background: var(--brand-dim);
  color: var(--brand);
}
.nav-item.active .nav-icon { color: var(--brand); }
.nav-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  color: var(--tx-4);
  transition: color var(--t-fast);
}
.nav-item:hover .nav-icon { color: var(--tx-2); }
.nav-label {
  overflow: hidden;
  transition: opacity var(--t-normal), width var(--t-normal);
  flex: 1;
}
.gf-sidebar.collapsed .nav-label { opacity: 0; width: 0; }
.nav-badge {
  background: var(--s-cuenta);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
  transition: opacity var(--t-normal);
}
.gf-sidebar.collapsed .nav-badge { opacity: 0; }

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border-glass);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast);
}
.sidebar-user:hover { background: rgba(255,255,255,0.05); }
.user-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6, #A855F7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
}
.user-info { overflow: hidden; transition: opacity var(--t-normal); }
.gf-sidebar.collapsed .user-info { opacity: 0; width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--tx-1); white-space: nowrap; }
.user-role { font-size: 11px; color: var(--tx-4); white-space: nowrap; }

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.05);
  color: var(--tx-4);
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.1); color: var(--tx-2); }
.sidebar-toggle svg { width: 14px; height: 14px; transition: transform var(--t-normal); }
.gf-sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }

/* ── MAIN ── */
.gf-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── TOPBAR ── */
.gf-topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-title { font-size: 18px; font-weight: 700; color: var(--tx-1); }
.topbar-subtitle { font-size: 13px; color: var(--tx-3); font-weight: 400; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.top-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  min-height: 36px;
}
.top-btn svg { width: 16px; height: 16px; }
.top-btn-ghost { color: var(--tx-3); background: transparent; }
.top-btn-ghost:hover { background: rgba(255,255,255,0.07); color: var(--tx-1); }
.top-btn-brand { background: var(--brand); color: white; box-shadow: var(--brand-glow); }
.top-btn-brand:hover { filter: brightness(1.1); }
.top-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border-radius: var(--r-md);
  position: relative;
}

.time-display {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-2);
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,0.05);
  padding: 6px 12px;
  border-radius: var(--r-md);
}

/* ── CONTENT ── */
.gf-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  scroll-behavior: smooth;
}

/* ── CARDS & GLASS ── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-xl);
  padding: 20px;
}
.card-sm { padding: 16px; border-radius: var(--r-lg); }
.card-lg { padding: 24px; border-radius: var(--r-2xl); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 15px; font-weight: 600; color: var(--tx-1); }
.card-subtitle { font-size: 12px; color: var(--tx-4); margin-top: 2px; }

/* ── BADGES & PILLS ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.badge-libre    { background: var(--s-libre-bg);    color: var(--s-libre);    border: 1px solid var(--s-libre-b); }
.badge-ocupada  { background: var(--s-ocupada-bg);  color: var(--s-ocupada);  border: 1px solid var(--s-ocupada-b); }
.badge-reservada{ background: var(--s-reservada-bg);color: var(--s-reservada);border: 1px solid var(--s-reservada-b); }
.badge-cocina   { background: var(--s-cocina-bg);   color: var(--s-cocina);   border: 1px solid var(--s-cocina-b); }
.badge-listo    { background: var(--s-listo-bg);    color: var(--s-listo);    border: 1px solid var(--s-listo-b); }
.badge-cuenta   { background: var(--s-cuenta-bg);   color: var(--s-cuenta);   border: 1px solid var(--s-cuenta-b); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-lg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  border: none;
  min-height: 44px;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn-primary { background: var(--brand); color: white; box-shadow: var(--brand-glow); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(249,115,22,0.4); }
.btn-primary:active { transform: translateY(0); }

.btn-success { background: var(--s-libre); color: #052e16; }
.btn-success:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-danger { background: var(--s-cuenta); color: white; }
.btn-danger:hover { filter: brightness(1.1); }

.btn-purple { background: var(--s-listo); color: white; }
.btn-purple:hover { filter: brightness(1.1); }

.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--tx-2);
  border: 1px solid var(--border-glass);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--tx-1); }

.btn-outline-brand {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
}
.btn-outline-brand:hover { background: var(--brand-dim); }

.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 36px; border-radius: var(--r-md); }
.btn-lg { padding: 14px 24px; font-size: 15px; min-height: 52px; border-radius: var(--r-xl); }
.btn-full { width: 100%; }
.btn-icon { padding: 10px; min-width: 44px; min-height: 44px; border-radius: var(--r-md); }

/* ── INPUTS ── */
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-label { font-size: 12px; font-weight: 600; color: var(--tx-3); text-transform: uppercase; letter-spacing: 0.5px; }
.input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px;
  color: var(--tx-1);
  font-size: 14px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-dim); }
.input::placeholder { color: var(--tx-4); }
.input-search {
  padding-left: 40px;
}
.input-wrapper { position: relative; }
.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tx-4);
  pointer-events: none;
}
.input-icon svg { width: 16px; height: 16px; }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--border-glass); margin: 16px 0; }

/* =============================================
   DASHBOARD
   ============================================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.dashboard-grid-bottom {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-xl);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.metric-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.08;
  transform: translate(20px, -20px);
}
.metric-card.mc-brand::after { background: var(--brand); }
.metric-card.mc-green::after { background: var(--s-libre); }
.metric-card.mc-amber::after { background: var(--s-ocupada); }
.metric-card.mc-purple::after { background: var(--s-listo); }

.metric-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.metric-icon svg { width: 20px; height: 20px; }
.mc-brand .metric-icon { background: var(--brand-dim); color: var(--brand); }
.mc-green .metric-icon { background: var(--s-libre-bg); color: var(--s-libre); }
.mc-amber .metric-icon { background: var(--s-ocupada-bg); color: var(--s-ocupada); }
.mc-purple .metric-icon { background: var(--s-listo-bg); color: var(--s-listo); }

.metric-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--tx-1);
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.metric-label { font-size: 12px; color: var(--tx-4); font-weight: 500; }
.metric-delta {
  font-size: 11px;
  font-weight: 600;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.metric-delta.up { color: var(--s-libre); }
.metric-delta.down { color: var(--s-cuenta); }

.activity-list { display: flex; flex-direction: column; gap: 8px; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--r-md);
  border: 1px solid var(--border-glass);
}
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.activity-text { flex: 1; font-size: 13px; color: var(--tx-2); }
.activity-time { font-size: 11px; color: var(--tx-4); font-variant-numeric: tabular-nums; }

.alerts-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
}
.alert-item.alert-warn { background: var(--s-cocina-bg); color: var(--s-cocina); border: 1px solid var(--s-cocina-b); }
.alert-item.alert-info { background: var(--s-reservada-bg); color: var(--s-reservada); border: 1px solid var(--s-reservada-b); }
.alert-item.alert-success { background: var(--s-listo-bg); color: var(--s-listo); border: 1px solid var(--s-listo-b); }
.alert-item svg { width: 16px; height: 16px; flex-shrink: 0; }

/* =============================================
   SALON — FLOOR PLAN
   ============================================= */
.salon-wrapper { display: flex; flex-direction: column; gap: 16px; height: 100%; }

.sector-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-glass);
  width: fit-content;
}
.sector-tab {
  padding: 8px 18px;
  border-radius: var(--r-lg);
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-3);
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}
.sector-tab:hover { color: var(--tx-1); background: rgba(255,255,255,0.05); }
.sector-tab.active { background: var(--bg-2); color: var(--tx-1); box-shadow: var(--sh-sm); }
.sector-tab .sector-count {
  background: var(--bg-3);
  color: var(--tx-3);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}
.sector-tab.active .sector-count { background: var(--brand-dim); color: var(--brand); }

.floor-canvas-wrap {
  flex: 1;
  min-height: 500px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-2xl);
  overflow: hidden;
  position: relative;
}

.floor-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 500px;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 50px 50px;
  padding: 40px;
}

.floor-label {
  position: absolute;
  top: 16px;
  left: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--tx-4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── TABLE ITEM ── */
.mesa-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform var(--t-fast), filter var(--t-fast);
  user-select: none;
}
.mesa-item:hover { transform: scale(1.06); filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5)); }
.mesa-item:active { transform: scale(0.97); }

.mesa-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── TABLE SURFACE ── */
.mesa-surface {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: var(--r-md);
  transition: all var(--t-normal);
  border: 2px solid transparent;
  position: relative;
  z-index: 2;
}
.mesa-surface.cuadrada   { width: 80px; height: 72px; }
.mesa-surface.rectangular { width: 116px; height: 72px; }
.mesa-surface.grande     { width: 160px; height: 72px; }
.mesa-surface.redonda    { width: 68px; height: 68px; border-radius: 50%; }
.mesa-surface.barra      { width: 80px; height: 44px; border-radius: var(--r-lg); }

.mesa-num {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: white;
}
.mesa-cap {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.8;
  color: white;
  display: flex;
  align-items: center;
  gap: 3px;
}
.mesa-mozo {
  font-size: 9px;
  font-weight: 600;
  opacity: 0.75;
  color: white;
  max-width: 90px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* ── MESA STATE COLORS ── */
.mesa-libre    .mesa-surface { background: var(--s-libre-bg);    border-color: var(--s-libre-b);    box-shadow: 0 0 20px rgba(34,197,94,0.15); }
.mesa-ocupada  .mesa-surface { background: var(--s-ocupada-bg);  border-color: var(--s-ocupada-b);  box-shadow: 0 0 20px rgba(245,158,11,0.15); }
.mesa-reservada .mesa-surface{ background: var(--s-reservada-bg);border-color: var(--s-reservada-b);box-shadow: 0 0 20px rgba(59,130,246,0.15); }
.mesa-cocina   .mesa-surface { background: var(--s-cocina-bg);   border-color: var(--s-cocina-b);   box-shadow: 0 0 20px rgba(234,179,8,0.2); }
.mesa-listo    .mesa-surface { background: var(--s-listo-bg);    border-color: var(--s-listo-b);    box-shadow: 0 0 20px rgba(168,85,247,0.2); }
.mesa-cuenta   .mesa-surface { background: var(--s-cuenta-bg);   border-color: var(--s-cuenta-b);   box-shadow: 0 0 20px rgba(239,68,68,0.2); }

.mesa-libre    .mesa-num { color: var(--s-libre); }
.mesa-ocupada  .mesa-num { color: var(--s-ocupada); }
.mesa-reservada .mesa-num { color: var(--s-reservada); }
.mesa-cocina   .mesa-num { color: var(--s-cocina); }
.mesa-listo    .mesa-num { color: var(--s-listo); }
.mesa-cuenta   .mesa-num { color: var(--s-cuenta); }

/* ── CHAIRS ── */
.chair {
  position: absolute;
  background: rgba(100,116,139,0.5);
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 4px;
  z-index: 1;
  transition: background var(--t-normal);
}
.chair-h { width: 22px; height: 10px; }
.chair-v { width: 10px; height: 22px; }
.chair-r { border-radius: 50%; width: 14px; height: 14px; }

/* cuadrada chairs: 2 top, 2 bottom */
.cuadrada .chair.ct1 { top: -16px; left: 12px; }
.cuadrada .chair.ct2 { top: -16px; left: 40px; }
.cuadrada .chair.cb1 { bottom: -16px; left: 12px; }
.cuadrada .chair.cb2 { bottom: -16px; left: 40px; }

/* rectangular chairs: 3 top, 3 bottom */
.rectangular .chair.ct1 { top: -16px; left: 10px; }
.rectangular .chair.ct2 { top: -16px; left: 44px; }
.rectangular .chair.ct3 { top: -16px; left: 78px; }
.rectangular .chair.cb1 { bottom: -16px; left: 10px; }
.rectangular .chair.cb2 { bottom: -16px; left: 44px; }
.rectangular .chair.cb3 { bottom: -16px; left: 78px; }

/* grande chairs: 4 top, 4 bottom + 2 sides */
.grande .chair.ct1 { top: -16px; left: 10px; }
.grande .chair.ct2 { top: -16px; left: 42px; }
.grande .chair.ct3 { top: -16px; left: 74px; }
.grande .chair.ct4 { top: -16px; left: 106px; }
.grande .chair.cb1 { bottom: -16px; left: 10px; }
.grande .chair.cb2 { bottom: -16px; left: 42px; }
.grande .chair.cb3 { bottom: -16px; left: 74px; }
.grande .chair.cb4 { bottom: -16px; left: 106px; }

/* redonda chairs: top, bottom */
.redonda .chair.ct1 { top: -16px; left: 28px; border-radius: 50%; width: 12px; height: 12px; }
.redonda .chair.cb1 { bottom: -16px; left: 28px; border-radius: 50%; width: 12px; height: 12px; }

/* barra chairs: 1 bottom each */
.barra .chair.ct1 { bottom: -14px; left: 8px; }
.barra .chair.ct2 { bottom: -14px; left: 50px; }

.mesa-item:hover .chair { background: rgba(148,163,184,0.6); }

/* ── STATUS INDICATOR ── */
.mesa-pulse {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 10;
}
.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg-1);
}
.mesa-cocina .pulse-dot  { background: var(--s-cocina); animation: pulseAnim 1.5s ease-in-out infinite; }
.mesa-listo  .pulse-dot  { background: var(--s-listo);  animation: pulseAnim 1.5s ease-in-out infinite; }
.mesa-cuenta .pulse-dot  { background: var(--s-cuenta); animation: pulseAnim 1s ease-in-out infinite; }
@keyframes pulseAnim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

/* ── LEGEND ── */
.floor-legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-lg);
  padding: 12px 16px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--tx-3);
  font-weight: 500;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* =============================================
   PEDIDOS — ORDER CREATION
   ============================================= */
.pedidos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  height: calc(100vh - var(--topbar-h) - 48px);
}

.productos-panel { display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.productos-search { flex-shrink: 0; }
.categoria-tabs-wrap {
  flex-shrink: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}
.categoria-tabs {
  display: flex;
  gap: 8px;
  width: max-content;
}
.cat-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-lg);
  font-size: 12px;
  font-weight: 600;
  color: var(--tx-3);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: all var(--t-fast);
  min-height: 36px;
  white-space: nowrap;
}
.cat-tab:hover { color: var(--tx-1); background: rgba(255,255,255,0.08); }
.cat-tab.active {
  background: var(--brand-dim);
  color: var(--brand);
  border-color: var(--brand);
}
.cat-tab-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.productos-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  align-content: start;
}

.producto-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-lg);
  padding: 16px;
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100px;
}
.producto-card:hover {
  background: rgba(249,115,22,0.08);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}
.producto-card:active { transform: translateY(0); }
.producto-nombre {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-1);
  line-height: 1.3;
}
.producto-desc { font-size: 11px; color: var(--tx-4); line-height: 1.4; }
.producto-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.producto-precio { font-size: 15px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.producto-tiempo { font-size: 10px; color: var(--tx-4); display: flex; align-items: center; gap: 3px; }
.producto-tiempo svg { width: 10px; height: 10px; }

/* ── ORDER PANEL ── */
.order-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-2xl);
  overflow: hidden;
}
.order-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.order-mesa-info { display: flex; flex-direction: column; }
.order-mesa-num { font-size: 18px; font-weight: 800; color: var(--tx-1); }
.order-meta { font-size: 12px; color: var(--tx-4); }

.order-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--tx-4);
  padding: 40px;
  text-align: center;
}
.order-empty svg { width: 40px; height: 40px; opacity: 0.4; }
.order-empty p { font-size: 13px; }

.order-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--r-md);
  border: 1px solid var(--border-glass);
  transition: all var(--t-fast);
}
.order-item:hover { background: rgba(255,255,255,0.06); }
.order-item-info { flex: 1; min-width: 0; }
.order-item-name { font-size: 13px; font-weight: 600; color: var(--tx-1); }
.order-item-obs { font-size: 11px; color: var(--tx-4); font-style: italic; margin-top: 2px; }
.order-item-price { font-size: 13px; font-weight: 700; color: var(--brand); white-space: nowrap; font-variant-numeric: tabular-nums; }

.qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.08);
  color: var(--tx-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  border: 1px solid var(--border-glass);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.qty-btn:hover { background: rgba(255,255,255,0.15); }
.qty-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--tx-1);
  min-width: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.order-footer { padding: 16px 20px; border-top: 1px solid var(--border-glass); display: flex; flex-direction: column; gap: 12px; }
.order-totals { display: flex; flex-direction: column; gap: 6px; }
.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--tx-3);
}
.order-total-row.total {
  font-size: 18px;
  font-weight: 800;
  color: var(--tx-1);
  padding-top: 6px;
  border-top: 1px solid var(--border-glass);
}
.order-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* =============================================
   COCINA — KDS
   ============================================= */
.cocina-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.cocina-stats { display: flex; gap: 12px; }
.cocina-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-lg);
  font-size: 13px;
  font-weight: 600;
}
.cocina-stat span:first-child { color: var(--tx-4); }

.kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  align-content: start;
}

.ticket {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: transform var(--t-fast);
}
.ticket:hover { transform: translateY(-2px); }

.ticket-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}
.ticket-mesa { font-size: 16px; font-weight: 800; color: var(--tx-1); }
.ticket-info { font-size: 11px; color: var(--tx-4); margin-top: 2px; }
.ticket-timer {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 4px 10px;
  border-radius: var(--r-md);
}
.ticket-timer.ok     { background: var(--s-libre-bg);  color: var(--s-libre); }
.ticket-timer.warn   { background: var(--s-cocina-bg); color: var(--s-cocina); }
.ticket-timer.danger { background: var(--s-cuenta-bg); color: var(--s-cuenta); }

.ticket-items { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.ticket-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.03);
  transition: background var(--t-fast);
}
.ticket-item:hover { background: rgba(255,255,255,0.06); }
.ticket-item-qty {
  font-size: 16px;
  font-weight: 800;
  color: var(--tx-1);
  min-width: 24px;
  font-variant-numeric: tabular-nums;
}
.ticket-item-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--tx-2); }
.ticket-item-obs { font-size: 11px; color: var(--s-cocina); font-style: italic; margin-top: 2px; }
.ticket-item-state {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.state-pendiente  { background: var(--tx-4); }
.state-preparando { background: var(--s-cocina); box-shadow: 0 0 6px var(--s-cocina); }
.state-listo      { background: var(--s-listo);  box-shadow: 0 0 6px var(--s-listo); }
.state-entregado  { background: var(--s-libre); }

.ticket-actions { padding: 12px 12px 14px; display: flex; gap: 8px; }

/* =============================================
   CAJA — PAYMENT
   ============================================= */
.caja-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 20px;
  height: calc(100vh - var(--topbar-h) - 48px);
}

.cuentas-list { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.cuenta-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-xl);
  padding: 16px 20px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.cuenta-card:hover { border-color: var(--brand); background: rgba(249,115,22,0.06); }
.cuenta-card.selected { border-color: var(--brand); background: var(--brand-dim); }
.cuenta-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.cuenta-mesa { font-size: 16px; font-weight: 800; color: var(--tx-1); }
.cuenta-mozo { font-size: 12px; color: var(--tx-4); margin-top: 2px; }
.cuenta-total-preview { font-size: 20px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.cuenta-items-preview { font-size: 12px; color: var(--tx-4); }

.payment-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-2xl);
  overflow: hidden;
}
.payment-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-glass);
}
.payment-title { font-size: 18px; font-weight: 800; color: var(--tx-1); }
.payment-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.payment-items { display: flex; flex-direction: column; gap: 6px; }
.payment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--tx-2);
}
.payment-item-price { font-weight: 700; color: var(--tx-1); font-variant-numeric: tabular-nums; }

.payment-methods { display: flex; flex-direction: column; gap: 8px; }
.payment-method-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--tx-4); margin-bottom: 4px; }
.payment-methods-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay-method-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.04);
  color: var(--tx-3);
  cursor: pointer;
  transition: all var(--t-fast);
  font-size: 12px;
  font-weight: 600;
}
.pay-method-btn svg { width: 22px; height: 22px; }
.pay-method-btn:hover { background: rgba(255,255,255,0.08); color: var(--tx-1); }
.pay-method-btn.selected { background: var(--brand-dim); color: var(--brand); border-color: var(--brand); }

.discount-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.discount-row .input { flex: 1; }
.discount-label { font-size: 12px; color: var(--tx-4); font-weight: 500; }

.payment-summary {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.payment-total-big {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.payment-total-big span:first-child { font-size: 16px; font-weight: 600; color: var(--tx-2); }
.payment-total-big .amount { font-size: 32px; font-weight: 800; color: var(--s-libre); font-variant-numeric: tabular-nums; }

.payment-footer { padding: 16px 20px; border-top: 1px solid var(--border-glass); display: flex; flex-direction: column; gap: 10px; }

/* =============================================
   MENU — PRODUCT MANAGEMENT
   ============================================= */
.menu-layout { display: flex; flex-direction: column; gap: 16px; }
.menu-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.menu-filters { display: flex; align-items: center; gap: 10px; }

.menu-table {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.menu-table-header, .menu-table-row {
  display: grid;
  grid-template-columns: 1fr 140px 100px 80px 100px 120px;
  align-items: center;
  padding: 12px 20px;
  gap: 12px;
}
.menu-table-header {
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border-glass);
  font-size: 11px;
  font-weight: 700;
  color: var(--tx-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.menu-table-row {
  border-bottom: 1px solid rgba(51,65,85,0.3);
  font-size: 13px;
  color: var(--tx-2);
  transition: background var(--t-fast);
}
.menu-table-row:last-child { border-bottom: none; }
.menu-table-row:hover { background: rgba(255,255,255,0.03); }
.menu-table-row .name { font-weight: 600; color: var(--tx-1); }
.menu-table-row .price { font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}
.status-pill.active   { background: var(--s-libre-bg); color: var(--s-libre); }
.status-pill.inactive { background: rgba(100,116,139,0.1); color: var(--tx-4); }
.row-actions { display: flex; gap: 6px; }

/* =============================================
   REPORTES — REPORTS
   ============================================= */
.reportes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-xl);
  padding: 20px;
}
.chart-title { font-size: 15px; font-weight: 600; color: var(--tx-1); margin-bottom: 4px; }
.chart-subtitle { font-size: 12px; color: var(--tx-4); margin-bottom: 16px; }

.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { font-size: 12px; color: var(--tx-3); min-width: 80px; text-align: right; }
.bar-track { flex: 1; height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s cubic-bezier(0.4,0,0.2,1); }
.bar-val { font-size: 11px; color: var(--tx-4); min-width: 50px; font-variant-numeric: tabular-nums; }

.donut-wrap { display: flex; gap: 20px; align-items: center; }
.donut-svg { flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.donut-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--tx-2); }
.donut-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-val { margin-left: auto; font-weight: 700; color: var(--tx-1); font-variant-numeric: tabular-nums; }

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-normal);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  border-radius: var(--r-2xl);
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--t-normal);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal-title { font-size: 18px; font-weight: 700; color: var(--tx-1); }
.modal-subtitle { font-size: 13px; color: var(--tx-4); margin-top: 2px; }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.07);
  color: var(--tx-3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.modal-close:hover { background: rgba(255,255,255,0.12); color: var(--tx-1); }
.modal-close svg { width: 16px; height: 16px; }

.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-glass); display: flex; gap: 10px; justify-content: flex-end; }

select.input {
  color: var(--tx-1);
  background-color: var(--bg-3);
  color-scheme: dark;
  appearance: auto;
}

select.input option,
select.input optgroup {
  color: #e5e7eb;
  background-color: #111827;
}

/* ── TABLE DETAIL MODAL ── */
.table-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-lg);
  margin-bottom: 4px;
}
.table-status-bar.libre    { background: var(--s-libre-bg);    border: 1px solid var(--s-libre-b); }
.table-status-bar.ocupada  { background: var(--s-ocupada-bg);  border: 1px solid var(--s-ocupada-b); }
.table-status-bar.cocina   { background: var(--s-cocina-bg);   border: 1px solid var(--s-cocina-b); }
.table-status-bar.listo    { background: var(--s-listo-bg);    border: 1px solid var(--s-listo-b); }
.table-status-bar.cuenta   { background: var(--s-cuenta-bg);   border: 1px solid var(--s-cuenta-b); }
.table-status-bar.reservada{ background: var(--s-reservada-bg);border: 1px solid var(--s-reservada-b); }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-item { display: flex; flex-direction: column; gap: 3px; }
.info-key { font-size: 11px; color: var(--tx-4); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.info-val { font-size: 15px; font-weight: 700; color: var(--tx-1); }

/* =============================================
   TOASTS
   ============================================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  font-size: 13px;
  font-weight: 500;
  color: var(--tx-1);
  animation: toastIn 0.3s cubic-bezier(0.4,0,0.2,1) forwards;
  cursor: pointer;
}
.toast.out { animation: toastOut 0.3s cubic-bezier(0.4,0,0.2,1) forwards; }
.toast-icon { width: 20px; height: 20px; flex-shrink: 0; }
.toast-success { border-left: 3px solid var(--s-libre); }
.toast-error   { border-left: 3px solid var(--s-cuenta); }
.toast-info    { border-left: 3px solid var(--brand); }
.toast-warning { border-left: 3px solid var(--s-cocina); }
.toast-success .toast-icon { color: var(--s-libre); }
.toast-error   .toast-icon { color: var(--s-cuenta); }
.toast-info    .toast-icon { color: var(--brand); }
.toast-warning .toast-icon { color: var(--s-cocina); }

@keyframes toastIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

/* =============================================
   UTILITIES
   ============================================= */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }
.text-muted { color: var(--tx-4); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Section heading */
.section-heading {
  font-size: 22px;
  font-weight: 800;
  color: var(--tx-1);
  letter-spacing: -0.4px;
}

/* =============================================
   RESPONSIVE — Tablet (768px)
   ============================================= */
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid-bottom { grid-template-columns: 1fr; }
  .reportes-grid { grid-template-columns: 1fr 1fr; }
  .pedidos-layout { grid-template-columns: 1fr 340px; }
  .caja-layout { grid-template-columns: 1fr 380px; }
  .menu-table-header,
  .menu-table-row { grid-template-columns: 1fr 120px 90px 80px 100px; }
  .menu-table-header > *:last-child,
  .menu-table-row > *:last-child { display: none; }
}

@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
    --bottom-nav-h: 64px;
  }
  .gf-sidebar {
    position: fixed; left: 0; top: 0;
    width: 280px; height: 100dvh;
    transform: translateX(-100%);
    transition: transform var(--t-normal);
    z-index: 200;
    box-shadow: var(--sh-lg);
  }
  .gf-sidebar.mobile-open { transform: translateX(0); }
  .gf-topbar { padding: 0 16px; }
  .gf-content { padding: 12px 14px; padding-bottom: calc(var(--bottom-nav-h) + 16px); }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .pedidos-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; }
  .caja-layout { grid-template-columns: 1fr; height: auto; }
  .order-panel { height: 400px; }
  .kds-grid { grid-template-columns: 1fr; }
  .sector-tab span:last-child { display: none; }
}
