/* ==========================================================================
   EZ RESTAURANT - EXECUTIVE SUITE & E-COMMERCE ADMIN PANEL
   Design: 24K Imperial Gold & Midnight Obsidian Glassmorphism
   Typography: Plus Jakarta Sans / Playfair Display / JetBrains Mono
   ========================================================================== */

:root {
  /* Palette */
  --bg-deep: #07090d;
  --bg-sidebar: #0b0e14;
  --bg-surface: #10151f;
  --bg-surface-elevated: #161c2b;
  --bg-surface-hover: #1c2336;
  
  /* 24K Royal Imperial Gold */
  --gold-primary: #cba86a;
  --gold-light: #f3e5c8;
  --gold-hover: #dfb76c;
  --gold-dark: #8a6c32;
  --gold-glow: rgba(203, 168, 106, 0.28);
  --gold-border: rgba(203, 168, 106, 0.22);
  --gold-gradient: linear-gradient(135deg, #f5e4c3 0%, #cba86a 50%, #99732b 100%);
  
  /* Accents & Status */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.12);
  
  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Glass */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 25px rgba(203, 168, 106, 0.2);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  
  /* Sidebar width */
  --sidebar-w: 280px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.admin-body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Links & Buttons Reset */
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* SIDEBAR */
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid rgba(203, 168, 106, 0.12);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-wrap {
  position: relative;
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1.5px solid var(--gold-primary);
  box-shadow: 0 0 14px var(--gold-glow);
}

.pulse-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--bg-sidebar);
  box-shadow: 0 0 8px var(--success);
}

.brand-title {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-toggle-btn {
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.sidebar-toggle-btn:hover {
  color: var(--gold-primary);
  background: rgba(203, 168, 106, 0.1);
}

/* Sidebar Navigation */
.sidebar-nav {
  padding: 20px 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-sub);
  padding: 12px 12px 6px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
}

.nav-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  transition: color 0.2s ease;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: var(--gold-light);
  background: linear-gradient(90deg, rgba(203, 168, 106, 0.16) 0%, rgba(203, 168, 106, 0.04) 100%);
  border-left: 3px solid var(--gold-primary);
  font-weight: 600;
}

.nav-item.active i {
  color: var(--gold-primary);
}

.nav-badge {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-weight: 600;
}

.nav-badge.badge-warning {
  background: var(--warning);
  color: #000;
  animation: pulseBadge 2s infinite;
}

.nav-badge.badge-info {
  background: var(--info);
  color: #fff;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Sidebar Footer / Profile */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: var(--glass-border);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold-primary);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  display: block;
  font-size: 0.72rem;
  color: var(--gold-primary);
}

.live-site-btn {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.live-site-btn:hover {
  color: var(--gold-light);
  background: rgba(203, 168, 106, 0.15);
}

/* ==========================================================================
   MAIN CONTENT VIEWPORT & TOP COMMAND BAR
   ========================================================================== */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-deep);
}

.top-command-bar {
  height: 70px;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(203, 168, 106, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.command-bar-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.mobile-sidebar-open {
  display: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  padding: 6px;
}

.location-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: var(--glass-border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.time-clock {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--gold-primary);
  background: rgba(203, 168, 106, 0.08);
  border: 1px solid rgba(203, 168, 106, 0.18);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 6px;
}

.command-bar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.status-open {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-open .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ==========================================================================
   BUTTONS & FORM ELEMENTS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
}

.btn-gold {
  background: var(--gold-gradient);
  color: #0b0e14;
  box-shadow: 0 4px 14px rgba(203, 168, 106, 0.3);
  font-weight: 700;
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(203, 168, 106, 0.45);
  filter: brightness(1.06);
}

.btn-outline {
  border: 1px solid rgba(203, 168, 106, 0.3);
  color: var(--gold-light);
  background: rgba(203, 168, 106, 0.05);
}

.btn-outline:hover {
  background: rgba(203, 168, 106, 0.15);
  border-color: var(--gold-primary);
  color: #fff;
}

.btn-dark {
  background: var(--bg-surface);
  border: var(--glass-border);
  color: var(--text-muted);
}

.btn-dark:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
}

.btn-danger {
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.link-btn {
  font-size: 0.85rem;
  color: var(--gold-primary);
  font-weight: 600;
  transition: color 0.2s;
}
.link-btn:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* ==========================================================================
   TAB PANES
   ========================================================================== */
.tab-pane {
  display: none;
  padding: 32px;
  animation: fadeInPane 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-pane.active {
  display: block;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pane-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
  flex-wrap: wrap;
}

.pane-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.pane-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   KPI CARDS (DASHBOARD)
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid rgba(203, 168, 106, 0.15);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  gap: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(203, 168, 106, 0.35);
  box-shadow: var(--shadow-gold);
}

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

.kpi-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.kpi-icon-wrap.gold-glow {
  background: rgba(203, 168, 106, 0.12);
  color: var(--gold-primary);
  border: 1px solid rgba(203, 168, 106, 0.25);
}

.kpi-icon-wrap.amber-glow {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.kpi-icon-wrap.blue-glow {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.kpi-icon-wrap.green-glow {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.kpi-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 4px 0;
  letter-spacing: -0.02em;
}

.kpi-delta {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.kpi-delta.positive { color: var(--success); }
.kpi-delta.warning { color: var(--warning); }
.kpi-delta.info { color: var(--info); }

/* DASHBOARD PANELS */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

.dashboard-panel {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

/* CUISINE DISTRIBUTION BARS */
.cuisine-bars-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.cuisine-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cuisine-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}

.cuisine-name {
  color: var(--text-main);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cuisine-count {
  color: var(--text-muted);
}

.cuisine-progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.cuisine-progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--gold-gradient);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ROOFTOP SUMMARY WIDGET */
.restaurant-rooftop-summary {
  display: flex;
  gap: 16px;
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(203, 168, 106, 0.18);
  border-radius: var(--radius-md);
  padding: 14px;
  align-items: center;
}

.rooftop-img-box {
  position: relative;
  width: 110px;
  height: 85px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.rooftop-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rooftop-overlay-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  font-size: 0.65rem;
  padding: 2px 4px;
  text-align: center;
  color: #fff;
  font-weight: 600;
}

.rooftop-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.rooftop-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.meta-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-pills span {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  color: var(--gold-light);
}

/* ==========================================================================
   PRODUCTS / DISHES SECTION
   ========================================================================== */
.filter-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 480px;
}

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-sub);
  font-size: 0.9rem;
}

.search-box input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 40px 10px 38px;
  color: var(--text-main);
  font-size: 0.88rem;
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-sub);
  display: none;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.select-styled {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}
.select-styled:focus {
  border-color: var(--gold-primary);
}

.view-toggle {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
}

.view-btn {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.view-btn.active {
  background: rgba(203, 168, 106, 0.2);
  color: var(--gold-light);
}

/* PRODUCTS GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}

.admin-dish-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}

.admin-dish-card:hover {
  transform: translateY(-3px);
  border-color: rgba(203, 168, 106, 0.3);
  box-shadow: var(--shadow-gold);
}

.dish-media-wrap {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: #000;
}

.dish-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.admin-dish-card:hover .dish-media-wrap img {
  transform: scale(1.05);
}

.dish-badge-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.dish-cuisine-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(16, 21, 31, 0.85);
  backdrop-filter: blur(8px);
  color: var(--text-main);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.dish-stock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.1rem;
}

.dish-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dish-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.dish-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.dish-card-price {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold-light);
  white-space: nowrap;
}

.dish-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dish-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.diet-pill {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.dish-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Stock Toggle Switch */
.stock-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.stock-toggle-wrap.in-stock { color: var(--success); }
.stock-toggle-wrap.out-stock { color: var(--danger); }

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--success);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

.dish-action-btns {
  display: flex;
  gap: 6px;
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.04);
}

.action-btn.btn-edit {
  color: var(--gold-light);
  border: 1px solid rgba(203, 168, 106, 0.25);
}
.action-btn.btn-edit:hover {
  background: var(--gold-primary);
  color: #000;
}

.action-btn.btn-del {
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.action-btn.btn-del:hover {
  background: var(--danger);
  color: #fff;
}

/* ==========================================================================
   TABLES (LUXURY THEME)
   ========================================================================== */
.table-responsive {
  overflow-x: auto;
}

.luxury-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.luxury-table th {
  padding: 14px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-sub);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.luxury-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  vertical-align: middle;
}

.luxury-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-dish-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid rgba(203, 168, 106, 0.2);
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.badge-status.status-pending {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-status.status-cooking {
  background: rgba(203, 168, 106, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(203, 168, 106, 0.3);
}

.badge-status.status-ready {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-status.status-completed {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-status.status-cancelled {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   LIVE ORDERS / KDS PIPELINE
   ========================================================================== */
.order-pipeline-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.pipe-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.pipe-tab:hover {
  color: var(--text-main);
  background: var(--bg-surface-elevated);
}

.pipe-tab.active {
  background: rgba(203, 168, 106, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

.count-tag {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}
.count-tag.count-warning { background: var(--warning); color: #000; }
.count-tag.count-amber { background: var(--gold-primary); color: #000; }
.count-tag.count-info { background: var(--info); color: #fff; }
.count-tag.count-success { background: var(--success); color: #fff; }

.orders-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.admin-order-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.admin-order-card:hover {
  border-color: rgba(203, 168, 106, 0.3);
  box-shadow: var(--shadow-md);
}

.order-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 12px;
}

.order-id-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold-light);
}

.order-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.order-customer-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-cust-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.order-cust-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-items-snippet {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
}

.order-snippet-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}

.order-totals-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.order-total-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold-light);
}

.order-action-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   MODALS (ADD DISH / PRINT RECEIPT)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.modal-container {
  background: var(--bg-surface);
  border: 1px solid rgba(203, 168, 106, 0.25);
  border-radius: var(--radius-lg);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), var(--shadow-gold);
  transform: scale(0.96);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-backdrop.active .modal-container {
  transform: scale(1);
}

.modal-lg { max-width: 960px; }
.modal-md { max-width: 600px; }

.modal-header {
  padding: 20px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-close-btn {
  color: var(--text-muted);
  font-size: 1.3rem;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s;
}
.modal-close-btn:hover { color: #fff; }

.modal-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-surface-elevated);
}

/* 2-Column Form Layout in Modal */
.modal-grid-2col {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label, .form-label-bold {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-label-bold {
  color: var(--text-main);
  margin-bottom: 8px;
  display: block;
}

.required { color: var(--gold-primary); }

.form-row {
  display: flex;
  gap: 14px;
}

.col-4 { flex: 1; }
.col-6 { flex: 1; }

.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.88rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: var(--font-sans);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
}

.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-prefix .prefix {
  position: absolute;
  left: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-primary);
}

.input-with-prefix .form-input {
  padding-left: 45px;
}

/* Checkbox Pills Wrap */
.checkbox-pills-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-check {
  display: inline-flex;
  cursor: pointer;
}

.pill-check input { display: none; }

.pill-check span {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pill-check input:checked + span {
  background: rgba(203, 168, 106, 0.2);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Image Upload Drop Zone */
.upload-methods-card {
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
}

.drop-zone {
  border: 2px dashed rgba(203, 168, 106, 0.35);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(203, 168, 106, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--gold-primary);
  background: rgba(203, 168, 106, 0.08);
}

.drop-icon {
  font-size: 1.8rem;
  color: var(--gold-primary);
  margin-bottom: 4px;
}

.drop-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.drop-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.file-hidden { display: none; }

.divider-text {
  text-align: center;
  position: relative;
  margin: 16px 0 12px;
}

.divider-text::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.divider-text span {
  position: relative;
  background: var(--bg-surface-elevated);
  padding: 0 10px;
  font-size: 0.68rem;
  color: var(--text-sub);
  letter-spacing: 0.08em;
  font-weight: 700;
}

/* Preset Images Horizontal Scroll */
.preset-images-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.preset-img-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.preset-img-btn img {
  width: 54px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
}

.preset-img-btn span {
  font-size: 0.65rem;
  color: var(--text-muted);
  max-width: 54px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-img-btn:hover, .preset-img-btn.active {
  border-color: var(--gold-primary);
  background: rgba(203, 168, 106, 0.15);
}

/* Live Card Preview Box */
.live-preview-box {
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(203, 168, 106, 0.2);
  border-radius: var(--radius-md);
  padding: 14px;
}

.preview-tag {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.preview-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.preview-media {
  position: relative;
  height: 120px;
}

.preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.preview-time {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  font-size: 0.65rem;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

.preview-body {
  padding: 10px 12px;
}

.preview-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.preview-title-row h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--gold-light);
  white-space: nowrap;
}

.preview-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   PRINTABLE INVOICE / KITCHEN RECEIPT
   ========================================================================== */
.printable-invoice {
  color: #f8fafc;
}

.invoice-brand {
  text-align: center;
  margin-bottom: 18px;
}

.invoice-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-primary);
  margin-bottom: 8px;
}

.invoice-brand h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--gold-light);
  margin-bottom: 2px;
}

.invoice-brand p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.invoice-divider {
  width: 60px;
  height: 2px;
  background: var(--gold-gradient);
  margin: 10px auto 0;
}

.invoice-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.82rem;
}

.meta-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.invoice-notes {
  background: rgba(203, 168, 106, 0.08);
  border-left: 3px solid var(--gold-primary);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.invoice-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.invoice-items-table th {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  color: var(--text-sub);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.invoice-items-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.invoice-items-table tfoot td {
  padding: 6px 10px;
  border: none;
}

.grand-total-row td {
  border-top: 1px solid rgba(203, 168, 106, 0.3) !important;
  font-size: 1rem !important;
  padding-top: 10px !important;
}

/* ==========================================================================
   SETTINGS SECTION
   ========================================================================== */
.settings-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

.settings-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.settings-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), var(--shadow-gold);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.admin-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  color: var(--gold-primary);
  font-size: 1.2rem;
}

.toast-message {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

/* ==========================================================================
   UTILITY CLASSES & PRINT MEDIA
   ========================================================================== */
.gold-text { color: var(--gold-primary) !important; }
.text-gold { color: var(--gold-light) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.font-bold { font-weight: 800 !important; }
.italic { font-style: italic !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 14px !important; }
.mt-4 { margin-top: 20px !important; }
.py-4 { padding-top: 16px !important; padding-bottom: 16px !important; }

/* PRINT STYLING */
@media print {
  body * {
    visibility: hidden;
  }
  #printableInvoiceContent, #printableInvoiceContent * {
    visibility: visible;
  }
  #printableInvoiceContent {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #fff !important;
    color: #000 !important;
    padding: 20px;
  }
  .invoice-items-table td, .invoice-items-table th {
    color: #000 !important;
    border-color: #ddd !important;
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-split-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .modal-grid-2col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
  .mobile-sidebar-open {
    display: block;
  }
  .top-command-bar {
    padding: 0 16px;
  }
  .tab-pane {
    padding: 20px 16px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .orders-cards-container {
    grid-template-columns: 1fr;
  }
  .location-chip {
    display: none;
  }
}
