/* =====================================================
   RestaurantOS — Global CSS
   Aesthetic: Industrial Elegance / Dark Forge
   Fonts: Bebas Neue (display) + Barlow (body) + JetBrains Mono (data)
   ===================================================== */

/* ── CSS Variables ── */
:root {
  /* Colors */
  --black:        #0a0a0a;
  --black-2:      #111111;
  --black-3:      #191919;
  --black-4:      #222222;
  --black-5:      #2a2a2a;
  --gray-1:       #333333;
  --gray-2:       #444444;
  --gray-3:       #666666;
  --gray-4:       #888888;
  --gray-5:       #aaaaaa;
  --white:        #f0ece4;
  --white-dim:    #c8c4bc;

  /* Brand */
  --gold:         #c8922a;
  --gold-light:   #e8b84b;
  --gold-dim:     #8a6218;
  --gold-bg:      rgba(200, 146, 42, 0.08);

  /* Status */
  --green:        #2d9e6b;
  --green-light:  #3dcc8a;
  --red:          #c0392b;
  --red-light:    #e74c3c;
  --blue:         #2980b9;
  --blue-light:   #3498db;
  --teal:         #1abc9c;
  --orange:       #e67e22;
  --yellow:       #f1c40f;

  /* Kitchen */
  --kitchen-accent: #e8693a;
  --bar-accent:     #2ec4b6;
  --caja-accent:    #f5a623;

  /* Layout */
  --nav-h:        56px;
  --sidebar-w:    260px;
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-xl:    16px;

  /* Shadows */
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.4);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.6);
  --shadow-gold:  0 0 24px rgba(200,146,42,0.2);
  --shadow-glow:  0 0 40px rgba(200,146,42,0.15);

  /* Transitions */
  --tr-fast:      0.15s ease;
  --tr-mid:       0.25s ease;
  --tr-slow:      0.4s ease;

  /* Typography */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--black-3); }
::-webkit-scrollbar-thumb { background: var(--gray-1); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* Selection */
::selection { background: var(--gold-dim); color: var(--white); }

/* ── Utility ── */
.hidden { display: none !important; }
.screen { position: fixed; inset: 0; z-index: 100; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* ═══════════════════════════════════
   SPLASH SCREEN
═══════════════════════════════════ */
#splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#splash-screen::before {
  content: '';
  position: absolute; inset: 0;
  background: 
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(200,146,42,0.06) 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(200,146,42,0.04) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(200,146,42,0.04) 40px);
  pointer-events: none;
}
.splash-inner {
  display: flex; flex-direction: column; align-items: center; gap: 48px;
  position: relative; z-index: 1;
}
.splash-logo { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.logo-emblem svg { width: 80px; height: 80px; animation: rotateIn 0.8s ease; }
.splash-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  letter-spacing: 0.12em;
  color: var(--white);
  line-height: 1;
  animation: fadeUp 0.6s 0.3s both;
}
.splash-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-4);
  animation: fadeUp 0.6s 0.5s both;
}
.splash-loader { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 280px; }
.loader-bar {
  width: 100%; height: 2px;
  background: var(--gray-1);
  border-radius: 2px; overflow: hidden;
}
.loader-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-light));
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
  animation: loadProgress 2.5s ease forwards;
}
.loader-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gray-4);
  letter-spacing: 0.1em;
}
@keyframes loadProgress { 0% { width: 0; } 60% { width: 70%; } 90% { width: 92%; } 100% { width: 100%; } }
@keyframes rotateIn { from { transform: rotate(-180deg) scale(0); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes fadeUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ═══════════════════════════════════
   LOGIN SCREEN
═══════════════════════════════════ */
#login-screen {
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
}
.login-bg {
  position: absolute; inset: 0; overflow: hidden;
}
.login-grid {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(200,146,42,0.06) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(200,146,42,0.06) 60px);
  animation: gridShift 20s linear infinite;
}
@keyframes gridShift { from { transform: translateY(0); } to { transform: translateY(60px); } }
.login-container {
  position: relative; z-index: 1;
  width: min(440px, 95vw);
  animation: fadeUp 0.5s ease;
}
.login-brand {
  text-align: center; margin-bottom: 32px;
}
.brand-icon {
  font-size: 2.5rem; margin-bottom: 12px;
  filter: drop-shadow(0 0 20px rgba(200,146,42,0.5));
}
.login-brand h1 {
  font-family: var(--font-display);
  font-size: 2.8rem; letter-spacing: 0.1em;
  color: var(--white); line-height: 1;
}
.login-brand p {
  color: var(--gray-4); font-size: 0.8rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  margin-top: 4px;
}
.login-form-wrapper {
  background: var(--black-2);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}
.login-tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-1);
  background: var(--black-3);
}
.login-tab {
  flex: 1; padding: 10px 4px;
  background: none; border: none;
  color: var(--gray-4);
  font-family: var(--font-body); font-size: 0.72rem;
  font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--tr-fast);
}
.login-tab:hover { color: var(--white-dim); }
.login-tab.active {
  color: var(--gold); border-bottom-color: var(--gold);
  background: var(--gold-bg);
}
.login-form { padding: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; margin-bottom: 6px;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray-4);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--black-4);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
  outline: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,146,42,0.1);
}
.form-group select option { background: var(--black-3); }
.form-group textarea { resize: vertical; min-height: 60px; }
.input-pass-wrap { position: relative; }
.input-pass-wrap input { padding-right: 44px; }
.toggle-pass {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 44px; background: none; border: none;
  cursor: pointer; font-size: 1rem;
  color: var(--gray-4); transition: color var(--tr-fast);
}
.toggle-pass:hover { color: var(--white); }
.login-error {
  background: rgba(192,57,43,0.15);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  color: var(--red-light);
  font-size: 0.8rem; padding: 8px 12px;
  margin-bottom: 12px;
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
.btn-login {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border: none; border-radius: var(--radius-sm);
  color: var(--black);
  font-family: var(--font-display); font-size: 1.1rem;
  letter-spacing: 0.1em;
  padding: 12px;
  cursor: pointer;
  transition: all var(--tr-mid);
  position: relative; overflow: hidden;
}
.btn-login::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  opacity: 0; transition: opacity var(--tr-mid);
}
.btn-login:hover::before { opacity: 1; }
.btn-login svg { width: 20px; height: 20px; position: relative; z-index: 1; }
.btn-login span { position: relative; z-index: 1; }
.login-footer {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px;
  border-top: 1px solid var(--gray-1);
  font-size: 0.75rem; color: var(--gray-4);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gray-3);
}
.status-dot.online { background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 2s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ═══════════════════════════════════
   TOP NAV
═══════════════════════════════════ */
#top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-1);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 8px; }
.nav-center { flex: 1; text-align: center; }
.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--gray-4); cursor: pointer;
  transition: all var(--tr-fast);
  position: relative;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover {
  background: var(--black-4); border-color: var(--gray-1);
  color: var(--white);
}
.hamburger {
  display: block; width: 18px; height: 2px;
  background: currentColor; border-radius: 2px;
  position: relative;
}
.hamburger::before, .hamburger::after {
  content: ''; position: absolute; left: 0; width: 100%; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: all 0.2s;
}
.hamburger::before { top: -5px; }
.hamburger::after { bottom: -5px; }
.nav-brand { display: flex; align-items: center; gap: 8px; }
.nav-logo { font-size: 1.2rem; }
.nav-title {
  font-family: var(--font-display);
  font-size: 1.3rem; letter-spacing: 0.08em;
  color: var(--white);
}
.current-view-label {
  font-family: var(--font-body);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gold);
}
.nav-clock {
  font-family: var(--font-mono);
  font-size: 0.85rem; color: var(--gray-4);
  letter-spacing: 0.05em;
}
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--red); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ═══════════════════════════════════
   SIDEBAR
═══════════════════════════════════ */
.sidebar {
  position: fixed; top: var(--nav-h); left: 0; bottom: 0; z-index: 150;
  width: var(--sidebar-w);
  background: var(--black-2);
  border-right: 1px solid var(--gray-1);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--tr-mid);
  overflow: hidden;
}
.sidebar.open { transform: translateX(0); }
.sidebar-overlay {
  position: fixed; inset: 0; z-index: 140;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--tr-mid);
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }
.sidebar-user {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--gray-1);
  background: var(--black-3);
}
.user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.2rem; color: var(--black);
  flex-shrink: 0;
}
.user-name { display: block; font-weight: 600; font-size: 0.9rem; color: var(--white); }
.user-role {
  display: block; font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold);
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.nav-section-label {
  padding: 12px 16px 4px;
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gray-3);
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.9rem; font-weight: 500;
  color: var(--gray-5);
  border-left: 3px solid transparent;
  transition: all var(--tr-fast);
  user-select: none;
}
.nav-item:hover { background: var(--black-3); color: var(--white-dim); border-left-color: var(--gray-2); }
.nav-item.active { background: var(--gold-bg); color: var(--gold); border-left-color: var(--gold); }
.nav-item-icon { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--gray-1);
}
.sidebar-version { font-family: var(--font-mono); font-size: 0.65rem; color: var(--gray-3); }

/* ═══════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════ */
#main-content {
  padding-top: var(--nav-h);
  min-height: 100vh;
  background: var(--black);
}
.panel { padding: 24px; animation: fadeUp 0.3s ease; }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
  flex-wrap: wrap;
}
.panel-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.06em;
  color: var(--white);
}
.panel-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ═══════════════════════════════════
   BUTTONS
═══════════════════════════════════ */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border: none; border-radius: var(--radius-sm);
  color: var(--black); font-family: var(--font-body);
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.05em;
  padding: 9px 18px; cursor: pointer;
  transition: all var(--tr-fast);
  white-space: nowrap;
}
.btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--black-4); border: 1px solid var(--gray-1);
  border-radius: var(--radius-sm); color: var(--white-dim);
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
  padding: 8px 16px; cursor: pointer;
  transition: all var(--tr-fast);
}
.btn-secondary:hover { border-color: var(--gray-2); background: var(--black-5); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ghost {
  background: none; border: 1px solid var(--gray-1);
  border-radius: var(--radius-sm); color: var(--gray-4);
  font-family: var(--font-body); font-size: 0.85rem;
  padding: 8px 16px; cursor: pointer;
  transition: all var(--tr-fast);
}
.btn-ghost:hover { border-color: var(--gray-2); color: var(--white); }

.btn-success {
  background: linear-gradient(135deg, #1d7a52, var(--green));
  border: none; border-radius: var(--radius-sm);
  color: #fff; font-family: var(--font-body);
  font-size: 0.85rem; font-weight: 700;
  padding: 9px 18px; cursor: pointer;
  transition: all var(--tr-fast);
}
.btn-success:hover { filter: brightness(1.1); }

.btn-danger {
  background: linear-gradient(135deg, #8b1e1e, var(--red));
  border: none; border-radius: var(--radius-sm);
  color: #fff; font-family: var(--font-body);
  font-size: 0.85rem; font-weight: 700;
  padding: 9px 18px; cursor: pointer;
  transition: all var(--tr-fast);
}
.btn-danger:hover { filter: brightness(1.1); }

.btn-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-1);
  background: var(--black-4);
  cursor: pointer; font-size: 0.85rem;
  transition: all var(--tr-fast);
  color: var(--gray-4);
}
.btn-icon:hover { border-color: var(--gray-2); color: var(--white); background: var(--black-5); }
.btn-icon.edit:hover { border-color: var(--blue); color: var(--blue-light); }
.btn-icon.delete:hover { border-color: var(--red); color: var(--red-light); }

/* ═══════════════════════════════════
   FORMS (shared)
═══════════════════════════════════ */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.form-check-group { display: flex; align-items: flex-end; }
.check-label {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 0.9rem; color: var(--white-dim);
  user-select: none;
}
.check-label input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--gold);
  cursor: pointer;
}

.search-input {
  background: var(--black-4); border: 1px solid var(--gray-1);
  border-radius: var(--radius-sm);
  padding: 8px 12px; color: var(--white);
  font-family: var(--font-body); font-size: 0.9rem;
  outline: none; transition: border-color var(--tr-fast);
}
.search-input:focus { border-color: var(--gold); }
.search-input.sm { max-width: 200px; }

.select-mesa, .select-filtro {
  background: var(--black-4); border: 1px solid var(--gray-1);
  border-radius: var(--radius-sm);
  padding: 8px 12px; color: var(--white);
  font-family: var(--font-body); font-size: 0.85rem;
  outline: none; cursor: pointer;
  transition: border-color var(--tr-fast);
  -webkit-appearance: none;
}
.select-mesa:focus, .select-filtro:focus { border-color: var(--gold); }

/* ═══════════════════════════════════
   PANEL COMEDOR
═══════════════════════════════════ */
.comedor-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) { .comedor-layout { grid-template-columns: 1fr; } }

.catalogo-panel {
  background: var(--black-2);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.catalogo-search { padding: 12px; border-bottom: 1px solid var(--gray-1); }
.catalogo-search .search-input { width: 100%; }

.categoria-tabs {
  display: flex; overflow-x: auto;
  border-bottom: 1px solid var(--gray-1);
  padding: 0 8px;
  gap: 2px;
  scrollbar-width: none;
}
.categoria-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0;
  padding: 10px 16px;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--gray-4);
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer; transition: all var(--tr-fast);
  white-space: nowrap;
}
.cat-tab:hover { color: var(--white-dim); }
.cat-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}
.producto-card {
  background: var(--black-3);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all var(--tr-fast);
  text-align: center;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.producto-card::after {
  content: ''; position: absolute;
  inset: 0; background: var(--gold-bg);
  opacity: 0; transition: opacity var(--tr-fast);
}
.producto-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.producto-card:hover::after { opacity: 1; }
.producto-card:active { transform: scale(0.96); }
.producto-card.unavailable { opacity: 0.4; pointer-events: none; }
.prod-emoji { font-size: 2rem; display: block; margin-bottom: 6px; }
.prod-name {
  font-weight: 600; font-size: 0.78rem;
  color: var(--white-dim); line-height: 1.2;
  margin-bottom: 4px;
}
.prod-price {
  font-family: var(--font-mono);
  font-size: 0.85rem; color: var(--gold);
  font-weight: 500;
}

/* ── CARRITO ── */
.carrito-panel {
  background: var(--black-2);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  position: sticky; top: calc(var(--nav-h) + 16px);
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow: hidden;
}
.carrito-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid var(--gray-1);
}
.carrito-header h3 { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.06em; }
.mesa-badge {
  background: var(--gold-bg); border: 1px solid var(--gold-dim);
  border-radius: 20px; padding: 3px 10px;
  font-size: 0.7rem; font-weight: 700;
  color: var(--gold); letter-spacing: 0.05em;
  text-transform: uppercase;
}
.carrito-items {
  flex: 1; overflow-y: auto;
  padding: 8px;
}
.carrito-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--black-3); border: 1px solid var(--gray-1);
  border-radius: var(--radius-sm);
  padding: 10px; margin-bottom: 6px;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.carrito-item-emoji { font-size: 1.3rem; }
.carrito-item-info { flex: 1; min-width: 0; }
.carrito-item-name { font-size: 0.8rem; font-weight: 600; color: var(--white-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carrito-item-price { font-family: var(--font-mono); font-size: 0.75rem; color: var(--gold); }
.carrito-item-qty {
  display: flex; align-items: center; gap: 6px;
}
.qty-btn {
  width: 24px; height: 24px;
  background: var(--black-4); border: 1px solid var(--gray-1);
  border-radius: 3px; color: var(--white);
  font-size: 1rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--tr-fast);
}
.qty-btn:hover { border-color: var(--gold); color: var(--gold); }
.qty-val { font-family: var(--font-mono); font-size: 0.85rem; min-width: 18px; text-align: center; }
.carrito-footer { padding: 14px; border-top: 1px solid var(--gray-1); }
.carrito-subtotal, .carrito-total {
  display: flex; justify-content: space-between;
  padding: 4px 0;
}
.carrito-subtotal { font-size: 0.8rem; color: var(--gray-4); }
.carrito-total {
  font-family: var(--font-display); font-size: 1.3rem;
  color: var(--white); letter-spacing: 0.04em;
  margin-bottom: 12px; padding-top: 8px;
  border-top: 1px solid var(--gray-1);
}
.carrito-total span:last-child { color: var(--gold); }
.carrito-btns { display: flex; gap: 8px; }
.carrito-btns .btn-danger, .carrito-btns .btn-success { flex: 1; font-size: 0.8rem; padding: 10px 8px; }

/* ═══════════════════════════════════
   PANEL COCINA / BARRA (Kitchen Board)
═══════════════════════════════════ */
.kitchen-header { background: rgba(232,105,58,0.06); border-radius: var(--radius-md); padding: 12px 16px; }
.bar-header { background: rgba(46,196,182,0.06); border-radius: var(--radius-md); padding: 12px 16px; }

.live-indicator {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.15em; color: var(--kitchen-accent);
}
.live-indicator.bar-live  { color: var(--bar-accent); }
.live-indicator.prod-live { color: var(--gold); }
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--kitchen-accent);
  animation: pulse 1.5s ease infinite;
}
.pulse-dot.teal { background: var(--bar-accent); }
.pulse-dot.gold { background: var(--gold); }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.6; } }

.kitchen-board, .bar-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  min-height: 200px;
}
.ticket-card {
  background: var(--black-2);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--tr-mid);
  animation: cardIn 0.3s ease;
}
@keyframes cardIn { from { transform: scale(0.95) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.ticket-card.pendiente { border-top: 3px solid var(--red); }
.ticket-card.en_proceso { border-top: 3px solid var(--yellow); }
.ticket-card.listo { border-top: 3px solid var(--green); opacity: 0.7; }

.ticket-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: var(--black-3);
  border-bottom: 1px solid var(--gray-1);
}
.ticket-num {
  font-family: var(--font-display);
  font-size: 1.2rem; letter-spacing: 0.06em; color: var(--white);
}
.ticket-mesa {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  background: var(--gold-bg); color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 2px 8px; border-radius: 12px;
}
.ticket-time {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--gray-4);
}
.ticket-items { padding: 12px 14px; }
.ticket-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem;
}
.ticket-item:last-child { border-bottom: none; }
.ticket-item-qty {
  font-family: var(--font-mono); font-weight: 700;
  color: var(--gold); min-width: 28px;
  background: var(--gold-bg); border-radius: 3px;
  padding: 1px 5px; font-size: 0.75rem; text-align: center;
}
.ticket-item-name { flex: 1; color: var(--white-dim); }
.ticket-item-nota { font-size: 0.7rem; color: var(--gray-4); font-style: italic; }
.ticket-actions {
  display: flex; gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--gray-1);
}
.ticket-actions button { flex: 1; padding: 7px; font-size: 0.75rem; }
.ticket-status-badge {
  padding: 3px 8px; border-radius: 12px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-pendiente { background: rgba(192,57,43,0.2); color: var(--red-light); }
.badge-en_proceso { background: rgba(241,196,15,0.15); color: var(--yellow); }
.badge-listo { background: rgba(45,158,107,0.2); color: var(--green-light); }

/* ═══════════════════════════════════
   PANEL CAJA
═══════════════════════════════════ */
.caja-stats { display: flex; gap: 10px; }
.stat-pill {
  background: var(--black-3); border: 1px solid var(--gray-1);
  border-radius: var(--radius-sm);
  padding: 6px 14px; text-align: center;
}
.stat-label { display: block; font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-4); }
.stat-val { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--gold); letter-spacing: 0.05em; }
.caja-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.orden-card {
  background: var(--black-2); border: 1px solid var(--gray-1);
  border-radius: var(--radius-lg);
  overflow: hidden; animation: cardIn 0.3s ease;
}
.orden-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--black-3);
  border-bottom: 1px solid var(--gray-1);
}
.orden-num {
  font-family: var(--font-display); font-size: 1.1rem;
  letter-spacing: 0.06em;
}
.orden-items-list { padding: 12px 16px; }
.orden-item-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  font-size: 0.82rem; padding: 3px 0;
  color: var(--white-dim);
}
.orden-item-row span:first-child { flex: 1; min-width: 0; padding-right: 8px; word-break: break-word; }
.orden-item-row span:last-child { font-family: var(--font-mono); color: var(--gray-4); font-size: 0.78rem; white-space: nowrap; flex-shrink: 0; }
.orden-total-row {
  display: flex; justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--gray-1);
  font-family: var(--font-display); font-size: 1.2rem;
  letter-spacing: 0.04em;
}
.orden-total-row span:last-child { color: var(--gold); }
.orden-actions { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--gray-1); }
.orden-actions button { flex: 1; font-size: 0.78rem; padding: 8px; }

/* ═══════════════════════════════════
   PANEL CATÁLOGO CRUD
═══════════════════════════════════ */
.catalogo-crud-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
@media (max-width: 700px) { .catalogo-crud-layout { grid-template-columns: 1fr; } }
.section-title {
  font-family: var(--font-display); font-size: 1rem;
  letter-spacing: 0.12em; color: var(--gray-4);
  margin-bottom: 12px;
}
.cat-list, .subcat-list { display: flex; flex-direction: column; gap: 8px; }
.cat-item, .subcat-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--black-2); border: 1px solid var(--gray-1);
  border-radius: var(--radius-md);
  padding: 12px 14px; cursor: pointer;
  transition: all var(--tr-fast);
}
.cat-item:hover, .subcat-item:hover { border-color: var(--gray-2); }
.cat-item.selected, .subcat-item.selected { border-color: var(--gold); background: var(--gold-bg); }
.cat-color-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.cat-emoji { font-size: 1.2rem; }
.cat-info { flex: 1; min-width: 0; }
.cat-name { font-weight: 600; font-size: 0.9rem; color: var(--white); }
.cat-type {
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gray-4);
}
.cat-actions { display: flex; gap: 4px; }
.subcat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.subcat-categories-section { padding: 20px; }

/* ═══════════════════════════════════
   ADMIN TABLE
═══════════════════════════════════ */
.admin-filters { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-products-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table thead tr {
  background: var(--black-3); border-bottom: 2px solid var(--gray-1);
}
.admin-table th {
  padding: 11px 14px; text-align: left;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gray-4); white-space: nowrap;
}
.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--white-dim);
  vertical-align: middle;
}
.admin-table tbody tr { transition: background var(--tr-fast); }
.admin-table tbody tr:hover { background: var(--black-3); }
.prod-table-emoji { font-size: 1.4rem; }
.prod-table-name { font-weight: 600; color: var(--white); }
.prod-table-price { font-family: var(--font-mono); color: var(--gold); }
.badge-disponible {
  display: inline-block; padding: 2px 8px;
  border-radius: 10px; font-size: 0.65rem;
  font-weight: 700; letter-spacing: 0.06em;
}
.badge-si { background: rgba(45,158,107,0.2); color: var(--green-light); }
.badge-no { background: rgba(192,57,43,0.15); color: var(--red-light); }
.table-actions { display: flex; gap: 6px; }

/* ═══════════════════════════════════
   PRODUCCIÓN
═══════════════════════════════════ */
.produccion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .produccion-grid { grid-template-columns: 1fr; } }
.prod-card {
  background: var(--black-2); border: 1px solid var(--gray-1);
  border-radius: var(--radius-lg); overflow: hidden;
}
.cocina-card { border-top: 3px solid var(--kitchen-accent); }
.barra-card { border-top: 3px solid var(--bar-accent); }
.prod-card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px; background: var(--black-3);
  border-bottom: 1px solid var(--gray-1);
}
.prod-icon { font-size: 1.4rem; }
.prod-card-header h3 { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 0.06em; flex: 1; }
.prod-count {
  background: var(--gold-bg); color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: 50%; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700;
}
.prod-items { padding: 12px; max-height: 400px; overflow-y: auto; }
.prod-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--black-3); border: 1px solid var(--gray-1);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 0.85rem;
}
.prod-row-qty {
  font-family: var(--font-mono); font-weight: 700;
  color: var(--gold); background: var(--gold-bg);
  padding: 1px 6px; border-radius: 3px; font-size: 0.78rem;
}
.prod-row-name { flex: 1; color: var(--white-dim); }
.prod-row-mesa { font-size: 0.7rem; color: var(--gray-4); }

/* ═══════════════════════════════════
   MODALES
═══════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--black-2);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  animation: modalUp 0.25s ease;
}
.modal-sm { max-width: 400px; }
@keyframes modalUp { from { transform: translateY(20px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--gray-1);
  background: var(--black-3);
}
.modal-head h3 { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 0.06em; }
.modal-close {
  width: 30px; height: 30px;
  background: var(--black-4); border: 1px solid var(--gray-1);
  border-radius: var(--radius-sm);
  color: var(--gray-4); cursor: pointer; font-size: 0.9rem;
  transition: all var(--tr-fast);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--red); border-color: var(--red); color: #fff; }
.modal-body { padding: 20px; }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 20px; border-top: 1px solid var(--gray-1);
  background: var(--black-3);
}

/* Pago */
.pago-resumen {
  background: var(--black-3); border: 1px solid var(--gray-1);
  border-radius: var(--radius-md); padding: 14px;
  margin-bottom: 16px;
}
.cambio-display {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(45,158,107,0.1); border: 1px solid var(--green);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 10px;
}
.cambio-amount { font-family: var(--font-display); font-size: 1.4rem; color: var(--green-light); }

/* ═══════════════════════════════════
   TOASTS
═══════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 1000;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--black-2); border: 1px solid var(--gray-1);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.85rem; color: var(--white-dim);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--blue); }
.toast.warning { border-left: 3px solid var(--yellow); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(100%); } }

/* ═══════════════════════════════════
   EMPTY STATES
═══════════════════════════════════ */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 48px 24px; color: var(--gray-3);
  text-align: center;
}
.empty-state .empty-icon { font-size: 3rem; opacity: 0.5; }
.empty-state p { font-size: 0.9rem; }

/* ═══════════════════════════════════
   LOADING
═══════════════════════════════════ */
.loading-spinner {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 48px;
}
.spinner {
  width: 40px; height: 40px;
  border: 2px solid var(--gray-1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════
   RESPONSIVE ADJUSTMENTS
═══════════════════════════════════ */
@media (max-width: 600px) {
  .panel { padding: 16px; }
  .panel-header { flex-direction: column; align-items: flex-start; }
  .caja-stats { flex-direction: column; }
  .nav-clock { display: none; }
  .nav-title { display: none; }
}

/* ═══════════════════════════════════
   PANEL REPORTES
═══════════════════════════════════ */

/* Grid de cards */
.reportes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1100px;
}
.reporte-card {
  background: var(--black-2);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  transition: all var(--tr-mid);
}
.reporte-card.disponible {
  cursor: pointer;
}
.reporte-card.disponible:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}
.reporte-card.proximamente {
  opacity: 0.45;
  cursor: not-allowed;
}
.reporte-card-icon { font-size: 2.2rem; line-height: 1; }
.reporte-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem; letter-spacing: 0.05em;
  color: var(--white); margin-bottom: 6px;
}
.reporte-card-body p {
  font-size: 0.82rem; color: var(--gray-4); line-height: 1.5;
}
.reporte-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
}
.reporte-badge {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px;
}
.disponible-badge {
  background: rgba(45,158,107,0.15);
  color: var(--green-light);
  border: 1px solid rgba(45,158,107,0.3);
}
.prox-badge {
  background: var(--black-3);
  color: var(--gray-3);
  border: 1px solid var(--gray-1);
}
.reporte-card-arrow {
  font-size: 1.2rem; color: var(--gold);
  transition: transform var(--tr-fast);
}
.reporte-card.disponible:hover .reporte-card-arrow { transform: translateX(5px); }

/* Botón volver + small helper */
.btn-back-report {
  background: none;
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-sm);
  color: var(--gray-4);
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 600;
  padding: 6px 14px; cursor: pointer;
  transition: all var(--tr-fast);
}
.btn-back-report:hover {
  background: var(--black-4); border-color: var(--gold); color: var(--gold);
}
.btn-sm { padding: 6px 14px !important; font-size: 0.8rem !important; }

/* Historial container */
.historial-container { display: flex; flex-direction: column; gap: 18px; }

/* Filtros de período */
.periodo-filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--black-2);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}
.periodo-btn {
  background: none; border: 1px solid var(--gray-1);
  border-radius: var(--radius-sm);
  color: var(--gray-4);
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 14px; cursor: pointer;
  transition: all var(--tr-fast);
}
.periodo-btn:hover { background: var(--black-4); color: var(--white-dim); border-color: var(--gray-2); }
.periodo-btn.active { background: var(--gold-bg); border-color: var(--gold); color: var(--gold); }
.rango-personalizado { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rango-personalizado input[type="date"] {
  background: var(--black-4); border: 1px solid var(--gray-1);
  border-radius: var(--radius-sm);
  color: var(--white); font-family: var(--font-mono); font-size: 0.8rem;
  padding: 6px 10px; outline: none;
  transition: border-color var(--tr-fast);
}
.rango-personalizado input[type="date"]:focus { border-color: var(--gold); }
.rango-sep { color: var(--gray-3); }

/* Estadísticas */
.historial-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hstat-card {
  background: var(--black-2); border: 1px solid var(--gray-1);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 4px;
  flex: 1; min-width: 110px;
}
.hstat-card.green { border-color: rgba(45,158,107,0.3); background: rgba(45,158,107,0.05); }
.hstat-card.red   { border-color: rgba(192,57,43,0.3);  background: rgba(192,57,43,0.05);  }
.hstat-card.gold  { border-color: rgba(200,146,42,0.3); background: var(--gold-bg); }
.hstat-label {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray-4);
}
.hstat-val {
  font-family: var(--font-display);
  font-size: 1.5rem; letter-spacing: 0.04em; color: var(--white);
}
.hstat-val.mono { font-family: var(--font-mono); font-size: 1.05rem; }

/* Filtros de tabla */
.historial-filtros { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Tabla de historial */
.historial-tabla-wrap {
  background: var(--black-2); border: 1px solid var(--gray-1);
  border-radius: var(--radius-md); overflow: hidden;
}
.hist-count {
  padding: 9px 16px;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--gray-4);
  border-bottom: 1px solid var(--gray-1); background: var(--black-3);
}
.hist-table-scroll { overflow-x: auto; }
.hist-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.hist-table thead tr { background: var(--black-3); border-bottom: 1px solid var(--gray-1); }
.hist-table th {
  padding: 10px 14px; text-align: left;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gray-4); white-space: nowrap;
}
.hist-table tbody tr { border-bottom: 1px solid var(--black-4); transition: background var(--tr-fast); }
.hist-table tbody tr:hover { background: var(--black-3); }
.hist-table tbody tr:last-child { border-bottom: none; }
.hist-table td { padding: 10px 14px; color: var(--white-dim); vertical-align: middle; }
.hist-td-num { color: var(--gray-3); font-family: var(--font-mono); font-size: 0.72rem; width: 36px; }
.hist-td-center { text-align: center; }
.hist-td-right { text-align: right; }
.hist-orden-num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--gold); }
.hist-fecha { font-size: 0.85rem; }
.hist-hora { font-family: var(--font-mono); font-size: 0.72rem; color: var(--gray-4); }
.hist-total { font-family: var(--font-mono); font-size: 0.9rem; color: var(--white); }
.hist-na { color: var(--gray-3); }
.hist-loading, .hist-empty {
  text-align: center; padding: 48px; color: var(--gray-4); font-size: 0.9rem;
}
.btn-hist-ver {
  background: none; border: 1px solid var(--gray-2);
  border-radius: var(--radius-sm);
  color: var(--gray-4); font-size: 0.75rem;
  padding: 4px 10px; cursor: pointer; white-space: nowrap;
  transition: all var(--tr-fast);
}
.btn-hist-ver:hover { background: var(--gold-bg); border-color: var(--gold); color: var(--gold); }

/* Status badges (historial) */
.status-badge {
  display: inline-block; padding: 3px 9px; border-radius: 20px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; white-space: nowrap;
}
.status-badge.pending     { background: rgba(241,196,15,0.15); color: var(--yellow);      border: 1px solid rgba(241,196,15,0.3); }
.status-badge.inprocess   { background: rgba(52,152,219,0.15); color: var(--blue-light);  border: 1px solid rgba(52,152,219,0.3); }
.status-badge.ready       { background: rgba(46,204,113,0.15); color: var(--green-light); border: 1px solid rgba(46,204,113,0.3); }
.status-badge.paid        { background: rgba(45,158,107,0.15); color: var(--green-light); border: 1px solid rgba(45,158,107,0.3); }
.status-badge.cancelled   { background: rgba(192,57,43,0.1);   color: var(--red-light);   border: 1px solid rgba(192,57,43,0.2); text-decoration: line-through; }
.metodo-badge { font-size: 0.82rem; color: var(--gray-5); }

/* Modal de detalle de orden */
.modal-md { max-width: 560px; }
.hdet-body { display: flex; flex-direction: column; gap: 18px; }
.hdet-meta {
  background: var(--black-3); border-radius: var(--radius-sm);
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.hdet-meta-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.875rem;
}
.hdet-meta-label {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-4);
}
.hdet-items-title {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gray-4); margin-bottom: 8px;
}
.hdet-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--black-4);
  font-size: 0.875rem;
}
.hdet-item:last-child { border-bottom: none; }
.hdet-item.cancelado { opacity: 0.38; text-decoration: line-through; }
.hdet-item-emoji { font-size: 1.1rem; flex-shrink: 0; }
.hdet-item-nombre { flex: 1; color: var(--white-dim); }
.hdet-item-qty { font-family: var(--font-mono); font-size: 0.8rem; color: var(--gray-4); }
.hdet-item-precio { font-family: var(--font-mono); font-size: 0.85rem; color: var(--white); min-width: 68px; text-align: right; }
.hdet-cancel-tag {
  font-size: 0.62rem; color: var(--red-light);
  border: 1px solid var(--red); border-radius: 10px; padding: 1px 6px;
}
.hdet-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0 0; border-top: 1px solid var(--gray-1);
  font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.06em;
}
.hdet-total-val { font-family: var(--font-mono); font-size: 1.35rem; color: var(--gold); }

/* ── VENTAS POR PRODUCTO ── */
.vp-podium {
  display: flex; gap: 14px; flex-wrap: wrap;
}
.vp-podium-item {
  flex: 1; min-width: 160px;
  background: var(--black-2); border: 1px solid var(--gray-1);
  border-radius: var(--radius-lg); padding: 18px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; transition: all var(--tr-mid);
}
.vp-podium-item.rank-1 {
  border-color: var(--gold); background: var(--gold-bg);
  box-shadow: 0 0 20px rgba(200,146,42,0.15);
}
.vp-podium-item.rank-2 { border-color: var(--gray-3); }
.vp-podium-item.rank-3 { border-color: rgba(200,120,60,0.4); }
.vp-podium-medal { font-size: 1.8rem; line-height: 1; }
.vp-podium-emoji { font-size: 2rem; }
.vp-podium-nombre {
  font-weight: 700; font-size: 0.9rem; color: var(--white);
  line-height: 1.3;
}
.vp-podium-cat {
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gray-4);
}
.vp-podium-stats { display: flex; gap: 12px; align-items: center; margin-top: 4px; }
.vp-podium-qty {
  font-family: var(--font-mono); font-size: 0.82rem;
  background: var(--black-3); border: 1px solid var(--gray-1);
  border-radius: 12px; padding: 2px 8px; color: var(--white-dim);
}
.vp-podium-rev {
  font-family: var(--font-mono); font-size: 0.88rem;
  color: var(--gold); font-weight: 600;
}

/* Tabla ventas — badge de categoría */
.vp-cat-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 10px; border: 1px solid;
}
/* Celda cantidad */
.vp-qty-cell {
  font-family: var(--font-mono); font-weight: 700; color: var(--gold);
}
/* Barra visual */
.vp-barra-td { min-width: 140px; }
.vp-barra-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--black-4); border-radius: 3px;
  height: 18px; position: relative; overflow: hidden;
}
.vp-barra-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 3px; transition: width 0.5s ease;
}
.vp-barra-label {
  position: relative; z-index: 1;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--white); padding-left: 6px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* ── RESUMEN DE INGRESOS ── */
.ri-big-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.ri-big-stat {
  background: var(--black-2); border: 1px solid var(--gray-1);
  border-radius: var(--radius-lg); padding: 20px 18px;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; text-align: center;
}
.ri-big-stat.gold  { border-color: rgba(200,146,42,0.4); background: var(--gold-bg); }
.ri-big-stat.green { border-color: rgba(45,158,107,0.3); background: rgba(45,158,107,0.06); }
.ri-big-stat.red   { border-color: rgba(192,57,43,0.3);  background: rgba(192,57,43,0.05); }
.ri-big-icon  { font-size: 1.8rem; line-height: 1; }
.ri-big-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gray-4);
}
.ri-big-val {
  font-family: var(--font-mono); font-size: 1.5rem;
  color: var(--white); font-weight: 600; letter-spacing: 0.02em;
}

/* Desglose métodos de pago */
.ri-metodos-container {
  background: var(--black-2); border: 1px solid var(--gray-1);
  border-radius: var(--radius-md); padding: 18px 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.ri-metodos-title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--gray-4);
}
.ri-metodo-row { display: flex; flex-direction: column; gap: 6px; }
.ri-metodo-header {
  display: flex; align-items: center; gap: 10px;
}
.ri-metodo-icon  { font-size: 1.1rem; flex-shrink: 0; }
.ri-metodo-label { flex: 1; font-size: 0.9rem; font-weight: 600; color: var(--white-dim); }
.ri-metodo-amount {
  font-family: var(--font-mono); font-size: 0.9rem;
  color: var(--white); min-width: 100px; text-align: right;
}
.ri-metodo-pct {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--gray-4); min-width: 46px; text-align: right;
}
.ri-metodo-barra-track {
  height: 6px; background: var(--black-4); border-radius: 3px;
  overflow: hidden;
}
.ri-metodo-barra-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 3px; transition: width 0.6s ease;
}

/* ── RENDIMIENTO POR MESA ── */
.rend-seccion {
  display: flex; flex-direction: column; gap: 10px;
}
.rend-seccion-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 1.1rem;
  letter-spacing: 0.08em; color: var(--white);
  padding: 6px 0 4px;
  border-bottom: 1px solid var(--gray-1);
}
.rend-seccion-icon { font-size: 1.2rem; }

/* Badge de tiempo de servicio */
.rend-tiempo-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--black-3); border: 1px solid var(--gray-1);
  border-radius: 10px; padding: 2px 9px;
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--gray-5);
}

/* Celda mesero */
.rend-mesero-cell {
  display: flex; align-items: center; gap: 10px;
}
.rend-mesero-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1rem; color: var(--black);
}
.rend-mesero-nombre {
  font-weight: 600; font-size: 0.9rem; color: var(--white);
}

/* Badge de rol */
.rend-rol-badge {
  display: inline-block; padding: 2px 9px; border-radius: 10px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; border: 1px solid;
}
.rend-rol-admin      { color: var(--gold);        border-color: var(--gold-dim);        background: var(--gold-bg); }
.rend-rol-comedor    { color: var(--blue-light);   border-color: rgba(52,152,219,0.3);   background: rgba(52,152,219,0.08); }
.rend-rol-caja       { color: var(--orange);       border-color: rgba(230,126,34,0.3);   background: rgba(230,126,34,0.08); }
.rend-rol-cocina     { color: var(--kitchen-accent); border-color: rgba(232,105,58,0.3); background: rgba(232,105,58,0.08); }
.rend-rol-default    { color: var(--gray-4);       border-color: var(--gray-1);          background: var(--black-3); }

/* Responsive */
@media (max-width: 600px) {
  .reportes-grid { grid-template-columns: 1fr; }
  .historial-stats { gap: 8px; }
  .hstat-card { min-width: 90px; padding: 10px 12px; }
  .hstat-val { font-size: 1.2rem; }
  .periodo-filters { gap: 6px; }
  .ri-big-stats { grid-template-columns: repeat(2, 1fr); }
  .vp-podium { flex-direction: column; }
}

/* ════════════════════════════════════════════════════════
   AUDITORÍA — NOTIFICATION DROPDOWN
════════════════════════════════════════════════════════ */

/* Contenedor principal */
.notif-dropdown {
  position: absolute;
  top: calc(var(--nav-h) + 4px);
  right: 8px;
  width: 340px;
  max-height: calc(100vh - 80px);
  background: var(--black-2);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 500;
  animation: notifSlideIn 0.18s ease;
}
@keyframes notifSlideIn {
  from { opacity:0; transform: translateY(-8px) scale(0.97); }
  to   { opacity:1; transform: translateY(0)    scale(1); }
}

/* Header */
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--gray-1);
  flex-shrink: 0;
}
.notif-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-head-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--white);
}
.notif-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(45,158,107,0.12);
  border: 1px solid rgba(61,204,138,0.3);
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--green-light);
  transition: background var(--tr-fast), box-shadow var(--tr-fast);
}
.notif-live-pill.notif-live-pulse {
  background: rgba(45,158,107,0.25);
  box-shadow: 0 0 8px rgba(61,204,138,0.3);
}
.notif-live-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green-light);
  animation: notifPulse 1.4s infinite;
}
@keyframes notifPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
.notif-head-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.notif-close-btn {
  background: none; border: none;
  color: var(--gray-3); cursor: pointer;
  font-size: 0.85rem; padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: color var(--tr-fast), background var(--tr-fast);
  line-height: 1;
}
.notif-close-btn:hover { color: var(--white); background: var(--black-4); }
.notif-clear-btn {
  background: none;
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: var(--radius-sm);
  color: var(--gray-4);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  transition: all var(--tr-fast);
  line-height: 1.4;
  white-space: nowrap;
}
.notif-clear-btn:hover {
  background: rgba(192,57,43,0.12);
  border-color: var(--red-light);
  color: var(--red-light);
}

/* Filtros */
.notif-filters {
  display: flex;
  gap: 3px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--gray-1);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.notif-filter {
  padding: 3px 10px;
  background: transparent;
  border: 1px solid var(--gray-1);
  border-radius: 10px;
  color: var(--gray-4);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--tr-fast);
  white-space: nowrap;
}
.notif-filter:hover  { border-color: var(--gray-2); color: var(--white-dim); }
.notif-filter.active {
  background: var(--gold-bg);
  border-color: var(--gold-dim);
  color: var(--gold-light);
}

/* Lista de eventos */
.notif-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-1) transparent;
}
.notif-list::-webkit-scrollbar       { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: var(--gray-1); border-radius: 2px; }

/* Estado de carga */
.notif-loading-state {
  display: flex; align-items: center; gap: 10px;
  padding: 24px 16px;
  color: var(--gray-4);
  font-size: 0.83rem;
}
.notif-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--gray-1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Estado vacío */
.notif-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--gray-3);
  font-size: 0.82rem;
}

/* Item de evento */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px 9px 14px;
  border-bottom: 1px solid rgba(51,51,51,0.5);
  transition: background var(--tr-fast);
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--black-3); }
.notif-item.notif-hidden { display: none !important; }

/* Animación de entrada para eventos nuevos */
.notif-item-enter {
  animation: notifItemIn 0.5s ease;
}
@keyframes notifItemIn {
  from { background: rgba(200,146,42,0.12); }
  to   { background: transparent; }
}

.notif-item-left { flex-shrink: 0; padding-top: 1px; }
.notif-item-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  background: var(--black-3);
  border: 1px solid var(--gray-1);
}

/* Colores de icono por categoría */
.au-green  { border-color: rgba(61,204,138,0.3)  !important; background: rgba(61,204,138,0.08)  !important; }
.au-gold   { border-color: rgba(200,146,42,0.35) !important; background: rgba(200,146,42,0.10)  !important; }
.au-red    { border-color: rgba(231,76,60,0.3)   !important; background: rgba(231,76,60,0.08)   !important; }
.au-blue   { border-color: rgba(52,152,219,0.3)  !important; background: rgba(52,152,219,0.08)  !important; }
.au-teal   { border-color: rgba(27,188,156,0.3)  !important; background: rgba(27,188,156,0.08)  !important; }
.au-orange { border-color: rgba(230,126,34,0.3)  !important; background: rgba(230,126,34,0.08)  !important; }
.au-gray   { border-color: var(--gray-1)          !important; background: var(--black-3)          !important; }

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-desc {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--white-dim);
  line-height: 1.35;
  word-break: break-word;
}
.notif-item-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}
.notif-item-user {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--gold);
  background: var(--gold-bg);
  border-radius: 4px;
  padding: 0 4px;
}
.notif-item-hora {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--gray-3);
}
.notif-item-ago {
  font-size: 0.68rem;
  color: var(--gray-3);
}

/* Punto de color (derecha) */
.notif-item-dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0; margin-top: 6px;
  background: var(--gray-2);
}
.notif-item-dot.au-green  { background: var(--green-light); box-shadow: 0 0 4px var(--green); }
.notif-item-dot.au-gold   { background: var(--gold);        box-shadow: 0 0 4px var(--gold-dim); }
.notif-item-dot.au-red    { background: var(--red-light);   box-shadow: 0 0 4px var(--red); }
.notif-item-dot.au-blue   { background: var(--blue-light);  }
.notif-item-dot.au-teal   { background: var(--teal);        }
.notif-item-dot.au-orange { background: var(--orange);      }

/* Footer */
.notif-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  border-top: 1px solid var(--gray-1);
  flex-shrink: 0;
}
.notif-total-label {
  font-size: 0.7rem;
  color: var(--gray-3);
  font-family: var(--font-mono);
}
.notif-foot-hint {
  font-size: 0.68rem;
  color: var(--gray-2);
}

/* Notif badge — ya existe, solo aseguramos que cuente > 9 quede bien */
#notif-badge {
  min-width: 16px;
  width: auto;
  padding: 0 3px;
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 400px) {
  .notif-dropdown { width: calc(100vw - 16px); right: 8px; }
}

/* ════════════════════════════════════════════════════════
   TICKET DE IMPRESIÓN 58mm
════════════════════════════════════════════════════════ */

/* Oculto en pantalla — solo se muestra al imprimir */
#ticket-print-frame {
  display: none;
  width: 52mm;
  font-family: 'Courier New', Courier, monospace;
  font-size: 8.5pt;
  color: #000;
  background: #fff;
  line-height: 1.35;
}

/* Header */
.tk-logo {
  text-align: center;
  font-size: 11pt;
  font-weight: bold;
  letter-spacing: 0.05em;
}
.tk-sub {
  text-align: center;
  font-size: 7pt;
  color: #555;
  margin-top: 1px;
}
.tk-header { margin-bottom: 4px; }

/* Separadores */
.tk-sep-dash {
  border: none;
  border-top: 1px dashed #000;
  margin: 4px 0;
}
.tk-sep-solid {
  border: none;
  border-top: 1px solid #000;
  margin: 4px 0;
}

/* Tabla universal del ticket */
.tk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.5pt;
}
.tk-qty {
  width: 18px;
  vertical-align: top;
  padding: 1px 2px 1px 0;
  white-space: nowrap;
  color: #555;
}
.tk-nombre {
  vertical-align: top;
  padding: 1px 3px 1px 2px;
  word-break: break-word;
}
.tk-monto {
  text-align: right;
  vertical-align: top;
  padding: 1px 0;
  white-space: nowrap;
}
.tk-meta-label {
  color: #444;
  vertical-align: top;
  padding: 1px 0;
  width: 60%;
}

/* Etiqueta de sección */
.tk-section-label {
  font-weight: bold;
  font-size: 8pt;
  letter-spacing: 0.08em;
  margin: 3px 0 2px;
}

/* Separador de cancelados */
.tk-div-label {
  text-align: center;
  font-size: 7pt;
  color: #777;
  padding: 3px 0 2px;
}

/* Ítems cancelados */
.tk-row-cancelado { opacity: 0.6; }
.tk-strike        { text-decoration: line-through; }

/* Nota de ítem */
.tk-nota {
  font-size: 7pt;
  color: #666;
  margin-top: 1px;
  font-style: italic;
}

/* Fila TOTAL */
.tk-total-row td {
  font-weight: bold;
  font-size: 10pt;
  padding: 2px 0;
}

/* Celda vacía */
.tk-empty {
  text-align: center;
  font-size: 7.5pt;
  color: #888;
  padding: 4px 0;
}

/* Footer */
.tk-footer {
  text-align: center;
  font-size: 7.5pt;
  margin-top: 4px;
}
.tk-footer-meta {
  color: #888;
  font-size: 7pt;
  margin-top: 2px;
}

/* ── Print styles ── */
@media print {
  #top-nav, #sidebar, .sidebar-overlay, .btn-primary, .btn-danger { display: none !important; }
  #main-content { padding-top: 0; }
}

/* ════════════════════════════════════════════════════════
   PANEL CONFIGURACIÓN
════════════════════════════════════════════════════════ */

/* Container */
.config-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Tabs ── */
.config-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 20px 0;
  border-bottom: 1px solid var(--gray-1);
  background: var(--black-2);
}

.config-tab {
  padding: 9px 22px;
  border: none;
  background: transparent;
  color: var(--gray-4);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-bottom: 2px solid transparent;
  transition: color var(--tr-fast), border-color var(--tr-fast), background var(--tr-fast);
  position: relative;
  bottom: -1px;
}
.config-tab:hover {
  color: var(--white-dim);
  background: var(--black-3);
}
.config-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: var(--black-3);
}

.config-tab-body {
  padding: 24px 20px;
}

/* ── Section header ── */
.cfg-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.cfg-section-icon { font-size: 1.1rem; }
.cfg-section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--white);
}

/* ════════════════════════════
   TAB ACCESO — Layout
════════════════════════════ */
.acceso-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.acceso-col {
  background: var(--black-2);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* Users table */
.cfg-usuarios-table td { vertical-align: middle; }

.cfg-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cfg-user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--black);
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
}
.cfg-avatar-admin   { background: linear-gradient(135deg, var(--gold-dim), var(--gold)); }
.cfg-avatar-comedor { background: linear-gradient(135deg, #1a5276, var(--blue-light)); }
.cfg-avatar-cocina  { background: linear-gradient(135deg, #7b241c, var(--kitchen-accent)); }
.cfg-avatar-caja    { background: linear-gradient(135deg, #7d6608, var(--yellow)); }
.cfg-avatar-monitor { background: linear-gradient(135deg, #1a4a2e, var(--green-light)); }

.cfg-user-nombre {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--white);
}
.cfg-user-login {
  font-size: 0.75rem;
  color: var(--gray-4);
  font-family: var(--font-mono);
}
.cfg-ultimo-login {
  font-size: 0.75rem;
  color: var(--gray-4);
}

/* Role badges */
.cfg-rol-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid;
  white-space: nowrap;
}
.cfg-rol-admin   { color: var(--gold);          border-color: var(--gold-dim);        background: var(--gold-bg); }
.cfg-rol-comedor { color: var(--blue-light);     border-color: rgba(52,152,219,0.3);   background: rgba(52,152,219,0.08); }
.cfg-rol-cocina  { color: var(--kitchen-accent); border-color: rgba(232,105,58,0.3);   background: rgba(232,105,58,0.08); }
.cfg-rol-caja    { color: var(--orange);         border-color: rgba(230,126,34,0.3);   background: rgba(230,126,34,0.08); }
.cfg-rol-monitor { color: var(--green-light);    border-color: rgba(61,204,138,0.3);   background: rgba(61,204,138,0.08); }

/* Status dot */
.cfg-status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.cfg-dot-on  { background: var(--green-light); box-shadow: 0 0 6px var(--green); }
.cfg-dot-off { background: var(--gray-2); }

.cfg-self-tag {
  font-size: 0.7rem;
  color: var(--gray-3);
  font-style: italic;
}

.cfg-row-actions { display: flex; gap: 6px; justify-content: center; align-items: center; }

.cfg-btn-edit {
  background: transparent;
  border: 1px solid rgba(52,152,219,0.4);
  color: #5dade2;
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background var(--tr-fast), border-color var(--tr-fast);
}
.cfg-btn-edit:hover {
  background: rgba(52,152,219,0.15);
  border-color: #5dade2;
}
.cfg-btn-del {
  background: transparent;
  border: 1px solid rgba(192,57,43,0.4);
  color: var(--red-light);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background var(--tr-fast), border-color var(--tr-fast);
}
.cfg-btn-del:hover {
  background: rgba(192,57,43,0.15);
  border-color: var(--red-light);
}
.cfg-edit-divider {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-top: 1px solid var(--gray-1);
  padding-top: 14px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-4);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.cfg-edit-optional {
  font-size: .7rem;
  font-weight: 400;
  color: var(--gray-3);
  text-transform: none;
  letter-spacing: 0;
}

/* ── Create user form ── */
.cfg-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cfg-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cfg-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cfg-input,
.cfg-select {
  background: var(--black-3);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-md);
  color: var(--white);
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--tr-fast);
  width: 100%;
}
.cfg-input:focus,
.cfg-select:focus {
  border-color: var(--gold);
}
.cfg-select option { background: var(--black-3); }

.cfg-form-error {
  background: rgba(192,57,43,0.12);
  border: 1px solid rgba(192,57,43,0.4);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--red-light);
}

.cfg-btn-submit {
  margin-top: 4px;
  width: 100%;
  padding: 11px;
  font-size: 0.95rem;
}

/* ════════════════════════════
   TAB LIMPIAR — Danger Zone
════════════════════════════ */
.limpiar-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Warning banner */
.limpiar-warning-banner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.35);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}
.limpiar-warn-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.limpiar-warn-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.limpiar-warn-body strong {
  color: var(--red-light);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}
.limpiar-warn-body p {
  font-size: 0.83rem;
  color: var(--gray-5);
  line-height: 1.5;
}
.cfg-code {
  background: var(--black-3);
  border: 1px solid var(--gray-1);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold-light);
}

/* Cards grid */
.limpiar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.limpiar-card {
  background: var(--black-2);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--tr-fast);
}
.limpiar-card:hover {
  border-color: rgba(192,57,43,0.4);
}

.limpiar-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.limpiar-card-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.limpiar-card-titulo {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--white);
}

.limpiar-card-desc {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.limpiar-card-desc p {
  font-size: 0.82rem;
  color: var(--gray-5);
  line-height: 1.45;
}
.limpiar-card-note {
  color: var(--gray-3) !important;
  font-size: 0.75rem !important;
}

.limpiar-card-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.limpiar-confirm-input {
  background: var(--black-3);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-md);
  color: var(--white);
  padding: 8px 11px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  outline: none;
  transition: border-color var(--tr-fast);
  width: 100%;
}
.limpiar-confirm-input:focus {
  border-color: var(--red-light);
}
.limpiar-confirm-input::placeholder {
  color: var(--gray-2);
}

.limpiar-exec-btn {
  width: 100%;
  padding: 9px 12px;
  background: rgba(192,57,43,0.15);
  border: 1px solid rgba(192,57,43,0.4);
  border-radius: var(--radius-md);
  color: var(--red-light);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: not-allowed;
  opacity: 0.45;
  transition: all var(--tr-fast);
  letter-spacing: 0.02em;
}
.limpiar-exec-btn:not(:disabled) {
  cursor: pointer;
  opacity: 1;
}
.limpiar-exec-btn:not(:disabled):hover {
  background: rgba(192,57,43,0.3);
  border-color: var(--red-light);
  box-shadow: 0 0 12px rgba(192,57,43,0.2);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .acceso-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .limpiar-grid { grid-template-columns: 1fr; }
  .config-tab   { padding: 8px 14px; font-size: 0.82rem; }
}

/* ══════════════════════════════════════════
   TAB DATOS — IMPORTAR / EXPORTAR BD
══════════════════════════════════════════ */
.datos-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.datos-card {
  background: var(--black-2);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.datos-card-danger {
  border-color: rgba(192,57,43,0.25);
  background: rgba(192,57,43,0.03);
}

.datos-card-hdr {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--gray-1);
}
.datos-card-danger .datos-card-hdr {
  border-bottom-color: rgba(192,57,43,0.2);
}

.datos-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
}
.datos-icon-green {
  background: rgba(45,158,107,0.15);
  border: 1px solid rgba(45,158,107,0.3);
  color: var(--green-light);
}
.datos-icon-red {
  background: rgba(192,57,43,0.15);
  border: 1px solid rgba(192,57,43,0.35);
  color: var(--red-light);
}

.datos-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 5px;
}
.datos-desc {
  font-size: 0.82rem;
  color: var(--gray-4);
  line-height: 1.55;
}
.datos-desc code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--black-4);
  border: 1px solid var(--gray-1);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--gold);
}

.datos-card-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Botones */
.datos-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--tr-fast);
  border: 1px solid;
}
.datos-btn-export {
  background: rgba(45,158,107,0.12);
  border-color: rgba(45,158,107,0.35);
  color: var(--green-light);
}
.datos-btn-export:hover:not(:disabled) {
  background: rgba(45,158,107,0.22);
  border-color: var(--green-light);
  box-shadow: 0 0 14px rgba(45,158,107,0.2);
}
.datos-btn-import {
  background: rgba(192,57,43,0.12);
  border-color: rgba(192,57,43,0.35);
  color: var(--red-light);
  cursor: not-allowed;
  opacity: 0.45;
}
.datos-btn-import:not(:disabled) {
  cursor: pointer;
  opacity: 1;
}
.datos-btn-import:not(:disabled):hover {
  background: rgba(192,57,43,0.25);
  border-color: var(--red-light);
  box-shadow: 0 0 14px rgba(192,57,43,0.2);
}
.datos-btn:disabled { cursor: not-allowed; opacity: 0.45; }

/* Mensajes resultado */
.datos-msg {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  border: 1px solid;
}
.datos-msg-ok {
  background: rgba(45,158,107,0.1);
  border-color: rgba(45,158,107,0.3);
  color: var(--green-light);
}
.datos-msg-err {
  background: rgba(192,57,43,0.1);
  border-color: rgba(192,57,43,0.3);
  color: var(--red-light);
}

/* Zona drag & drop */
.datos-drop-zone {
  border: 2px dashed var(--gray-1);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--tr-fast);
  background: var(--black-3);
}
.datos-drop-zone:hover,
.datos-drop-zone.drag-over {
  border-color: rgba(192,57,43,0.5);
  background: rgba(192,57,43,0.06);
}
.datos-file-hidden {
  display: none;
}
.datos-drop-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  line-height: 1;
}
.datos-drop-label {
  font-size: 0.84rem;
  color: var(--gray-4);
  line-height: 1.5;
}
.datos-drop-link {
  color: var(--gold);
  text-decoration: underline;
  cursor: pointer;
}

/* Archivo seleccionado */
.datos-file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  background: var(--black-3);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--white-dim);
}
.datos-file-icon { font-size: 1rem; }

/* Confirmar importación */
.datos-confirm-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.datos-confirm-lbl {
  font-size: 0.8rem;
  color: var(--gray-4);
}
.datos-confirm-lbl code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--black-4);
  border: 1px solid var(--gray-1);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--red-light);
}

@media (max-width: 640px) {
  .datos-card-hdr { flex-direction: column; gap: 10px; }
}

/* ═══════════════════════════════════════
   MONITOR DE VENTAS
═══════════════════════════════════════ */
.monitor-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.monitor-datetime {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.monitor-date {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--gray-4);
  letter-spacing: 0.03em;
  text-transform: capitalize;
}

.monitor-time {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  line-height: 1.1;
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.monitor-stat-card {
  background: var(--black-2);
  border: 1px solid var(--gray-1);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}

.monitor-stat-card:hover {
  border-color: var(--gray-2);
  box-shadow: var(--shadow-sm);
}

.monitor-stat-card.highlight {
  border-color: rgba(200, 146, 42, 0.45);
  background: rgba(200, 146, 42, 0.04);
}

.monitor-stat-card.highlight:hover {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(200, 146, 42, 0.15);
}

.monitor-stat-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.monitor-stat-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--gray-4);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

.monitor-stat-value {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.02em;
}

.monitor-stat-value.currency {
  font-size: 1.6rem;
  color: var(--gold-light);
}

.monitor-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--gray-1);
  margin: 2px 0;
}

.monitor-ticket-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 28px;
}


@media (max-width: 700px) {
  .monitor-grid { grid-template-columns: repeat(2, 1fr); }
  .monitor-stat-value { font-size: 1.7rem; }
  .monitor-stat-value.currency { font-size: 1.35rem; }
}

@media (max-width: 420px) {
  .monitor-grid { grid-template-columns: 1fr; }
  .monitor-header-row { justify-content: flex-start; }
  .monitor-datetime { align-items: flex-start; }
}
