/* ============================================
   AQUA & SAPONE - COSMETIC SHOP DESIGN SYSTEM
   ============================================ */

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
/* Enable hardware acceleration for animations */
.product-card,
.modal,
.toast,
.btn {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Content visibility for off-screen performance */
.product-card {
  content-visibility: auto;
  contain-intrinsic-size: 300px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* GPU acceleration for smooth scrolling */
.category-tabs,
.products-grid,
.waiter-tables-grid {
  will-change: scroll-position;
}

/* ============================================
   CSS VARIABLES & THEMING — AQUA & SAPONE
   ============================================ */
:root {
  /* Primary Colors - Aqua */
  --primary: #6de4f7;
  --primary-hover: #4cc9e0;
  --primary-light: rgba(109, 228, 247, 0.15);
  --primary-glow: rgba(109, 228, 247, 0.4);
  --primary-rgb: 109, 228, 247;

  /* Accent Colors - Aqua (unified cosmetic palette) */
  --accent: #6de4f7;
  --accent-hover: #4cc9e0;
  --accent-light: rgba(109, 228, 247, 0.15);
  --accent-glow: rgba(109, 228, 247, 0.4);
  --accent-rgb: 109, 228, 247;
  --shadow-accent: 0 7px 10px -3px rgba(109, 228, 247, 0.25), 0 4px 6px -4px rgba(109, 228, 247, 0.2);

  /* Aqua & Sapone Specific */
  --aqua: #6de4f7;
  --deep-sea: #030d1a;
  --pearl: #e8f7ff;
  --mist: rgba(180, 235, 255, 0.18);
  --rim: rgba(126, 232, 250, 0.55);

  /* Status Colors - Vibrant & Distinct */
  --status-inactive: #cbb6b6;
  --status-active: #3b82f6;
  --status-ordering: #fbbf24;
  --status-pending: #fb923c;
  --status-preparing: #c084fc;
  --status-delivered: #4ade80;
  --status-paid: #34d399;
  --status-cleared: #9ca3af;
  --status-payment-requested: #f472b6;

  /* Semantic Colors */
  --success: #10b981;
  --success-hover: #059669;
  --success-light: rgba(16, 185, 129, 0.15);
  --success-glow: rgba(16, 185, 129, 0.4);
  --warning: #f59e0b;
  --warning-hover: #d97706;
  --warning-light: rgba(245, 158, 11, 0.15);
  --error: #ef4444;
  --error-hover: #dc2626;
  --error-light: rgba(239, 68, 68, 0.15);
  --info: #3b82f6;
  --info-hover: #2563eb;
  --info-light: rgba(59, 130, 246, 0.15);

  /* Background Colors - Deep Sea */
  --bg-primary: #030d1a;
  --bg-secondary: rgba(6, 20, 40, 0.85);
  --bg-tertiary: rgba(10, 30, 55, 0.9);
  --bg-card: rgba(6, 20, 40, 0.65);
  --bg-glass: rgba(109, 228, 247, 0.04);

  /* Text Colors - Pearl & Mist */
  --text-primary: #e8f7ff;
  --text-secondary: rgba(200, 240, 255, 0.65);
  --text-muted: rgba(200, 240, 255, 0.45);
  --text-inverse: #030d1a;

  /* Border & Dividers - Aqua Tinted */
  --border-color: rgba(109, 228, 247, 0.22);
  --border-light: rgba(109, 228, 247, 0.12);
  --divider: rgba(109, 228, 247, 0.08);

  /* Shadows - Deep Sea */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.4), 0 4px 8px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 30px -5px rgba(109, 228, 247, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(109, 228, 247, 0.2);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Typography - Cosmetic Serif + Sans */
  --font-family: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;

  /* Z-Index Layers */
  --z-below: -1;
  --z-base: 0;
  --z-above: 10;
  --z-sticky: 100;
  --z-fixed: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* Custom Premium Modal Styles */
.custom-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: var(--space-md);
}

.custom-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  /* backdrop-filter: blur(8px); */
  /* Potentially heavy on mobile */
}

.custom-modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 400px;
  padding: var(--space-lg);
  box-shadow: var(--shadow-xl);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal-overlay.active .custom-modal-box {
  transform: scale(1) translateY(0);
}

.custom-modal-content {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.custom-modal-content p {
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-normal);
  font-weight: var(--font-weight-medium);
}

.custom-modal-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.modal-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-md);
  transition: all 0.2s ease;
  flex: 1;
  text-align: center;
  cursor: pointer;
  border: none;
}

.modal-btn.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.modal-btn.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.modal-btn.secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.modal-btn.secondary:hover {
  background: var(--bg-glass);
  transform: translateY(-2px);
}

.modal-btn.danger {
  background: var(--error);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.modal-btn.danger:hover {
  background: var(--error-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.modal-btn:active {
  transform: translateY(0);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* Disable text selection globally */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  /* iOS Safari - disable callout menu */
}

/* Re-enable text selection for editable elements */
input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

html {
  font-size: 20px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

body {
  font-family: var(--font-family);
  line-height: normal;
  color: var(--pearl);
  background: var(--deep-sea);
  min-height: 100vh;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
}

/* Background Pattern — Deep Sea Gradients */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 70% at 50% 20%, rgba(0, 110, 180, 0.25) 0%, transparent 65%),
    radial-gradient(ellipse 80% 90% at 80% 80%, rgba(0, 50, 120, 0.2) 0%, transparent 70%),
    radial-gradient(circle at 20% 60%, rgba(109, 228, 247, 0.08) 0%, transparent 40%);
  pointer-events: none;
  z-index: var(--z-below);
}

a {
  color: inherit;
  text-decoration: none;
}

.relative {
  position: relative;
}

.pr-xl {
  padding-right: var(--space-xl) !important;
}

.search-clear-btn {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--error);
  /* Red by default */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  z-index: 10;
}

.search-clear-btn:hover {
  transform: translateY(-50%) scale(1.1);
  background: rgba(239, 68, 68, 0.15);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

ul,
ol {
  list-style: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
}

h1 {
  font-size: var(--font-size-3xl);
}

h2 {
  font-size: var(--font-size-2xl);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

h5 {
  font-size: var(--font-size-md);
}

h6 {
  font-size: var(--font-size-sm);
}

p {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
  font-weight: 500;
}

.text-primary {
  color: var(--pearl);
}

.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

.text-error {
  color: var(--error);
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--space-md);
}

.flex {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  align-content: stretch;
  height: none;
  flex-wrap: wrap;
  justify-content: space-between;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

.gap-xs {
  gap: var(--space-xs);
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

.gap-xl {
  gap: var(--space-xl);
}

.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   HEADER COMPONENT
   ============================================ */
.header {
  position: relative;
  z-index: var(--z-sticky);
  background: rgba(3, 13, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-md) 0;
}

.header-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

.header-logo {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
}

.header-logo-main {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}


.restaurant-logo {
  height: 120px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 0 12px rgba(109, 228, 247, 0.25));
}

.restaurant-branding {
  display: flex;
  flex-direction: column;
}

.restaurant-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  font-weight: 400;
  background: linear-gradient(135deg, #ffffff, #6de4f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  text-shadow: none;
  letter-spacing: 0.02em;
}

.header-logo h1 {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  background: linear-gradient(135deg, #ffffff, var(--aqua));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Call Waiter Button - Header */
.call-waiter-btn-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(130deg, rgba(109, 228, 247, 0.28), rgba(50, 140, 210, 0.2));
  border: 1px solid rgba(109, 228, 247, 0.4);
  border-radius: 40px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--pearl);
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.08em;
  box-shadow: 0 4px 16px rgba(109, 228, 247, 0.15);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.call-waiter-btn-header:hover {
  transform: translateY(-2px);
  background: linear-gradient(130deg, rgba(109, 228, 247, 0.4), rgba(50, 140, 210, 0.32));
  box-shadow: 0 6px 20px rgba(109, 228, 247, 0.25);
}

.call-waiter-btn-header:active {
  transform: translateY(0) scale(0.97);
}

.call-waiter-btn-header svg {
  width: 18px;
  height: 18px;
}

.session-code-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.session-code-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .session-code-btn.mobile-compact {
    padding: 2px 6px !important;
    font-size: 10px !important;
    height: 28px !important;
    border-radius: 8px !important;
    gap: 4px !important;
  }
}

.header-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.table-badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: rgba(109, 228, 247, 0.08);
  border: 1px solid rgba(109, 228, 247, 0.3);
  border-radius: var(--radius-full);
  color: var(--aqua);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.table-badge svg {
  width: 16px;
  height: 16px;
}

/* Social Media Buttons in Header */
.header-social-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(109, 228, 247, 0.25);
  background: rgba(109, 228, 247, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--aqua);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.social-btn:hover {
  background: rgba(109, 228, 247, 0.18);
  border-color: rgba(109, 228, 247, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(109, 228, 247, 0.2);
}

.social-btn:active {
  transform: scale(0.95);
}

.social-btn svg {
  width: 16px;
  height: 16px;
}

/* Language Selector */
.language-selector {
  position: relative;
}

.language-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(109, 228, 247, 0.06);
  border: 1px solid rgba(109, 228, 247, 0.22);
  border-radius: 40px;
  color: var(--pearl);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.language-btn:hover {
  background: rgba(109, 228, 247, 0.12);
  border-color: rgba(109, 228, 247, 0.4);
}

.language-dropdown {
  position: absolute;
  top: calc(100% + var(--space-xs));
  right: 0;
  min-width: 120px;
  background: rgba(3, 13, 26, 0.95);
  border: 1px solid rgba(109, 228, 247, 0.22);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: var(--z-above, 999999);
}

.language-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-option {
  display: block;
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  color: var(--pearl);
  transition: all var(--transition-fast);
}

.language-option:hover,
.language-option.active {
  background: rgba(109, 228, 247, 0.12);
  color: var(--aqua);
}

/* ============================================
   CATEGORY TABS - Client Menu
   ============================================ */
.sticky-nav {
  position: sticky !important;
  position: -webkit-sticky !important;
  top: 0 !important;
  z-index: 110 !important;
  background: rgba(3, 13, 26, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: 100% !important;
  margin: 0 0 20px 0 !important;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 10px 30px rgba(109, 228, 247, 0.08);
  padding: 5px 0;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(109, 228, 247, 0.12);
}

.search-flex {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: var(--space-md) 0;
}

.search-flex .search-container {
  flex: 1;
  margin: 0 !important;
}

.allergy-btn {
  height: 52px;
  padding: 0 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* Specific color for dietary */
#dietaryFilterBtn {
  color: var(--success);
}


/* Glassmorphism Category Tabs */
.category-tabs {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding: var(--space-sm) 0 !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.category-tab {
  flex-shrink: 0;
  white-space: break-spaces;
  padding: 10px 22px !important;
  border-radius: var(--radius-full) !important;
  background: rgba(109, 228, 247, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(109, 228, 247, 0.1) !important;
  color: rgba(200, 240, 255, 0.65);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.category-tab:hover {
  background: rgba(109, 228, 247, 0.1);
  color: var(--pearl);
  transform: translateY(-2px);
}

.category-tab.active {
  background: linear-gradient(130deg, rgba(109, 228, 247, 0.28), rgba(50, 140, 210, 0.2)) !important;
  color: white !important;
  border-color: rgba(109, 228, 247, 0.4) !important;
  box-shadow: 0 4px 16px rgba(109, 228, 247, 0.2);
  transform: translateY(-2px);
  font-weight: 600;
}

/* Secondary Category Tabs Styling */
.secondary-category-tabs .category-tab {
  padding: 6px 16px !important;
  font-size: 16px;
  background: rgb(255 255 255 / 5%);
  border-color: rgba(255, 255, 255, 0.03) !important;
}

.secondary-category-tabs .category-tab.active {
  background: var(--primary) !important;
  /* Use primary color for sub-tabs to distinguish from accent primary-tabs */
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.waiter-category-tabs.secondary-waiter-category-tabs .waiter-category-tab {
  padding: 6px 14px;
  font-size: 13px;
  opacity: 0.9;
}

.waiter-category-tabs.secondary-waiter-category-tabs .waiter-category-tab.active {
  background: var(--primary);
  color: white;
}

.data-table {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  overflow-x: auto;
  /* Enable horizontal scroll on mobile */
  -webkit-overflow-scrolling: touch;
}

/* Search Bar Enhancement */
/* Premium Search Bar Enhancement */
.search-container {
  background: rgba(255, 255, 255, 0.05) !important;
  /* backdrop-filter: blur(8px); */
  /* Removed for performance */
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--radius-lg);
  display: flex !important;
  align-items: center;
  padding: 0 16px !important;
  height: 52px;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  margin: var(--space-md) 0 !important;
  position: relative;
  z-index: 10;
}

.search-container:focus-within {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.search-container input {
  background: transparent !important;
  border: none !important;
  color: var(--text-primary) !important;
  flex: 1;
  padding: 12px !important;
  padding-left: 48px !important;
  padding-right: 48px !important;
  font-size: 15px !important;
  outline: none !important;
  width: 100%;
}

.search-icon {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.search-container:focus-within .search-icon {
  color: var(--accent);
}

/* Consolidated Order Status Card */
.order-status-card.consolidated {
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-xl);
}

.order-status-card.consolidated.collapsed .card-body {
  display: none;
}

.order-status-card.consolidated .status-indicator {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

.order-status-card.consolidated .status-indicator.pending {
  background: #f97316;
  box-shadow: 0 0 10px #f97316;
}

.order-status-card.consolidated .status-indicator.preparing {
  background: #a855f7;
  box-shadow: 0 0 10px #a855f7;
}

.order-status-card.consolidated .status-indicator.delivered {
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
}

.status-indicator.payment_requested {
  background: #ec4899;
  box-shadow: 0 0 10px #ec4899;
}

.order-items-summary {
  max-height: 200px;
  overflow-y: auto;
  padding-right: var(--space-sm);
}

.order-status-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--divider);
}

.order-status-item:last-child {
  border-bottom: none;
}

.order-status-card.collapsed .chevron-icon {
  transform: rotate(-90deg);
}

.order-blocks-container {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: var(--space-md);
  padding-right: 4px;
}

.order-blocks-container::-webkit-scrollbar {
  width: 4px;
}

.order-blocks-container::-webkit-scrollbar-track {
  background: transparent;
}

.order-blocks-container::-webkit-scrollbar-thumb {
  background: var(--divider);
  border-radius: 10px;
}

.order-status-block:last-child {
  border-bottom: none !important;
}

.order-status-block .text-muted {
  line-height: 1.4;
  word-break: break-word;
}


/* Blocked Table UI */
#blockedOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: white;
  text-align: center;
  padding: var(--space-xl);
}

.blocked-content {
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  animation: scale-in 0.3s ease;
}

.blocked-content svg {
  color: #ef4444;
  filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.5));
}

body.table-blocked {
  overflow: hidden;
}

@keyframes scale-in {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  padding-bottom: 180px;
  /* Extra space for floating cart - increased from 140px */
}

/* Variation Previews on Cards */
.product-variations-preview {
  margin-top: 8px;
  margin-bottom: 4px;
}

.product-variations-preview span {
  font-size: 0.7rem !important;
  color: var(--text-muted) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  transition: all var(--transition-fast) !important;
}

/* Cart/Order Detail Styling */
.cart-item-note,
.placed-order-item .item-note {
  font-size: 0.8rem;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  margin-top: 4px;
  border-left: 2px solid var(--accent);
}

.cart-item-modifications,
.item-exclusions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.item-exclusion-badge,
.exclusion-badge {
  font-size: 0.7rem;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Variation Selection in Modal */
.variation-item {
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid rgb(255 255 255);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.variation-item.active {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: var(--primary);
  color: #1fff00;
}

.variation-item.active .variation-check {
  display: block;
}

.variation-check {
  display: none;
  color: var(--primary);
}

.product-card {
  position: relative;
  background: rgba(18, 55, 95, 0.7);
  /* Lighter blue */
  border: 2px dotted rgba(255, 255, 255, 0.4);
  /* Foam-like bubble edge */
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.15);
  /* inner foam glow */
}

.product-card:active {
  transform: scale(0.98);
}

.product-card:hover {
  transform: translateY(-6px);
  background: rgba(24, 68, 115, 0.8);
  border-color: rgba(255, 255, 255, 0.8);
  /* Brighter foam on hover */
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.3),
    /* intense inner foam */
    0 12px 30px rgba(109, 228, 247, 0.2),
    0 0 25px rgba(109, 228, 247, 0.5);
}

.product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: transparent;
  /* Changed from var(--bg-tertiary) to prevent flicker */
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.img-fade-in {
  opacity: 0;
  transition: opacity 0.15s ease-out;
  will-change: opacity;
}

.img-fade-in.img-loaded {
  opacity: 1;
}

.product-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--accent);
  border-radius: var(--radius-sm);
  color: white;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

/* In-cart quantity badge on product cards */
.product-in-cart-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: var(--radius-full);
  color: white;
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* Cart item actions wrapper */
.cart-item-actions-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-xs);
}

/* Remove item button in cart */
.btn-remove-item {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
  border: 2px solid #ef4444;
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  font-weight: bold;
}

.btn-remove-item:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  border-color: #dc2626;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

/* Clear all button */
.clear-all-btn {
  margin-bottom: var(--space-md);
}

.product-content {
  padding: var(--space-md);
}

.product-name {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
  color: var(--pearl);
}

.product-description {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-md);
  display: -webkit-box;
  /* -webkit-line-clamp: 2; vendor extension removed for validation */
  /* -webkit-box-orient: vertical; */
  max-height: 3.1rem;
  /* Fallback for 2 lines */
  overflow: hidden;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-direction: column;
}

.product-price {
  /* font-size: var(--font-size-xl); */
  font-weight: var(--font-weight-bold);
  color: var(--accent);
}



/* ============================================
   BUTTONS - Premium Design System
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-lg);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: break-word;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Primary - Vibrant Indigo Gradient */
.btn-primary {
  background: linear-gradient(130deg, rgba(109, 228, 247, 0.35), rgba(50, 140, 210, 0.3));
  border: 1px solid rgba(109, 228, 247, 0.4);
  color: white;
  box-shadow: 0 4px 14px rgba(109, 228, 247, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(130deg, rgba(109, 228, 247, 0.5), rgba(50, 140, 210, 0.4));
  box-shadow: 0 6px 20px rgba(109, 228, 247, 0.3);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

/* Secondary - Glass Effect */
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

/* Accent - Warm Amber Gradient */
.btn-accent {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  color: #1f2937;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn-accent:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* Success - Emerald Gradient */
.btn-success {
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-success:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

/* Danger - Rose Gradient */
.btn-danger {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-danger:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

/* Warning - Orange Gradient */
.btn-warning {
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 50%, #ea580c 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4);
}

.btn-warning:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

/* Info - Blue Gradient */
.btn-info {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-info:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-xs);
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-md);
}

.btn-block {
  width: 100%;
}

/* Add to Order Button */
.btn-add {
  width: 44px;
  height: 44px;
  padding: 0;
  background: linear-gradient(130deg, rgba(109, 228, 247, 0.35), rgba(50, 140, 210, 0.3));
  border: 1px solid rgba(109, 228, 247, 0.4);
  border-radius: var(--radius-full);
  color: var(--pearl);
  font-size: var(--font-size-xl);
  box-shadow: 0 4px 12px rgba(109, 228, 247, 0.15);
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.btn-add:hover {
  background: linear-gradient(130deg, rgba(109, 228, 247, 0.5), rgba(50, 140, 210, 0.4));
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(109, 228, 247, 0.25);
}

.btn-add:active {
  transform: scale(0.95);
}

/* Product Quantity Selector on Card */
.product-qty-selector {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.product-qty-selector .qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-qty-selector .qty-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.product-qty-selector .qty-text {
  font-weight: var(--font-weight-bold);
  min-width: 20px;
  text-align: center;
}

/* ============================================
   FLOATING CART
   ============================================ */
.floating-cart {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-fixed);
  width: calc(100% - var(--space-xl));
  max-width: 500px;
}

.cart-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cart-preview:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.cart-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.cart-icon {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: var(--radius-lg);
  color: white;
}

.cart-icon svg {
  width: 24px;
  height: 24px;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: var(--radius-full);
  color: white;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
}

.cart-text h4 {
  font-size: var(--font-size-md);
  margin-bottom: 2px;
}

.cart-text p {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.cart-total {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--accent);
}

/* Hidden state */
.floating-cart.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(100px);
}

/* ============================================
   CART MODAL / DRAWER
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: auto;
  max-height: 85vh;
  max-height: 85dvh;
  background: var(--bg-secondary);
  border-radius: 24px 24px 0 0;
  z-index: var(--z-modal);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

.cart-modal.active {
  transform: translateY(0);
}

.cart-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px;
  padding-top: 28px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  flex-shrink: 0;
  background: var(--bg-secondary);
  min-height: 60px;
  box-sizing: border-box;
}

.cart-modal-header::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.cart-modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.cart-modal-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
  border: 2px solid #ef4444;
  border-radius: 50%;
  color: white;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  flex-shrink: 0;
}

.cart-modal-close:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
}

.cart-modal-body {
  flex: 1 1 auto;
  width: 100%;
  min-height: 100px;
  max-height: 40vh;
  overflow-y: auto;
  padding: 16px 20px;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.cart-modal-footer {
  width: 100%;
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Cart Items */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cart-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.cart-item-image {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  transition: all var(--transition-fast);
}

.qty-btn:hover {
  background: var(--primary);
}

.qty-btn.remove:hover {
  background: var(--error);
}

.cart-item-qty {
  min-width: 30px;
  text-align: center;
  font-weight: var(--font-weight-semibold);
}

/* Inline Quantity Selector on Product Cards */
.product-qty-selector {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 6px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
}

.product-qty-selector .qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  font-weight: bold;
}

.product-qty-selector .qty-btn:hover {
  background: var(--accent) !important;
  color: white !important;
  transform: scale(1.1);
}

.product-qty-selector .qty-text {
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--accent);
}

.cart-item-total {
  font-weight: var(--font-weight-bold);
  color: var(--accent);
  font-size: var(--font-size-lg);
  align-self: center;
}

/* Empty Cart */
.cart-empty {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.cart-empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.cart-empty-icon svg {
  width: 40px;
  height: 40px;
}

.cart-empty h3 {
  margin-bottom: var(--space-sm);
}

.cart-empty p {
  color: var(--text-muted);
}

/* Cart Summary */
.cart-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-summary-row.total {
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  font-size: var(--font-size-lg);
}

.cart-summary-row.total span:last-child {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--accent);
}

/* ============================================
   CALL WAITER BUTTON
   ============================================ */
.call-waiter-btn {
  position: fixed;
  bottom: 120px;
  right: var(--space-lg);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-full);
  color: white;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-fixed);
  transition: all var(--transition-fast);
}

.call-waiter-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

.call-waiter-btn svg {
  width: 28px;
  height: 28px;
}

.call-waiter-btn.calling {
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
  }

  70% {
    box-shadow: 0 0 0 20px rgba(245, 158, 11, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* ============================================
   PRODUCT DETAIL MODAL
   ============================================ */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.product-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.product-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 88vh;
  /* Reduced height to allow space at the top */
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 1001;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: 20px;
  /* Added space above */
}

.product-modal.active {
  transform: translateY(0);
}

.product-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  padding-top: max(var(--space-sm), env(safe-area-inset-top));
  /* Handle notch */
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  /* Make it sticky */
  top: 0;
  z-index: 10;
}

.product-modal-nav {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.product-modal-nav:hover {
  background: var(--primary);
  transform: scale(1.05);
}

.product-modal-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.product-modal-close {
  width: 44px;
  height: 44px;
  border: 2px solid #ef4444;
  background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.product-modal-close:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
}

.product-modal-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.product-modal-image {
  width: 100%;
  height: 200px;
  background: var(--bg-tertiary);
  position: relative;
  overflow: hidden;
}

.product-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-modal-content {
  padding: var(--space-lg);
}

.product-modal-name {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.product-modal-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.product-modal-ingredients {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.product-modal-ingredients h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.ingredients-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.ingredient-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ingredient-toggle.added {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--success);
  color: #ffffff;
}

.ingredient-toggle.removed {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--error);
  color: var(--error);
  text-decoration: line-through;
}

.item-exclusion {
  color: #ef4444 !important;
  font-weight: 500;
}

.product-modal-note {
  margin-bottom: var(--space-md);
}

.product-modal-note label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.product-modal-note textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  resize: none;
  transition: border-color 0.2s ease;
}

.product-modal-note textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.product-modal-note textarea::placeholder {
  color: var(--text-muted);
}

.product-modal-price {
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  color: var(--accent);
}

.product-modal-footer {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.quantity-selector .qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.quantity-selector .qty-btn:hover {
  background: var(--primary);
  color: white;
}

.quantity-selector .qty-value {
  min-width: 40px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  color: var(--accent);
}

.product-modal-footer .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 50px;
}

.product-modal-footer .add-price {
  font-weight: var(--font-weight-bold);
  opacity: 0.9;
}

.add-to-cart-btn-large {
  flex: 1;
  display: flex;
  gap: var(--space-sm);
  min-height: 52px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white !important;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.add-to-cart-btn-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
  filter: brightness(1.1);
}

.add-to-cart-btn-large:active {
  transform: translateY(0) scale(0.98);
}


/* Desktop adjustments for product modal */
@media (min-width: 768px) {

  /* Use standard centering for all product-like modals when active */
  .modal.active .product-modal {
    max-width: 500px;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    max-height: 85vh;
    border-radius: var(--radius-xl);
    bottom: auto !important;
    height: auto;
    min-height: 200px;
    display: flex !important;
    /* Ensure it's visible */
  }

  .product-modal-image {
    height: 250px;
  }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  pointer-events: none;
  width: 100%;
  max-width: 400px;
  padding: 0 var(--space-md);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in 0.2s ease;
  font-size: 14px;
}

.toast.toast-out {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: var(--success);
}

.toast.error .toast-icon {
  color: var(--error);
}

.toast.warning .toast-icon {
  color: var(--warning);
}

.toast.info .toast-icon {
  color: var(--info);
}

.toast-message {
  font-size: 13px;
  color: var(--text-primary);
  flex: 1;
}

.toast-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.2);
  border: none;
  border-radius: var(--radius-md);
  color: #ef4444;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(239, 68, 68, 0.3);
}

.toast-close svg {
  width: 14px;
  height: 14px;
}

/* ============================================
   ADMIN PRESETS STYLING
   ============================================ */
/* Admin Modal Styles moved to end of file to ensure specificity */

.btn-danger-outline {
  background: transparent;
  border: 1px solid var(--error);
  color: var(--error);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger-outline:hover {
  background: var(--error);
  color: white;
}

.modal-footer {
  background: var(--bg-tertiary);
  margin-top: 0;
  /* handled by modal body padding usually, but ensuring tight fit */
}

/* ============================================
   WAITER DASHBOARD STYLES
   ============================================ */
.waiter-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

@media (min-width: 768px) {
  .waiter-layout {
    grid-template-columns: 300px 1fr;
  }
}

.waiter-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: var(--space-lg);
  overflow-y: auto;
}

.waiter-main {
  padding: var(--space-lg);
  overflow-y: auto;
}

/* Table Cards */
.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-md);
}

.table-card {
  position: relative;
  padding: var(--space-lg);
  background: #6366f121;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl);
  text-align: center;
  cursor: pointer;
  box-shadow:
    0 0 20px #6366f1,
    0 3px #00ffab;
}


.table-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.table-card.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.table-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

.table-number {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
}

.table-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-status.inactive {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.2), rgba(107, 114, 128, 0.1));
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.table-status.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.1));
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.table-status.ordering {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(251, 191, 36, 0.1));
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.table-status.pending {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.25), rgba(251, 146, 60, 0.1));
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.4);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.table-status.preparing {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.25), rgba(192, 132, 252, 0.1));
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.4);
}

.table-status.delivered {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.25), rgba(74, 222, 128, 0.1));
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.table-status.paid {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.25), rgba(52, 211, 153, 0.1));
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.table-status.payment_requested {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.25), rgba(244, 114, 182, 0.1));
  color: #f472b6;
  border: 1px solid rgba(244, 114, 182, 0.4);
  animation: pulse-badge 1.5s infinite;
}

/* Notification Badge */
.notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--error);
  border-radius: var(--radius-full);
  color: white;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  animation: bounce 1s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

/* Order Details Panel */
.order-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.order-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.order-panel-body {
  padding: var(--space-lg);
}

.order-panel-footer {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

/* Order Items List */
.order-items-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.order-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border-radius: var(--radius-md);
}

.order-item-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.order-item-qty {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: var(--radius-sm);
  color: white;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.order-item-name {
  font-weight: var(--font-weight-medium);
}

.order-item-price {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

/* ============================================
   ADMIN PANEL STYLES
   ============================================ */
.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .admin-layout {
    grid-template-columns: 260px 1fr;
  }
}

.admin-sidebar {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: var(--space-xl) var(--space-md);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
}

.logo-icon-glow {
  background: rgba(var(--primary-rgb, 99, 102, 241), 0.1);
  padding: 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  border: 1px solid rgba(var(--primary-rgb, 99, 102, 241), 0.2);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-2xl);
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  color: white;
  font-weight: var(--font-weight-bold);
  transition: all var(--transition-fast);
}

.admin-nav-item:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.admin-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Admin Search Bar Styles */
.search-wrap {
  position: relative;
  width: 100%;
}

.search-container {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 400px;
}

.search-container>svg {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 5;
}

.search-container .form-input {
  padding-left: 48px !important;
  padding-right: 48px !important;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.search-container .form-input:focus {
  background: var(--bg-tertiary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.admin-nav-item svg {
  width: 30px;
  height: 30px;
}

.admin-main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  scroll-padding-top: 80px;
  /* Offset for sticky header */
}

/* Mobile Navigation */
.admin-mobile-nav {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Hide scrollbar Firefox */
  margin-top: 10px;
  width: 100%;
}

.admin-mobile-nav::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar Chrome/Safari */
}

.admin-mobile-nav .admin-nav-item {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.9rem;
}

.admin-mobile-nav .admin-nav-item.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

@media (max-width: 1024px) {
  .admin-sidebar {
    display: none;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-top-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .admin-header-right {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ============================================
   MANAGER PANEL MOBILE TWEAKS
   ============================================ */
#inventoryCategoryTabs {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  gap: 10px;
  padding-bottom: 5px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#inventoryCategoryTabs::-webkit-scrollbar {
  display: none;
}

#inventoryCategoryTabs .btn {
  flex-shrink: 0;
}

.inv-history-split-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  height: 500px;
  /* Default desktop height */
  min-height: 0;
}

@media (max-width: 768px) {
  .inv-history-split-view {
    grid-template-columns: 1fr;
    height: auto;
    flex: 1;
    overflow-y: hidden;
    /* container handles scroll */
    display: flex;
    flex-direction: column;
  }

  #inventoryHistoryModal .manager-modal {
    height: 95dvh;
    max-height: 95dvh;
    display: flex;
    flex-direction: column;
  }

  #inventoryHistoryModal .manager-modal>div:last-child {
    flex: 1;
    min-height: 0;
    /* Enable flex scroll */
    display: flex;
    flex-direction: column;
  }

  .inv-history-split-view>div {
    max-height: 45%;
    flex: 1;
  }

  .inv-history-log-item {
    font-size: 0.8rem;
  }
}

/* Admin Top Header */
.admin-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-xl);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 400;
  margin-bottom: var(--space-lg);
}

.staff-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-indicator.active {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.section-badge {
  padding: 4px 16px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-section {
  padding: var(--space-md) var(--space-xl) var(--space-xl);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  gap: var(--space-md);
  flex-wrap: wrap;
  position: sticky;
  top: 70px;
  /* Below the top header */
  z-index: 90;
  background: var(--bg-primary);
  padding: var(--space-md) 0;
}

.admin-header h1 {
  font-size: var(--font-size-2xl);
  margin: 0;
}

/* Admin Category Filter */
.admin-category-filter {
  margin-bottom: var(--space-lg);
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: static;
  cursor: grab;
  user-select: none;
}

.admin-category-filter.dragging {
  cursor: grabbing;
}

.admin-category-filter::-webkit-scrollbar {
  display: none;
}

/* Data Table */
.data-table {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  overflow-x: auto;
  /* Ensure horizontal scroll */
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.data-table th {
  background: var(--bg-secondary);
  color: white;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--bg-glass);
}

.data-table-actions {
  display: flex;
  gap: var(--space-sm);
}

/* Toggle Switch */
.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle.active {
  background: var(--success);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: var(--radius-full);
  transition: transform var(--transition-fast);
}

.toggle.active::after {
  transform: translateX(22px);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.form-input,
.form-select,
.form-textarea {
  width: 94%;
  padding: var(--space-md);
  background: #0000006e;
  /* border: 1px solid var(--border-color); */
  border: 1px solid var(--border-color);
  border-radius: 99px;
  color: #ffffff;
  font-size: var(--font-size-md);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right var(--space-md) center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: var(--space-2xl);
}

/* Image Upload */
.image-upload {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
}

.image-upload:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.image-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-upload-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.image-upload-text {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.image-upload-preview {
  position: absolute;
  inset: 0;
}

.image-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: scale-down;
}

.image-upload-remove {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--error);
  border-radius: var(--radius-full);
  color: white;
  z-index: 1;
}

/* ============================================
   MODAL DIALOG
   ============================================ */
/* Consolidated with admin-modernization block below */

.modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  padding-top: max(var(--space-lg), env(safe-area-inset-top));
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: var(--font-size-xl);
}

.modal-body {
  padding: var(--space-lg);
  overflow-y: auto;
  max-height: 90vh;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-top: 1px solid var(--border-color);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mb-xs {
  margin-bottom: var(--space-xs);
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

.mt-xs {
  margin-top: var(--space-xs);
}

/* ============================================
   LANGUAGE SELECTION MODAL
   ============================================ */
.language-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.98);
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.language-modal-content {
  max-width: 400px;
  width: 100%;
  padding-bottom: 100px;
}

.language-buttons-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.language-btn-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
  padding: 16px var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-lg);
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.2s ease;
  cursor: pointer;
}

.language-btn-large:hover,
.language-btn-large:active {
  background: var(--bg-tertiary);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.language-flag {
  font-size: 1.75rem;
}

/* ============================================
   MOBILE UX IMPROVEMENTS
   ============================================ */
/* Bigger Search Bar */
/* Bigger Search Bar */
.search-input {
  height: 60px;
  /* Significant Size Increase */
  font-size: 18px;
  /* Larger text */
  padding: 0 var(--space-md);
  width: 100%;
  border-radius: var(--radius-lg);
}

.search-container svg {
  width: 24px;
  height: 24px;
}

/* Green Call Waiter Button */
/* Green Call Waiter Button */
.call-waiter-btn {
  position: fixed;
  bottom: 120px;
  /* Moved up to clear cart */
  right: var(--space-md);
  width: 64px;
  /* Larger */
  height: 64px;
  border-radius: 50%;
  background-color: #10b981 !important;
  /* Force Green */
  color: white !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  border: none;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.call-waiter-btn:active {
  transform: scale(0.95);
}

.call-waiter-btn svg {
  width: 28px;
  height: 28px;
}

/* Ensure Floating Cart is safe on mobile */
/* Ensure Floating Cart is safe on mobile */
@media (max-width: 640px) {
  .floating-cart {
    bottom: var(--space-md);
    /* More breathing room */
    left: var(--space-md);
    right: var(--space-md);
    width: auto;
    border-radius: var(--radius-xl);
    /* Removed background and padding to fix "grey box" issue */
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
  }

  .call-waiter-btn {
    bottom: 100px;
    /* Clear the cart */
  }
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

/* ============================================
   LOADING STATES
   ============================================ */
.skeleton {
  background: linear-gradient(90deg,
      var(--bg-tertiary) 25%,
      var(--bg-card) 50%,
      var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 640px) {
  :root {
    --font-size-3xl: 1.75rem;
    --font-size-2xl: 1.25rem;
    --font-size-xl: 1.125rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    padding: var(--space-md) 0 180px 0;
  }

  /* Admin & Waiter Layout Stacking */
  .admin-layout,
  .waiter-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  /* Admin Mobile Navigation - Horizontal Scroll */
  .admin-sidebar {
    width: 100%;
    min-height: auto;
    padding: var(--space-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
  }

  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: var(--space-sm);
    padding-bottom: var(--space-xs);
  }

  .admin-nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
  }

  /* Compact header logo on mobile */
  .admin-sidebar .header-logo {
    display: none;
    /* Hide logo title to save space, or make very small */
  }

  .admin-main {
    padding: var(--space-md);
  }

  /* Full Screen Modals on Mobile */
  .modal-content {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    padding: var(--space-md);
    overflow-y: auto;
  }

  /* Hide less important table columns */
  /* Hide less important table columns on mobile */
  /* Hide Image column (1st) */
  .data-table th:nth-child(1),
  .data-table td:nth-child(1) {
    display: none;
  }

  /* Hiding 4th column hid the 'Links' in Waiter/Tables sections. 
     We should try to only hide price/category in Products if needed, 
     but since tables vary, let's just show column 4 for now to ensure Links are visible.
  */
  .data-table th:nth-child(4),
  .data-table td:nth-child(4) {
    display: table-cell;
    /* Restore visibility */
  }

  /* Waiter Table Mobile: Show Name (1), Hide ID (2) */
  #waitersSection .data-table th:nth-child(1),
  #waitersSection .data-table td:nth-child(1) {
    display: table-cell !important;
  }

  #waitersSection .data-table th:nth-child(2),
  #waitersSection .data-table td:nth-child(2) {
    display: none !important;
  }

  /* Tables Table Mobile: Show Number (1), Hide Status (3) */
  #tablesSection .data-table th:nth-child(1),
  #tablesSection .data-table td:nth-child(1) {
    display: table-cell !important;
  }

  #tablesSection .data-table th:nth-child(3),
  #tablesSection .data-table td:nth-child(3) {
    display: none !important;
  }

  /* Categories Table Mobile: Show Name (2), Hide Prind (1) and Order (3) */
  /* Categories Table Mobile: Show All */
  #categoriesSection .data-table th:nth-child(1),
  #categoriesSection .data-table td:nth-child(1),
  #categoriesSection .data-table th:nth-child(3),
  #categoriesSection .data-table td:nth-child(3) {
    display: table-cell !important;
  }

  #categoriesSection .data-table th:nth-child(2),
  #categoriesSection .data-table td:nth-child(2) {
    display: table-cell !important;
  }

  /* Variations Table Mobile: Show Name (1), Hide Order (2) */
  #variationsSection .data-table th:nth-child(2),
  #variationsSection .data-table td:nth-child(2) {
    display: none !important;
  }

  #variationsSection .data-table th:nth-child(1),
  #variationsSection .data-table td:nth-child(1) {
    display: table-cell !important;
  }
}

/* ============================================
   ADMIN MODAL - PROPER SIZING & OVERFLOW
   ============================================ */

/* Base modal styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.modal.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 90000;
}

/* Specific z-index to ensure variations modal is always on top of add-item modal */
#waiterProductModal.active {
  z-index: 90010 !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
}

.modal-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: modal-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-radius: 120px;
  padding-top: max(var(--space-md), env(safe-area-inset-top));
  background: #334155;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  flex-direction: row;
  gap: 33px;
}

.modal-header h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.modal-body {
  flex: 1;
  padding: var(--space-lg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal-footer {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.modal-footer .btn {
  flex: 1;
}

/* Admin modal specific - wider for forms */
#productModal .modal-content {
  max-width: 1400px;
}

#ingredientModal .modal-content {
  max-width: 600px;
}

/* Mobile modal overrides */
/* Mobile modal overrides */
@media (max-width: 768px) {

  /* Scope the drawer-style modal ONLY to waiter panels to avoid CSS bleed */
  #addItemModal.active,
  #waiterProductModal.active,
  #cartModal.active {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* Shared "Drawer" Content Style for Waiter Modals */
  #addItemModal .modal-content,
  #waiterProductModal .modal-content,
  #cartModal .modal-content {
    width: calc(100% - 24px) !important;
    max-width: 600px !important;
    /* Cap width for better premium feel on larger mobile/tablets */
    height: 90vh !important;
    max-height: 90vh !important;
    min-width: 0 !important;
    /* Fix flex overflow */
    border-radius: var(--radius-2xl) !important;
    margin: 10px !important;
    margin-top: 30px !important;
    /* Added more space at the top as requested */
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4) !important;
    position: relative !important;
    transform: none !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center;
  }

  /* Default modals should stay centered and not bleed */
  .modal:not(#addItemModal):not(#waiterProductModal):not(#cartModal) {
    display: none;
    align-items: center;
    justify-content: center;
  }

  /* Fix Nested Scrollbars on Mobile */
  #addItemModal .modal-body {
    padding: var(--space-md);
    padding-bottom: 70px;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    /* Disable outer scroll */
    height: 100%;
    min-height: 0;
  }

  /* Waiter Product List - The only scrollable area on mobile */
  .waiter-product-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    padding-bottom: var(--space-xl);
    scrollbar-width: none;
    /* Hide scrollbar */
  }

  .waiter-product-list::-webkit-scrollbar {
    display: none;
  }

  .modal:not(#addItemModal):not(#waiterProductModal):not(#cartModal).active {
    display: flex !important;
  }

  /* Stack grids to single column on mobile */
  .modal-body .grid-cols-2,
  .modal-body .grid-cols-3 {
    grid-template-columns: 1fr !important;
  }

  .modal-body .grid {
    gap: var(--space-sm) !important;
  }
}

/* Landscape mobile fix - prevent nav blocking */
@media (orientation: landscape) and (max-height: 500px) {
  .admin-mobile-nav {
    position: relative !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
  }

  .admin-mobile-nav .admin-nav-item {
    flex: 0 0 auto !important;
    min-width: 60px !important;
    min-height: 44px !important;
  }
}

.admin-sidebar,
.waiter-sidebar {
  width: 110%;
  min-height: auto;
  padding: var(--space-md);
  position: relative;
  top: 0;
}

.waiter-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.waiter-sidebar .tables-grid {
  display: flex;
  overflow-x: auto;
  padding-bottom: var(--space-sm);
}

.waiter-sidebar .table-card {
  min-width: 100px;
  flex-shrink: 0;
}

.admin-main,
.waiter-main {
  width: 100%;
  height: auto;
  overflow: visible;
  padding: var(--space-md);
}

/* Responsive Tables */
.data-table {
  display: block;
  overflow-x: auto;
  /* white-space: nowrap; */
  -webkit-overflow-scrolling: touch;
}

/* Modals */
.modal-content {
  width: 95%;
  max-height: 95vh;
  margin: var(--space-sm);
}

/* Waiter Order Panel Footer */
.order-panel-footer {
  flex-direction: column;
  gap: var(--space-sm);
}

.order-panel-footer button {
  width: 100%;
}

/* Header adjustments */
.header-content {
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
}

.search-container {
  width: 100%;
}

.search-input {
  width: 100%;
}

.category-nav {
  top: 130px;
  /* Adjust based on header height */
}

/* Floating elements adjustments */
.floating-cart {
  bottom: var(--space-md);
  width: calc(100% - var(--space-lg));
  left: var(--space-sm);
  right: var(--space-sm);
}

.call-waiter-btn {
  bottom: 100px;
  right: var(--space-md);
  width: 48px;
  height: 48px;
}

.cart-modal {
  max-height: 85vh;
}

@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   WAITER DASHBOARD - Premium Header
   ============================================ */
.waiter-view-header {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.waiter-cart-section {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 50;
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  max-height: 70%;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  /* Collapsed state: smaller peek height */
  transform: translateY(calc(100% - 60px));
  pointer-events: auto;
}

.waiter-cart-section.empty {
  transform: translateY(100%) !important;
  opacity: 0;
  pointer-events: none;
}

.waiter-cart-section.expanded {
  transform: translateY(0);
}

.drawer-handle-container {
  width: 100%;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.drawer-handle {
  width: 40px;
  height: 4px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  opacity: 0.6;
}

.waiter-cart-header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg) var(--space-md);
  cursor: pointer;
}

.waiter-cart-label {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0 !important;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.waiter-cart-label::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px var(--primary-light);
}

.waiter-cart-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--space-lg);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.waiter-cart-section.expanded .waiter-cart-drawer-content {
  opacity: 1;
}

.waiter-cart-footer {
  padding: var(--space-lg);
  display: none;
}

.waiter-cart-section.expanded .waiter-cart-footer {
  display: block;
}

/* Ensure modal body has room for the taller peek drawer and only 1 vertical scroll */
#addItemModal .modal-body {
  padding-bottom: 90px !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  height: calc(100% - 60px);
  flex: 1;
  min-height: 0;
}

#addItemModal .modal-content {
  overflow: hidden !important;
}

/* Category Filter Tabs management */
/* Old Duplicate Removed 1 */
/* .waiter-category-tabs { ... } */


/* DESKTOP REFINEMENT - STABLE & CLEAN */
@media (min-width: 1024px) {
  #addItemModal .modal-content {
    max-width: 700px;
    height: 90vh;
    border-radius: var(--radius-2xl);
  }

  /* Waiter Modal Body - FIX SCROLL */
  #addItemModal .modal-body {
    padding: var(--space-md);
    padding-bottom: 90px;
    /* Space for the drawer handle */
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    /* Disable outer scroll */
    height: 100%;
    min-height: 0;
  }

  /* Waiter Product List - The only scrollable area */
  .waiter-product-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    padding-bottom: var(--space-xl);
    /* Hide scrollbar for cleaner look */
    scrollbar-width: none;
  }

  .waiter-product-list::-webkit-scrollbar {
    display: none;
  }
}

.variation-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.variation-chip {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.2s ease;
}

.variation-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.variation-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* RESTORED CART ITEM STYLES */
.waiter-cart-item-row {
  transition: all 0.2s ease;
  border-bottom: 4px solid #6366f1 !important;
}

.waiter-cart-item-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.waiter-cart-item-bullet {
  width: 10px;
  height: 10px;
  background: #00ff00;
  border-radius: 100%;
  flex-shrink: 0;
  opacity: 1;
}

.cart-item-note {
  font-size: 11px;
  color: var(--warning);
  margin-top: 2px;
  font-weight: normal;
}

.ingredient-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  color: #10b981;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.ingredient-toggle.excluded {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  text-decoration: line-through;
}

/* ============================================
   WAITER PRODUCT LIST - Enhanced Styling
   ============================================ */
.waiter-product-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.waiter-product-list h5 {
  color: #00ff01;
  font-size: var(--font-size-sm);
  font-weight: bolder;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: var(--space-sm);
  border-bottom: 7px solid #6366f1;
  margin-bottom: var(--space-sm);
}

.waiter-product-list .card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}

.waiter-product-list .card:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), #6224fb);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(4px);
}

/* Category Filter Tabs for Waiter Modal */
.waiter-category-tabs {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-md);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.waiter-category-tabs::-webkit-scrollbar {
  display: none;
}

.waiter-category-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  color: white;
  font-size: 13px;
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.waiter-category-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.waiter-category-tab.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* ============================================
   STATS PANEL - Premium Cards
   ============================================ */
.stats-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
}

.stat-card {
  position: relative;
  padding: var(--space-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.stat-card:nth-child(1)::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.stat-card:nth-child(2)::before {
  background: linear-gradient(90deg, #6366f1, #a855f7);
}

.stat-card:nth-child(3)::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.stat-card h3 {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.stat-value {
  font-size: 28px;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  line-height: 1;
}

.stat-card:nth-child(1) .stat-value {
  background: linear-gradient(135deg, #10b981, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card:nth-child(2) .stat-value {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card:nth-child(3) .stat-value {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   FLOATING CART - Glassmorphism
   ============================================ */
.floating-cart {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-fixed);
  width: calc(100% - var(--space-xl));
  max-width: 500px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-2xl);
  /* box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(99, 102, 241, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05); */
  backdrop-filter: blur(20px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cart-preview:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

.cart-icon {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-radius: var(--radius-lg);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: var(--radius-full);
  color: white;
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
  animation: badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badge-pop {
  0% {
    transform: scale(0.5);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

.cart-total {
  font-size: 22px;
  font-weight: var(--font-weight-bold);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   ADMIN DATA TABLES - Enhanced
   ============================================ */
.data-table th {
  background: linear-gradient(135deg, rgba(30, 41, 59, 1), rgba(51, 65, 85, 0.8));
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px var(--space-lg);
}

.data-table tr:hover td {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.03));
}

.data-table-actions {
  display: flex;
  gap: 8px;
}

.data-table-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
}

/* ============================================
   ADMIN NAV - Enhanced
   ============================================ */
.admin-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 14px var(--space-lg);
  border-radius: var(--radius-lg);
  color: white;
  font-weight: var(--font-weight-bold);
  transition: all 0.2s ease;
  overflow: hidden;
}

.admin-nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, #6366f1, #a855f7);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}

.admin-nav-item:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-primary);
}

.admin-nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.08));
  color: var(--primary);
}

.admin-nav-item.active::before {
  height: 24px;
}

/* ============================================
   ORDER STATUS CARDS - Client Menu
   ============================================ */
.order-status-card {
  position: relative;
  z-index: 50;
  margin-top: var(--space-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  animation: slideUp 0.3s ease;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all 0.3s ease;
}

.order-status-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
}

.order-status-card .card-body {
  padding: var(--space-md) var(--space-lg);
}

.order-status-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

/* ============================================
   GENERAL CARD IMPROVEMENTS
   ============================================ */
.card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
}

.p-sm {
  padding: var(--space-sm);
}

.p-md {
  padding: var(--space-md);
}

.p-lg {
  padding: var(--space-lg);
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: x-large;
}

.text-secondary {
  color: #ffffff;
}

.font-bold {
  font-weight: 500;
}

.border-bottom {
  border-bottom: 1px solid var(--border-color);
}

.pb-xs {
  padding-bottom: var(--space-xs);
}

/* Small Icon Button for Actions */
.btn-icon-small {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon-small:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-icon-small.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.order-item-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ============================================
   WAITER PANEL - NEW LAYOUT
   ============================================ */

/* Tables View (Main) */
.waiter-tables-view {
  min-height: 100vh;
  padding: var(--space-lg);
  background: var(--bg-primary);
}

.waiter-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.waiter-view-header .header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.waiter-view-header .header-logo h1 {
  font-size: 20px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-socials {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-right: 0;
  margin-bottom: 4px;
}


.social-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.insta-link {
  color: #d946ef !important;
  /* Premium Purple/Fuchsia */
}

.google-link {
  color: #f59e0b !important;
  /* Premium Amber/Yellow */
}

.social-icon-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.waiter-section-title {
  margin-bottom: var(--space-lg);
}

.waiter-section-title h2 {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
}

/* Global Call Alert */
.waiter-global-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  animation: pulse-badge 2s infinite;
}

.waiter-global-alert .alert-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.waiter-global-alert .alert-icon {
  width: 24px;
  height: 24px;
  color: #fbbf24;
}

/* Tables Grid - Large Cards */
.waiter-tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-lg);
}

.table-category-header {
  grid-column: 1 / -1;
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-category-header:first-child {
  margin-top: 0;
}

.table-card-large {
  position: relative;
  padding: var(--space-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.table-card-large:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.table-card-large.has-order {
  border-color: rgba(251, 191, 36, 0.4);
}

.table-card-large.calling {
  border-color: rgba(251, 191, 36, 0.8);
  animation: pulse-badge 1.5s infinite;
}

.table-card-large .table-number {
  font-size: 28px;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.table-card-large .table-status {
  font-size: 11px;
}

.table-card-large .table-total {
  margin-top: var(--space-sm);
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  color: var(--accent);
}

/* Detail View */
.waiter-detail-view {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.waiter-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.btn-back {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary);
}

.detail-header-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.detail-header-info h2 {
  font-size: 18px;
}

.waiter-detail-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
}

/* Client Info Card */
.clients-info-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
}

.clients-count {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-primary);
}

.clients-count span:first-of-type {
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  color: var(--primary);
}

.order-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

/* Unified Waiter Detail Footer - Base Styles (Moved to consolidated section at end) */

/* Modal Close Button - Red */
.modal-close-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
  border: 2px solid #ef4444;
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  font-weight: bold;
}

.modal-close-btn:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  border-color: #dc2626;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
}

/* Delete Button Styling */
.btn-delete,
.order-item .btn-danger {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%) !important;
}

/* ============================================
   WAITER MODAL - CATEGORY TABS & PRODUCT LIST
   ============================================ */

/* Waiter Category Tabs */
.waiter-category-tabs {
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.waiter-category-tabs::-webkit-scrollbar {
  display: none;
}

.waiter-category-tab {
  flex-shrink: 0;
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: white;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
  transition: all var(--transition-fast);
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.waiter-category-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  color: #ffffff;
}

.waiter-category-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Waiter Product List */
.waiter-product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.waiter-product-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 80px;
  align-items: center;
}

.waiter-product-card:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

.waiter-product-card:active {
  transform: scale(0.98);
}

.waiter-product-card-image {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-tertiary);
}

.waiter-product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.waiter-product-card-info {
  flex: 1;
  min-width: 0;
}

.waiter-product-card-name {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.waiter-product-card-price {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--accent);
}

.waiter-product-card-desc {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  display: -webkit-box;
  /* -webkit-line-clamp: 2; vendor extension removed for validation */
  /* -webkit-box-orient: vertical; */
  max-height: 2.3rem;
  /* Fallback for 2 lines */
  overflow: hidden;
  margin-top: 4px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {

  .header,
  .floating-cart,
  .call-waiter-btn,
  .toast-container {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  body::before {
    display: none;
  }
}

/* ============================================
   ADMIN PANEL - MOBILE RESPONSIVENESS
   ============================================*/
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

html,
body {
  width: 100%;
  max-width: 100vw;
  /* overflow-x: hidden !important; -- Breaking sticky nav, moved to body only if needed */
}

/* Full Screen Image Modal */
.full-screen-image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.full-screen-image-modal.active {
  display: flex;
  opacity: 1;
}

.full-screen-image-modal img {
  max-width: 95%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.full-screen-image-modal.active img {
  transform: scale(1);
}

.close-full-screen {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2010;
}

@media (max-width: 1024px) {
  .admin-layout {
    grid-template-columns: 1fr !important;
  }

  /* Hide the sidebar completely on mobile - nav moves to header */
  .admin-sidebar {
    display: none !important;
  }

  /* Mobile Admin Main - no bottom padding since no bottom nav */
  .main-content,
  .admin-main {
    padding: 0 !important;
  }

  .admin-top-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 200 !important;
    padding: 8px 12px !important;
    margin-bottom: var(--space-sm) !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(12px) !important;
    max-width: 100vw !important;
  }

  .admin-header-right {
    gap: 130px !important;
  }

  .admin-header-right .btn {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }

  /* Hide center section on mobile */
  .admin-header-center {
    display: none !important;
  }

  /* Hide left badge text on mobile, keep indicator */
  .admin-header-left .staff-badge span {
    display: none;
  }

  /* Container for mobile nav in header - added via JS */
  .admin-mobile-nav {
    display: flex !important;
    flex-direction: row !important;
    /* FORCE HORIZONTAL */
    width: 100% !important;
    overflow-x: auto !important;
    /* ALLOW SCROLL */
    -webkit-overflow-scrolling: touch !important;
    justify-content: flex-start !important;
    /* Start for scroll */
    gap: var(--space-sm) !important;
    padding: var(--space-sm) var(--space-md) !important;
    border-top: 1px solid var(--border-color) !important;
    margin-top: var(--space-sm) !important;
    scrollbar-width: none;
  }

  .admin-mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .admin-mobile-nav .admin-nav-item {
    flex-direction: column !important;
    gap: 2px !important;
    padding: var(--space-xs) var(--space-sm) !important;
    font-size: 10px !important;
    flex: 0 0 auto !important;
    /* ALLOW SCROLL */
    width: auto !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: var(--radius-md) !important;
    min-height: 56px !important;
    min-width: 70px !important;
  }

  .admin-mobile-nav .admin-nav-item svg {
    width: 18px !important;
    height: 18px !important;
  }

  .admin-section {
    padding: var(--space-md) var(--space-md) var(--space-md) !important;
  }

  .admin-header {
    position: relative !important;
    top: auto !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: var(--space-sm) !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .admin-category-filter {
    position: relative !important;
    top: auto !important;
  }

  .admin-header h1 {
    font-size: var(--font-size-2xl) !important;
  }

  .admin-header .btn {
    padding: var(--space-sm) var(--space-md) !important;
    font-size: 13px !important;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: var(--space-md) !important;
  }

  /* Hide table on mobile ONLY for products (which has mobile cards alternative) */
  #productsSection .data-table {
    display: none !important;
  }

  /* Mobile Product Cards Grid */
  .admin-products-mobile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
  }

  .admin-product-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    align-items: center;
  }

  .admin-product-card-image {
    width: 80px;
    height: 70px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-tertiary);
  }

  .admin-product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .admin-product-card-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: var(--text-muted);
    text-align: center;
  }

  .admin-product-card-info {
    flex: 1;
    min-width: 0;
  }

  .admin-product-card-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }

  .admin-product-card-actions .btn {
    min-width: 44px;
    min-height: 44px;
    padding: var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Increase touch targets for mobile */
  .btn:not(.btn-icon-small),
  .btn-add,
  .category-tab,
  .language-option,
  .toggle {
    min-height: 44px;
  }

  .btn-sm {
    min-height: 40px;
    padding: var(--space-sm) var(--space-md);
  }

  /* ============================================
     CLIENT MENU MOBILE - Header & Sticky Nav
     ============================================ */

  /* Hide original desktop header-info on mobile - it moves to sticky-nav bar */
  .header .header-info {
    display: none !important;
  }

  /* Sticky nav container adjustment */
  .sticky-nav {
    position: sticky !important;
    position: -webkit-sticky !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 0 15px 0 !important;
    border-radius: 0 0 20px 20px !important;
    padding-top: var(--space-sm) !important;
  }

  /* Mobile header-info bar shown inside sticky nav */
  .mobile-header-info {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    /* Align items to the start */
    gap: 4px !important;
    /* Small gap between Table and Lang */
    padding-bottom: var(--space-sm) !important;
    margin-bottom: var(--space-sm) !important;
    border-bottom: 1px solid var(--border-color) !important;
    width: 100% !important;
    /* Ensure full width */
    padding-left: 10px !important;
    /* Added padding to prevent edge touching */
    padding-right: 10px !important;
    /* Added padding to prevent edge touching */
    box-sizing: border-box !important;
    /* Ensure padding doesn't affect total width */
    position: relative !important;
    /* Context for z-index */
    z-index: 100 !important;
    /* Ensure high z-index */
  }

  .mobile-header-info .table-badge {
    padding: 2px 4px !important;
    font-size: 15px !important;
    white-space: nowrap !important;
    height: 28px !important;
    flex-shrink: 1 !important;
    /* Allow shrinking */
  }

  .mobile-header-info .table-badge svg {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0 !important;
  }

  /* Compact Language Button */
  .mobile-header-info .language-btn {
    padding: 2px 4px !important;
    font-size: 15px !important;
    height: 28px !important;
    flex-shrink: 1 !important;
  }

  .mobile-header-info .language-btn svg {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0 !important;
  }

  /* Compact Call Waiter Button - Pushed to Right */
  .mobile-header-info .call-waiter-btn-header {
    padding: 2px 8px !important;
    font-size: 16px !important;
    height: 28px !important;
    margin-left: auto !important;
    /* Push to the right end */
    flex-shrink: 0 !important;
    /* Don't shrink this important button */
    white-space: nowrap !important;
  }

  .mobile-header-info .call-waiter-btn-header svg {
    width: 12px !important;
    height: 12px !important;
  }

  /* Waiter panel mobile improvements */
  .waiter-detail-footer .btn {
    min-height: 44px;
  }

  .waiter-product-list {
    grid-template-columns: 1fr;
  }

  .waiter-product-card {
    min-height: 72px;
  }
}


@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .admin-product-card {
    flex-wrap: wrap;
  }

  .admin-product-card-info {
    width: calc(100% - 56px);
    /* 40px image + 16px gap */
  }

  .admin-product-card-actions {
    flex-direction: row;
    width: 100%;
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-color);
  }

  .admin-product-card-actions .btn {
    flex: 1;
  }
}

/* ============================================
   CHEF PAGE - MOBILE RESPONSIVENESS
   ============================================ */
@media (max-width: 768px) {
  .chef-container {
    padding: var(--space-md) !important;
  }

  .chef-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .tickets-grid {
    flex-direction: column !important;
    gap: var(--space-md) !important;
  }

  .ticket {
    width: 100% !important;
    max-width: none !important;
  }

  .btn-chef {
    min-height: 48px;
    font-size: 14px;
  }
}

/* ============================================
   GLOBAL TOUCH TARGET IMPROVEMENTS
   ============================================ */
@media (max-width: 1024px) {

  /* Ensure interactive elements meet 44px minimum */
  .btn:not(.btn-icon-small),
  .btn-add,
  .category-tab,
  .language-option,
  .toggle {
    min-height: 60px;
    min-width: 140px;
  }

  /* Increase Variation Text Size */
  .variation-item {
    font-size: 17px !important;
    /* Increased to 18px */
    padding: 10px 5px !important;
    width: auto !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    max-width: 100%;
    box-sizing: border-box !important;
    white-space: nowrap !important;
  }

  /* Add to Cart Button - Handle Long Text */
  .add-to-cart-btn-large {
    white-space: normal !important;
    /* Allow wrapping */
    height: auto !important;
    /* Allow growing */
    min-height: 54px !important;
    /* Minimum touch target */
    padding: 10px 16px !important;
    line-height: 1.2 !important;
    /* Tighten line height for wrapped text */
    display: flex !important;
    text-align: center !important;
  }

  .variation-item span {
    font-weight: 500 !important;
  }

  /* Waiter panel minimum touch sizes */
  .waiter-detail-footer .btn {
    min-height: 44px;
  }

  /* Improve waiter product list for mobile */
  .waiter-product-list {
    grid-template-columns: 1fr;
  }

  .waiter-product-card {
    min-height: 72px;
  }
}


.product-card-waiter:active {
  transform: scale(0.98);
}

.btn-qty {
  width: 32px;
  /* height: 32px; */
  border-radius: 50%;
  border: 1px solid #6366f1;
  background: rgba(99, 102, 241, 0.3);
  color: #57ff00f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-qty:hover {
  background: #00ff0d;
  color: #000000;
}

.btn-qty.btn-minus {
  border-color: var(--error) !important;
  color: var(--error) !important;
}

.btn-qty.btn-minus:hover {
  background: var(--error) !important;
  color: white !important;
}

.btn-qty.btn-plus {
  border-color: var(--success) !important;
  color: var(--success) !important;
}

.btn-qty.btn-plus:hover {
  background: var(--success) !important;
  color: white !important;
}

.btn-qty:active {
  transform: scale(0.9);
}


.ingredient-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.ingredient-toggle.excluded {
  opacity: 1;
  text-decoration: line-through;
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1px solid var(--error) !important;
  color: var(--error) !important;
}

.ingredient-toggle .status-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--success);
  color: white;
  font-size: 0.7rem;
}

.ingredient-toggle.excluded .status-icon {
  background: var(--error);
}

/* Specific fix for Desktop Waiter Modal Positioning */
@media (min-width: 1024px) {

  #addItemModal .modal-content,
  #waiterProductModal .modal-content {
    position: relative;
    /* Let flexbox center it */
    transform: none !important;
    max-height: 85vh;
    overflow-y: auto;
    margin: auto;
    width: 90%;
    max-width: 500px;
    inset: auto;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    right: auto !important;
  }
}

.ingredients-grid-waiter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Waiter Search Result Scroll Fix */
.waiter-product-list {
  max-height: 963vh;
  overflow-y: visible;
  padding: 4px;
}

.waiter-product-list .card:hover {
  FONT-WEIGHT: 200;
  box-shadow: 0 0 10px aliceblue;
  border-color: #34d399;
}


@media (min-width: 768px) {
  .modal-content {
    max-width: 600px;
    margin: 2rem auto;
    border-radius: var(--radius-xl);
  }

  /* Ensure waiter add item list is manageable on desktop */
  .waiter-product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-height: 60vh;
  }

  /* Fix for Desktop Product Modal Positioning */
  .product-modal.active {
    display: flex;
    flex-direction: column;
    width: 90%;
    max-width: 500px;
    height: auto;
    max-height: 85vh;
    inset: 0;
    margin: auto;
    top: 50%;
    left: 50%;
    bottom: auto;
    right: auto;
    transform: translate(-50%, -50%) !important;
    border-radius: var(--radius-xl);
  }
}

/* Ingredient Exclusion Style */
.ingredient-toggle.excluded {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
  text-decoration: line-through;
}

/* Removed to fix contrast issue */

/* Variation Chips */
.variation-chip {
  padding: 6px 12px;
  border-radius: 30px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.6rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
}

.variation-chip:hover {
  background: var(--bg-hover);
  border-color: var(--primary-light);
}

.variation-chip.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  font-weight: 600;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-buttons .btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  transition: all 0.2s;
}

.action-buttons .btn-icon:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--primary);
  transform: translateY(-1px);
}

.action-buttons .btn-icon.delete:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.action-buttons .btn-icon:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Waiter Timer Badge */
.table-timer-badge {
  z-index: 10;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ============================================
   WAITER PANEL - HEADER CONFIGURATION (PROPORTIONS)
   ============================================ */
:root {
  --waiter-header-padding: 8px 20px;
  --waiter-profile-img-size-desktop: 28px;
  --waiter-profile-img-size-mobile: 40px;
}

/* ============================================
   WAITER PANEL - HEADER LAYOUT (DESKTOP BASE)
   ============================================ */
.waiter-view-header {
  padding: var(--waiter-header-padding) !important;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1px;
  display: flex !important;
  flex-direction: row !important;
  /* FLATTENED TO SINGLE ROW */
  align-items: center !important;
  justify-content: space-between !important;
  gap: 15px !important;
  width: 100%;
  min-height: 60px;
}

/* Force internal wrappers to let children be part of the header flex */
.waiter-header-top,
.waiter-header-bottom {
  display: contents !important;
}

/* 1. Consolidated Profile Button (Order 1) */
.waiter-profile-btn {
  order: 1 !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding: 6px 14px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: max-content;
}

.waiter-profile-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  transform: translateY(-1px);
}

.waiter-profile-btn .header-logo {
  display: flex !important;
  align-items: center !important;
  gap: 8px;
  color: var(--primary);
}

.waiter-profile-btn .header-logo svg {
  width: var(--waiter-profile-img-size-desktop);
  height: var(--waiter-profile-img-size-desktop);
  flex-shrink: 0;
}

.waiter-info-container {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.waiter-info-container h1 {
  font-size: 14px !important;
  /* Compact name */
  margin: 0 !important;
  line-height: 1.2 !important;
  color: white !important;
  font-weight: 700 !important;
}

.change-waiter-link {
  font-size: 9px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 800;
  opacity: 0.8;
}

/* 2. Table Filters (Order 2) */
.table-filters {
  order: 2 !important;
  display: flex !important;
  gap: 8px;
  align-items: center;
}

.table-filters .form-select {
  padding: 4px 10px !important;
  border-radius: 8px !important;
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid var(--border-color) !important;
  color: white !important;
  font-size: 12px !important;
  height: 32px !important;
  width: auto !important;
}

/* 3. Action Buttons (Order 3) */
.header-action-buttons {
  order: 3 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.header-action-buttons .btn {
  display: flex !important;
  align-items: center !important;
  gap: 6px;
  padding: 6px 12px !important;
  font-weight: 600;
  font-size: 12px !important;
  border-radius: 8px !important;
  white-space: nowrap;
}

/* Base colors for action buttons on desktop (Translucent) */
.btn-history {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #3b82f6 !important;
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

.btn-block {
  background: rgba(249, 115, 22, 0.1) !important;
  color: #f97316 !important;
  border: 1px solid rgba(249, 115, 22, 0.2) !important;
}

.btn-codes {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.btn-staff {
  background: rgba(168, 85, 247, 0.1) !important;
  color: #a855f7 !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
}

/* 4. Meta Group: Toggles & Logout */
.header-right-meta {
  display: flex !important;
  align-items: center !important;
  gap: 20px;
  order: 4 !important;
}

.header-toggles {
  display: flex !important;
  align-items: flex-end;
  gap: 15px;
  flex-direction: column-reverse;
  align-content: space-between;
}

/* Premium Switch Toggle (Desktop) */
.switch-container {
  display: flex !important;
  align-items: center !important;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
}

.switch-container i {
  font-size: 16px;
  color: var(--primary);
}

.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.1);
  transition: .3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px !important;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50% !important;
}

input:checked+.slider {
  background-color: var(--primary);
}

input:checked+.slider:before {
  transform: translateX(16px);
}

/* 5. Logout Button (Order 5) */
.btn-logout {
  order: 5 !important;
  padding: 8px 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px;
  font-weight: 700;
  font-size: 13px !important;
  border-radius: 10px !important;
  background: #ef4444 !important;
  color: white !important;
  border: none !important;
}

/* ============================================
   WAITER PANEL - MOBILE REDESIGN (FINAL)
   ============================================ */
@media (max-width: 991px) {
  .waiter-view-header {
    flex-direction: column !important;
    /* Stack rows on mobile */
    padding: 12px !important;
    gap: 1px !important;
    height: auto !important;
    min-height: unset;
  }

  .waiter-header-top {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  /* Profile on mobile: slightly larger */
  .waiter-profile-btn {
    padding: 5px !important;
    border: none !important;
    background: none !important;
  }

  .waiter-profile-btn .header-logo svg {
    width: var(--waiter-profile-img-size-mobile);
    height: var(--waiter-profile-img-size-mobile);
  }

  .waiter-info-container h1 {
    font-size: 16px !important;
  }

  /* Right Side: Toggles & Logout (Dense) */
  .header-right-meta {
    gap: 12px;
    margin-left: auto;
  }

  .header-toggles {
    gap: 12px;
  }

  /* 3x LARGER TOGGLES (Fixed: Use dimensions instead of transform) */
  .header-toggles .switch {
    width: 65px;
    /* ~3x bigger */
    height: 34px;
  }

  .header-toggles .slider:before {
    height: 28px;
    width: 28px;
    left: 3px;
    bottom: 3px;
  }

  .header-toggles input:checked+.slider:before {
    transform: translateX(31px);
  }

  .header-toggles .switch-container i {
    font-size: 28px;
    /* Bigger icons to match */
  }

  .btn-logout {
    width: 44px;
    height: 44px;
    padding: 0 !important;
    justify-content: center;
    border-radius: 12px !important;
  }

  .btn-logout span {
    display: none;
  }

  /* Filters Row */
  .table-filters {
    order: 2 !important;
    width: 800% !important;
    display: grid !important;
    grid-template-columns: auto;
    gap: 10px;
  }

  .table-filters .form-select {
    height: 42px !important;
    font-size: 14px !important;
    width: 100% !important;
  }

  /* Action Buttons Grid (Bottom) */
  .waiter-header-bottom {
    display: flex !important;
    width: 100% !important;
  }

  .header-action-buttons {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    width: 100% !important;
    gap: 10px;
    flex: unset;
  }

  .header-action-buttons .btn {
    height: 60px;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-content: center;
    border-radius: 20px !important;
    /* Premium rounded */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .header-action-buttons .btn span {
    display: none;
  }

  .header-action-buttons .btn i {
    font-size: 26px !important;
  }

  /* Bright colors for mobile buttons */
  .btn-history {
    background: #3b82f6 !important;
    color: white !important;
    border: none !important;
  }

  .btn-block {
    background: #f97316 !important;
    color: white !important;
    border: none !important;
  }

  .btn-codes {
    background: #10b981 !important;
    color: white !important;
    border: none !important;
  }

  .btn-staff {
    background: #a855f7 !important;
    color: white !important;
    border: none !important;
  }
}


@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Utilities */
body.no-scroll {
  overflow: hidden !important;
  overscroll-behavior-y: contain !important;
}

.product-variations-preview {
  font-size: 0.6rem !important;
}

/* ============================================
   SPECIAL PRODUCTS SLIDER
   ============================================ */
.special-slider-container {
  width: 100%;
  overflow: hidden;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-md);
  display: flex;
  justify-content: center;
}

.special-slider-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.special-slider-header {
  text-align: center;
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 2;
}

.special-slider-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.special-slider-header p {
  font-size: 0.9rem;
}

.special-slides-track {
  display: flex;
  position: relative;
  transform: translateX(0);
  transition: transform 0.4s ease-out;
  touch-action: pan-y;
  z-index: 1;
  /* Flexbox children determine width */
}

.special-slide {
  flex: 0 0 100%;
  min-width: 100%;
  max-width: 100%;
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  align-items: center;
  padding: var(--space-md);
  border-radius: var(--radius-xl);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  height: 220px;
  max-height: 220px;
  box-sizing: border-box;
  overflow: hidden;
}

.special-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  border-radius: var(--radius-xl);
  z-index: 0;
}

.special-product-card {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 130px;
  min-width: 100px;
  max-width: 160px;
  height: 180px;
  max-height: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Adaptive sizing based on product count */
.special-slide[data-count="1"] .special-product-card {
  width: 180px;
  max-width: 200px;
}

.special-slide[data-count="2"] .special-product-card {
  width: 160px;
  max-width: 180px;
}

.special-slide[data-count="3"] .special-product-card {
  width: 130px;
  max-width: 150px;
}

.special-slide[data-count="4"] .special-product-card {
  width: 110px;
  max-width: 130px;
}

.special-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
}

.special-product-image {
  width: 100%;
  height: 80px;
  object-fit: cover;
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.special-product-info {
  padding: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.special-product-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex-shrink: 0;
}

.special-product-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.special-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
  min-height: 32px;
}

.special-add-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.02);
}

.special-add-btn:active {
  transform: scale(0.98);
}

.special-add-btn svg {
  width: 14px;
  height: 14px;
}

/* Slider Navigation Dots */
.special-slider-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  position: relative;
  z-index: 2;
}

.special-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.special-slider-dot.active {
  width: 24px;
  border-radius: var(--radius-full);
  background: var(--accent);
}

/* Responsive Design */
/* Responsive Design */
@media (max-width: 480px) {
  .special-slides-track {
    gap: 24px;
    /* Space between slides */
  }

  .special-slide {
    gap: var(--space-sm);
    /* Revert internal item spacing */
    padding: var(--space-sm);
    min-height: 180px;
  }

  .special-product-card {
    width: 90px;
    min-width: 80px;
    max-width: 100px;
  }

  .special-slide[data-count="1"] .special-product-card {
    width: 140px;
    max-width: 160px;
  }

  .special-slide[data-count="2"] .special-product-card {
    width: 120px;
    max-width: 140px;
  }

  .special-slide[data-count="3"] .special-product-card,
  .special-slide[data-count="4"] .special-product-card {
    width: 85px;
    max-width: 95px;
  }

  .special-product-image {
    height: 50px;
  }

  .special-product-name {
    font-size: 0.65rem;
  }

  .special-product-price {
    font-size: 0.7rem;
  }

  .special-add-btn {
    padding: 6px 8px;
    font-size: 0.65rem;
    min-height: 28px;
  }

  .special-add-btn svg {
    width: 12px;
    height: 12px;
  }

  .special-slider-header h3 {
    font-size: 1rem;
  }

  .special-slider-header p {
    font-size: 0.8rem;
  }
}

@media (min-width: 768px) {
  .special-product-card {
    width: 150px;
    max-width: 180px;
  }

  .special-product-image {
    height: 85px;
  }

  .special-slide {
    min-height: 220px;
    gap: var(--space-md);
  }

  .special-slide[data-count="4"] .special-product-card {
    width: 140px;
    max-width: 160px;
  }
}

#newCartLabel {
  background: var(--bg-card);
  /* Darker/different than tertiary? */
  background-color: #fca5a5;
  /* Light red to distinguish? User wants distinct color. */
  /* Wait, user said "box they are in". Maybe make it look like a button or header. */
  background: var(--primary);
  color: white;
  border: 2px solid var(--primary-hover);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin-top: 0;
  /* Pull up more */
  position: relative;
  z-index: 20;
  /* Higher z-index */
  box-shadow: var(--shadow-md);
  display: block;
  text-align: center;
  font-weight: bold;
}

html,
body {
  overscroll-behavior-y: none;
  /* Removed overflow fix that was breaking sticky nav */
}

/* ============================================
   APP FOOTER
   ============================================ */
.app-footer {
  padding: var(--space-xl) var(--space-md);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  text-align: center;
  margin-bottom: 100px;
  /* Space for floating cart/nav */
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.social-link:hover {
  transform: translateY(-3px);
  color: white;
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.social-link svg {
  width: 24px;
  height: 24px;
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   ADMIN PANEL PREMIUM MOBILE STYLES
   ============================================ */
@media (max-width: 1024px) {

  /* Premium Mobile Header */
  .admin-top-header {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  /* Premium Mobile Navigation - Manager Style */
  .admin-mobile-nav {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 8px !important;
    padding: 12px 0 8px !important;
    border-top: 1px solid var(--border-color) !important;
    margin-top: 8px !important;
    scrollbar-width: none;
    background: transparent !important;
  }

  .admin-mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .admin-mobile-nav .admin-nav-item {
    flex-shrink: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 16px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: white !important;
    white-space: nowrap !important;
    min-height: 44px !important;
    transition: all 0.2s ease !important;
  }

  .admin-mobile-nav .admin-nav-item::before {
    display: none !important;
  }

  .admin-mobile-nav .admin-nav-item:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    border-color: var(--primary) !important;
  }

  .admin-mobile-nav .admin-nav-item.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
  }

  .admin-mobile-nav .admin-nav-item svg {
    width: 16px !important;
    height: 16px !important;
  }

  /* Premium Section Headers */
  .admin-section .admin-header {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
    padding: 0;
    flex-direction: row;
  }

  .admin-section .admin-header h1 {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .admin-section .admin-header .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 12px;
    min-height: 48px;
  }

  /* Premium Data Tables for Mobile */
  .admin-section .data-table {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
  }

  .admin-section .data-table table {
    font-size: 16px;
  }

  .admin-section .data-table th {
    padding: 12px;
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  .admin-section .data-table td {
    padding: 12px;
  }

  .admin-section .data-table-actions {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 6px;
  }

  .admin-section .data-table-actions .btn {
    padding: 8px 12px;
    min-height: 36px;
    font-size: 11px;
    border-radius: 8px;
  }

  /* Premium Mobile Product Cards */
  .admin-products-mobile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-product-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    align-items: center;
    transition: all 0.2s ease;
  }

  .admin-product-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
  }

  .admin-product-card-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .admin-product-card-info {
    flex: 1;
    min-width: 0;
  }

  .admin-product-card-info h4 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
  }

  .admin-product-card-info p {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 4px;
  }

  .admin-product-card-info .price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
  }

  .admin-product-card-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
  }

  .admin-product-card-actions .btn {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
  }

  /* Premium Stats Panel Mobile */
  .stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
  }

  .stat-card {
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .stat-card h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
  }

  .stat-card .stat-value {
    font-size: 20px;
    font-weight: 700;
  }

  /* Premium Modal Styling for Mobile */
  .admin-section .modal-content {
    border-radius: 20px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .admin-section .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
  }

  .admin-section .modal-header h3 {
    font-size: 18px;
    font-weight: 700;
  }

  .admin-section .modal-body {
    padding: 16px 20px;
  }

  .admin-section .modal-footer {
    padding: 16px 20px;
    gap: 12px;
  }

  .admin-section .modal-footer .btn {
    flex: 1;
    min-height: 48px;
    border-radius: 12px;
    font-weight: 600;
  }

  /* Premium Form Controls */
  .admin-section .form-input,
  .admin-section .form-select {
    min-height: 48px;
    border-radius: 12px;
    font-size: 15px;
    padding: 12px 14px;
  }

  .admin-section .form-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
  }

  /* Premium Toggle Styling */
  .admin-section .toggle {
    min-width: 52px;
    min-height: 28px;
    border-radius: 14px;
  }

  /* Category Filter Tabs */
  .admin-category-filter {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
    scrollbar-width: none;
  }

  .admin-category-filter::-webkit-scrollbar {
    display: none;
  }

  .admin-category-filter .waiter-category-tab {
    flex-shrink: 0;
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    min-height: 40px;
    color: white;
  }
}

/* ============================================
   FINAL LANDSCAPE OVERRIDES
   Moved to end to guarantee specificity
   ============================================ */
@media (max-width: 1024px) and (orientation: landscape) {
  .admin-top-header {
    padding: var(--space-xs) var(--space-md) !important;
  }

  .admin-mobile-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    justify-content: flex-start !important;
    max-width: 100vw !important;
    margin-top: 4px !important;
    padding-top: 4px !important;
  }

  .admin-mobile-nav::-webkit-scrollbar {
    height: 4px;
    display: none;
    /* Hide scrollbar for cleaner look, still scrollable */
  }

  .admin-mobile-nav .admin-nav-item {
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 36px !important;
    padding: 4px 12px !important;
    flex: 0 0 auto !important;
    width: auto !important;
    margin-bottom: 0 !important;
  }

  .admin-mobile-nav .admin-nav-item svg {
    width: 14px !important;
    height: 14px !important;
    margin-bottom: 0 !important;
  }

  .admin-mobile-nav .admin-nav-item span {
    display: inline-block !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }
}

/* ============================================
   MOBILE RESPONSIVENESS FIXES
   ============================================ */
@media (max-width: 480px) {

  /* Header Info adjustments */
  .header-info {
    gap: 2px;
  }

  /* Compact Table Badge */
  .table-badge {
    padding: 2px 4px;
    font-size: 10px;
    white-space: nowrap;
    height: 28px;
  }

  .table-badge svg {
    width: 12px;
    height: 12px;
  }

  /* Compact Language Button */
  .language-btn {
    padding: 2px 4px;
    font-size: 10px;
    height: 28px;
  }

  .language-btn svg {
    width: 12px;
    height: 12px;
  }

  #currentLang {
    font-size: 10px;
  }

  /* Compact Call Waiter Button */
  .call-waiter-btn-header {
    padding: 2px 8px;
    font-size: 10px;
    height: 28px;
  }

  .call-waiter-btn-header svg {
    width: 12px;
    height: 12px;
  }

  /* Sticky Nav Adjustments */
  .search-flex {
    gap: 4px;
  }

  /* Shrink and fit Allergy/Dietary Buttons */
  .allergy-btn {
    padding: 0 6px;
    font-size: 10px;
    height: 38px;
    /* Slightly smaller height */
    flex-shrink: 1;
    /* Allow shrinking if needed */
    min-width: 0;
    /* Allow Flexbox shrinking below content size if absolutely necessary */
  }

  .allergy-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Ensure text truncates if absolutely needed, but clamp handles sizing */
  #allergyBtnText,
  #dietaryBtnText {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(8px, 3vw, 10px);
    /* Responsive font sizing */
  }

  /* Search Container adjustments */
  .search-container {
    height: 38px;
    padding: 0 6px !important;
  }

  .search-container input {
    font-size: 20px !important;
    padding: 6px !important;
    padding-left: 32px !important;
  }

  .search-icon {
    width: 14px;
    height: 14px;
    left: 8px;
    /* Adjust icon position if absolute */
  }

  /* Category Tabs - Ensure they are swipeable and don't take too much vertical space */
  .category-tab {
    padding: 4px 12px !important;
    font-size: 11px;
  }
}

/* ============================================
   PASSWORD VISIBILITY TOGGLE
   ============================================ */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.password-input-wrapper .form-input {
  padding-right: 50px;
  flex: 1;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  z-index: 5;
}

.password-toggle-btn:hover {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
}

.password-toggle-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.password-toggle-btn i {
  font-size: 16px;
}

/* Password Section Cards */
.password-section-card {
  transition: all 0.2s ease;
}

.password-section-card:hover {
  border-color: var(--primary);
}

/* Individual Password Items */
#individualChefPasswordsList .form-group,
#individualWaiterPasswordsList .form-group {
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

#individualChefPasswordsList .form-group:hover,
#individualWaiterPasswordsList .form-group:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

/* Mobile Adjustments for Passwords Tab */
@media (max-width: 768px) {
  .password-section-card {
    padding: 15px !important;
    max-width: 100% !important;
  }

  #passwordsTab>div:first-child {
    flex-direction: column;
    gap: 15px;
  }

  #passwordsTab>div:first-child .btn {
    width: 100%;
  }

  #individualPasswordsListContainer>div:first-child {
    flex-direction: column;
    align-items: flex-start;
  }

  #individualChefPasswordsList .form-group,
  #individualWaiterPasswordsList .form-group {
    padding: 10px;
  }

  .password-input-wrapper {
    width: 100%;
  }
}

/* ============================================
   WAITER PANEL OVERRIDES & DESKTOP OPTIMIZATION
   ============================================ */

/* Fix Waiter Cart Drawer Clickability and Layout */
.waiter-cart-section {
  position: absolute;
  /* Changed from fixed to absolute to stick to modal bottom */
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 20;
  /* Above modal content */
  padding: 20px;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(calc(100% - 65px));
  /* Default collapsed state */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex !important;
  /* Force flex as requested */
  flex-direction: column;
  max-height: 80%;
}

.waiter-cart-section.expanded {
  transform: translateY(0);
}

.drawer-handle-container {
  padding: 10px;
  display: flex;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.drawer-handle {
  width: 60px;
  height: 5px;
  background: var(--border-color);
  border-radius: 10px;
}

.waiter-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.waiter-cart-drawer-content {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 10px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 0;
}

.waiter-cart-footer {
  flex-shrink: 0;
}

/* Ensure modal content allows positioning context */
#addItemModal .modal-content {
  position: relative;
  overflow: hidden;
  /* Contains the drawer */
  display: flex;
  font-size: 21px !important;
  padding: 6px !important;
  padding-left: 32px !important;
}

.search-icon {
  width: 14px;
  height: 14px;
  left: 8px;
  /* Adjust icon position if absolute */
}

/* Category Tabs - Ensure they are swipeable and don't take too much vertical space */
.category-tab {
  padding: 4px 12px !important;
  font-size: 17px;
}

/* ============================================
   PASSWORD VISIBILITY TOGGLE
   ============================================ */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.password-input-wrapper .form-input {
  padding-right: 50px;
  flex: 1;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  z-index: 5;
}

.password-toggle-btn:hover {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
}

.password-toggle-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.password-toggle-btn i {
  font-size: 16px;
}

/* Password Section Cards */
.password-section-card {
  transition: all 0.2s ease;
}

.password-section-card:hover {
  border-color: var(--primary);
}

/* Individual Password Items */
#individualChefPasswordsList .form-group,
#individualWaiterPasswordsList .form-group {
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

#individualChefPasswordsList .form-group:hover,
#individualWaiterPasswordsList .form-group:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

/* Mobile Adjustments for Passwords Tab */
@media (max-width: 768px) {
  .password-section-card {
    padding: 15px !important;
    max-width: 100% !important;
  }

  #passwordsTab>div:first-child {
    flex-direction: column;
    gap: 15px;
  }

  #passwordsTab>div:first-child .btn {
    width: 100%;
  }

  #individualPasswordsListContainer>div:first-child {
    flex-direction: column;
    align-items: flex-start;
  }

  #individualChefPasswordsList .form-group,
  #individualWaiterPasswordsList .form-group {
    padding: 10px;
  }

  .password-input-wrapper {
    width: 100%;
  }
}

/* ============================================
   WAITER PANEL OVERRIDES & DESKTOP OPTIMIZATION
   ============================================ */

/* Fix Waiter Cart Drawer Clickability and Layout */
.waiter-cart-section {
  position: absolute;
  /* Changed from fixed to absolute to stick to modal bottom */
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 20;
  /* Above modal content */
  padding: 1px;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(calc(100% - 65px));
  /* Default collapsed state */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex !important;
  /* Force flex as requested */
  flex-direction: column;
  max-height: 80%;
}

.waiter-cart-section.expanded {
  transform: translateY(0);
}

.drawer-handle-container {
  padding: 10px;
  display: flex;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.drawer-handle {
  width: 60px;
  height: 5px;
  background: var(--border-color);
  border-radius: 10px;
}

.waiter-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.waiter-cart-drawer-content {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 10px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 0;
}

.waiter-cart-footer {
  flex-shrink: 0;
}

/* Ensure modal content allows positioning context */
#addItemModal .modal-content {
  position: relative;
  overflow: hidden;
  /* Contains the drawer */
  display: flex;
  flex-direction: column;
}

/* DESKTOP OPTIMIZATIONS - STRONG OVERRIDES */

/* DESKTOP OPTIMIZATIONS - STRONG OVERRIDES */
@media (min-width: 1024px) {

  /* Full Screen Add Item Modal - FORCE OVERRIDE */
  #addItemModal .modal-content {
    position: fixed !important;
    inset: 2vh 2vw !important;
    /* Safe margin from edges */
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    transform: none !important;
    /* Remove centering transform to prevent clip */

    display: flex !important;
    flex-direction: column !important;
    border-radius: 20px !important;
  }

  /* Cart: Interactive Drawer on Desktop too (as requested) */
  #addItemModal .waiter-cart-section {
    position: absolute !important;
    /* Back to absolute to allow sliding */
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;

    /* Peeking behavior: "red up" -> Lift it higher to verify visibility */
    /* Showing 85px of the header/handle instead of 65px */
    transform: translateY(calc(100% - 85px)) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;

    border-radius: 20px 20px 0 0 !important;
    /* Rounded top */
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5) !important;
    z-index: 50 !important;

    /* Expanded height */
    height: auto !important;
    max-height: 50vh !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Expanded State for Desktop */
  #addItemModal .waiter-cart-section.expanded {
    transform: translateY(0) !important;
    bottom: 0 !important;
    /* Fix to bottom */
  }

  /* Show the drag handle on desktop so user can click to close */
  #addItemModal .drawer-handle-container {
    display: flex !important;
    cursor: pointer !important;
  }

  /* Increase header size for easier clicking */
  #addItemModal .waiter-cart-header {
    padding: 0 10px;
    cursor: pointer;
  }

  #addItemModal .modal-body {
    padding-bottom: 100px !important;
    /* More space for the taller peeked drawer */
    flex: 1 !important;
    overflow-y: auto !important;
  }

  /* Product Grid Layout */
  /* FIX: Container is BLOCK so category groups stack vertically */
  .waiter-product-list {
    display: block !important;
    padding-bottom: 80px !important;
    /* Extra scroll space */
  }

  /* Each Category Group is also BLOCK (full width) */
  .waiter-product-list>div {
    display: block !important;
    width: 100% !important;
    margin-bottom: 20px !important;
  }

  /* The ITEMS container inside the group is the GRID */
  .waiter-product-list>div>.flex.flex-col.gap-sm {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 15px !important;
    width: 100% !important;
  }

  /* ALSO apply Grid to the main container if it has direct children (Search results) */
  .waiter-product-list>.flex.flex-col.gap-sm {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 15px !important;
    width: 100% !important;
  }

  /* Card Layout: STRICT ROW */
  .product-card-waiter {
    height: auto !important;
    min-height: 90px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 12px !important;
    width: 100% !important;
  }

  /* Internal Flex Container: Row Flow with Wrap */
  .product-card-waiter .flex.items-center.gap-md {
    display: flex !important;
    flex-direction: row !important;
    /* Stack Horizontally first */
    flex-wrap: wrap !important;
    /* Wrap if space runs out */
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
  }

  /* Content (Name/Price) Area */
  .product-card-waiter .flex .flex-grow-1 {
    flex: 1 1 120px !important;
    /* Grow, shrink, min-width 120px */
    margin-bottom: 0 !important;
    text-align: left !important;
    display: block !important;
    /* Ensure block text */
  }

  /* Controls (Buttons) Area */
  .product-card-waiter .flex.items-center.gap-sm {
    flex: 0 0 auto !important;
    /* Do not grow, take needed space */
    width: auto !important;
    min-width: 90px !important;
    /* Ensure buttons fit */
    justify-content: flex-end !important;
  }

  /* Ensure the waiter category tabs don't wrap weirdly */
  .waiter-category-tab {
    flex: 0 0 auto !important;
  }
}

/* MOBILE SPECIFIC OVERRIDES */
@media (max-width: 1023px) {

  /* Lift the cart section as requested + 40px more */
  .waiter-cart-section {
    /* Raising base position to avoid bottom nav/screen edge issues */
    bottom: 0 !important;

    /* Peeking behavior: "up 40 pixels more" than before */
    /* Previous was 65px visible. If they want +40px, let's show 105px total or lift the whole container */
    /* User said "make it be up 40 pixels more" */
    transform: translateY(calc(100% - 105px)) !important;
    /* 65 + 40 = 105px visible peek */

    z-index: 9999 !important;
    /* Ensure it's above everything to be clickable */
    pointer-events: auto !important;
    /* Force clickability */
  }

  .waiter-cart-section.expanded {
    transform: translateY(0) !important;
    z-index: 99999 !important;
    /* Super top when expanded */
  }

  /* Ensure modal body has extra padding to account for the lifted cart */
  #addItemModal .modal-body {
    padding-bottom: 150px !important;
    /* 105px + padding */
  }
}

/* Final Status Refinements */
.table-status.free {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.1)) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
}


/* Ingredients Table Mobile: Show Name (1), Show Status (2) */
#ingredientsSection .data-table th:nth-child(1),
#ingredientsSection .data-table td:nth-child(1) {
  display: table-cell !important;
}


/* premium waiter filter select */
/* premium waiter filter select */
.waiter-filter-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-color: #1e293b !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 14px !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: var(--radius-lg) !important;
  padding: 10px 36px 10px 14px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  min-height: 40px;
  min-width: 100px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  color-scheme: light;
  /* FORCE browser to render popup in Light Mode (Black Text) */
}

.waiter-filter-select:hover {
  background-color: #334155 !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-1px);
}

.waiter-filter-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3), 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

/* Fallback: Force standard readable colors for options */
/* Specific IDs to ensure override */
.waiter-filter-select option,
#tableSortSelect option,
#tableStatusSelect option {
  background-color: #ffffff !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  padding: 12px !important;
}

.waiter-filter-select optgroup {
  background-color: #ffffff !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* Browsing Mode Overlay */
.browsing-mode-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.browsing-mode-content {
  background: var(--bg-secondary);
  padding: 40px 30px;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.4s ease-out;
}

.browsing-mode-icon {
  background: var(--accent-light);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border: 2px solid var(--accent);
  animation: pulse 2s infinite;
}

.browsing-mode-content h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: white;
}

.browsing-mode-content p {
  color: var(--text-secondary);
  margin-bottom: 30px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.browsing-mode-auth {
  display: flex;
  gap: 12px;
  background: var(--bg-tertiary);
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--border-light);
}

@media (max-width: 480px) {
  .browsing-mode-auth {
    flex-direction: column;
  }
}

/* Staff Call Styles */
.staff-calling {
  border: 2px solid #a855f7 !important;
  animation: staffCallPulse 2s infinite !important;
}

@keyframes staffCallPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(168, 85, 247, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
  }
}

.transfer-table-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
  color: white;
}

.transfer-table-item:hover {
  background: rgba(99, 102, 241, 0.1);
}

.transfer-table-item.selected {
  background: #6366f1;
  color: white;
  border-color: #6366f1;
}

.transfer-table-item.current {
  opacity: 0.5;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* Session Code Button - Premium Styling */
.session-code-btn {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 14px !important;
  background: linear-gradient(135deg, var(--bg-secondary), rgba(99, 102, 241, 0.1)) !important;
  border: 1.5px solid var(--accent) !important;
  border-radius: 14px !important;
  color: var(--accent) !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  height: 38px !important;
  margin: 0 8px !important;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1) !important;
  backdrop-filter: blur(8px) !important;
  position: relative !important;
  overflow: hidden !important;
  animation: sessionCodePulse 2s infinite !important;
}

.session-code-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  transition: 0.5s;
}

.session-code-btn:hover::before {
  left: 100%;
}

.session-code-btn:hover {
  background: var(--accent) !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
}

.session-code-btn:active {
  transform: translateY(0) !important;
}

.session-code-btn.mobile-compact {
  padding: 4px 10px !important;
  font-size: 11px !important;
  height: 32px !important;
  border-radius: 10px !important;
  gap: 6px !important;
}

.session-code-btn svg {
  color: inherit !important;
  filter: drop-shadow(0 0 2px rgba(99, 102, 241, 0.3)) !important;
}

@keyframes sessionCodePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

/* ============================================
   SPECIAL SLIDER STYLES
   ============================================ */
.special-slider-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 24px;
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  min-height: 200px;
  /* Ensure visibility */
}

.special-slider-header {
  padding: 16px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2;
}

/* Slide structure removed here and consolidated below at the end of the file */

.special-product-card {
  background: rgba(30, 41, 59, 0.95);
  border-radius: 12px;
  overflow: hidden;
  width: 140px;
  /* Fixed width for better layout */
  flex-shrink: 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.special-product-image {
  width: 100%;
  aspect-ratio: 1/1;
  /* Force square */
  object-fit: cover;
  background: #334155;
}

.special-product-info {
  padding: 8px;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.special-product-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.special-product-price {
  font-size: 12px;
  color: #f59e0b;
  margin-bottom: 8px;
  font-weight: 700;
}

.special-add-btn {
  width: 100%;
  padding: 6px;
  font-size: 12px;
  background: #6366f1;
  color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.2s;
}

.special-add-btn:hover {
  background: #4f46e5;
}

.special-add-btn svg {
  width: 14px;
  height: 14px;
}

.special-slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-bottom: 12px;
  position: absolute;
  bottom: 0;
  width: 100%;
}

.special-slider-dot {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border: none;
  padding: 0;
  transition: all 0.3s;
}


.special-slider-dot.active {
  background: #fff;
  transform: scale(1.2);
}

/* FIX: Waiter Cart Clickability Issue */
.waiter-cart-section {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 410px;
  background: #1e293b;
  border-top-left-radius: 12px;
  box-shadow: -4px -4px 15px #6366f1;
  z-index: 999999 !important;
  /* Higher than modal backdrop */
  display: flex;
  flex-direction: column;
  transition: transform 0.1s ease;
  /* Ensure it handles pointer events */
  pointer-events: auto;
}

/* Ensure modal content allows clicks on children if it has lower z-index */
.modal-content {
  overflow: hidden;
  /* sometimes needed, but can be issue if strict */
}

/* FIX: Special Slider Scrolling & Width */
/* Duplicate slider styles removed - consolidated in main slider section above (lines 6231-6537) */

/* ============================================
   PREMIUM WAITER PANEL STYLES
   Complete redesign for modern, premium look
   ============================================ */

/* Base Waiter View */
.waiter-tables-view {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding-bottom: 30px;
}

/* Premium Header Styling */
.waiter-view-header {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.waiter-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Group profile, filters, and toggles together */
.waiter-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

/* Premium Profile Button - Compact */
.waiter-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
  font-size: 13px;
  font-weight: 600;
}

.waiter-profile-btn svg {
  color: var(--accent);
  flex-shrink: 0;
}

.waiter-profile-btn span {
  white-space: nowrap;
}

.waiter-profile-btn:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(99, 102, 241, 0.1));
  border-color: var(--primary);
  transform: translateY(-1px);
}

.waiter-profile-btn .header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.waiter-profile-btn .header-logo svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
  flex-shrink: 0;
}

.waiter-info-container {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.waiter-info-container h1 {
  font-size: 14px;
  font-weight: 700;
  color: white;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.change-waiter-link {
  font-size: 11px;
  color: var(--primary);
  font-weight: 500;
  opacity: 0.8;
}

/* Premium Filter Selects */
.table-filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.table-filters .form-select {
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(135deg, #1e293b, #334155);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: white;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  padding: 8px 32px 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.table-filters .form-select:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, #334155, #475569);
}

.table-filters .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  outline: none;
}

/* Header Right Section */
.header-right-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Compact Mini Toggles */
.toggle-mini {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-mini:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
}

.toggle-mini i {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.toggle-mini input {
  display: none;
}

.toggle-mini:has(input:checked) {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
}

.toggle-mini:has(input:checked) i {
  color: var(--primary);
}

.switch {
  position: relative;
  width: 36px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #475569;
  transition: 0.3s;
}

.slider.round {
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked+.slider {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
}

input:checked+.slider:before {
  transform: translateX(16px);
}

/* Premium Logout Button */
.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 10px;
  color: #ef4444;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.btn-logout i {
  font-size: 14px;
}

/* Header Bottom Row */
.waiter-header-bottom {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.header-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.header-action-buttons .btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid;
}

.header-action-buttons .btn-secondary {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.4);
  color: #818cf8;
}

.header-action-buttons .btn-secondary:hover {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: #6366f1;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Specific button colors */
.header-action-buttons .btn-codes {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.header-action-buttons .btn-codes:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.header-action-buttons .btn-history {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
  color: #a78bfa;
}

.header-action-buttons .btn-history:hover {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border-color: #8b5cf6;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.header-action-buttons .btn-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1));
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.header-action-buttons .btn-warning:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

/* Section Title */
.waiter-section-title {
  padding: 1px 2px 1px;
}

.waiter-section-title h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Premium Tables Grid */
.waiter-tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  padding: 0 16px 20px;
}

/* Premium Table Card with Blue Border */
.table-card-large {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(51, 65, 85, 0.7));
  border: 2px solid rgba(99, 102, 241, 0.4);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 120px;
}

.table-card-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}

.table-card-large:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
}

.table-card-large:hover::before {
  opacity: 1;
}

.table-card-large:active {
  transform: scale(0.97);
}

.table-card-large.active {
  border-color: var(--success);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), rgba(30, 41, 59, 0.9));
}

.table-card-large.active::before {
  background: var(--success);
  opacity: 1;
}

.table-card-large.calling {
  border-color: #f59e0b;
  animation: pulseCall 2s infinite;
}

@keyframes pulseCall {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }

  50% {
    box-shadow: 0 0 0 15px rgba(245, 158, 11, 0);
  }
}

.table-card-large.payment-requested {
  border-color: #f472b6;
  background: linear-gradient(145deg, rgba(244, 114, 182, 0.15), rgba(30, 41, 59, 0.9));
}

/* ============================================
   DETAIL FOOTER BUTTON COLORS
   ============================================ */
.btn-qr {
  background: rgba(6, 182, 212, 0.15) !important;
  border: 1px solid rgba(6, 182, 212, 0.4) !important;
  color: #22d3ee !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-qr:hover {
  background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
  color: white !important;
}

.btn-add {
  background: rgba(16, 185, 129, 0.15) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-add:hover {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: white !important;
}

.btn-transfer {
  background: rgba(139, 92, 246, 0.15) !important;
  border: 1px solid rgba(139, 92, 246, 0.4) !important;
  color: #a78bfa !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-transfer:hover {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
  color: white !important;
}

/* Table Card Content */
.table-card-large .table-number {
  font-size: 32px;
  display: flex;
  font-weight: 800;
  color: white;
  line-height: 1;
  margin-bottom: 8px;
  flex-direction: row-reverse;
}

.table-card-large .table-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  flex-grow: 1;
}

.table-card-large .table-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-status.free {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.table-status.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.table-status.pending {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.table-status.preparing {
  background: rgba(192, 132, 252, 0.15);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.table-status.delivered {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.table-status.paid {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.table-status.call_waiter {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
  animation: statusPulse 2s infinite;
}

.table-status.payment_requested {
  background: rgba(244, 114, 182, 0.15);
  color: #f472b6;
  border: 1px solid rgba(244, 114, 182, 0.3);
}

@keyframes statusPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

/* Global Alert */
.waiter-global-alert {
  margin: 12px 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.waiter-global-alert .alert-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.waiter-global-alert .alert-icon {
  width: 24px;
  height: 24px;
  color: #fbbf24;
}

.waiter-global-alert span {
  font-weight: 600;
  color: #fbbf24;
}

/* ============================================
   WAITER DETAIL VIEW
   ============================================ */
.waiter-detail-view {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  flex-direction: column;
}

.waiter-detail-header {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(180deg, #6366f17d 0%, #080a47 100%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  align-items: center;
  overflow-wrap: break-word;
  white-space: normal;
}

.btn-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  transform: translateX(-3px);
}

.btn-back svg {
  width: 18px;
  height: 18px;
}

.detail-header-info {
  text-align: right;
}

.detail-header-info h2 {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin: 0 0 4px 0;
}

.detail-header-info .table-status {
  font-size: 11px;
}

/* Detail Content */
.waiter-detail-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  padding-bottom: 100px;
  /* Space for footer */
}

.clients-info-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 14px;
  margin-bottom: 16px;
}

.clients-count {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-weight: 600;
}

.clients-count svg {
  color: var(--primary);
}

.clients-count #connectedClientsCount {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

/* Client Tracking */
.client-tracking-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
}

/* Order Section */
.order-section {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(51, 65, 85, 0.5));
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.order-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Order Total */
.order-total-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 14px;
  padding: 16px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.total-amount {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #fcd34d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   PREMIUM WAITER DETAIL FOOTER (5-SLOT GRID)
   ============================================ */
.waiter-detail-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr) !important;
  /* Always 5 slots */
  gap: 8px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 1) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(99, 102, 241, 0.2);
  padding: 12px;
  z-index: 99;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.5);
}

.waiter-detail-footer .btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  width: 100%;
  height: 60px;
  min-width: 0;
}

/* Status Action Slot & Placeholder Box */
.status-action-slot {
  position: relative;
  width: 100%;
  height: 60px;
}

.status-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.placeholder-box {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.status-action-slot .btn {
  position: absolute;
  inset: 0;
  z-index: 2;
  height: 100%;
}

.waiter-detail-footer .btn.hidden {
  display: none !important;
}

.waiter-detail-footer .btn.invisible {
  visibility: hidden;
  pointer-events: none;
}

.waiter-detail-footer .btn svg {
  width: 18px;
  height: 18px;
}

.waiter-detail-footer .btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
  color: white;
}

.waiter-detail-footer .btn-secondary:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.waiter-detail-footer .btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.waiter-detail-footer .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.waiter-detail-footer .btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.waiter-detail-footer .btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.waiter-detail-footer .btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.waiter-detail-footer .btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

.waiter-detail-footer .btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.waiter-detail-footer .btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

/* ============================================
   WAITER CATEGORY TABS (Add Item Modal)
   ============================================ */
/* Old Duplicate Removed 2 */
/* .waiter-category-tabs { ... } */


/* Waiter Product List */
.waiter-product-list {
  /* display: flex; */
  flex-direction: column;
  gap: 16px;
  padding-bottom: 120px;
}

/* Product Card for Waiter Panel */
.product-card-waiter {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(51, 65, 85, 0.7));
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
  flex-direction: column;
}

.product-card-waiter:hover {
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.product-card-waiter .product-info {
  flex-grow: 1;
  min-width: 0;
}

.product-card-waiter .product-name {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-waiter .product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.product-card-waiter .product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.product-card-waiter .btn-add-product {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--success), #059669);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-card-waiter .btn-add-product:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* ============================================
   WAITER MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .waiter-header-top {
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: space-between;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
  }

  .waiter-header-top::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
  }

  .waiter-profile-btn {
    padding: 6px 10px;
    border-radius: 12px;
  }

  .waiter-profile-btn .header-logo svg {
    width: 22px;
    height: 22px;
  }

  .waiter-info-container h1 {
    font-size: 13px;
  }

  .table-filters .form-select {
    padding: 5px 24px 5px 8px;
    font-size: 11px;
    min-width: 55px;
  }

  .waiter-header-left {
    gap: 6px;
  }

  .header-toggles {
    gap: 4px;
  }

  .switch-container {
    padding: 4px 6px;
    gap: 4px;
  }

  .switch-container i {
    font-size: 12px;
  }

  .switch {
    width: 28px;
    height: 16px;
  }

  .slider:before {
    height: 10px;
    width: 10px;
    left: 2px;
    bottom: 3px;
  }

  input:checked+.slider:before {
    transform: translateX(12px);
  }

  .btn-logout {
    padding: 6px 10px;
    font-size: 12px;
  }

  .btn-logout span {
    display: none;
    /* Hide text on mobile */
  }

  .header-action-buttons {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .header-action-buttons::-webkit-scrollbar {
    display: none;
  }

  .header-action-buttons .btn {
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 11px;
  }

  .header-action-buttons .btn span {
    display: none;
  }

  .waiter-tables-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 12px 20px;
  }

  .table-card-large {
    padding: 14px;
    min-height: 110px;
  }

  .table-card-large .table-number {
    font-size: 26px;
  }

  .table-card-large .table-status {
    padding: 4px 8px;
    font-size: 10px;
  }

  .waiter-detail-footer {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 4px;
    padding: 8px;
  }

  .waiter-detail-footer .btn {
    padding: 6px 2px;
    font-size: 8px;
    height: 52px;
  }

  .status-action-slot {
    height: 52px;
  }

  .waiter-detail-footer .btn span {
    display: none;
  }

  .waiter-detail-footer .btn svg {
    margin-right: 0;
  }
}

/* Large desktop optimization */
@media (min-width: 1200px) {
  .waiter-tables-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px 30px;
  }

  .table-card-large {
    padding: 22px;
    min-height: 150px;
  }

  .table-card-large .table-number {
    font-size: 38px;
  }
}

/* Skeleton loading animation */
.skeleton {
  background: linear-gradient(90deg, rgba(51, 65, 85, 0.5) 0%, rgba(71, 85, 105, 0.5) 50%, rgba(51, 65, 85, 0.5) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 18px;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* ============================================
   SPECIAL SLIDER STYLES (Fixed Alignment)
   ============================================ */
.special-slider-container {
  display: block;
  margin-bottom: 25px;
  width: 100%;
  overflow: hidden;
}

.special-slider-wrapper {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  /* background handled inline */
}

/* Header inside the wrapper but outside the track */
.special-slider-header {
  padding: 10px 15px 5px;
  margin-bottom: 5px;
}

.special-slider-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.special-slider-header p {
  margin: 0;
  font-size: 13px;
  opacity: 0.9;
}

.special-slides-track {
  display: flex;
  width: 100%;
  gap: 16px;
  /* FIXED GAP DEFINITION */
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  padding-bottom: 2px;
}

.special-slide {
  flex: 0 0 100%;
  /* Takes full width of container */
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 180px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.special-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
  color: white;
}

.special-slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.special-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 0;
  transition: all 0.3s ease;
  cursor: pointer;
}

.special-slider-dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;


}

/* ============================================
   NOTIFICATION Z-INDEX FIXES
   ============================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 20000 !important;
  /* Above everything */
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  /* Allow clicks to pass through container */
}

.toast {
  position: relative;
  /* z-index: 20001; Inline z-index not needed if container is high */
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 300px;
  max-width: 400px;
  pointer-events: auto;
  /* Re-enable clicks on toasts themselves */
  animation: slideInToast 0.3s ease forwards;
  border-left-width: 4px;
  border-left-style: solid;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--error);
}

.toast.warning {
  border-left-color: var(--warning);
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon svg {
  width: 20px;
  height: 20px;
}

.toast-message {
  font-size: 14px;
  font-weight: 500;
}

@keyframes slideInToast {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-out {
  animation: slideOutToast 0.3s ease forwards;
}

@keyframes slideOutToast {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Ensure Modals are below Toast */
.modal,
.modal-overlay,
.custom-modal-overlay {
  z-index: 9000 !important;
  /* Ensure modals are below notifications */
}

.modal.active,
.modal-overlay.active,
.custom-modal-overlay.active {
  z-index: 400 !important;
  /* Active modals slightly higher but still below toasts */
}

/* ============================================
   FULLSCREEN TOGGLE BUTTON
   ============================================ */
.fullscreen-btn {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.fullscreen-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--primary);
  transform: scale(1.05);
}

.fullscreen-btn:active {
  transform: scale(0.95);
}

.fullscreen-btn i {
  font-size: 14px;
}

/* Fullscreen-specific body styling */
:fullscreen body,
:-webkit-full-screen body,
:-moz-full-screen body,
:-ms-fullscreen body {
  overflow: auto;
}

:fullscreen .waiter-tables-view,
:-webkit-full-screen .waiter-tables-view,
:-moz-full-screen .waiter-tables-view,
:-ms-fullscreen .waiter-tables-view {
  height: 100vh;
  overflow-y: auto;
}

:fullscreen .waiter-detail-view,
:-webkit-full-screen .waiter-detail-view,
:-moz-full-screen .waiter-detail-view,
:-ms-fullscreen .waiter-detail-view {
  height: 100vh;
  overflow-y: auto;
}

/* ============================================
   MOBILE INTERACTION FIXES
   ============================================ */
@media (hover: none) and (pointer: coarse) {

  /* Disable 3D pop-up effect on touch devices */
  .table-card-large:hover,
  .table-card:hover,
  .card:hover {
    transform: none !important;
    box-shadow: var(--shadow-md) !important;
    /* Maintain base shadow */
  }

  /* Improve click reliability */
  .table-card-large,
  .table-card,
  .btn,
  .card {
    cursor: default !important;
    /* Remove pointer cursor to reduce tap delay confusion */
  }
}

/* ============================================
   WAITER PANEL - CATEGORY TABS (HORIZONTAL SCROLL)
   ============================================ */
/* ============================================================
   WAITER ADD-ITEM MODAL - CATEGORY SCROLL
   ============================================================ */

/* Main Container Constraint */
#addItemModal .modal-content {
  max-width: calc(100vw - 20px) !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

#addItemModal .modal-body {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  /* Edge to edge removal of "box" */
  overflow: hidden !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.search-container-wrap {
  padding: 16px 16px 0 16px !important;
  flex-shrink: 0;
  width: 100%;
}

.waiter-category-tabs {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  width: 100% !important;
  min-width: 0 !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  background: var(--bg-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0 !important;
  touch-action: pan-x !important;
}


.waiter-category-tab {
  background: var(--bg-tertiary) !important;
  color: #fff !important;
}

.waiter-category-tabs::-webkit-scrollbar {
  display: none !important;
}

.waiter-category-tabs.dragging {
  cursor: grabbing !important;
}

/* Shared Tab Button Styles */
.waiter-category-tab {
  flex-shrink: 0 !important;
  padding: 8px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap !important;
  transition: all 0.2s ease;
  user-select: none;
}

.waiter-category-tab.active {
  background: var(--primary) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px var(--primary-glow);
  transform: translateY(-1px);
}

/* Secondary Tab Specifics */
.secondary-waiter-category-tabs {
  background: rgba(15, 23, 42, 0.2);
  padding: 8px 16px !important;
  min-height: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: 0;
}

.secondary-waiter-category-tabs .waiter-category-tab {
  padding: 6px 14px;
  font-size: 11px;
  background: transparent;
  border-color: transparent;
  opacity: 0.7;
}

.secondary-waiter-category-tabs .waiter-category-tab:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
}

.secondary-waiter-category-tabs .waiter-category-tab.active {
  background: white !important;
  color: black !important;
  opacity: 1;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

/* ============================================================
   WAITER PRODUCT LIST - FORCED VERTICAL SCROLL (MOBILE)
   ============================================================ */
.waiter-product-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  padding-bottom: 160px !important;
  /* Large padding for Bottom Cart Drawer */
  min-height: 0 !important;
  width: 100% !important;
  scrollbar-width: none !important;
  touch-action: pan-y !important;
  /* Enable vertical swipe scrolling */
}

.waiter-product-list::-webkit-scrollbar {
  display: none !important;
}

/* ============================================
   ADMIN MODAL OVERRIDES (High Specificity)
   ============================================ */
.presets-container {
  transition: all 0.2s ease;
}

.presets-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.presets-actions-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}

.presets-buttons {
  display: flex;
  gap: 8px;
}

.presets-create-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

/* Mobile Layout Fixes */
@media (max-width: 768px) {
  .presets-actions-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .presets-actions-row select {
    width: 100% !important;
  }

  .presets-buttons {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  .presets-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .presets-create-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .presets-create-row input {
    width: 100%;
  }

  .presets-create-row .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Fix for Select overflow in Grid */
.presets-actions-row select {
  min-width: 0;
}

/* Fix for Categories Flow - Forces wrap and scroll */
.admin-category-filter {
  flex-wrap: wrap !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  max-height: 120px !important;
  height: auto !important;
  gap: 6px !important;
}

.admin-category-filter .category-tab {
  flex: 0 0 auto;
  margin-bottom: 4px;
}

/* ============================================
   UTILITIES
   ============================================ */
/* Scroll Locking for Modals */
.no-scroll {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none;
}

/* ============================================
   BUBBLE CANVAS & OVERLAYS — AQUA & SAPONE
   ============================================ */
#bubbleCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

.vignette-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 55% at 50% 100%, rgba(2, 10, 26, 0.75) 0%, transparent 70%),
    radial-gradient(ellipse 100% 30% at 50% 0%, rgba(2, 10, 26, 0.4) 0%, transparent 60%);
  pointer-events: none;
}

.grain-overlay {
  position: fixed;
  inset: -60%;
  width: 220%;
  height: 220%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.5s steps(1) infinite;
}

@keyframes grain {
  0% {
    transform: translate(0, 0);
  }

  20% {
    transform: translate(-3%, 2%);
  }

  40% {
    transform: translate(2%, -3%);
  }

  60% {
    transform: translate(-2%, 3%);
  }

  80% {
    transform: translate(3%, -2%);
  }

  100% {
    transform: translate(0, 0);
  }
}

/* Ensure main content sits above bubble canvas */
.header {
  position: relative;
  z-index: 5;
}

main {
  position: relative;
  z-index: 4;
}

.sticky-nav {
  z-index: 110 !important;
}

.floating-cart {
  z-index: 200;
}

.toast-container {
  z-index: 10000;
}

/* Social Icon Links in header */
.social-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(109, 228, 247, 0.2);
  background: rgba(109, 228, 247, 0.05);
  color: var(--aqua);
  transition: all 0.3s ease;
}

.social-icon-link:hover {
  background: rgba(109, 228, 247, 0.15);
  border-color: rgba(109, 228, 247, 0.4);
  transform: translateY(-2px);
}

.header-socials {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Search Container aqua focus */
.search-container:focus-within {
  border-color: rgba(109, 228, 247, 0.5) !important;
  box-shadow: 0 0 0 4px rgba(109, 228, 247, 0.08) !important;
}

.search-container:focus-within .search-icon {
  color: var(--aqua) !important;
}

/* Language Modal Overlay — Aqua Theme */
.language-modal-overlay {
  background: rgba(3, 13, 26, 0.92) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.language-modal-content {
  background: rgba(6, 20, 40, 0.95) !important;
  border: 1px solid rgba(109, 228, 247, 0.2) !important;
  border-radius: 20px !important;
}

.language-btn-large {
  background: rgba(109, 228, 247, 0.06) !important;
  border: 1px solid rgba(109, 228, 247, 0.2) !important;
  color: var(--pearl) !important;
  transition: all 0.3s ease !important;
}

.language-btn-large:hover {
  background: rgba(109, 228, 247, 0.15) !important;
  border-color: rgba(109, 228, 247, 0.4) !important;
}

/* Add to cart button large — Aqua */
.add-to-cart-btn-large {
  background: linear-gradient(130deg, rgba(109, 228, 247, 0.35), rgba(50, 140, 210, 0.3)) !important;
  border: 1px solid rgba(109, 228, 247, 0.4) !important;
  box-shadow: 0 4px 15px rgba(109, 228, 247, 0.2) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.add-to-cart-btn-large:hover {
  background: linear-gradient(130deg, rgba(109, 228, 247, 0.5), rgba(50, 140, 210, 0.4)) !important;
  box-shadow: 0 6px 20px rgba(109, 228, 247, 0.3) !important;
}

/* Product modal — Aqua Deep Sea */
.product-modal {
  background: rgba(6, 20, 40, 0.95) !important;
  border-top: 1px solid rgba(109, 228, 247, 0.15);
}

.product-modal-header {
  background: rgba(3, 13, 26, 0.9) !important;
  border-bottom-color: rgba(109, 228, 247, 0.12) !important;
}

.product-modal-footer {
  background: rgba(3, 13, 26, 0.9) !important;
  border-top-color: rgba(109, 228, 247, 0.12) !important;
}

/* Cart modal — Aqua Deep Sea */
.cart-modal {
  background: rgba(6, 20, 40, 0.95) !important;
  border-top: 1px solid rgba(109, 228, 247, 0.15);
}

.cart-modal-header {
  background: rgba(6, 20, 40, 0.95) !important;
  border-bottom-color: rgba(109, 228, 247, 0.12) !important;
}

.cart-modal-footer {
  background: rgba(3, 13, 26, 0.95) !important;
  border-top-color: rgba(109, 228, 247, 0.12) !important;
}

/* Floating cart aqua */
.cart-preview {
  background: rgba(6, 20, 40, 0.9) !important;
  border: 1px solid rgba(109, 228, 247, 0.25) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cart-preview:hover {
  border-color: rgba(109, 228, 247, 0.45) !important;
  box-shadow: 0 8px 30px rgba(109, 228, 247, 0.15) !important;
}

.cart-icon {
  background: linear-gradient(130deg, rgba(109, 228, 247, 0.35), rgba(50, 140, 210, 0.3)) !important;
  border: 1px solid rgba(109, 228, 247, 0.3);
}

/* Variation Item aqua active */
.variation-item {
  border-color: rgba(109, 228, 247, 0.15) !important;
  background: rgba(10, 30, 55, 0.7) !important;
}

.variation-item.active {
  background: rgba(109, 228, 247, 0.1) !important;
  border-color: var(--aqua) !important;
  color: var(--pearl) !important;
}

/* Toast refinements */
.toast {
  background: rgba(6, 20, 40, 0.95) !important;
  border-color: rgba(109, 228, 247, 0.15) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Order status card */
.order-status-card.consolidated {
  background: rgba(6, 20, 40, 0.85) !important;
  border-color: rgba(109, 228, 247, 0.15) !important;
}

/* Search container aqua */
.search-container {
  background: rgba(109, 228, 247, 0.04) !important;
  border-color: rgba(109, 228, 247, 0.12) !important;
}

/* Allergy/Color filter btn aqua */
.allergy-btn {
  border-color: rgba(109, 228, 247, 0.2) !important;
  background: rgba(109, 228, 247, 0.04) !important;
  color: var(--aqua) !important;
}

/* Quantity selector aqua */
.quantity-selector {
  background: rgba(6, 20, 40, 0.8) !important;
  border-color: rgba(109, 228, 247, 0.15) !important;
}

.quantity-selector .qty-btn:hover {
  background: rgba(109, 228, 247, 0.2) !important;
  color: var(--pearl) !important;
}