/* ================================================
   RestoPOS - Premium POS System CSS
   Modern Dark/Light Theme for Bar & Restaurant
   ================================================ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;0,14..32,900&display=swap');

/* ─── CSS Variables ─── */
:root {
  --primary:       #6366f1;
  --primary-dark:  #4f46e5;
  --primary-light: #818cf8;
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #06b6d4;
  --sidebar-width: 260px;
  --topnav-height: 60px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --transition:    all 0.25s ease;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.15);
  --shadow:    0 4px 20px rgba(0,0,0,0.25);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.35);
}

[data-bs-theme="dark"] {
  --bg-body:    #0f172a;
  --bg-card:    #1e293b;
  --bg-sidebar: #0d1117;
  --bg-topnav:  #111827;
  --border-color: rgba(255,255,255,0.10);
  --text-muted:   rgba(255,255,255,0.45);
  --text-muted-custom: rgba(255,255,255,0.45);
  --shadow-ambient: rgba(0,0,0,0.4);
}

[data-bs-theme="light"] {
  --bg-body:    #f1f5f9;
  --bg-card:    #ffffff;
  --bg-sidebar: #1e293b;
  --bg-topnav:  #ffffff;
  --border-color: rgba(0,0,0,0.10);
  --text-muted:   rgba(0,0,0,0.5);
  --text-muted-custom: rgba(0,0,0,0.45);
  --shadow-ambient: rgba(0,0,0,0.1);
}

/* ─── Base ─── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; font-size: 14px; min-height: 100vh; }
.restpos-body { background: var(--bg-body); display: flex; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── Sidebar ─── */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh; width: var(--sidebar-width);
  background: var(--bg-sidebar); border-right: 1px solid var(--border-color);
  display: flex; flex-direction: column; z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto; overflow-x: hidden;
}
.sidebar-header {
  padding: 20px 16px 16px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border-color);
  min-height: 72px;
}
.brand-logo {
  width: 40px; height: 40px; background: var(--primary);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: white; flex-shrink: 0;
  box-shadow: 0 0 20px rgba(99,102,241,0.4);
}
.brand-title { font-size: 15px; font-weight: 700; color: white; display: block; line-height: 1.2; }
.brand-subtitle { font-size: 10px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1px; }
.sidebar-toggle-btn { color: rgba(255,255,255,0.6); padding: 4px; }

.sidebar-user {
  padding: 16px;
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.04); border-bottom: 1px solid var(--border-color);
}
.user-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: white; flex-shrink: 0; overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 13px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10px; background: rgba(99,102,241,0.2); color: var(--primary-light); padding: 2px 8px; border-radius: 20px; display: inline-block; }

.sidebar-nav { list-style: none; padding: 12px 0; margin: 0; flex: 1; }
.sidebar-nav .nav-section {
  padding: 12px 20px 4px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.25);
}
.sidebar-nav .nav-item { padding: 2px 8px; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--border-radius-sm);
  color: rgba(255,255,255,0.65); text-decoration: none;
  transition: var(--transition); font-size: 13.5px; font-weight: 500;
}
.sidebar-nav .nav-link i { font-size: 16px; width: 20px; flex-shrink: 0; }
.sidebar-nav .nav-link:hover { color: white; background: rgba(255,255,255,0.08); }
.sidebar-nav .nav-link.active {
  color: white; background: rgba(99,102,241,0.25);
  border-left: 3px solid var(--primary); padding-left: 9px;
}
.sidebar-nav .nav-link.active i { color: var(--primary-light); }

.sidebar-footer {
  padding: 12px 8px; border-top: 1px solid var(--border-color);
}
.sidebar-footer .nav-link { padding: 8px 12px; color: rgba(255,255,255,0.5); font-size: 13px; display: flex; align-items: center; gap: 8px; border-radius: var(--border-radius-sm); }
.sidebar-footer .nav-link:hover { color: white; background: rgba(255,255,255,0.06); }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 999; }

/* ─── Main Content ─── */
.main-content {
  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);
  flex: 1;
}

/* ─── Topnav ─── */
.topnav {
  position: sticky; top: 0; z-index: 100;
  height: var(--topnav-height);
  background: var(--bg-topnav);
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  backdrop-filter: blur(12px);
}
[data-bs-theme="light"] .topnav { box-shadow: 0 1px 8px rgba(0,0,0,0.08); border-bottom-color: rgba(0,0,0,0.08); }
.topnav-breadcrumb h5 { font-size: 15px; font-weight: 600; }
.topnav-actions { display: flex; align-items: center; gap: 4px; }
.btn-ghost { background: transparent; border: none; padding: 8px 10px; border-radius: var(--border-radius-sm); color: inherit; transition: var(--transition); }
.btn-ghost:hover { background: rgba(99,102,241,0.1); color: var(--primary); }
.sidebar-toggle { display: none; }
.user-btn { border-radius: 30px !important; display: flex; align-items: center; }
.user-avatar-sm {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--info));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white; flex-shrink: 0;
}

/* ─── Page Content ─── */
.page-content { padding: 24px; flex: 1; }
.page-footer { padding: 12px 24px; border-top: 1px solid var(--border-color); font-size: 12px; color: var(--text-muted-custom); display: flex; align-items: center; }

/* ─── Cards ─── */
.card { border: 1px solid var(--border-color); border-radius: var(--border-radius); background: var(--bg-card); box-shadow: 0 2px 10px var(--shadow-ambient); }
.card-glass { background: var(--bg-card); border: 1px solid var(--border-color); backdrop-filter: blur(8px); border-radius: var(--border-radius); box-shadow: 0 2px 10px var(--shadow-ambient); }
[data-bs-theme="light"] .card, [data-bs-theme="light"] .card-glass { box-shadow: 0 1px 8px rgba(0,0,0,0.07); }
.card:hover { box-shadow: 0 4px 20px var(--shadow-ambient); }
.card-header { border-bottom: 1px solid var(--border-color); padding: 14px 20px; background: transparent; }

/* ─── KPI Cards ─── */
.kpi-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px; border-radius: var(--border-radius);
  border: 1px solid var(--border-color); background: var(--bg-card);
  transition: var(--transition); cursor: default;
  box-shadow: 0 2px 10px var(--shadow-ambient);
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-icon { width: 52px; height: 52px; border-radius: var(--border-radius-sm); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.kpi-ventas .kpi-icon { background: rgba(16,185,129,0.15); color: var(--success); }
.kpi-mesas .kpi-icon  { background: rgba(99,102,241,0.15); color: var(--primary); }
.kpi-pedidos .kpi-icon { background: rgba(245,158,11,0.15); color: var(--warning); }
.kpi-inventario .kpi-icon { background: rgba(239,68,68,0.15); color: var(--danger); }
.kpi-value { font-size: 22px; font-weight: 800; line-height: 1.2; }
.kpi-label { font-size: 13px; font-weight: 500; opacity: 0.7; }
.kpi-sub { font-size: 12px; opacity: 0.5; }

/* ─── Rank Badge ─── */
.rank-badge { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.rank-1 { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.rank-2 { background: linear-gradient(135deg, #9ca3af, #6b7280); color: white; }
.rank-3 { background: linear-gradient(135deg, #d97706, #92400e); color: white; }
.rank-4, .rank-5 { background: rgba(99,102,241,0.15); color: var(--primary); }

/* ─── Mesa Legend ─── */
.mesa-legend { display: flex; flex-direction: column; gap: 6px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ─── Product Mini ─── */
.product-mini-img { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; background: rgba(99,102,241,0.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.product-mini-img img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Flash Alert ─── */
.alert-floating { position: fixed; top: 80px; right: 20px; z-index: 9999; min-width: 300px; max-width: 400px; animation: slideInRight 0.3s ease; box-shadow: var(--shadow); }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── Notification Dropdown ─── */
.notification-dropdown { width: 320px; max-height: 400px; overflow-y: auto; }
.notification-dropdown .dropdown-header { padding: 12px 16px; border-bottom: 1px solid var(--border-color); font-size: 13px; font-weight: 600; }

/* ─── Quick Search ─── */
.kbd-hint { position: absolute; right: 50px; top: 50%; transform: translateY(-50%); background: rgba(99,102,241,0.1); color: var(--primary); padding: 2px 8px; border-radius: 6px; font-size: 11px; font-family: monospace; }

/* ─── ==================== ─── */
/* ─── MESAS VIEW           ─── */
/* ─── ==================== ─── */

.mesa-stats-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--bg-card);
  border: 1px solid var(--border-color); border-radius: var(--border-radius);
  box-shadow: 0 1px 6px var(--shadow-ambient);
}
.stat-pill {
  display: flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: 20px; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: var(--transition);
}
.stat-disponible { background: rgba(16,185,129,0.15); color: var(--success); }
.stat-disponible:hover { background: rgba(16,185,129,0.3); }
.stat-ocupada { background: rgba(239,68,68,0.15); color: var(--danger); }
.stat-ocupada:hover { background: rgba(239,68,68,0.3); }
.stat-reservada { background: rgba(99,102,241,0.15); color: var(--primary); }
.stat-reservada:hover { background: rgba(99,102,241,0.3); }
.stat-pendiente { background: rgba(245,158,11,0.15); color: var(--warning); }
.stat-pendiente:hover { background: rgba(245,158,11,0.3); }
.zona-tabs { gap: 4px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.zona-tabs::-webkit-scrollbar { height: 3px; }

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

/* ─── Mesa Card ─── */
.mesa-card {
  position: relative; border-radius: var(--border-radius);
  border: 2px solid var(--border-color); background: var(--bg-card);
  cursor: pointer; transition: all 0.2s ease;
  overflow: hidden; display: flex; flex-direction: column;
  min-height: 160px; user-select: none;
}
.mesa-card:hover { transform: scale(1.03); box-shadow: var(--shadow); z-index: 2; }
.mesa-card:active { transform: scale(0.98); }

/* Mesa estados */
.mesa-disponible { border-color: rgba(16,185,129,0.4); }
.mesa-disponible::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--success); }
.mesa-ocupada { border-color: rgba(239,68,68,0.5); background: rgba(239,68,68,0.04); }
.mesa-ocupada::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--danger); }
.mesa-reservada { border-color: rgba(99,102,241,0.5); background: rgba(99,102,241,0.04); }
.mesa-reservada::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--primary); }
.mesa-pendiente { border-color: rgba(245,158,11,0.5); background: rgba(245,158,11,0.04); animation: pulseWarning 2s infinite; }
.mesa-pendiente::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--warning); }
.mesa-mantenimiento { opacity: 0.5; border-style: dashed; }
.mesa-redonda { border-radius: 50%; }
.mesa-barra { border-radius: 6px; }

@keyframes pulseWarning {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(245,158,11,0); }
}

.mesa-card-header {
  padding: 10px 12px 6px;
  display: flex; justify-content: space-between; align-items: center;
}
.mesa-numero { font-size: 22px; font-weight: 800; line-height: 1; }
.mesa-estado-badge { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 6px; border-radius: 10px; opacity: 0.75; }
.mesa-disponible .mesa-estado-badge { background: rgba(16,185,129,0.2); color: var(--success); }
.mesa-ocupada .mesa-estado-badge { background: rgba(239,68,68,0.2); color: var(--danger); }
.mesa-reservada .mesa-estado-badge { background: rgba(99,102,241,0.2); color: var(--primary-light); }
.mesa-pendiente .mesa-estado-badge { background: rgba(245,158,11,0.2); color: var(--warning); }

.mesa-card-body { padding: 4px 12px 10px; flex: 1; }
.mesa-nombre { font-size: 12px; font-weight: 500; opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mesa-info { font-size: 11px; opacity: 0.5; margin-top: 2px; }
.mesa-tiempo { font-size: 11px; opacity: 0.65; margin-top: 4px; }
.mesa-total { font-size: 14px; font-weight: 700; color: var(--success); margin-top: 4px; }

.mesa-card-actions { padding: 8px; border-top: 1px solid var(--border-color); }
.btn-mesa-action {
  width: 100%; padding: 6px; border-radius: 6px; border: none;
  font-size: 11px; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.btn-abrir  { background: rgba(16,185,129,0.15); color: var(--success); }
.btn-abrir:hover { background: var(--success); color: white; }
.btn-ver    { background: rgba(99,102,241,0.15); color: var(--primary); }
.btn-ver:hover { background: var(--primary); color: white; }
.btn-cobrar { background: rgba(245,158,11,0.15); color: var(--warning); }
.btn-cobrar:hover { background: var(--warning); color: white; }

/* ─── POS Index: Zona Tabs ─── */
.pos-zona-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-zona-tab {
  padding: 7px 16px; border-radius: 20px;
  border: 1px solid var(--border-color); background: transparent;
  color: var(--text-muted-custom); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s ease;
}
.pos-zona-tab:hover { border-color: var(--primary); color: var(--primary-light); background: rgba(99,102,241,0.08); }
.pos-zona-tab.active { background: var(--primary); border-color: var(--primary); color: white; box-shadow: 0 2px 8px rgba(99,102,241,0.35); }

/* ─── POS Index: Stat Pills ─── */
.pos-stat-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.pos-stat-pill i { font-size: 8px; }

/* ─── Mesa Panel ─── */
.mesa-panel {
  position: fixed; right: -360px; top: 0; bottom: 0; width: 340px;
  background: var(--bg-card); border-left: 1px solid var(--border-color);
  z-index: 1050; display: flex; flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
.mesa-panel.open { right: 0; }
.mesa-panel-overlay { display: none; position: fixed; inset: 0; z-index: 1049; }
.mesa-panel-overlay.show { display: block; }
.mesa-panel-header { padding: 16px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.mesa-panel-body { padding: 16px; flex: 1; }
.panel-mesa-info { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-status-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel-item { background: rgba(255,255,255,0.04); border-radius: 8px; padding: 10px; }
[data-bs-theme="light"] .panel-item { background: rgba(0,0,0,0.04); }
.panel-actions { display: flex; flex-direction: column; gap: 8px; }

/* ─── ==================== ─── */
/* ─── POS VIEW             ─── */
/* ─── ==================== ─── */
.pos-body { background: #0d1117; margin: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.pos-topbar {
  height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: #111827; border-bottom: 1px solid rgba(255,255,255,0.06); flex-shrink: 0;
}
.pos-topbar-left, .pos-topbar-right { display: flex; align-items: center; gap: 8px; min-width: 180px; }
.pos-topbar-center { flex: 1; text-align: center; }
.pos-topbar-right { justify-content: flex-end; }
.pos-brand { font-weight: 700; font-size: 14px; color: var(--primary-light); }
.pos-title { font-weight: 600; font-size: 14px; }
.pos-time { font-size: 13px; opacity: 0.6; font-variant-numeric: tabular-nums; }
.pos-main { flex: 1; overflow: hidden; }

.pos-container { display: flex; height: 100%; }

/* Products Panel */
.pos-products-panel {
  flex: 1; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,0.06);
  overflow: hidden; min-width: 0;
}
.pos-search-bar { padding: 12px; background: #111827; border-bottom: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; }
.pos-search-bar .form-control, .pos-search-bar .input-group-text { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: white; }
.pos-search-bar .form-control::placeholder { color: rgba(255,255,255,0.3); }

.pos-cat-tabs {
  display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; flex-shrink: 0;
  background: #0d1117; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.pos-cat-tabs::-webkit-scrollbar { height: 2px; }
.cat-tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 14px; border-radius: var(--border-radius-sm); border: 1px solid rgba(255,255,255,0.08);
  background: transparent; color: rgba(255,255,255,0.55); font-size: 11px; font-weight: 500;
  cursor: pointer; transition: var(--transition); white-space: nowrap; flex-shrink: 0;
}
.cat-tab i { font-size: 16px; }
.cat-tab:hover { background: rgba(99,102,241,0.1); color: white; border-color: rgba(99,102,241,0.3); }
.cat-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

.pos-products-grid {
  flex: 1; overflow-y: auto; padding: 12px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px;
  align-content: start;
}
.pos-product-card {
  border: 1px solid rgba(255,255,255,0.07); border-radius: var(--border-radius-sm);
  background: rgba(255,255,255,0.04); cursor: pointer;
  transition: all 0.15s ease; overflow: hidden;
  display: flex; flex-direction: column;
}
.pos-product-card:hover { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.4); transform: scale(1.02); }
.pos-product-card:active { transform: scale(0.97); }
.pos-product-card.agotado { opacity: 0.4; cursor: not-allowed; }
.pos-product-card.agotado:hover { transform: none; background: rgba(255,255,255,0.04); }

.product-img-container { position: relative; aspect-ratio: 1; overflow: hidden; }
.product-img-container img { width: 100%; height: 100%; object-fit: cover; }
.product-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: rgba(99,102,241,0.08); }
.agotado-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--danger); text-transform: uppercase; letter-spacing: 1px; }
.stock-low-badge { position: absolute; top: 4px; right: 4px; background: var(--warning); color: black; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 10px; }

.product-info { padding: 8px 10px 10px; }
.product-name { font-size: 12px; font-weight: 600; line-height: 1.3; margin-bottom: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-cat { font-size: 10px; opacity: 0.45; margin-bottom: 4px; }
.product-price { font-size: 13px; font-weight: 700; color: var(--success); }

/* Order Panel */
.pos-order-panel {
  width: 360px; flex-shrink: 0; display: flex; flex-direction: column;
  background: #0d1117; border-left: 1px solid rgba(255,255,255,0.06);
}
.pos-order-header {
  padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; justify-content: space-between; align-items: center;
  background: #111827; flex-shrink: 0;
}
.mesa-badge { display: flex; align-items: center; gap: 6px; background: rgba(99,102,241,0.2); color: var(--primary-light); padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.pos-order-meta { padding: 8px 14px; font-size: 11px; opacity: 0.5; display: flex; gap: 8px; border-bottom: 1px solid rgba(255,255,255,0.04); flex-shrink: 0; }

.pos-items-list { flex: 1; overflow-y: auto; padding: 8px; }
.pos-empty-order { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; opacity: 0.4; text-align: center; }

.pos-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 8px;
  border-radius: var(--border-radius-sm); margin-bottom: 4px;
  background: rgba(255,255,255,0.04); transition: var(--transition);
}
.pos-item:hover { background: rgba(255,255,255,0.07); }
.pos-item-info { flex: 1; min-width: 0; }
.pos-item-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-item-nota { font-size: 10px; opacity: 0.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-item-price { font-size: 11px; opacity: 0.5; }
.pos-item-qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.qty-btn { width: 24px; height: 24px; border-radius: 50%; background: rgba(99,102,241,0.15); border: none; color: var(--primary-light); font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); padding: 0; }
.qty-btn:hover { background: var(--primary); color: white; }
.qty-value { font-size: 13px; font-weight: 700; min-width: 20px; text-align: center; }
.pos-item-subtotal { font-size: 13px; font-weight: 700; color: var(--success); white-space: nowrap; flex-shrink: 0; min-width: 70px; text-align: right; }

.pos-order-totals { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,0.06); background: rgba(0,0,0,0.2); flex-shrink: 0; }
.total-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; opacity: 0.7; }
.total-final { font-size: 17px; font-weight: 800; opacity: 1; color: var(--success); padding-top: 8px; margin-top: 4px; border-top: 1px solid rgba(255,255,255,0.06); }

.pos-actions { padding: 12px; border-top: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; }

/* Payment Methods */
.payment-methods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.payment-method-btn {
  padding: 12px 6px; border-radius: var(--border-radius-sm); border: 2px solid var(--border-color);
  text-align: center; cursor: pointer; transition: var(--transition); font-size: 11px; font-weight: 500;
  background: transparent;
}
.payment-method-btn:hover { border-color: var(--primary); background: rgba(99,102,241,0.08); }
.payment-method-btn.active { border-color: var(--primary); background: rgba(99,102,241,0.15); color: var(--primary-light); }

.cambio-display { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.2); border-radius: var(--border-radius-sm); padding: 16px; text-align: center; height: 100%; display: flex; align-items: center; justify-content: center; }
.cobrar-resumen { border: 1px solid var(--border-color); }

/* Cliente suggestions */
.cliente-suggestions { border: 1px solid var(--border-color); border-radius: 0 0 8px 8px; max-height: 160px; overflow-y: auto; background: var(--bg-card); }
.cliente-suggestion-item { padding: 10px 12px; cursor: pointer; font-size: 13px; transition: var(--transition); }
.cliente-suggestion-item:hover { background: rgba(99,102,241,0.1); }

/* Nota suggestions */
.nota-suggestions { display: flex; flex-wrap: wrap; gap: 4px; }

/* ─── ==================== ─── */
/* ─── KITCHEN VIEW         ─── */
/* ─── ==================== ─── */
.kitchen-body { background: #0a0a0a; color: white; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.kitchen-header { padding: 12px 20px; background: #111; border-bottom: 2px solid #222; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.kitchen-main { flex: 1; overflow-y: auto; padding: 16px; }
.kitchen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-content: start; }

.comanda-card {
  background: #1a1a1a; border: 1px solid #333; border-radius: 12px; overflow: hidden;
  transition: var(--transition);
}
.comanda-card.urgente { border-color: var(--danger); animation: pulseRed 1.5s infinite; }
.comanda-card.lista { border-color: var(--success); opacity: 0.7; }
@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}
.comanda-header { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; background: #222; }
.comanda-mesa { font-size: 20px; font-weight: 800; }
.comanda-tiempo { font-size: 12px; opacity: 0.5; font-variant-numeric: tabular-nums; }
.comanda-items { padding: 12px; }
.comanda-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #333; }
.comanda-item:last-child { border-bottom: none; }
.comanda-item-qty { background: var(--primary); color: white; font-weight: 800; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.comanda-item-nombre { flex: 1; font-size: 14px; font-weight: 500; margin: 0 10px; }
.comanda-item-nota { font-size: 11px; color: var(--warning); opacity: 0.8; }
.comanda-actions { padding: 12px; border-top: 1px solid #333; display: flex; gap: 8px; }
.btn-comanda { flex: 1; padding: 10px; border-radius: 8px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-preparando { background: rgba(245,158,11,0.2); color: var(--warning); border: 1px solid rgba(245,158,11,0.3); }
.btn-preparando:hover { background: var(--warning); color: black; }
.btn-listo { background: rgba(16,185,129,0.2); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.btn-listo:hover { background: var(--success); color: white; }

/* ─── Auth ─── */
.auth-body { background: #0f172a; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.auth-shapes .shape { position: absolute; border-radius: 50%; opacity: 0.06; }
.shape-1 { width: 400px; height: 400px; background: var(--primary); top: -100px; right: -100px; animation: float 8s ease-in-out infinite; }
.shape-2 { width: 300px; height: 300px; background: var(--info); bottom: -80px; left: -80px; animation: float 10s ease-in-out infinite reverse; }
.shape-3 { width: 200px; height: 200px; background: var(--success); top: 50%; left: 40%; animation: float 6s ease-in-out infinite 2s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

.auth-container { position: relative; z-index: 1; width: 100%; max-width: 420px; padding: 20px; }
.auth-card { background: rgba(30,41,59,0.9); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; padding: 36px; backdrop-filter: blur(20px); box-shadow: var(--shadow-lg); }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-icon { width: 64px; height: 64px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: white; margin: 0 auto 12px; box-shadow: 0 0 30px rgba(99,102,241,0.4); }
.auth-title { font-size: 24px; font-weight: 800; color: white; margin-bottom: 4px; }
.auth-subtitle { color: rgba(255,255,255,0.4); font-size: 13px; }
.btn-login { padding: 14px; font-size: 15px; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border: none; border-radius: 10px; transition: var(--transition); }
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,0.4); }
.auth-footer { text-align: center; }
.demo-hint { text-align: center; padding: 8px 12px; background: rgba(99,102,241,0.1); border-radius: 8px; border: 1px solid rgba(99,102,241,0.2); }

/* ─── Toast ─── */
.toast { border-radius: var(--border-radius-sm); border: 1px solid var(--border-color); box-shadow: 0 4px 16px var(--shadow-ambient); }
[data-bs-theme="light"] .toast { background: #fff; }

/* ─── Productos ─── */
.product-grid-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }

/* ─── Instalador ─── */
.install-container { max-width: 600px; margin: 40px auto; padding: 20px; }
.install-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px; padding: 40px; }
.install-header { text-align: center; margin-bottom: 30px; }
.install-icon { font-size: 48px; color: var(--primary); margin-bottom: 12px; display: block; }

/* ─── Responsive ─── */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .main-content { margin-left: 0 !important; }
  .sidebar-toggle { display: block !important; }
  .mesas-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 768px) {
  .pos-container { flex-direction: column; }
  .pos-order-panel { width: 100%; height: 50vh; border-left: none; border-top: 1px solid rgba(255,255,255,0.06); }
  .pos-products-panel { height: 50vh; }
  .pos-products-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .payment-methods { grid-template-columns: repeat(3, 1fr); }
  .page-content { padding: 16px; }
  .mesa-panel { width: 100%; right: -100%; }
  .kpi-card { padding: 14px; }
  .kpi-value { font-size: 18px; }
}

@media (max-width: 480px) {
  .kpi-card { flex-direction: column; text-align: center; gap: 8px; }
  .mesas-grid { grid-template-columns: repeat(2, 1fr); }
  .mesa-numero { font-size: 18px; }
}

/* ─── Utilities ─── */
.text-purple { color: #a855f7; }
.bg-purple { background-color: #a855f7; }
.border-0 { border-width: 0 !important; }
.gap-2 { gap: 0.5rem; }
.rotate-180 { transform: rotate(180deg); }

/* ─── Table styles ─── */
.table-hover tbody tr:hover { background: rgba(99,102,241,0.05); }
.table th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.6; }

/* ─── Form controls dark ─── */
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 0.2rem rgba(99,102,241,0.15); }

/* ─── Badge estado productos ─── */
.badge-activo { background: rgba(16,185,129,0.15); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.badge-inactivo { background: rgba(107,114,128,0.15); color: #9ca3af; border: 1px solid rgba(107,114,128,0.2); }

/* Fade in animation */
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Loading spinner */
.loading-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999; display: flex; align-items: center; justify-content: center; }

/* ─── ==================== ─── */
/* ─── NEW COMPONENTS        ─── */
/* ─── ==================== ─── */

/* ─── Page Header ─── */
.page-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px; padding: 20px 24px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 6px var(--shadow-ambient);
}
.page-header-icon {
  width: 48px; height: 48px; border-radius: var(--border-radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.ph-primary { background: rgba(99,102,241,0.15); color: var(--primary); }
.ph-success { background: rgba(16,185,129,0.15); color: var(--success); }
.ph-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.ph-danger  { background: rgba(239,68,68,0.15); color: var(--danger); }
.ph-info    { background: rgba(6,182,212,0.15); color: var(--info); }
.ph-purple  { background: rgba(168,85,247,0.15); color: #a855f7; }
.page-header-title { font-size: 20px; font-weight: 700; margin: 0; line-height: 1.2; }
.page-header-sub { font-size: 13px; opacity: 0.45; margin: 3px 0 0; }
.page-header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ─── Empty State ─── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 64px 20px; text-align: center;
}
.empty-state-icon { font-size: 52px; opacity: 0.18; margin-bottom: 16px; display: block; }
.empty-state-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.empty-state-text { font-size: 13px; opacity: 0.45; max-width: 280px; line-height: 1.6; }

/* ─── Stat Cards ─── */
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--border-radius); padding: 20px 16px; text-align: center;
  transition: var(--transition); box-shadow: 0 2px 10px var(--shadow-ambient);
}
[data-bs-theme="light"] .stat-card { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card-value { font-size: 28px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-card-label { font-size: 11px; font-weight: 600; opacity: 0.5; text-transform: uppercase; letter-spacing: .5px; }
.stat-card-primary { border-top: 3px solid var(--primary); }
.stat-card-success { border-top: 3px solid var(--success); }
.stat-card-warning { border-top: 3px solid var(--warning); }
.stat-card-danger  { border-top: 3px solid var(--danger); }
.stat-card-primary .stat-card-value { color: var(--primary); }
.stat-card-success .stat-card-value { color: var(--success); }
.stat-card-warning .stat-card-value { color: var(--warning); }
.stat-card-danger  .stat-card-value { color: var(--danger); }

/* ─── KPI accent left-border ─── */
.kpi-accent-primary { border-left: 4px solid var(--primary) !important; }
.kpi-accent-success { border-left: 4px solid var(--success) !important; }
.kpi-accent-warning { border-left: 4px solid var(--warning) !important; }
.kpi-accent-danger  { border-left: 4px solid var(--danger) !important; }
.kpi-accent-info    { border-left: 4px solid var(--info) !important; }

/* ─── Role Badges ─── */
.role-badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.role-superadmin { background: rgba(239,68,68,0.15); color: #ef4444; }
.role-admin      { background: rgba(245,158,11,0.15); color: #f59e0b; }
.role-cajero     { background: rgba(6,182,212,0.15);  color: #06b6d4; }
.role-mesero     { background: rgba(16,185,129,0.15); color: #10b981; }
.role-bartender  { background: rgba(99,102,241,0.15); color: #6366f1; }
.role-cocina     { background: rgba(107,114,128,0.15); color: #9ca3af; }

/* ─── Activity Feed ─── */
.activity-feed { display: flex; flex-direction: column; }
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border-color);
  transition: background 0.15s ease;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: rgba(99,102,241,0.04); }
.activity-dot {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; margin-top: 1px;
  background: rgba(99,102,241,0.1); color: var(--primary);
}
.activity-dot.ad-success { background: rgba(16,185,129,0.1); color: var(--success); }
.activity-dot.ad-warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.activity-dot.ad-danger  { background: rgba(239,68,68,0.1);  color: var(--danger); }
.activity-dot.ad-info    { background: rgba(6,182,212,0.1);  color: var(--info); }
.activity-body { flex: 1; min-width: 0; }
.activity-actor { font-size: 12px; font-weight: 600; line-height: 1.3; }
.activity-action { font-size: 11px; opacity: 0.5; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-time { font-size: 10px; opacity: 0.32; margin-top: 3px; }

/* ─── Info List ─── */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border-color); font-size: 13px;
}
.info-list li:last-child { border-bottom: none; }
.info-list .info-label { opacity: 0.5; }
.info-list .info-value { font-weight: 600; }

/* ─── Time Block ─── */
.time-block {
  min-width: 60px; text-align: center;
  background: rgba(99,102,241,0.1); border-radius: var(--border-radius-sm);
  padding: 8px 6px; border: 1px solid rgba(99,102,241,0.15);
}
.time-block-hour { font-size: 18px; font-weight: 800; line-height: 1; color: var(--primary); }
.time-block-label { font-size: 10px; opacity: 0.45; margin-top: 2px; }

/* ─── Reservation Item ─── */
.reservation-item {
  display: flex; gap: 16px; padding: 14px 16px;
  border-bottom: 1px solid var(--border-color); align-items: flex-start;
  transition: background 0.15s;
}
.reservation-item:last-child { border-bottom: none; }
.reservation-item:hover { background: rgba(99,102,241,0.04); }

/* ─── Section Label ─── */
.section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; opacity: 0.35; margin-bottom: 12px;
}

/* ─── Product Admin Card ─── */
.product-card-admin {
  border: 1px solid var(--border-color); border-radius: var(--border-radius);
  overflow: hidden; transition: var(--transition); background: var(--bg-card);
  box-shadow: 0 2px 10px var(--shadow-ambient);
  display: flex; flex-direction: column;
}
.product-card-admin:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(99,102,241,0.45); }
.product-card-admin .img-wrap {
  aspect-ratio: 4/3; overflow: hidden; position: relative;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.08));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.product-card-admin .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-card-admin .img-placeholder {
  font-size: 40px; opacity: 0.25;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.product-card-admin .img-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #fff;
}
.product-card-admin .img-badge { position: absolute; padding: 2px 7px; border-radius: 10px; font-size: 10px; font-weight: 700; }
.product-card-admin .img-badge-tl { top: 7px; left: 7px; }
.product-card-admin .img-badge-tr { top: 7px; right: 7px; }
.product-card-admin .prod-body    { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.product-card-admin .prod-name    { font-size: 13px; font-weight: 600; margin-bottom: 2px; line-height: 1.3; }
.product-card-admin .prod-cat     { font-size: 10px; opacity: 0.45; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .4px; }
.product-card-admin .prod-footer  { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; margin-top: auto; }
.product-card-admin .prod-price   { font-size: 15px; font-weight: 700; color: var(--success); }
.product-card-admin .prod-stock   { font-size: 11px; opacity: 0.4; }
.product-card-admin .prod-barcode { font-size: 10px; opacity: 0.45; font-family: monospace; margin-bottom: 10px; }
.product-card-admin .prod-actions { display: flex; gap: 6px; }

/* ─── Stat Cards ─── */

/* ─── Inventory Movement ─── */
.inv-movement {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}
.inv-movement:last-child { border-bottom: none; }
.inv-movement:hover { background: rgba(99,102,241,0.04); }
.inv-movement-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.inv-mov-entrada { background: rgba(16,185,129,0.15); color: var(--success); }
.inv-mov-salida  { background: rgba(239,68,68,0.15);  color: var(--danger); }
.inv-mov-ajuste  { background: rgba(245,158,11,0.15); color: var(--warning); }
.inv-movement-body { flex: 1; min-width: 0; }
.inv-movement-name { font-size: 12px; font-weight: 600; }
.inv-movement-detail { font-size: 11px; opacity: 0.45; margin-top: 1px; }
.inv-movement-date { font-size: 10px; opacity: 0.3; margin-top: 1px; }

/* ─── User Avatar Large ─── */
.user-avatar-lg {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: white;
  border: 3px solid rgba(99,102,241,0.3);
  flex-shrink: 0;
}
.user-avatar-lg img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ─── Card header with icon ─── */
.card-header-icon {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}

/* ─── Topnav breadcrumb improved ─── */
.topnav-title { font-size: 15px; font-weight: 600; }
.topnav-section { font-size: 11px; opacity: 0.4; font-weight: 400; }

/* ─── Table improvements ─── */
.table th {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; opacity: 0.5; padding: 10px 16px;
  border-bottom: 1px solid var(--border-color) !important;
}
.table td { padding: 12px 16px; vertical-align: middle; }
.table > :not(caption) > * > * { border-bottom-color: var(--border-color) !important; }
.table-hover tbody tr:hover { background: rgba(99,102,241,0.05) !important; }

/* ─── Improved form controls ─── */
.form-label { font-size: 11.5px; font-weight: 600; opacity: 0.7; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-floating .form-label { text-transform: none; letter-spacing: 0; opacity: 1; }
[data-bs-theme="light"] .form-control, [data-bs-theme="light"] .form-select { border-color: rgba(0,0,0,0.15); }
[data-bs-theme="light"] .form-control:focus, [data-bs-theme="light"] .form-select:focus { border-color: var(--primary); }

/* ─── Better modal ─── */
.modal-header { border-bottom-color: var(--border-color); padding: 18px 20px; }
.modal-footer { border-top-color: var(--border-color); padding: 14px 20px; }
.modal-body { padding: 20px; }
.modal-title { font-size: 15px; font-weight: 700; }
.modal-content { border: 1px solid var(--border-color); box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
[data-bs-theme="light"] .modal-content { box-shadow: 0 10px 40px rgba(0,0,0,0.15); border-color: rgba(0,0,0,0.1); }

/* ─── Payment method grid ─── */
.pay-method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 400px) { .pay-method-grid { grid-template-columns: repeat(5, 1fr); } }

/* ─── Status pill ─── */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-success { background: rgba(16,185,129,0.12); color: var(--success); }
.pill-danger  { background: rgba(239,68,68,0.12);  color: var(--danger); }
.pill-warning { background: rgba(245,158,11,0.12); color: var(--warning); }
.pill-info    { background: rgba(6,182,212,0.12);  color: var(--info); }
.pill-muted   { background: rgba(107,114,128,0.12); color: #9ca3af; }

/* ─── Topnav clock ─── */
#current-time { font-size: 12px; font-variant-numeric: tabular-nums; opacity: 0.5; }

/* ─── Bottom summary row (caja / factura) ─── */
.totals-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--border-color); }
.totals-row:last-child { border-bottom: none; font-size: 15px; font-weight: 700; padding-top: 12px; }
.totals-row .totals-label { opacity: 0.55; }

/* ─── Light mode overrides ─── */
[data-bs-theme="light"] .activity-item:hover { background: rgba(0,0,0,0.025); }
[data-bs-theme="light"] .activity-dot { background: rgba(99,102,241,0.08); }
[data-bs-theme="light"] .table > :not(caption) > * > * { border-bottom-color: rgba(0,0,0,0.07) !important; }
[data-bs-theme="light"] .table-hover tbody tr:hover { background: rgba(99,102,241,0.04) !important; }
[data-bs-theme="light"] .modal-content { box-shadow: 0 8px 40px rgba(0,0,0,0.15); }
[data-bs-theme="light"] .dropdown-menu { box-shadow: 0 8px 24px rgba(0,0,0,0.12); border-color: rgba(0,0,0,0.1); }
[data-bs-theme="light"] .btn-ghost { color: #374151; }
[data-bs-theme="light"] .btn-ghost:hover { background: rgba(99,102,241,0.08); color: var(--primary); }
[data-bs-theme="light"] .mesa-stats-bar { box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
[data-bs-theme="light"] .page-header { box-shadow: 0 1px 8px rgba(0,0,0,0.06); }
[data-bs-theme="light"] .sidebar-footer .nav-link { color: rgba(255,255,255,0.5); }
[data-bs-theme="light"] .reservation-item:hover { background: rgba(0,0,0,0.02); }

/* ─── Responsive tweaks ─── */
@media (max-width: 576px) {
  .page-header { flex-wrap: wrap; gap: 10px; }
  .page-header-actions { margin-left: 0; width: 100%; }
  .page-header-title { font-size: 17px; }
}
