/**
 * RestoBill — style.css
 * Emerald Green (#10B981) Luxury Dark F&B Theme & Responsive POS Layout
 */

:root {
  --primary: #10B981;
  --primary-hover: #059669;
  --primary-light: #34D399;
  --primary-dark: #047857;
  --primary-glow: rgba(16, 185, 129, 0.28);

  /* Gold / Amber Accents (Inspired by RestoBill VIP Card & Golden Glowing Frame) */
  --accent-gold: #F59E0B;
  --accent-gold-light: #FBBF24;
  --accent-gold-hover: #D97706;
  --accent-gold-dark: #B45309;
  --accent-gold-glow: rgba(245, 158, 11, 0.35);

  /* Dual Emerald-Gold Gradients */
  --gradient-emerald-gold: linear-gradient(135deg, #10B981 0%, #F59E0B 100%);
  --gradient-gold: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  --gradient-gold-badge: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(245, 158, 11, 0.18) 100%);
  --border-gold-glow: rgba(245, 158, 11, 0.4);

  --status-available: #10B981;
  --status-occupied: #F59E0B;
  --status-bill: #EF4444;

  --bg-dark: #061A14;
  --bg-darker: #04120E;
  --surface: #0B251D;
  --surface-card: #0F3227;
  --surface-hover: #144033;
  --border: #1B4D3C;
  --border-light: rgba(255, 255, 255, 0.1);

  --text: #ECFDF5;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;
  --text-dark: #061A14;
  --text-on-primary: #061A14;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.3);

  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
}

/* ============================================================
   LIGHT THEME OVERRIDES (CRISP EMERALD & GOLDEN AMBER DINING)
   ============================================================ */
[data-theme="light"] {
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #10B981;
  --primary-dark: #064E3B;
  --primary-glow: rgba(5, 150, 105, 0.18);

  --accent-gold: #D97706;
  --accent-gold-light: #B45309;
  --accent-gold-hover: #92400E;
  --accent-gold-dark: #78350F;
  --accent-gold-glow: rgba(217, 119, 6, 0.25);

  --gradient-emerald-gold: linear-gradient(135deg, #059669 0%, #D97706 100%);
  --gradient-gold: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  --gradient-gold-badge: linear-gradient(135deg, rgba(5, 150, 105, 0.12) 0%, rgba(217, 119, 6, 0.15) 100%);
  --border-gold-glow: rgba(217, 119, 6, 0.35);

  --status-available: #059669;
  --status-occupied: #D97706;
  --status-bill: #DC2626;

  --bg-dark: #F3F6F4;
  --bg-darker: #E5ECE8;
  --surface: #FFFFFF;
  --surface-card: #F8FAF9;
  --surface-hover: #EDF3F0;
  --border: #CBD5CE;
  --border-light: rgba(0, 0, 0, 0.08);

  --text: #0F241D;
  --text-muted: #52665D;
  --text-dim: #7C8F87;
  --text-dark: #0F241D;
  --text-on-primary: #FFFFFF;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.16);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --primary: #059669;
    --primary-hover: #047857;
    --primary-light: #10B981;
    --primary-dark: #064E3B;
    --primary-glow: rgba(5, 150, 105, 0.18);

    --accent-gold: #D97706;
    --accent-gold-light: #B45309;
    --accent-gold-hover: #92400E;
    --accent-gold-dark: #78350F;
    --accent-gold-glow: rgba(217, 119, 6, 0.25);

    --gradient-emerald-gold: linear-gradient(135deg, #059669 0%, #D97706 100%);
    --gradient-gold: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    --gradient-gold-badge: linear-gradient(135deg, rgba(5, 150, 105, 0.12) 0%, rgba(217, 119, 6, 0.15) 100%);
    --border-gold-glow: rgba(217, 119, 6, 0.35);

    --status-available: #059669;
    --status-occupied: #D97706;
    --status-bill: #DC2626;

    --bg-dark: #F3F6F4;
    --bg-darker: #E5ECE8;
    --surface: #FFFFFF;
    --surface-card: #F8FAF9;
    --surface-hover: #EDF3F0;
    --border: #CBD5CE;
    --border-light: rgba(0, 0, 0, 0.08);

    --text: #0F241D;
    --text-muted: #52665D;
    --text-dim: #7C8F87;
    --text-dark: #0F241D;
    --text-on-primary: #FFFFFF;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.16);
  }
}

/* Light Mode Component Fine-Tuning */
[data-theme="light"] .modal-overlay {
  background: rgba(15, 36, 29, 0.65);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .modal-overlay {
    background: rgba(15, 36, 29, 0.65);
  }
}

[data-theme="light"] .brand-text h1 .brand-highlight {
  background: linear-gradient(135deg, #059669 20%, #D97706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .brand-text h1 .brand-highlight {
    background: linear-gradient(135deg, #059669 20%, #D97706 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

[data-theme="light"] .vietqr-preview-box {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .vietqr-preview-box {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
  }
}

[data-theme="light"] .form-control option {
  background: #FFFFFF;
  color: #0F241D;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .form-control option {
    background: #FFFFFF;
    color: #0F241D;
  }
}

.theme-switch-btn {
  background: var(--surface-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.theme-switch-btn:hover {
  border-color: var(--accent-gold);
  background: var(--surface-hover);
  color: var(--accent-gold);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Explicitly inherit typography & rendering across all buttons and inputs */
button,
input,
select,
textarea,
optgroup {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ============================================================
   TOP NAVBAR & STATUS BAR
   ============================================================ */
.top-navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #10B981 0%, #064E3B 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4), 0 0 8px rgba(245, 158, 11, 0.35);
  color: #FBBF24;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo-icon .material-symbols-outlined {
  font-size: 22px;
  color: #FDE047;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0;
}

.brand-text h1 .brand-highlight {
  background: linear-gradient(135deg, #34D399 20%, #FBBF24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.65rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(245, 158, 11, 0.2));
  color: var(--accent-gold-light);
  border: 1px solid rgba(245, 158, 11, 0.45);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
  margin-left: 4px;
  vertical-align: middle;
}

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

.shift-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shift-status-pill:hover {
  border-color: var(--accent-gold);
  background: var(--surface-hover);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-light);
  box-shadow: 0 0 8px var(--primary-light);
}

.pulse-dot.closed {
  background: var(--text-dim);
  box-shadow: none;
}

.lang-switch-btn {
  background: var(--surface-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   DESKTOP TOP NAVIGATION TABS (Header)
   ============================================================ */
.nav-tabs--desktop {
  display: none;
  align-items: center;
  gap: 6px;
}

.nav-tab-desktop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.nav-tab-desktop-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border);
}

.nav-tab-desktop-btn.active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary-light);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.15);
}

.nav-tab-desktop-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px var(--accent-gold);
}

.nav-tab-desktop-btn .material-symbols-outlined {
  font-size: 19px;
}

.nav-tab-desktop-btn .tab-badge {
  position: static;
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  color: #061A14;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  margin-left: 2px;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

/* ============================================================
   BOTTOM NAVIGATION BAR (Mobile Tabs)
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 90;
}

.nav-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  position: relative;
}

.nav-tab-btn .material-symbols-outlined {
  font-size: 22px;
}

.nav-tab-btn.active {
  color: var(--accent-gold-light);
}

.nav-tab-btn.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 28px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent-gold-light));
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}

.tab-badge {
  position: absolute;
  top: 2px;
  right: 10px;
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  color: #061A14;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* ============================================================
   MAIN CONTENT CONTAINER
   ============================================================ */
.main-container {
  flex: 1;
  padding: 16px;
  padding-bottom: 76px; /* for bottom nav */
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

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

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

/* Subheaders */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Filter pills */
.pills-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 16px;
  scrollbar-width: none;
}

.pills-bar::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pill-btn:hover {
  background: var(--surface-card);
  color: var(--text);
}

.pill-btn.active {
  background: var(--primary);
  border-color: var(--primary-light);
  color: var(--text-on-primary);
  font-weight: 500;
  box-shadow: 0 0 12px var(--primary-glow);
}

/* ============================================================
   TABLE MATRIX (FLOOR MAP)
   ============================================================ */
.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}

.table-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.table-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.table-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.table-area-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.table-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.table-card.status-available .table-status-indicator {
  background: var(--status-available);
  box-shadow: 0 0 8px var(--status-available);
}
.table-card.status-available {
  border-top: 3px solid var(--status-available);
}

.table-card.status-occupied .table-status-indicator {
  background: var(--status-occupied);
  box-shadow: 0 0 8px var(--status-occupied);
}
.table-card.status-occupied {
  border-top: 3px solid var(--status-occupied);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.05) 0%, var(--surface) 100%);
}

.table-card.status-bill_printed .table-status-indicator {
  background: var(--status-bill);
  box-shadow: 0 0 8px var(--status-bill);
}
.table-card.status-bill_printed {
  border-top: 3px solid var(--status-bill);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.07) 0%, var(--surface) 100%);
}

.table-card-body {
  margin: 6px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.table-order-preview {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-light);
  margin-top: 4px;
}

.table-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ============================================================
   SPLIT POS VIEW (ORDER PAD & MENU)
   ============================================================ */
.pos-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 960px) {
  .pos-container {
    grid-template-columns: 1.4fr 1fr;
  }
}

.menu-section {
  display: flex;
  flex-direction: column;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.search-input-wrapper .material-symbols-outlined {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px 10px 40px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

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

.menu-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.menu-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.menu-item-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.item-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: var(--primary-light);
  font-size: 24px;
}

.item-title {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--text);
}

.item-price {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--primary-light);
}

.item-modifiers-badge {
  font-size: 0.65rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(245, 158, 11, 0.16));
  color: var(--accent-gold-light);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
  padding: 2px 7px;
  display: inline-block;
  margin-top: 4px;
  width: fit-content;
  font-weight: 700;
}

.quick-add-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: var(--text-dark);
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
  transition: all 0.15s ease;
}

.quick-add-btn:hover {
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
  border-color: var(--accent-gold-light);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
  transform: scale(1.1);
}

/* ============================================================
   ORDER PAD / CART (Right Panel)
   ============================================================ */
.order-cart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  position: sticky;
  top: 70px;
}

.cart-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-card);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.cart-target-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-target-badge {
  background: var(--primary-glow);
  color: var(--primary-light);
  border: 1px solid var(--primary);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

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

.cart-item-row {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-item-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.cart-item-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.cart-item-details {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cart-item-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
}

.qty-btn:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

.qty-number {
  min-width: 24px;
  text-align: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.cart-item-price {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--primary-light);
}

.cart-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}

.cart-empty-state .material-symbols-outlined {
  font-size: 48px;
  margin-bottom: 8px;
}

/* Cart Calculation Summary */
.cart-summary {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

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

.summary-row.total-row {
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.summary-row.total-row .total-amount {
  background: linear-gradient(135deg, #34D399 10%, #FBBF24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.35rem;
  font-weight: 900;
}

.cart-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.btn,
button.btn {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-main) !important;
  font-weight: 500 !important;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  transition: all 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.btn span:not(.material-symbols-outlined) {
  font-family: var(--font-main) !important;
  font-weight: 500 !important;
}

.btn .material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal !important;
}

.btn-primary {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #061A14;
  border: 1px solid rgba(251, 191, 36, 0.3);
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4), 0 0 8px rgba(245, 158, 11, 0.25);
}

.btn-accent {
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  color: #061A14;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #FDE047 0%, #FBBF24 100%);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--primary-light);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #EF4444;
  font-weight: 500;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-full {
  grid-column: span 2;
  font-size: 1rem;
  padding: 12px;
  font-weight: 500;
}

/* ============================================================
   TAKE-AWAY QUEUE CARDS
   ============================================================ */
.takeaway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.takeaway-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 4px solid var(--accent-gold);
}

.takeaway-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.takeaway-order-id {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
}

.takeaway-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.takeaway-status-badge.preparing {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.takeaway-status-badge.ready {
  background: rgba(16, 185, 129, 0.2);
  color: var(--primary-light);
  border: 1px solid var(--primary-light);
}

/* ============================================================
   MODALS & OVERLAYS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 18, 14, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

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

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--surface-card);
}

/* ============================================================
   CHECKOUT & PAYMENT MODAL
   ============================================================ */
.payment-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.payment-tab-btn {
  padding: 10px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.payment-tab-btn.active {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary-light);
}

.cash-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.cash-suggestion-btn {
  background: var(--surface-card);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-gold-light);
  padding: 9px 4px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cash-suggestion-btn:hover {
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  color: #061A14;
  border-color: #FBBF24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.vietqr-preview-box {
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #1F2937;
}

.vietqr-image {
  max-width: 240px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.qr-info-row {
  font-size: 0.85rem;
  margin-top: 8px;
  color: #374151;
  font-weight: 600;
}

/* ============================================================
   THERMAL PRINT SIMULATOR (58mm / 80mm)
   ============================================================ */
.thermal-receipt {
  background: #ffffff;
  color: #000000;
  font-family: var(--font-mono);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.thermal-receipt.size-58 {
  width: 280px;
}

.thermal-receipt.size-80 {
  width: 380px;
}

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

.receipt-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.receipt-divider {
  border-top: 1px dashed #444;
  margin: 8px 0;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
}

.receipt-table th, .receipt-table td {
  padding: 4px 0;
}

.receipt-table th {
  text-align: left;
  border-bottom: 1px solid #444;
}

.receipt-footer {
  text-align: center;
  margin-top: 12px;
  font-size: 11px;
}

/* Print Media */
@media print {
  body * {
    visibility: hidden;
  }
  .thermal-receipt, .thermal-receipt * {
    visibility: visible;
  }
  .thermal-receipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    box-shadow: none;
    padding: 0;
  }
}

/* Form controls */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-control {
  width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 70px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--surface-card);
  border-left: 4px solid var(--primary);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.25s ease-out;
}

@keyframes toastIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Report KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.kpi-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-light);
  margin-top: 4px;
}

/* UAT banner */
.uat-banner {
  background: linear-gradient(90deg, #065F46, #047857);
  color: #ECFDF5;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS (Desktop vs Mobile Navigation)
   ============================================================ */
@media (min-width: 860px) {
  .bottom-nav {
    display: none !important;
  }
  .nav-tabs--desktop {
    display: flex !important;
  }
  .main-container {
    padding-bottom: 32px !important;
  }
}

@media (max-width: 859px) {
  .nav-tabs--desktop {
    display: none !important;
  }
  .bottom-nav {
    display: flex !important;
  }
}

/* ============================================================
   POS QUICK STATS BAR (Floor Matrix Header)
   ============================================================ */
.pos-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 859px) {
  .pos-stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.pos-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.pos-stat-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.pos-stat-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pos-stat-icon-wrapper.available {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary-light);
}

.pos-stat-icon-wrapper.occupied {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
}

.pos-stat-icon-wrapper.bill {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.pos-stat-icon-wrapper.revenue {
  background: rgba(16, 185, 129, 0.2);
  color: var(--primary-light);
}

.pos-stat-info {
  display: flex;
  flex-direction: column;
}

.pos-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.pos-stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ============================================================
   REVAMPED SETTINGS CARDS (6 Modular Groups)
   ============================================================ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 960px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

.settings-card-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.settings-card-group:hover {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: var(--shadow-md);
}

.settings-card-group.full-width {
  grid-column: 1 / -1;
}

.settings-card-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.settings-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-card-title .material-symbols-outlined {
  font-size: 22px;
}

.settings-card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .form-grid-2col {
    grid-template-columns: 1fr;
  }
}

.studio-brand-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.studio-logo-circle {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 2px solid var(--primary-light);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
  overflow: hidden;
  flex-shrink: 0;
}

.studio-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

