/* ==========================================================
   PlatePoint POS - Web Application Theme & Stylesheet
   Modern Dark Glassmorphism, Responsive Grid & Print Engine
   ========================================================== */

:root {
  --bg-main: #020617;
  --bg-surface: #090d16;
  --bg-card: #0f172a;
  --bg-card-hover: #1e293b;
  --border-color: #1e293b;
  --border-light: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --primary-cyan: #06b6d4;
  --primary-cyan-hover: #22d3ee;
  --primary-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #020617;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Typography & Links */
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--primary-cyan);
}

/* Layout Utilities */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-main);
  transition: all 0.3s ease;
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(6px);
  z-index: 95;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

.sidebar {
  width: 260px;
  background-color: rgba(15, 23, 42, 0.96);
  border-right: 1px solid var(--border-color);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.25rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.sidebar-close-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #fff;
}

.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.sidebar-collapse-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: var(--primary-cyan);
}

/* Desktop Collapsed Sidebar State */
.dashboard-wrapper.sidebar-collapsed .sidebar {
  width: 76px;
  padding: 1.25rem 0.6rem;
}
.dashboard-wrapper.sidebar-collapsed .sidebar-brand-text,
.dashboard-wrapper.sidebar-collapsed .nav-label,
.dashboard-wrapper.sidebar-collapsed .voice-lang-widget {
  display: none !important;
}
.dashboard-wrapper.sidebar-collapsed .sidebar-header-box {
  justify-content: center;
  padding-bottom: 0.75rem;
}
.dashboard-wrapper.sidebar-collapsed .nav-link-custom {
  justify-content: center;
  padding: 0.75rem 0.5rem;
}
.dashboard-wrapper.sidebar-collapsed .btn-public-menu {
  justify-content: center !important;
  padding: 0.6rem 0.3rem !important;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

.top-navbar {
  height: 64px;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(12px);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.menu-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.menu-toggle-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: var(--primary-cyan);
  border-color: rgba(6, 182, 212, 0.4);
}

/* Nav Item Styling */
.nav-link-custom {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
}
.nav-link-custom:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}
.nav-link-custom.active {
  background-color: var(--primary-cyan);
  color: #020617;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
}

/* Glassmorphism Cards */
.card-glass {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card-glass:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.metric-card {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Kanban Columns */
.kanban-col {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  min-height: 520px;
}
.kanban-col-new {
  border-top: 3px solid var(--accent-amber);
}
.kanban-col-kitchen {
  border-top: 3px solid var(--primary-cyan);
}
.kanban-col-served {
  border-top: 3px solid var(--accent-emerald);
}

.order-card {
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 0.85rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.order-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-2px);
}

/* Badges & Tags */
.badge-custom {
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.badge-table {
  background: rgba(6, 182, 212, 0.12);
  color: var(--primary-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.badge-veg {
  border: 1.5px solid #22c55e;
  padding: 2px;
  border-radius: 4px;
  display: inline-flex;
}
.badge-veg-dot {
  width: 6px;
  height: 6px;
  background-color: #22c55e;
  border-radius: 999px;
}
.badge-nonveg {
  border: 1.5px solid #ef4444;
  padding: 2px;
  border-radius: 4px;
  display: inline-flex;
}
.badge-nonveg-dot {
  width: 6px;
  height: 6px;
  background-color: #ef4444;
  border-radius: 999px;
}

/* Custom Buttons */
.btn-cyan {
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
  color: #020617;
  font-weight: 700;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.25);
}
.btn-cyan:hover {
  background: linear-gradient(135deg, var(--primary-cyan-hover), #60a5fa);
  color: #020617;
  transform: translateY(-1px);
}
.btn-emerald {
  background: linear-gradient(135deg, #10b981, #0d9488);
  color: #020617;
  font-weight: 800;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}
.btn-dark {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid var(--border-color);
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}
.btn-dark:hover {
  background: #1e293b;
  color: #fff;
  border-color: #475569;
}

/* Form Controls */
.form-control-custom {
  width: 100%;
  padding: 0.65rem 1rem;
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: #fff;
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
}
.form-control-custom:focus {
  outline: none;
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}
.form-control-custom::placeholder {
  color: var(--text-muted);
}

/* Floating Waiter Alert Banner */
.waiter-toast-banner {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: linear-gradient(135deg, #d97706, #e11d48);
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(251, 191, 36, 0.4);
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Customer Mobile Menu Specifics */
.customer-mobile-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 120px;
  background-color: var(--bg-main);
  position: relative;
}

.category-nav-pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scrollbar-width: none;
}
.category-nav-pills::-webkit-scrollbar {
  display: none;
}

.pill-item {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  background: #0f172a;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
}
.pill-item.active {
  background: var(--primary-cyan);
  color: #020617;
  border-color: var(--primary-cyan);
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
}

.dish-card-customer {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  gap: 1rem;
  position: relative;
  transition: border-color 0.2s ease;
}
.dish-card-customer:hover {
  border-color: rgba(6, 182, 212, 0.3);
}

.dish-thumbnail {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background-color: #1e293b;
  flex-shrink: 0;
}

/* Floating Bottom Assistance Bar */
.assistance-bar-floating {
  position: fixed;
  bottom: 0.75rem;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0 0.75rem;
  max-width: 480px;
  margin: 0 auto;
}

.assistance-pill-container {
  background: rgba(9, 13, 22, 0.95);
  border: 1px solid rgba(51, 65, 85, 0.8);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-full);
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(6, 182, 212, 0.2);
}

.action-chip {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #0f172a;
  border: 1px solid var(--border-color);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}
.action-chip:hover {
  background: #1e293b;
  color: var(--primary-cyan);
}
.action-chip.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Cart Drawer */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.cart-drawer-overlay.open {
  display: flex;
}
.cart-drawer-content {
  width: 100%;
  max-width: 480px;
  background: #090d16;
  border-top: 1px solid var(--border-color);
  border-radius: 28px 28px 0 0;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.8);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Screen Utility for Print Areas */
.print-only-area {
  display: none;
}

/* ==========================================================
   Print Engine: QR Stand Sheets (A4 / Acrylic) & 80mm Receipts
   ========================================================== */
@media print {
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide all dashboard chrome, sidebar, modals, buttons */
  .dashboard-wrapper,
  .sidebar,
  .top-navbar,
  .no-print,
  #admin-tables-grid,
  .card-glass,
  .modal-overlay,
  .assistance-bar-floating {
    display: none !important;
  }

  /* Show dedicated print areas */
  .print-only-area {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 8mm 5mm !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  /* QR Stand Batch Sheet (A4 Grid) */
  .qr-sheet-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15mm 10mm !important;
  }

  .qr-stand-card {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2.5px solid #000000 !important;
    border-radius: 20px !important;
    padding: 20px 16px !important;
    text-align: center !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .qr-stand-card canvas,
  .qr-stand-card img {
    display: block !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    height: auto !important;
    image-rendering: pixelated !important;
  }

  /* 80mm ESC/POS Thermal Slip */
  .print-thermal-receipt {
    width: 80mm !important;
    max-width: 80mm !important;
    margin: 0 auto !important;
    padding: 4mm 2mm !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
  }
}

.receipt-preview-card {
  width: 80mm;
  max-width: 320px;
  background: #ffffff;
  color: #000000;
  padding: 1rem;
  border-radius: 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  line-height: 1.25;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  margin: 0 auto;
}

.qr-sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.qr-stand-card {
  background: #fff;
  color: #000;
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ==========================================================
   Responsive Navigation & Mobile Drawer Media Queries
   ========================================================== */
@media (max-width: 992px) {
  .menu-toggle-btn {
    display: flex !important;
  }
  .sidebar-collapse-btn {
    display: none !important;
  }
  .sidebar-close-btn {
    display: flex !important;
  }
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    width: 280px !important;
    z-index: 100 !important;
    transform: translateX(-100%);
    box-shadow: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  }
  .sidebar.sidebar-mobile-open {
    transform: translateX(0) !important;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.8) !important;
  }
  .top-navbar {
    padding: 0 1rem;
  }
}

@media (max-width: 640px) {
  .status-label {
    display: none !important;
  }
  .top-navbar h1 {
    font-size: 0.95rem !important;
    max-width: 140px;
  }
}

