:root {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-surface: #f1f3f5;
  --bg-hover: #e9ecef;
  --border-color: #e5e7eb;
  --border-focus: #e4002b;
  --text-main: #111827;
  --text-muted: #4b5563;
  --text-dim: #9ca3af;
  --accent-primary: #e4002b;
  /* Iconic KFC Red */
  --accent-primary-hover: #b80016;
  /* Deep Crimson */
  --accent-success: #16a34a;
  /* Clean Green ONLY for success */
  --accent-success-hover: #15803d;
  --accent-warning: #ea580c;
  --accent-danger: #e4002b;
  --accent-danger-hover: #b80016;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(228, 0, 43, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", sans-serif;
  user-select: none;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header & Navigation */
header {
  background-color: var(--bg-secondary);
  border-bottom: 2px solid #e5e7eb;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #e4002b, #b80016);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: #fff;
  box-shadow: 0 3px 10px rgba(228, 0, 43, 0.35);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #111827;
}

.brand-title span {
  color: var(--accent-primary);
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.nav-tabs {
  display: flex;
  gap: 0.5rem;
}

.nav-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-tab:hover {
  background-color: var(--bg-surface);
  color: var(--accent-primary);
}

.nav-tab.active {
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(228, 0, 43, 0.3);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-success);
  /* Green strictly for online/success */
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.6);
}

.status-dot.warning {
  background: var(--accent-warning);
  box-shadow: 0 0 6px var(--accent-warning);
}

.status-dot.error {
  background: var(--accent-danger);
  box-shadow: 0 0 6px var(--accent-danger);
}

.status-pill.status-offline {
  border-color: rgba(220, 38, 38, 0.4);
  background: #fef2f2;
  color: #991b1b;
}

.status-pill.status-pending-sync {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
  cursor: pointer;
}

.status-pill.status-syncing {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1d4ed8;
  animation: pulse 1.5s infinite;
}

.status-dot.dot-online {
  background: #16a34a;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.6);
}

.status-dot.dot-offline {
  background: #dc2626;
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.6);
}

.status-dot.dot-pending {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.status-dot.dot-syncing {
  background: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
}

.badge-counter {
  background: var(--accent-danger);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(228, 0, 43, 0.35);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

/* App Main Container */
main {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

.screen-view {
  width: 100%;
  height: 100%;
  display: none;
}

.screen-view.active {
  display: flex;
}

/* ====================================================
   BILLING SCREEN (2 Panels: Catalog + Cart)
   ==================================================== */
.billing-layout {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Catalog Left Panel */
.catalog-panel {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  background: var(--bg-primary);
  overflow: hidden;
}

.catalog-header {
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
}

.search-box-wrapper {
  position: relative;
  flex: 1;
}

.search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  font-size: 1rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
  user-select: text;
}

.search-input:focus {
  background: #ffffff;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(228, 0, 43, 0.12);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1.1rem;
}

.shortcut-hint {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.items-grid {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  align-content: start;
}

/* Item Card */
.item-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.item-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.item-card-image {
  width: 100%;
  height: 180px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  padding: 6px;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.item-card-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease;
}

.item-card:hover .item-card-image img {
  transform: scale(1.02);
}

.item-card-body {
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #ffffff;
}

.item-card-title {
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
  color: var(--text-main);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-card-price {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--accent-primary);
  /* Bold KFC Red */
  margin-bottom: 0.4rem;
}

.item-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  border: 1px solid var(--border-color);
}

.qty-btn {
  width: 46px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.65rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.1s;
  line-height: 1;
}

.qty-btn:hover {
  background: var(--bg-hover);
}

.qty-btn.btn-card-plus {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.qty-btn.btn-card-plus:hover {
  background: var(--accent-primary-hover);
}

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

.qty-display {
  font-weight: 800;
  font-size: 1rem;
  min-width: 28px;
  text-align: center;
  color: var(--text-main);
}

/* Cart Right Panel */
.cart-panel {
  flex: 1;
  min-width: 440px;
  max-width: 560px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.04);
}

.cart-top-bar {
  background: #ffffff;
  border-bottom: 1.5px solid var(--border-color);
  padding: 0.4rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex-shrink: 0;
}

.cart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.cart-title {
  font-size: 0.92rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-main);
  white-space: nowrap;
}

.cart-count-badge {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.5px 6px;
  border-radius: 10px;
}

.clear-cart-btn {
  background: transparent;
  border: 1px solid #fee2e2;
  color: var(--accent-danger);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.18rem 0.45rem;
  border-radius: var(--radius-sm);
  transition: all 0.1s;
  line-height: 1.2;
}

.clear-cart-btn:hover {
  background: #fee2e2;
}

.cart-channel-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.channel-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.3rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: #f8fafc;
}

.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-dim);
  text-align: center;
  gap: 0.4rem;
  padding: 1.5rem 0;
}

.cart-item-row {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: background 0.1s, border-color 0.1s;
  min-height: 38px;
}

.cart-item-row:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.cart-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cart-item-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.25;
}

.cart-item-details {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.cart-item-calc {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.1;
}

.btn-edit-cart-flavour {
  background: #f0f9ff;
  color: #0369a1;
  border: 1.5px solid #0284c7;
  font-size: 0.73rem;
  padding: 1.5px 7px;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.12);
  line-height: 1.2;
}

.btn-edit-cart-flavour:hover {
  background: #e0f2fe;
  border-color: #0369a1;
  transform: translateY(-1px);
}

.btn-edit-cart-flavour.missing {
  background: #fff1f2;
  color: #dc2626;
  border: 1.5px dashed #dc2626;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.12);
}

.btn-edit-cart-flavour.missing:hover {
  background: #fee2e2;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.cart-qty-btn {
  width: 34px;
  height: 30px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: var(--text-main);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.45rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
  line-height: 1;
}

.cart-qty-btn:hover {
  background: #e2e8f0;
  color: var(--accent-primary);
  border-color: #94a3b8;
}

.cart-qty-btn:active {
  transform: scale(0.94);
}

.qty-display {
  font-weight: 800;
  font-size: 0.95rem;
  min-width: 26px;
  text-align: center;
  color: var(--text-main);
}

.cart-item-total {
  font-weight: 800;
  font-size: 0.88rem;
  min-width: 58px;
  text-align: right;
  color: var(--text-main);
}

.remove-item-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
  margin-left: 0.15rem;
  font-size: 0.85rem;
  border-radius: 3px;
}

.remove-item-btn:hover {
  color: var(--accent-danger);
  background: #fee2e2;
}

/* Cart Controls & Billing Footer */
.cart-footer {
  border-top: 1.5px solid var(--border-color);
  background: #ffffff;
  padding: 0.4rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}

.cart-inline-options {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.inline-control-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.inline-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.select-input-sm {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  padding: 0.2rem 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  width: 100%;
  min-width: 0;
}

.select-input-sm:focus {
  border-color: var(--border-focus);
}

.select-input {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.select-input:focus {
  border-color: var(--border-focus);
}

.bill-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.summary-line.discount {
  color: var(--accent-primary);
}

.summary-line.total {
  border-top: 1px dashed #cbd5e1;
  padding-top: 0.2rem;
  margin-top: 0.1rem;
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--text-main);
}

.summary-line.total span:last-child {
  color: var(--accent-primary);
  /* Bold KFC Red Total */
}

.btn-checkout {
  background: linear-gradient(135deg, #e4002b, #b80016);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.8rem;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 2px 6px rgba(228, 0, 43, 0.25);
  transition: all 0.15s;
  letter-spacing: 0.02em;
}

.btn-checkout:hover:not(:disabled) {
  background: linear-gradient(135deg, #c80024, #9f0012);
  box-shadow: 0 4px 12px rgba(228, 0, 43, 0.4);
}

transform: translateY(-1px);
}

.btn-checkout:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

/* ====================================================
   BILL HISTORY SCREEN
   ==================================================== */
.history-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
}

.history-toolbar {
  padding: 0.85rem 1.25rem;
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.history-table-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.pos-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: #ffffff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pos-table th {
  background: #f1f3f5;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  padding: 0.85rem 0.9rem;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.pos-table td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-main);
  background: #ffffff;
  white-space: nowrap;
}

.pos-table tr:hover td {
  background: #fdf2f2;
  /* Soft red tint on row hover */
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* GREEN strictly for success */
.badge-success {
  background: rgba(22, 163, 74, 0.15);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.badge-danger {
  background: rgba(228, 0, 43, 0.12);
  color: #b80016;
  border: 1px solid rgba(228, 0, 43, 0.25);
}

.badge-warning {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
  border: 1px solid rgba(234, 88, 12, 0.25);
}

.badge-secondary {
  background: #f1f3f5;
  color: #4b5563;
  border: 1px solid #d1d5db;
}

.table-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  white-space: nowrap;
}

.btn-action {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-action:hover {
  background: var(--bg-surface);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-action.btn-danger {
  color: var(--accent-danger);
  border-color: #fecaca;
}

.btn-action.btn-danger:hover {
  background: #fee2e2;
  border-color: var(--accent-danger);
}

/* ====================================================
   ADMIN SCREEN & MODALS
   ==================================================== */
.admin-layout {
  display: flex;
  width: 100%;
  height: 100%;
}

.admin-sidebar {
  width: 250px;
  background: var(--bg-secondary);
  border-right: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.admin-nav {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  overflow-y: auto;
}

.admin-nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-nav-item:hover {
  background: var(--bg-surface);
  color: var(--accent-primary);
}

.admin-nav-item.active {
  background: rgba(228, 0, 43, 0.08);
  color: var(--accent-primary);
  border-left: 4px solid var(--accent-primary);
}

.admin-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  background: var(--bg-primary);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.admin-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.admin-title-row h2 {
  font-weight: 900;
  color: #111827;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-input {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  user-select: text;
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(228, 0, 43, 0.12);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  accent-color: var(--accent-primary);
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: 0 2px 6px rgba(228, 0, 43, 0.25);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
}

/* Modal Window */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

@keyframes modalIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1.5px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  flex-shrink: 0;
}

.modal-header h3 {
  font-weight: 800;
  color: #111827;
}

.modal-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #ffffff;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
}

.modal-footer {
  padding: 0.85rem 1.5rem;
  background: #f8f9fa;
  border-top: 1.5px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
}

.btn-close-modal:hover {
  color: var(--accent-primary);
}

/* ====================================================
   BURGER KING STYLE MEAL BUILDER MODAL
   ==================================================== */
.meal-builder-card {
  max-width: 480px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border: none;
}

.meal-modal-header {
  background: linear-gradient(135deg, #e4002b 0%, #f59e0b 100%);
  padding: 1rem 1.25rem;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.meal-modal-header::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.meal-modal-header-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.meal-modal-header-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.meal-modal-header-text h3 {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.meal-modal-header-text p {
  font-size: 0.78rem;
  color: #ffffff;
  margin: 0.15rem 0 0 0;
  font-weight: 600;
  opacity: 0.95;
}

.meal-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  z-index: 1;
}

.meal-modal-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.meal-modal-body {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: #f8fafc;
  overflow-y: auto;
}

.meal-trigger-preview {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #ffffff;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.meal-trigger-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.meal-trigger-info {
  flex: 1;
}

.meal-trigger-name {
  font-weight: 800;
  font-size: 1rem;
  color: #0f172a;
}

.meal-trigger-price {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.meal-trigger-price strong {
  color: #0f172a;
  font-weight: 700;
}

/* Choice 1: The Hero Combo Card */
.meal-card-combo {
  cursor: pointer;
  background: linear-gradient(145deg, #ffffff 0%, #fffbeb 100%);
  border: 2px solid #e4002b;
  border-radius: 14px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  position: relative;
  box-shadow: 0 6px 16px -2px rgba(228, 0, 43, 0.18), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.meal-card-combo:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -3px rgba(228, 0, 43, 0.28), 0 3px 8px rgba(0, 0, 0, 0.06);
  border-color: #e4002b;
}

.meal-card-combo-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.meal-card-combo-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 900;
  font-size: 1.05rem;
  color: #e4002b;
}

.meal-badge-best-value {
  background: linear-gradient(135deg, #e4002b 0%, #f59e0b 100%);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(228, 0, 43, 0.35);
  white-space: nowrap;
}

.meal-card-combo-desc {
  font-size: 0.82rem;
  color: #b91c1c;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.meal-combo-pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.2rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #fecaca;
}

.meal-combo-price-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #991b1b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.meal-combo-price-value {
  font-size: 1.45rem;
  font-weight: 900;
  color: #e4002b;
  letter-spacing: -0.02em;
}

.meal-btn-add-combo {
  background: linear-gradient(135deg, #e4002b 0%, #f59e0b 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.98rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(228, 0, 43, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s;
  width: 100%;
}

.meal-btn-add-combo:hover {
  background: linear-gradient(135deg, #c40024 0%, #d97706 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(228, 0, 43, 0.45);
}

/* Choice 2: Regular Item Only */
.meal-card-regular {
  cursor: pointer;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s;
}

.meal-card-regular:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.meal-regular-left {
  display: flex;
  flex-direction: column;
}

.meal-regular-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #334155;
}

.meal-regular-sub {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.meal-regular-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.meal-regular-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: #334155;
}

.meal-btn-regular {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.meal-card-regular:hover .meal-btn-regular {
  background: #e2e8f0;
  color: #1e293b;
  border-color: #94a3b8;
}

.meal-modal-footer {
  padding: 0.65rem 1.25rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ==========================================================================
   Order Context Controls (Dine-In / Takeaway & Channels)
   ========================================================================== */
.order-type-toggle {
  display: flex;
  background: #e2e8f0;
  padding: 1.5px;
  border-radius: 6px;
  gap: 2px;
}

.btn-order-type {
  background: transparent;
  border: none;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s;
  line-height: 1.2;
}

.btn-order-type.active {
  background: #ffffff;
  color: var(--accent-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.order-channel-group {
  display: flex;
  gap: 0.25rem;
}

.btn-channel {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.2;
}

.btn-channel.active[data-channel="STORE"] {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}

.btn-channel.active[data-channel="SWIGGY"] {
  background: #fc8019;
  color: #ffffff;
  border-color: #e57207;
}

.btn-channel.active[data-channel="ZOMATO"] {
  background: #cb202d;
  color: #ffffff;
  border-color: #b01824;
}

/* ==========================================================================
   Order Notes & Quick Chips (Ultra-Compact)
   ========================================================================== */
.cart-notes-compact {
  padding: 0.25rem 0.55rem;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
}

.cart-notes-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.notes-icon {
  font-size: 0.85rem;
  opacity: 0.7;
}

.order-notes-input-compact {
  flex: 1;
  min-width: 100px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  font-size: 0.76rem;
  background: #f8fafc;
  color: #1e293b;
}

.order-notes-input-compact:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: #ffffff;
}

.cart-notes-chips-compact {
  display: flex;
  gap: 0.2rem;
  flex-shrink: 0;
}

.cart-notes-chips-compact .note-chip {
  font-size: 0.68rem;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.1s;
  line-height: 1.2;
}

.cart-notes-chips-compact .note-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.cart-notes-chips-compact .note-chip.active {
  background: #e4002b;
  color: #ffffff;
  border-color: #b80016;
}

/* Extra Fee Controls */
.cart-extra-charge-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  padding: 0.25rem 0.4rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
}

.btn-extra-fee-toggle {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.2;
  white-space: nowrap;
}

.btn-extra-fee-toggle:hover {
  background: #e2e8f0;
  color: #0f172a;
}


/* ==========================================================================
   Drink Flavour Tiles Modal
   ========================================================================== */
.drink-flavour-tile {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.drink-flavour-tile:hover {
  transform: translateY(-2px);
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.drink-flavour-tile.active {
  border-color: #0284c7;
  background: #f0f9ff;
}

.drink-flavour-icon {
  font-size: 1.8rem;
}

.drink-flavour-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

/* ==========================================================================
   Payment Modal Styles
   ========================================================================== */
.payment-mode-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.payment-method-chip {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  text-align: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}

.payment-method-chip:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.payment-method-chip.active {
  border-color: var(--accent-primary);
  background: #fef2f2;
  color: var(--accent-primary);
}

.rupee-chip {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s;
}

.rupee-chip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* Settle Payment & Checkout Modal Expanded */
#payment-modal .modal-card {
  max-width: 900px !important;
  width: 95vw !important;
  max-height: 94vh !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 800px) {
  #payment-modal .modal-body {
    grid-template-columns: 1fr !important;
  }
}

/* Logo Drop Zone */
.logo-dropzone.drag-over {
  border-color: var(--accent-primary) !important;
  background: #fef2f2 !important;
  transform: scale(1.01);
}

/* ========================================================
   Admin Analytics & Operations Dashboard Styles
   ======================================================== */
.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-filter-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.dash-filter-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.dash-preset-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dash-preset-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.dash-preset-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(228, 0, 43, 0.25);
}

.dash-custom-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dash-period-indicator {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
}

/* Dashboard Metric Cards */
.dashboard-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
}

.dash-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s, box-shadow 0.15s;
}

.dash-metric-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.dash-metric-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-metric-value {
  font-size: 1.85rem;
  font-weight: 900;
  margin: 0.5rem 0 0.25rem 0;
  color: var(--text-main);
  line-height: 1.2;
}

.dash-metric-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Two-column Analytics Layout */
.dashboard-analytics-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .dashboard-analytics-grid {
    grid-template-columns: 1fr;
  }
}

.dash-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dash-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.dash-panel-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.item-volume-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}

.item-volume-bar-track {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.item-volume-bar-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Order Split Progress Bar */
.order-split-progress {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.75rem 0;
  background: #e2e8f0;
}

.order-split-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.split-dine-in {
  background: #2563eb;
}

.split-takeaway {
  background: #ea580c;
}

.split-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
}

.channel-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
}

.channel-store {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.channel-swiggy {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.channel-zomato {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

/* Customer Name Input (Mandatory in Billing) */
.cart-customer-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  margin-top: 0.4rem;
  transition: all 0.2s ease;
}

.cart-customer-row:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(228, 0, 43, 0.12);
}

.customer-icon {
  font-size: 1rem;
  opacity: 0.75;
}

.customer-name-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: capitalize;
}

.customer-name-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: none;
}

.input-error-pulse {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

/* History Split Side-by-Side Layout */
.history-split-layout {
  display: grid;
  grid-template-columns: 580px 1fr;
  gap: 1.25rem;
  height: calc(100vh - 120px);
  min-height: 560px;
}

@media (max-width: 1240px) {
  .history-split-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
}

/* Left Pane: Kitchen Queue */
.history-queue-pane {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.queue-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(to bottom, var(--bg-panel), var(--bg-card));
}

.queue-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.queue-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.queue-orders-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.queue-card {
  background: var(--bg-panel);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.queue-card:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.12);
}

.queue-card.queue-card-urgent {
  border-left: 4px solid #ef4444;
}

.queue-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.queue-seq-badge {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent-primary);
}

.queue-elapsed-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: #d97706;
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.queue-cust-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.2;
}

.queue-items-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  background: rgba(0, 0, 0, 0.02);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
}

.queue-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.btn-mark-given {
  background: #16a34a;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-mark-given:hover {
  background: #15803d;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

.btn-preview-kot-sm {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-preview-kot-sm:hover {
  background: var(--bg-card);
  border-color: var(--text-muted);
}

/* Right Pane: All Orders History */
.history-all-pane {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.history-all-pane .history-toolbar {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.history-all-pane .history-table-container {
  flex: 1;
  overflow-y: auto;
}

/* Edit Order Button & Modal Styling */
.btn-edit-bill {
  background: rgba(139, 92, 246, 0.08);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-weight: 700;
}

.btn-edit-bill:hover:not(:disabled) {
  background: #7c3aed;
  color: #ffffff;
  border-color: #6d28d9;
}

#edit-order-items-list::-webkit-scrollbar {
  width: 5px;
}
#edit-order-items-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

/* ==========================================================================
   Consolidated Order Actions Button & Popup Modal
   ========================================================================== */
.btn-order-actions {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-order-actions:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 6px rgba(228, 0, 43, 0.25);
}

.order-actions-card {
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.order-actions-header {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  padding: 0.9rem 1.25rem;
}

.order-actions-info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.info-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.info-cust {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.info-grid-details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-color);
}

.info-grid-details > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.info-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.order-action-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.order-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.7rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
}

.order-action-item:hover:not(:disabled) {
  background: var(--bg-surface);
  border-color: var(--accent-primary);
  transform: translateX(3px);
}

.order-action-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f1f5f9;
}

.action-icon {
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-surface);
  flex-shrink: 0;
}

.action-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.action-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

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

.action-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 800;
}

.order-action-item.fulfill-action:hover:not(:disabled) {
  border-color: #16a34a;
}

.order-action-item.danger-action:hover:not(:disabled) {
  border-color: #ef4444;
  background: #fef2f2;
}

.order-action-item.danger-action:hover:not(:disabled) .action-title {
  color: #dc2626;
}

/* ==========================================================================
   History Table: Compact Customer & Bill Column with Hover Details
   ========================================================================== */
.cust-bill-cell {
  max-width: 140px;
  min-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cust-bill-name {
  font-weight: 800;
  color: var(--text-main);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cust-bill-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cust-bill-num {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cust-bill-notes {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 4px;
  padding: 1px 6px;
  margin-top: 3px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
  transition: all 0.15s ease;
}

.cust-bill-notes:hover {
  background: #fde68a;
  border-color: #f59e0b;
}

/* Unified Checkout Popup Note Chips */
.note-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  transition: all 0.15s ease;
  user-select: none;
}

.note-chip:hover {
  border-color: var(--accent-primary);
  background: var(--bg-surface);
  transform: translateY(-1px);
}

.note-chip.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.note-chip-spicy.active {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
}

.note-chip-no-spicy.active {
  background: #16a34a !important;
  color: #ffffff !important;
  border-color: #15803d !important;
}

.note-chip-ice.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0369a1 !important;
}

.payment-type-prompt-box {
  background: #eff6ff;
  border: 2px dashed #93c5fd;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  color: #1d4ed8;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  animation: promptPulse 2s infinite ease-in-out;
}

@keyframes promptPulse {
  0%, 100% { transform: scale(1); border-color: #93c5fd; }
  50% { transform: scale(1.01); border-color: #3b82f6; }
}