/* Nabad POS & Restaurant Management System - Ultra-Modern Glassmorphic Dark Theme */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-base: #0B0F19;
  --bg-surface: #111827;
  --bg-card: rgba(18, 24, 39, 0.85);
  --bg-card-hover: rgba(27, 36, 58, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.18);
  
  --primary: #10B981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.25);
  
  --accent-cyan: #06B6D4;
  --accent-amber: #F59E0B;
  --accent-rose: #F43F5E;
  --accent-purple: #8B5CF6;
  --accent-indigo: #6366F1;
  
  --text-main: #F9FAFB;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  user-select: none;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 40%);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* TOP NAVBAR / APP HEADER */
.top-navbar, .app-header {
  height: 60px;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 50;
  flex-shrink: 0;
}

.brand-wrapper, .brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}

.brand-title {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.3px;
  color: #FFFFFF;
}

.brand-subtitle, .brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.top-nav-status, .system-status {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.status-indicator-dot, .dot-green {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* MAIN APPLICATION SHELL */
.app-container, .app-body-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 60px);
}

/* LEFT NAVIGATION SIDEBAR */
.sidebar, .sidebar-nav {
  width: 230px;
  background: rgba(15, 21, 35, 0.95);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  gap: 6px;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-category-header, .sidebar-section-title {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 10px 0 4px 10px;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.sidebar-btn-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.sidebar-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.1));
  border-color: rgba(16, 185, 129, 0.4);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.badge-counter {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.sidebar-btn.active .badge-counter {
  background: var(--primary);
  color: #fff;
}

/* MAIN CONTENT AREA & VIEW SECTIONS */
.content-area, .main-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: var(--bg-base);
}

.view-section {
  display: none;
  flex: 1;
  height: 100%;
  overflow-y: auto;
  padding: 18px;
}

.view-section.active {
  display: flex;
  flex-direction: column;
}

/* POS TERMINAL TWO-PANEL SPACIOUS LAYOUT (MAX FOOD SCREEN) */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 14px;
  height: 100%;
  overflow: hidden;
  padding: 2px;
}

@media (max-width: 1200px) {
  .pos-layout {
    grid-template-columns: 1fr 340px;
    gap: 10px;
  }
}

@media (max-width: 880px) {
  .pos-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

/* POS MAIN FOOD MENU PANEL */
.pos-center-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  height: 100%;
  min-height: 0;
  flex: 1;
}

/* CATEGORY TABS & SEARCH */
.category-filter-bar, .category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  flex-wrap: nowrap;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar {
  height: 5px;
}

.category-tabs::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.category-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.cat-tab {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(25, 34, 53, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cat-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.cat-tab.active {
  background: linear-gradient(135deg, var(--primary), #059669);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.cat-badge {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
}

.cat-tab.active .cat-badge {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.menu-search-bar {
  display: flex;
  align-items: center;
  background: rgba(18, 24, 39, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 14px;
  gap: 10px;
  height: 42px;
  flex-shrink: 0;
}

.menu-search-bar input {
  background: transparent;
  border: none;
  color: white;
  font-size: 13.5px;
  width: 100%;
  outline: none;
}

.menu-search-bar input::placeholder {
  color: var(--text-dim);
}

/* FOOD ITEMS SPACIOUS GRID WITH SMOOTH SCROLL */
.menu-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  grid-auto-rows: 215px;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 6px 30px 2px;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
}

.menu-items-grid::-webkit-scrollbar {
  width: 6px;
}

.menu-items-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}

.menu-items-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.menu-item-card {
  background: linear-gradient(180deg, rgba(26, 36, 56, 0.95) 0%, rgba(16, 22, 36, 0.98) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: default;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  height: 215px;
  min-height: 215px;
  max-height: 215px;
  flex-shrink: 0;
}

.menu-item-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), 0 0 16px rgba(16, 185, 129, 0.25);
}

.menu-item-img-container {
  position: relative;
  width: 100%;
  height: 125px;
  min-height: 125px;
  max-height: 125px;
  overflow: hidden;
  background: #0B0F19;
  flex-shrink: 0;
}

.menu-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.menu-item-card:hover .menu-item-img {
  transform: scale(1.08);
}

.category-pill-overlay {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #F9FAFB;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: capitalize;
}

.quick-add-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
}

.quick-add-btn:hover {
  transform: scale(1.15);
  background: #059669;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.6);
}

.quick-add-btn:active {
  transform: scale(0.95);
}

.menu-item-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-height: 0;
}

.menu-item-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-item-footer .price-usd {
  font-size: 16px;
  font-weight: 900;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
}

.btn-card-add {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

.btn-card-add:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.btn-card-add:active {
  transform: scale(0.94);
}

/* POS RIGHT PANEL (Ticket Cart & Checkout) */
.pos-right-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.ticket-header {
  padding: 14px 16px;
  background: rgba(18, 24, 39, 0.95);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticket-title-group h3 {
  font-size: 15px;
  font-weight: 800;
  color: white;
}

.ticket-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-item-row {
  background: rgba(25, 34, 53, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 13.5px;
  font-weight: 700;
}

.item-row-notes {
  font-size: 11px;
  color: var(--accent-cyan);
  font-style: italic;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.qty-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 800;
  width: 22px;
  height: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.qty-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.qty-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  min-width: 18px;
  text-align: center;
}

.btn-discount-quick {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-discount-quick:hover {
  background: rgba(239, 68, 68, 0.2);
  color: white;
  border-color: var(--accent-rose);
}

.btn-discount-quick.active {
  background: var(--accent-rose);
  color: white;
  border-color: var(--accent-rose);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

.edit-cat-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.edit-cat-pill:hover {
  background: rgba(16, 185, 129, 0.2);
  color: white;
  border-color: var(--primary);
}

.edit-cat-pill.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.ticket-summary {
  padding: 14px 16px;
  background: rgba(18, 24, 39, 0.95);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.summary-line.total {
  font-size: 15px;
  font-weight: 800;
  color: white;
  padding-top: 6px;
  border-top: 1px solid var(--border-color);
}

.action-bar-pos {
  padding: 0 16px 16px 16px;
  background: rgba(18, 24, 39, 0.95);
}

/* BUTTONS & FORMS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #059669);
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--border-color-hover);
}

.btn-warning {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--accent-amber);
}

.btn-warning:hover {
  background: rgba(245, 158, 11, 0.3);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
}

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

.section-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-select {
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: white;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* GLASS PANEL & TABLES */
.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.glass-card {
  background: rgba(25, 34, 53, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.custom-table th {
  text-align: left;
  padding: 12px 14px;
  background: rgba(11, 15, 25, 0.6);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

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

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

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-val {
  font-size: 22px;
  font-weight: 900;
  color: white;
  line-height: 1.1;
  font-family: 'Outfit', sans-serif;
}

.stat-lbl {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.status-tag-free {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}

/* REPORT FILTER PRESET TABS */
.report-filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(25, 34, 53, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-tab-btn.active {
  background: linear-gradient(135deg, var(--primary), #059669);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* MODALS (HIDDEN BY DEFAULT) */
.modal-overlay, .modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none !important;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-overlay.active, .modal-backdrop.active {
  display: flex !important;
}

.modal-card, .modal-window {
  background: #151D30;
  border: 1px solid var(--border-color-hover);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: white;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.modal-close-btn:hover {
  color: white;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: 70vh;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(11, 15, 25, 0.5);
}

/* THERMAL RECEIPT STYLES (100% POS MATCH - CRISP SOLID BLACK) */
.thermal-receipt {
  background: #FFFFFF !important;
  color: #000000 !important;
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, Roboto, sans-serif;
  font-size: 11px;
  line-height: 1.35;
  max-width: 290px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.thermal-receipt * {
  color: #000000 !important;
  box-sizing: border-box;
}

.receipt-header {
  text-align: center;
  margin-bottom: 12px;
}

.receipt-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  line-height: 1.4;
}

.receipt-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 6px;
  font-size: 11px;
}

.receipt-items-table th {
  border-bottom: 1px solid #000000;
  padding: 3px 0;
  font-size: 11px;
  font-weight: 700;
}

.receipt-items-table td {
  padding: 2.5px 0;
  vertical-align: top;
  font-size: 11px;
}

.receipt-footer {
  text-align: center;
  font-size: 10.5px;
  margin-top: 14px;
  line-height: 1.4;
}

/* LOGIN OVERLAY & AUTHENTICATION */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.login-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(26, 36, 56, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(16, 185, 129, 0.2);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-header {
  text-align: center;
}

.login-logo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 3px solid var(--primary);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.login-demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.login-demo-badge:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--primary);
  color: white;
}

.user-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 700;
}

.badge-role-admin {
  background: rgba(239, 68, 68, 0.18);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-role-cashier {
  background: rgba(16, 185, 129, 0.18);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-role-waiter {
  background: rgba(59, 130, 246, 0.18);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* EXPENSE CATEGORY BADGES */
.badge-exp-mushaar { background: rgba(59, 130, 246, 0.18); color: #60A5FA; border: 1px solid rgba(59, 130, 246, 0.35); padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }
.badge-exp-koronto { background: rgba(245, 158, 11, 0.18); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.35); padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }
.badge-exp-biyo { background: rgba(6, 182, 212, 0.18); color: #22D3EE; border: 1px solid rgba(6, 182, 212, 0.35); padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }
.badge-exp-kale { background: rgba(156, 163, 175, 0.18); color: #D1D5DB; border: 1px solid rgba(156, 163, 175, 0.35); padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }

/* ACCOUNT & STATEMENT BADGES */
.badge-stmt-inflow { background: rgba(16, 185, 129, 0.18); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.35); padding: 3px 8px; border-radius: 6px; font-weight: 800; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }
.badge-stmt-outflow { background: rgba(239, 68, 68, 0.18); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.35); padding: 3px 8px; border-radius: 6px; font-weight: 800; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }
.badge-stmt-transfer { background: rgba(139, 92, 246, 0.18); color: #A78BFA; border: 1px solid rgba(139, 92, 246, 0.35); padding: 3px 8px; border-radius: 6px; font-weight: 800; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }

.account-card-box {
  background: linear-gradient(145deg, rgba(26, 36, 56, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.account-card-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ===================================================================== */
/* PRESET IMAGE PICKER & SMART DISH SELECTOR STYLES                      */
/* ===================================================================== */
.preset-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
  margin-top: 8px;
  max-height: 150px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.preset-image-item {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}
.preset-image-item:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}
.preset-image-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}
.preset-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preset-image-item .preset-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  font-size: 8.5px;
  text-align: center;
  color: #fff;
  padding: 1px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===================================================================== */
/* LIGHT MODE STYLES & OVERRIDES                                        */
/* ===================================================================== */
body.light-mode {
  --bg-base: #F1F5F9;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --border-color: #E2E8F0;
  --border-color-hover: #CBD5E1;

  --primary: #059669;
  --primary-hover: #047857;
  --primary-glow: rgba(5, 150, 105, 0.2);

  --accent-cyan: #0284C7;
  --accent-amber: #D97706;
  --accent-rose: #E11D48;
  --accent-purple: #7C3AED;
  --accent-indigo: #4F46E5;

  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-dim: #94A3B8;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);

  background-color: #F1F5F9;
  color: #0F172A;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(5, 150, 105, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(2, 132, 199, 0.04) 0%, transparent 40%);
}

body.light-mode .top-navbar,
body.light-mode .app-header {
  background: #FFFFFF !important;
  border-bottom: 1px solid #E2E8F0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

body.light-mode .brand-title {
  color: #0F172A !important;
}
body.light-mode .brand-sub {
  color: #64748B !important;
}

body.light-mode .sidebar,
body.light-mode .sidebar-nav {
  background: #FFFFFF !important;
  border-right: 1px solid #E2E8F0 !important;
}
body.light-mode .sidebar-category-header,
body.light-mode .sidebar-section-title {
  color: #94A3B8 !important;
}
body.light-mode .sidebar-btn {
  color: #475569 !important;
}
body.light-mode .sidebar-btn:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
}
body.light-mode .sidebar-btn.active {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.12), rgba(2, 132, 199, 0.08)) !important;
  border-color: rgba(5, 150, 105, 0.4) !important;
  color: #047857 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

body.light-mode .main-content-area,
body.light-mode .content-area {
  background: #F1F5F9 !important;
}

body.light-mode .glass-panel,
body.light-mode .glass-card {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.light-mode .menu-item-card {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
body.light-mode .menu-item-card:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.15) !important;
}
body.light-mode .menu-item-title {
  color: #0F172A !important;
}
body.light-mode .category-pill-overlay {
  background: rgba(15, 23, 42, 0.75) !important;
  color: #FFFFFF !important;
}

body.light-mode .pos-cart-panel,
body.light-mode .ticket-panel {
  background: #FFFFFF !important;
  border-left: 1px solid #E2E8F0 !important;
}
body.light-mode .ticket-header {
  background: #F8FAFC !important;
  border-bottom: 1px solid #E2E8F0 !important;
}
body.light-mode .ticket-header h3 {
  color: #0F172A !important;
}
body.light-mode .ticket-item-row {
  border-bottom: 1px solid #F1F5F9 !important;
}
body.light-mode .ticket-item-name {
  color: #0F172A !important;
}
body.light-mode .ticket-summary {
  background: #F8FAFC !important;
  border-top: 1px solid #E2E8F0 !important;
}

body.light-mode .form-input,
body.light-mode .form-select,
body.light-mode .menu-search-bar input {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}
body.light-mode .form-input:focus,
body.light-mode .form-select:focus,
body.light-mode .menu-search-bar input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15) !important;
}
body.light-mode .menu-search-bar {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}
body.light-mode .category-pill-btn {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  color: #475569 !important;
}
body.light-mode .category-pill-btn.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}
body.light-mode .filter-tab-btn {
  background: #F1F5F9 !important;
  border-color: #E2E8F0 !important;
  color: #475569 !important;
}
body.light-mode .filter-tab-btn.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

body.light-mode .custom-table th {
  background: #F8FAFC !important;
  color: #334155 !important;
  border-bottom: 1px solid #E2E8F0 !important;
}
body.light-mode .custom-table td {
  border-bottom: 1px solid #F1F5F9 !important;
  color: #1E293B !important;
}
body.light-mode .custom-table tr:hover td {
  background: #F8FAFC !important;
}

body.light-mode .modal-card {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  color: #0F172A !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}
body.light-mode .modal-header {
  border-bottom: 1px solid #E2E8F0 !important;
}
body.light-mode .modal-header h3 {
  color: #0F172A !important;
}
body.light-mode .modal-footer {
  border-top: 1px solid #E2E8F0 !important;
}
body.light-mode .btn-secondary {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #334155 !important;
}
body.light-mode .btn-secondary:hover {
  background: #E2E8F0 !important;
  color: #0F172A !important;
}
body.light-mode .user-status-pill {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
}
body.light-mode #current-user-name {
  color: #0F172A !important;
}
body.light-mode .stat-card {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}
body.light-mode .stat-lbl {
  color: #64748B !important;
}
body.light-mode .section-label {
  color: #334155 !important;
}
body.light-mode .account-card-box {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}
body.light-mode .login-card {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}
body.light-mode .login-card h2 {
  color: #0F172A !important;
}
body.light-mode .login-overlay {
  background: rgba(241, 245, 249, 0.88) !important;
}
body.light-mode .preset-image-grid {
  background: #F8FAFC !important;
  border-color: #E2E8F0 !important;
}