/* Crispy Crust POS Industrial Touch Design System */
/* Dark Charcoal, Crimson Red, Cheddar Gold, Forest Green */
/* ZERO UNICODE EMOJIS - STRICT SVG STANDARD */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  font-size: 13.5px; /* Compact industrial base */
  --bg-primary: #0a0c10;
  --bg-surface: #12151c;
  --bg-card: #181c26;
  --bg-card-hover: #1f2432;
  --bg-overlay: rgba(10, 12, 16, 0.85);

  --border-color: #272d3d;
  --border-focus: #e53e3e;

  --text-main: #f7fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-red: #e53e3e;
  --accent-red-hover: #c53030;
  --accent-gold: #ecc94b;
  --accent-gold-dark: #b7791f;
  --accent-green: #38a169;
  --accent-green-hover: #2f855a;
  --accent-blue: #3182ce;

  --font-arabic: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cairo', system-ui, -apple-system, sans-serif;

  --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);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--font-arabic);
  direction: rtl;
  background-color: var(--bg-primary);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header & Navigation Bar */
.pos-navbar {
  height: 56px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 100;
  flex-shrink: 0;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}

/* Branch Selector & Role-Based Display */
.branch-selector-container {
  display: flex;
  align-items: center;
  position: relative;
}

.branch-badge-locked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(236, 201, 75, 0.08);
  border: 1px solid rgba(236, 201, 75, 0.25);
  border-radius: var(--radius-sm);
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 800;
  user-select: none;
}

.branch-dropdown-wrapper {
  position: relative;
}

.btn-branch-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(236, 201, 75, 0.12);
  border: 1px solid rgba(236, 201, 75, 0.35);
  border-radius: var(--radius-sm);
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 800;
  font-family: var(--font-arabic);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-branch-selector:hover {
  background: rgba(236, 201, 75, 0.2);
  border-color: var(--accent-gold);
}

.btn-branch-selector .chevron-icon {
  transition: transform 0.2s ease;
}

.branch-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 5px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.branch-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-arabic);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: right;
  width: 100%;
  transition: background 0.15s ease;
}

.branch-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.branch-menu-item.active {
  background: rgba(236, 201, 75, 0.12);
  color: var(--accent-gold);
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-primary);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-arabic);
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-tab-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab-btn.active {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 2px 8px rgba(229, 62, 62, 0.4);
}

.nav-tab-btn .badge-pill {
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.header-status-panel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(56, 161, 105, 0.15);
  color: #68d391;
  border: 1px solid rgba(56, 161, 105, 0.3);
}

.status-badge .indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

/* Compact Network Status Badge */
.network-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.2s ease;
  user-select: none;
}

.network-status-badge.online {
  background: rgba(56, 161, 105, 0.12);
  color: #68d391;
  border: 1px solid rgba(56, 161, 105, 0.35);
}

.network-status-badge.offline {
  background: rgba(245, 158, 11, 0.15);
  color: #f6e05e;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.network-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.network-status-badge.online .network-status-dot {
  background: #38a169;
  box-shadow: 0 0 6px #38a169;
}

.network-status-badge.offline .network-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
  animation: pulseOffline 1.4s infinite;
}

@keyframes pulseOffline {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.network-pending-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.25);
  padding: 1px 5px;
  border-radius: 4px;
}

.clock-display {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 700;
}

/* App View Container */
.main-view-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  margin-top: 52px;
  padding-top: 0;
  height: calc(100vh - 52px);
  max-height: calc(100vh - 52px);
}

.view-panel {
  position: absolute;
  inset: 0;
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.view-panel.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  width: 100%;
  height: 100%;
  min-height: 0;
  position: relative;
}

#tab-pos,
#tab-pos.view-panel.active,
.pos-layout,
.pos-layout-grid,
#tab-pos .pos-layout-grid {
  display: flex;
  width: 100%;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

/* POS Left: Sticky Order Cart (34%) */
#tab-pos .pos-cart-panel,
.pos-cart-panel {
  width: 34%;
  flex: 0 0 34%;
  max-width: 34%;
  min-width: 0;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-header {
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.order-type-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: var(--bg-primary);
  padding: 3px;
  border-radius: var(--radius-md);
  margin-top: 0.35rem;
}

.order-type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.38rem 0.2rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.order-type-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.order-type-btn.active {
  background: var(--bg-card);
  color: var(--accent-gold);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

/* Cart Delivery Badge */
.cart-delivery-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.85rem;
  background: rgba(236, 201, 75, 0.1);
  border: 1px solid rgba(236, 201, 75, 0.35);
  border-radius: var(--radius-md);
  margin: 0.45rem 1rem 0;
  gap: 0.5rem;
  animation: fadeInModal 0.2s ease-in-out;
}

.cart-delivery-badge-info {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.cart-delivery-badge-info svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent-gold);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.btn-delivery-badge-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid rgba(236, 201, 75, 0.4);
  color: var(--text-main);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-arabic);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-delivery-badge-edit:hover {
  background: var(--accent-gold);
  color: #000;
}

.btn-delivery-badge-edit svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.cart-items-scroll,
.cart-items-container {
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - 380px);
  padding: 0.6rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: var(--font-arabic);
}

.cart-item-row {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.15s;
}

.cart-item-row:hover {
  border-color: var(--accent-red);
}

.cart-item-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.cart-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.cart-item-pref {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  margin-top: 2px;
  display: inline-block;
}

.cart-item-pref.spicy {
  background: rgba(229, 62, 62, 0.2);
  color: #fc8181;
}

.cart-item-pref.regular {
  background: rgba(236, 201, 75, 0.2);
  color: #f6e05e;
}

.cart-item-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-gold);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.4rem;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 700;
}

.qty-btn:active {
  background: var(--accent-red);
}

.qty-number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 20px;
  text-align: center;
}

.cart-item-delete {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
}

.cart-item-delete:hover {
  color: var(--accent-red);
}

.cart-item-delete svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Quick Upsell Bar */
.cart-upsell-bar {
  padding: 0.5rem 1.25rem;
  background: rgba(236, 201, 75, 0.05);
  border-top: 1px solid rgba(236, 201, 75, 0.2);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
}

.upsell-chip {
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid rgba(236, 201, 75, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold);
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.upsell-chip:hover {
  background: var(--accent-gold);
  color: #000;
}

/* Cart Footer & Payment */
.cart-footer {
  margin-top: auto;
  flex-shrink: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cart-summary-line.total {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
  border-top: 1px solid var(--border-color);
  padding-top: 0.4rem;
}

.cart-summary-line .amount {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-gold);
}

/* Cash Denominations */
.cash-tender-row {
  display: flex;
  gap: 6px;
  margin-top: 0.1rem;
}

.cash-chip {
  flex: 1;
  padding: 5px 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.cash-chip:active {
  background: var(--accent-green);
  color: #fff;
}

.change-due-box {
  background: rgba(56, 161, 105, 0.15);
  border: 1px dashed var(--accent-green);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #68d391;
}

.change-due-box .val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

/* Payment Methods Grid */
.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.pay-method-btn {
  padding: 0.45rem 0.2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.pay-method-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.pay-method-btn.active {
  background: rgba(229, 62, 62, 0.2);
  color: #fff;
  border-color: var(--accent-red);
}

.btn-checkout-print {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: linear-gradient(135deg, var(--accent-red), #b91c1c);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-arabic);
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(229, 62, 62, 0.4);
  transition: transform 0.1s ease, filter 0.15s;
}

.btn-checkout-print:active {
  transform: scale(0.98);
}

.btn-checkout-print svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* POS Right: Menu Grid & Quick Bar (66%) */
#tab-pos .pos-menu-panel,
.pos-layout-grid .pos-menu-panel,
.pos-menu-panel {
  width: 66%;
  flex: 0 0 66%;
  max-width: 66%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow: hidden;
}

.menu-top-toolbar {
  padding: 0.45rem 1rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

.search-input-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-box svg {
  position: absolute;
  right: 12px;
  width: 18px;
  height: 18px;
  stroke: var(--text-dim);
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 0.45rem 2.4rem 0.45rem 0.8rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-arabic);
  font-size: 0.85rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-red);
}

.category-filter-pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-filter-pills::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  height: 34px;
  line-height: 34px;
  padding: 0 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-family: var(--font-arabic);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.cat-pill:hover {
  color: var(--text-main);
  border-color: var(--accent-gold);
}

.cat-pill.active {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

.menu-items-grid {
  flex: 1;
  padding: 0.6rem 0.85rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.55rem;
  align-content: flex-start;
}

.menu-card,
.pos-prod-card,
.prod-card {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  border: 1px solid var(--border-color, #1e293b);
  background: var(--card-bg, #161922);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  position: relative;
  padding: 0;
  min-height: 160px;
}

.menu-card:hover,
.pos-prod-card:hover,
.prod-card:hover {
  transform: translateY(-2px);
  border-color: #F59E0B;
  box-shadow: var(--shadow-md);
}

.menu-card:active,
.pos-prod-card:active,
.prod-card:active {
  transform: scale(0.98);
  border-color: #F59E0B;
}

.menu-card.out-of-stock,
.pos-prod-card.out-of-stock,
.prod-card.out-of-stock {
  opacity: 0.65;
  filter: grayscale(0.25);
}

/* Full-Width Image Banner (75px) */
.pos-prod-img-wrap,
.menu-card-thumb-wrap {
  width: 100%;
  height: 75px;
  min-height: 75px;
  max-height: 78px;
  position: relative;
  background: #0f1218;
  overflow: hidden;
  display: block;
  flex-shrink: 0;
}

.pos-prod-img-wrap img,
.menu-card-thumb-wrap img,
.menu-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px 8px 0 0;
}

.pos-prod-fallback-svg,
.menu-card-fallback-svg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F59E0B;
  background: #0f1218;
}

/* Bottom Body Zone */
.pos-prod-body,
.menu-card-details {
  padding: 0.45rem 0.55rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  gap: 0.25rem;
  min-height: 0;
}

.pos-prod-name,
.menu-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.25;
  margin: 0;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer Row - Guaranteed Bottom Anchor */
.pos-prod-footer,
.menu-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  margin-top: auto !important;
  flex-shrink: 0 !important;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pos-prod-price,
.menu-card-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: #F59E0B;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pos-prod-price .pos-prod-currency,
.pos-prod-currency {
  font-size: 0.7rem;
  font-weight: 700;
  color: #F59E0B;
}

/* Stock Badges */
.pos-stock-badge,
.menu-card-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pos-stock-badge.in-stock,
.menu-card-badge.in-stock {
  background: rgba(56, 161, 105, 0.2);
  color: #68d391;
  border: 1px solid rgba(56, 161, 105, 0.35);
}

.pos-stock-badge.out-of-stock,
.menu-card-badge.out-of-stock {
  background: rgba(229, 62, 62, 0.2);
  color: #fc8181;
  border: 1px solid rgba(229, 62, 62, 0.35);
}

/* Completely suppress redundant product description */
.pos-prod-desc,
.prod-desc,
.menu-card-desc {
  display: none !important;
}

.flavor-toggle-btn {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.flavor-toggle-btn.spicy {
  background: rgba(229, 62, 62, 0.2);
  color: #fc8181;
  border-color: var(--accent-red);
}

/* ==========================================================
   VIEW 2: KITCHEN DISPLAY SYSTEM (#tab-kds)
   ========================================================== */
.kds-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0d0f15;
  overflow: hidden;
}

.kds-toolbar {
  padding: 0.75rem 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kds-stats-row {
  display: flex;
  gap: 1.5rem;
}

.kds-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.kds-stat-item .count {
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.kds-stat-item.cooking .count {
  background: rgba(236, 201, 75, 0.2);
  color: var(--accent-gold);
}

.kds-stat-item.ready .count {
  background: rgba(56, 161, 105, 0.2);
  color: #68d391;
}

.kds-grid {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  align-content: flex-start;
}

.kds-ticket,
.kds-card {
  display: flex;
  flex-direction: column;
  height: 540px;
  max-height: calc(100vh - 160px);
  background: var(--card-bg, #161922);
  border: 1px solid var(--border-color, #1e293b);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s;
}

.kds-ticket.status-cooking,
.kds-card.status-cooking {
  border-color: var(--accent-gold);
}

.kds-ticket.status-ready,
.kds-card.status-ready {
  border-color: var(--accent-green);
}

.kds-card-header {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color, #1e293b);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.kds-order-info-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.kds-order-num {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text-main);
}

.kds-order-type-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kds-order-type-badge.dine-in {
  background: rgba(56, 161, 105, 0.2);
  color: #68d391;
  border: 1px solid rgba(56, 161, 105, 0.4);
}

.kds-order-type-badge.takeaway {
  background: rgba(236, 201, 75, 0.2);
  color: #f6e05e;
  border: 1px solid rgba(236, 201, 75, 0.4);
}

.kds-order-type-badge.delivery {
  background: rgba(49, 130, 206, 0.2);
  color: #63b3ed;
  border: 1px solid rgba(49, 130, 206, 0.4);
}

.kds-timer-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.kds-timer-badge.green {
  background: rgba(56, 161, 105, 0.2);
  color: #68d391;
}

.kds-timer-badge.amber {
  background: rgba(236, 201, 75, 0.2);
  color: var(--accent-gold);
}

.kds-timer-badge.red {
  background: rgba(229, 62, 62, 0.2);
  color: #fc8181;
  animation: pulse-red 1s infinite alternate;
}

@keyframes pulse-red {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Scrollable Content Area */
.kds-ticket-body,
.kds-card-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.85rem;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Prominent Kitchen Items List */
.kds-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.kds-item-block {
  margin-bottom: 0.65rem;
}

.kds-item-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.35;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
}

.kds-item-qty {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 900;
  color: #F59E0B;
  flex-shrink: 0;
  min-width: 28px;
}

.kds-item-notes {
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
  margin-right: 0.35rem;
}

.kds-item-notes.spicy {
  color: #f87171;
  font-weight: 700;
}

/* Nested Item Checklists */
.kds-item-checklist {
  margin-right: 1.25rem;
  margin-top: 0.25rem;
  margin-bottom: 0.65rem;
  padding-right: 0.5rem;
  border-right: 2px solid #334155;
}

.kds-check-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: #cbd5e1;
  margin-bottom: 0.2rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.kds-check-item input[type="checkbox"],
.kds-check-input,
.kds-chk-box {
  min-width: 16px;
  min-height: 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #10B981;
}

.kds-check-item input:checked + .kds-check-text,
.kds-check-item.completed {
  text-decoration: line-through;
  color: #64748b;
}

.kds-frying-hint {
  margin-top: auto;
  background: rgba(229, 62, 62, 0.1);
  border: 1px solid rgba(229, 62, 62, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: #feb2b2;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kds-frying-hint svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Pinned Action Footer */
.kds-ticket-footer,
.kds-card-footer {
  flex-shrink: 0;
  padding: 0.75rem 0.85rem;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--border-color, #1e293b);
}

.kds-ticket-footer .btn-ready,
.kds-card-footer .btn-ready,
.btn-kds-advance {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  background: #10B981;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
  font-family: var(--font-arabic);
}

.btn-ready:hover,
.btn-kds-advance:hover {
  background: #059669;
}

.btn-ready:disabled,
.btn-kds-advance:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ready.ready,
.btn-kds-advance.ready {
  background: var(--accent-blue);
  color: #fff;
}

.btn-ready svg,
.btn-kds-advance svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ==========================================================
   VIEW 3: SELF-ORDERING KIOSK (#tab-kiosk)
   ========================================================== */
.kiosk-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #080a0f;
  position: relative;
  overflow: hidden;
}

.kiosk-hero-banner {
  background: linear-gradient(135deg, #1a202c, #0f1117);
  border-bottom: 2px solid var(--accent-red);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kiosk-hero-title h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
}

.kiosk-hero-title p {
  color: var(--accent-gold);
  font-size: 0.88rem;
  font-weight: 700;
}

.kiosk-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.kiosk-category-sidebar {
  width: 220px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.kiosk-cat-btn {
  padding: 1rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-arabic);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.15s ease;
}

.kiosk-cat-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.kiosk-cat-btn.active {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4);
}

.kiosk-items-area {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  align-content: flex-start;
}

.kiosk-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.kiosk-bottom-bar {
  height: 80px;
  background: var(--bg-surface);
  border-top: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.kiosk-cart-summary-text {
  font-size: 1.1rem;
  font-weight: 800;
}

.kiosk-cart-summary-text .amount {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--accent-gold);
}

.btn-kiosk-checkout {
  padding: 0.9rem 2.5rem;
  background: var(--accent-green);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-arabic);
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 14px rgba(56, 161, 105, 0.4);
}

.btn-kiosk-checkout svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ==========================================================
   VIEW 4: INVENTORY & TRANSFERS (#tab-inventory)
   ========================================================== */
.inventory-container {
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.scanner-toolbar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.scanner-input-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.scanner-input-field {
  flex: 1;
  background: var(--bg-primary);
  border: 2px dashed var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 1rem;
}

.scanner-input-field:focus {
  outline: none;
  border-style: solid;
}

.btn-scanner-action {
  padding: 0.75rem 1.5rem;
  background: var(--accent-red);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn-scanner-action.secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-scanner-action.secondary:hover {
  border-color: var(--accent-gold);
}

.btn-scanner-action svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Full-Width Industrial Branch Stock & Inventory Workspace */
.branch-stock-panel,
.inventory-table-container,
.erp-transfers-panel {
  width: 100%;
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
}

.branch-stock-panel .pos-table th,
.branch-stock-panel .pos-table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.branch-stock-panel .pos-table th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 2px solid var(--border-color);
  font-size: 0.85rem;
}

.branch-stock-panel .pos-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
}

.branch-stock-panel .pos-table tr:hover td {
  background: rgba(236, 201, 75, 0.03);
}

/* Clear column spacing and ergonomic visual hierarchy */
.branch-stock-panel .pos-table th:first-child,
.branch-stock-panel .pos-table td:first-child {
  width: 16%;
}

.branch-stock-panel .pos-table th:nth-child(2),
.branch-stock-panel .pos-table td:nth-child(2) {
  width: 28%;
  font-weight: 700;
}

.branch-stock-panel .pos-table th:nth-child(3),
.branch-stock-panel .pos-table td:nth-child(3) {
  width: 15%;
}

.branch-stock-panel .pos-table th:nth-child(4),
.branch-stock-panel .pos-table td:nth-child(4) {
  width: 18%;
}

.branch-stock-panel .pos-table th:nth-child(5),
.branch-stock-panel .pos-table td:nth-child(5) {
  width: 11%;
}

.branch-stock-panel .pos-table th:nth-child(6),
.branch-stock-panel .pos-table td:nth-child(6) {
  width: 12%;
  text-align: center;
}

/* Legacy container normalization (full-width fallback) */
.inventory-split-layout,
.inventory-tables-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.inventory-col-right,
.inventory-col-left {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.data-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.data-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.data-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.data-card-title svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent-gold);
  fill: none;
  stroke-width: 2;
}

.pos-table-wrapper {
  overflow-x: auto;
}

.pos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: right;
}

.pos-table th {
  padding: 0.6rem 0.75rem;
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}

.pos-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.pos-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.stock-badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.stock-badge.optimal {
  background: rgba(56, 161, 105, 0.2);
  color: #68d391;
}

.stock-badge.low {
  background: rgba(229, 62, 62, 0.2);
  color: #fc8181;
}

/* Inbound Transfer Summary Badges */
.badge-accent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(236, 201, 75, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(236, 201, 75, 0.3);
}

.badge-info {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(49, 130, 206, 0.15);
  color: #63b3ed;
  border: 1px solid rgba(49, 130, 206, 0.3);
}

.badge-neutral {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.badge-success {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(56, 161, 105, 0.18);
  color: #68d391;
  border: 1px solid rgba(56, 161, 105, 0.35);
}

/* Transfer Manifest Inspection Modal & Table */
.trf-modal-card {
  max-width: 820px;
  width: 95%;
  max-height: 90vh;
}

.trf-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.trf-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trf-meta-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 700;
}

.trf-meta-val {
  font-size: 0.86rem;
  color: var(--text-main);
  font-weight: 800;
}

.trf-manifest-table-wrapper {
  max-height: 42vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
}

.trf-manifest-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.trf-manifest-table th {
  background: var(--bg-card);
  padding: 0.65rem 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  text-align: right;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1;
}

.trf-manifest-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  vertical-align: middle;
}

.trf-manifest-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.trf-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}

.trf-summary-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.btn-inspect-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-inspect-action:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(236, 201, 75, 0.08);
}

.btn-receive-success {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-green);
  color: #ffffff;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  font-family: inherit;
}

.btn-receive-success:hover {
  background: var(--accent-green-hover);
}

.btn-receive-success:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================
   VIEW: MENU RECIPES & BOM DIRECTORY (#tab-recipes)
   (Consolidated in VIEW 4 below)
   ========================================================== */

/* ==========================================================
   VIEW 5: DISPATCH & LIVE GPS MAP (#tab-dispatch)
   ========================================================== */
.dispatch-container {
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

.map-sidebar {
  width: 380px;
  min-width: 320px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  z-index: 10;
}

.map-viewport {
  flex: 1;
  height: 100%;
  min-height: 400px;
  background: #111;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

#leaflet-map, #dispatch-map, #fleet-map, .dispatch-map-container {
  height: 100%;
  min-height: 400px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #1a1a1a;
  border: 1px solid var(--border-color);
}

.leaflet-tile-pane {
  filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7);
}

.driver-status-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.driver-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.driver-name {
  font-size: 0.95rem;
  font-weight: 800;
}

.driver-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.driver-status-pill.on_delivery {
  background: rgba(236, 201, 75, 0.2);
  color: var(--accent-gold);
}

.driver-status-pill.available {
  background: rgba(56, 161, 105, 0.2);
  color: #68d391;
}

.driver-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.driver-stats-row .val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
}

.btn-settle-custody {
  padding: 0.45rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--accent-green);
  font-family: var(--font-arabic);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.3rem;
  text-align: center;
}

.btn-settle-custody:hover {
  background: var(--accent-green);
  color: #fff;
}

/* ==========================================================
   VIEW 6: END OF SHIFT Z-REPORT (#tab-zreport)
   ========================================================== */
.zreport-container {
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Shift Hub Unified 2-Section Subtabs */
.pos-shift-subtabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 1rem;
}

.subtab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-arabic);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subtab-btn.active {
  background: var(--bg-surface) !important;
  border-color: var(--accent-gold) !important;
  color: var(--accent-gold) !important;
}

.subtab-btn:hover:not(.active) {
  border-color: rgba(236, 201, 75, 0.4);
  color: var(--text-main);
}

/* Shift Archive Toolbar & Pills */
.shift-archive-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
}

#pos-shift-period-pills .pill {
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

#pos-shift-period-pills .pill:hover {
  border-color: var(--accent-gold);
  color: var(--text-main);
}

#pos-shift-period-pills .pill.active {
  background: rgba(236, 201, 75, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 800;
}

.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.zreport-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.actual-cash-input-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.variance-alert-badge {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.variance-alert-badge.match {
  background: rgba(56, 161, 105, 0.15);
  border: 1px solid var(--accent-green);
  color: #68d391;
}

.variance-alert-badge.discrepancy {
  background: rgba(229, 62, 62, 0.15);
  border: 1px solid var(--accent-red);
  color: #fc8181;
}

.variance-alert-badge.surplus {
  background: rgba(49, 151, 149, 0.15);
  border: 1px solid #319795;
  color: #4fd1c5;
}

.btn-submit-zreport {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--accent-red), #9b2c2c);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-arabic);
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 4px 14px rgba(229, 62, 62, 0.4);
}

.btn-submit-zreport svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
}

.modal-content-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
}

.modal-close-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ==========================================================
   DELIVERY MODAL & DIALOG ARCHITECTURE
   ========================================================== */
.pos-modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeInModal 0.15s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pos-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 92%;
  max-width: 480px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpModal 0.2s ease-out;
}

@keyframes slideUpModal {
  from { transform: translateY(20px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.pos-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.pos-modal-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.btn-close-modal:hover {
  color: var(--accent-red);
}

.pos-modal-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-surface);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-arabic);
  font-size: 0.88rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(236, 201, 75, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 54px;
}

.pos-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.btn {
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-arabic);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-muted);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.btn-primary {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
  box-shadow: 0 2px 8px rgba(229, 62, 62, 0.4);
}

/* ==========================================================
   VIEW 4: MENU RECIPES & BOM DIRECTORY (#tab-recipes)
   ========================================================== */
.recipes-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  gap: 1rem;
  overflow-y: auto;
  box-sizing: border-box;
}

.recipes-header-card {
  margin-bottom: 0.5rem;
  padding: 1rem 1.25rem;
}

.recipes-directory-grid,
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  padding-bottom: 2rem;
}

@media (max-width: 768px) {
  .recipes-directory-grid,
  .recipes-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

.recipe-card {
  background: var(--bg-card, #0f172a);
  border: 1px solid var(--border-color, rgba(51, 65, 85, 0.65));
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, border-color 0.15s ease;
  box-sizing: border-box;
  width: 100%;
}

.recipe-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
}

/* Row 1: Identity */
.recipe-card-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.recipe-card-thumb {
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  max-width: 52px;
  max-height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-surface, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.recipe-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.recipe-card-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.recipe-card-title {
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.98rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}

.recipe-meal-code-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
}

.recipe-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.recipe-card-category {
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.recipe-card-price {
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--accent-gold, #f59e0b);
  white-space: nowrap;
}

/* Row 2: Dedicated Barcode Strip */
.recipe-card-barcode-strip {
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.recipe-card-barcode-strip svg {
  max-height: 38px;
  height: 38px;
  width: 100%;
  max-width: 250px;
  display: block;
}

/* Row 3: Yield Status Bar */
.recipe-capacity-pill {
  width: 100%;
  padding: 6px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.82rem;
  font-weight: 800;
  box-sizing: border-box;
  text-align: center;
}

.recipe-capacity-pill.optimal {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.recipe-capacity-pill.warning {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.recipe-capacity-pill.out-of-stock {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #f87171;
}

.recipe-capacity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* BOM Clean Ingredient Rows */
.recipe-bom-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.bom-ingredient-clean-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.bom-ingredient-clean-row:hover {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(245, 158, 11, 0.3);
}

.bom-ingredient-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.bom-code-badge {
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.72rem;
  font-weight: 800;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.38);
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.bom-ingredient-name {
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.84rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: normal;
  line-height: 1.3;
}

.bom-ingredient-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bom-pill {
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bom-pill-deduct {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
}

.bom-pill-stock-ok {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.bom-pill-stock-short {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

@media (max-width: 768px) {
  .bom-ingredient-clean-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }
  .bom-ingredient-left {
    justify-content: flex-start !important;
  }
}

/* 80mm ESC/POS Thermal Receipt Layout */
#receipt-print-zone {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }
  #receipt-print-zone, #receipt-print-zone * {
    visibility: visible;
  }
  #receipt-print-zone {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 72mm;
    margin: 0;
    padding: 2mm;
    color: #000;
    background: #fff;
    font-family: 'Cairo', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.3;
    direction: rtl;
  }
  .receipt-logo {
    display: block;
    margin: 0 auto 6px auto;
    max-width: 48mm;
    filter: grayscale(100%) contrast(150%);
  }
  .receipt-header-center {
    text-align: center;
    border-bottom: 1px dashed #000;
    padding-bottom: 6px;
    margin-bottom: 6px;
  }
  .receipt-order-box {
    border: 2px solid #000;
    padding: 6px;
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    margin: 6px 0;
  }
  #receipt-print-zone [dir="ltr"] {
    direction: ltr !important;
    unicode-bidi: isolate !important;
  }
  .receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0;
    font-size: 11px;
  }
  .receipt-table th {
    border-bottom: 1px solid #000;
    padding: 3px 0;
    text-align: right;
  }
  .receipt-table td {
    padding: 3px 0;
  }
  .receipt-summary-block {
    border-top: 1px dashed #000;
    padding-top: 6px;
    margin-top: 6px;
  }
  .receipt-barcode-svg {
    display: block;
    margin: 8px auto 0 auto;
    width: 50mm;
    height: 15mm;
  }
}

/* ==========================================================
   VIEW: DEDICATED ORDERS TAB & QUICK ACTIONS (#tab-orders)
   ========================================================== */
.orders-container {
  width: 100%;
  height: 100%;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.orders-header-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.5rem;
}

.orders-toolbar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
}

.orders-table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.orders-table th {
  background: var(--bg-surface);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  padding: 0.65rem 0.85rem;
  white-space: nowrap;
}

.orders-table td {
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.orders-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.btn-orders-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-arabic);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-orders-action.reprint {
  background: rgba(229, 62, 62, 0.12);
  border: 1px solid rgba(229, 62, 62, 0.3);
  color: #f87171;
}

.btn-orders-action.reprint:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

.btn-orders-action.view {
  background: rgba(236, 201, 75, 0.12);
  border: 1px solid rgba(236, 201, 75, 0.3);
  color: var(--accent-gold);
}

.btn-orders-action.view:hover {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

.btn-orders-action svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Current Shift Transactions Audit Table Styling */
.shift-audit-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
}

.shift-audit-table {
  width: 100%;
  border-collapse: collapse;
}

.shift-audit-table th {
  background: var(--bg-primary);
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  padding: 0.55rem 0.75rem;
}

.shift-audit-table td {
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.shift-audit-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Industrial Dark Select & Custom Category Input */
.hidden {
  display: none !important;
}

.dark-select {
  background-color: #0f1218;
  color: #f8fafc;
  border: 1px dashed #334155;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  width: 100%;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.dark-select:focus {
  border-color: #F59E0B;
}

.dark-select option {
  background-color: #0f1218;
  color: #f8fafc;
}

.form-input.dark-input,
.dark-input {
  background-color: #0f1218;
  color: #f8fafc;
  border: 1px dashed #334155;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  width: 100%;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.form-input.dark-input:focus,
.dark-input:focus {
  border-color: #F59E0B;
}

/* ==========================================================
   VIEW 6: END-OF-DAY INVENTORY AUDIT & WASTE STYLES
   ========================================================== */
.audit-schedule-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  flex-shrink: 0;
}

.audit-schedule-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.schedule-pill {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.schedule-pill.shift-pill {
  background: rgba(49, 130, 206, 0.12);
  color: #63b3ed;
  border: 1px solid rgba(49, 130, 206, 0.28);
}

.schedule-pill.audit-pill {
  background: rgba(236, 201, 75, 0.14);
  color: var(--accent-gold);
  border: 1px solid rgba(236, 201, 75, 0.38);
  font-weight: 800;
}

.audit-branch-tag .branch-badge {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}

.audit-grid-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.85rem;
  align-items: start;
  width: 100%;
}

@media (max-width: 992px) {
  .audit-grid-layout {
    grid-template-columns: 1fr;
  }
}

.audit-col-main,
.audit-col-waste {
  min-width: 0;
  width: 100%;
}

.pos-waste-card,
.pos-audit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.form-group-compact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 0.45rem;
}

.form-group-compact label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pos-audit-table-wrapper {
  overflow-x: auto;
  max-height: calc(100vh - 310px);
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.pos-audit-table-wrapper table.compact td,
.pos-audit-table-wrapper table.compact th {
  padding: 5px 8px;
  font-size: 0.8rem;
}

.audit-diff-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.78rem;
}

.audit-diff-badge.zero {
  background: rgba(56, 161, 105, 0.15);
  color: #48bb78;
  border: 1px solid rgba(56, 161, 105, 0.3);
}

.audit-diff-badge.negative {
  background: rgba(229, 62, 62, 0.18);
  color: #feb2b2;
  border: 1px solid rgba(229, 62, 62, 0.4);
}

.audit-diff-badge.positive {
  background: rgba(49, 130, 206, 0.15);
  color: #63b3ed;
  border: 1px solid rgba(49, 130, 206, 0.3);
}

.actual-count-input {
  background: #0b0e14;
  border: 1px solid #3b4252;
  border-radius: 4px;
  color: #f7fafc;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  width: 75px;
  padding: 3px 5px;
  outline: none;
  transition: border-color 0.2s ease;
}

.actual-count-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 1px var(--accent-gold);
}

/* Inbound Storefront Online Orders & Amber Notifications */
@keyframes pulseAmber {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.glowing-amber-badge {
  animation: pulseAmber 1.6s infinite !important;
}

.pending-online-section {
  border: 2px solid #f59e0b;
  background: rgba(245, 158, 11, 0.05);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.12);
}

.pending-online-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
  margin-top: 0.85rem;
}

.pending-online-card {
  background: var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.pending-online-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: #f59e0b;
}

/* ==========================================================
   INTERACTIVE FLOOR PLAN, DINE-IN TABLE BAR & RESERVATION HUB
   ========================================================== */

.cart-table-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin: 0 0.75rem 0.35rem 0.75rem;
  background: rgba(236, 201, 75, 0.08);
  border: 1px dashed rgba(236, 201, 75, 0.38);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.cart-table-badge.has-table {
  background: rgba(56, 161, 105, 0.14);
  border: 1px solid rgba(72, 187, 120, 0.45);
}

.cart-table-badge.is-appending {
  background: rgba(221, 107, 32, 0.16);
  border: 1px solid rgba(246, 173, 85, 0.5);
}

.cart-table-badge-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-main);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-table-badge-info svg {
  width: 15px;
  height: 15px;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.cart-table-badge.has-table .cart-table-badge-info svg {
  color: #48bb78;
}

.btn-table-badge-select {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: rgba(236, 201, 75, 0.16);
  border: 1px solid rgba(236, 201, 75, 0.4);
  border-radius: 4px;
  color: var(--accent-gold);
  font-family: var(--font-arabic);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-table-badge-select:hover {
  background: var(--accent-gold);
  color: #0a0c10;
}

.btn-table-badge-select svg {
  width: 12px;
  height: 12px;
}

/* Floor Plan Modal */
.floor-plan-modal-card {
  width: 94vw;
  max-width: 1080px !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.floor-plan-header {
  padding: 0.75rem 1.15rem !important;
}

.table-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.42);
  border-radius: 999px;
  color: #6ee7b7;
  font-size: 0.68rem;
  font-weight: 800;
}

.status-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #48bb78;
  box-shadow: 0 0 6px #48bb78;
}

.floor-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.btn-floor-action,
#btn-toggle-floor-editor,
#btn-open-new-reservation {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  min-width: max-content;
  border-radius: 8px;
  font-family: var(--font-arabic);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.btn-layout-editor-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.btn-layout-editor-toggle.active,
.btn-layout-editor-toggle:hover {
  background: rgba(236, 201, 75, 0.16);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-new-reservation {
  background: linear-gradient(135deg, #805ad5, #6b46c1);
  border: 1px solid #9f7aea;
  color: #fff;
}

.btn-new-reservation:hover {
  background: linear-gradient(135deg, #9f7aea, #805ad5);
}

/* Floor Plan Toolbar */
.floor-plan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0.55rem 1.15rem;
  background: rgba(10, 12, 16, 0.65);
  border-bottom: 1px solid var(--border-color);
}

.floor-zone-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.floor-zone-tab {
  padding: 5px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-arabic);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.floor-zone-tab.active,
.floor-zone-tab:hover {
  background: rgba(236, 201, 75, 0.16);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.floor-status-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-chip.status-available .legend-dot { background: #38a169; box-shadow: 0 0 6px #38a169; }
.legend-chip.status-occupied .legend-dot { background: #e53e3e; box-shadow: 0 0 6px #e53e3e; }
.legend-chip.status-reserved .legend-dot { background: #9f7aea; box-shadow: 0 0 6px #ecc94b; }
.legend-chip.status-cleaning .legend-dot { background: #3182ce; box-shadow: 0 0 6px #3182ce; }

/* Admin Layout Editor Banner */
.floor-editor-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0.5rem 1.15rem;
  background: rgba(236, 201, 75, 0.12);
  border-bottom: 1px solid rgba(236, 201, 75, 0.35);
  color: var(--accent-gold);
  font-size: 0.76rem;
}

.btn-add-table-layout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--accent-gold);
  color: #0a0c10;
  border: none;
  border-radius: 4px;
  font-family: var(--font-arabic);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

/* Visual Floor Plan Grid */
.floor-plan-modal-body {
  padding: 0.75rem 1.15rem !important;
  overflow-y: auto;
  overflow-x: auto;
  max-height: calc(88vh - 180px);
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(236, 201, 75, 0.35) rgba(15, 23, 42, 0.6);
  background:
    radial-gradient(circle at 20% 20%, rgba(236, 201, 75, 0.03), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(159, 122, 234, 0.04), transparent 45%),
    #0b0e14;
}

#floor-map-view-container,
#floor-plan-view-container,
#floor-timeline-view-container,
#timeline-schedule-view-container {
  overflow-y: auto;
  overflow-x: auto;
  max-height: calc(88vh - 180px);
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(236, 201, 75, 0.35) rgba(15, 23, 42, 0.6);
}

.floor-plan-modal-body::-webkit-scrollbar,
#floor-map-view-container::-webkit-scrollbar,
#floor-plan-view-container::-webkit-scrollbar,
#floor-timeline-view-container::-webkit-scrollbar,
#timeline-schedule-view-container::-webkit-scrollbar,
.timeline-gantt-scroll-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.floor-plan-modal-body::-webkit-scrollbar-track,
#floor-map-view-container::-webkit-scrollbar-track,
#floor-plan-view-container::-webkit-scrollbar-track,
#floor-timeline-view-container::-webkit-scrollbar-track,
#timeline-schedule-view-container::-webkit-scrollbar-track,
.timeline-gantt-scroll-wrap::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.65);
  border-radius: 6px;
}

.floor-plan-modal-body::-webkit-scrollbar-thumb,
#floor-map-view-container::-webkit-scrollbar-thumb,
#floor-plan-view-container::-webkit-scrollbar-thumb,
#floor-timeline-view-container::-webkit-scrollbar-thumb,
#timeline-schedule-view-container::-webkit-scrollbar-thumb,
.timeline-gantt-scroll-wrap::-webkit-scrollbar-thumb {
  background: rgba(236, 201, 75, 0.38);
  border-radius: 6px;
}

.floor-plan-modal-body::-webkit-scrollbar-thumb:hover,
#floor-map-view-container::-webkit-scrollbar-thumb:hover,
#floor-timeline-view-container::-webkit-scrollbar-thumb:hover,
.timeline-gantt-scroll-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(236, 201, 75, 0.65);
}

.floor-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  padding-top: 8px;
  padding-bottom: 12px;
  padding-left: 4px;
  padding-right: 4px;
  box-sizing: border-box;
  overflow-y: visible;
  flex: 1 1 auto;
}

/* Custom Dark Thin Scrollbar for Floor Plan & Modals */
.floor-plan-modal-body::-webkit-scrollbar,
.floor-plan-grid::-webkit-scrollbar,
.pos-modal-body::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.floor-plan-modal-body::-webkit-scrollbar-track,
.floor-plan-grid::-webkit-scrollbar-track,
.pos-modal-body::-webkit-scrollbar-track {
  background: rgba(15, 18, 24, 0.75);
  border-radius: 6px;
}

.floor-plan-modal-body::-webkit-scrollbar-thumb,
.floor-plan-grid::-webkit-scrollbar-thumb,
.pos-modal-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 6px;
}

.floor-plan-modal-body::-webkit-scrollbar-thumb:hover,
.floor-plan-grid::-webkit-scrollbar-thumb:hover,
.pos-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(236, 201, 75, 0.55);
}

/* Table Visual Cards & Distinct Shapes */
.table-visual-card {
  position: relative;
  background: #141923;
  border: 2px solid #2d3748;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-height: 136px;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  user-select: none;
}

.table-visual-card.shape-square {
  border-radius: 12px;
}

.table-visual-card.shape-round {
  border-radius: 28px;
  padding-left: 1rem;
  padding-right: 1rem;
}

.table-visual-card.shape-round .table-chair-pip {
  width: 24px;
  height: 5px;
  border-radius: 999px;
}

.table-visual-card.shape-rectangle {
  border-radius: 10px;
  border-width: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.table-visual-card.shape-rectangle .table-chair-pip {
  width: 26px;
  height: 5px;
  border-radius: 3px;
}

.table-shape-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.table-visual-card:hover {
  transform: translateY(-2px);
}

.table-visual-card.selected-table {
  box-shadow: 0 0 0 3px var(--accent-gold), 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* Chair Indicators Top/Bottom */
.table-chairs-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

.table-chair-pip {
  width: 20px;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
}

/* Status Colors */
.table-visual-card.status-available {
  border-color: rgba(56, 161, 105, 0.65);
  background: linear-gradient(160deg, rgba(56, 161, 105, 0.13) 0%, rgba(20, 25, 35, 0.96) 100%);
}
.table-visual-card.status-available .table-chair-pip {
  background: rgba(72, 187, 120, 0.55);
}

.table-visual-card.status-occupied {
  border-color: rgba(229, 62, 62, 0.75);
  background: linear-gradient(160deg, rgba(229, 62, 62, 0.16) 0%, rgba(221, 107, 32, 0.08) 100%);
}
.table-visual-card.status-occupied .table-chair-pip {
  background: rgba(245, 101, 101, 0.65);
}

.table-visual-card.status-reserved {
  border-color: rgba(159, 122, 234, 0.85);
  background: linear-gradient(160deg, rgba(159, 122, 234, 0.2) 0%, rgba(236, 201, 75, 0.1) 100%);
  box-shadow: 0 4px 15px rgba(159, 122, 234, 0.15);
}
.table-visual-card.status-reserved .table-chair-pip {
  background: rgba(236, 201, 75, 0.75);
}

.table-visual-card.status-cleaning {
  border-color: rgba(49, 130, 206, 0.7);
  background: linear-gradient(160deg, rgba(49, 130, 206, 0.16) 0%, rgba(20, 25, 35, 0.96) 100%);
}
.table-visual-card.status-cleaning .table-chair-pip {
  background: rgba(99, 179, 237, 0.6);
}

.table-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.table-num-badge {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.table-status-tag {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

.status-available .table-status-tag {
  background: rgba(56, 161, 105, 0.22);
  color: #68d391;
}
.status-occupied .table-status-tag {
  background: rgba(229, 62, 62, 0.24);
  color: #feb2b2;
}
.status-reserved .table-status-tag {
  background: rgba(159, 122, 234, 0.28);
  color: #e9d8fd;
  border: 1px solid rgba(236, 201, 75, 0.45);
}
.status-cleaning .table-status-tag {
  background: rgba(49, 130, 206, 0.24);
  color: #90cdf4;
}

.table-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.table-card-details {
  background: rgba(0, 0, 0, 0.28);
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 0.71rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.res-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  background: rgba(236, 201, 75, 0.2);
  border: 1px solid rgba(236, 201, 75, 0.5);
  color: var(--accent-gold);
  font-size: 0.63rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
}

/* Contextual Table Action Drawer inside Floor Plan Modal */
.floor-table-action-drawer {
  background: #161b26;
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.drawer-table-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-table-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.btn-drawer-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 6px;
  font-family: var(--font-arabic);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-drawer-act.seat-green {
  background: #38a169;
  color: #fff;
}
.btn-drawer-act.seat-green:hover {
  background: #2f855a;
}

.btn-drawer-act.gold-act {
  background: var(--accent-gold);
  color: #0a0c10;
}
.btn-drawer-act.gold-act:hover {
  background: #f6e05e;
}

.btn-drawer-act.blue-act {
  background: #3182ce;
  color: #fff;
}
.btn-drawer-act.blue-act:hover {
  background: #2b6cb0;
}

.btn-drawer-act.danger-act {
  background: rgba(229, 62, 62, 0.16);
  border-color: rgba(229, 62, 62, 0.45);
  color: #feb2b2;
}
.btn-drawer-act.danger-act:hover {
  background: #e53e3e;
  color: #fff;
}

/* Connected Apps Modal Card */
.connector-featured-card {
  background: linear-gradient(145deg, rgba(159, 122, 234, 0.1) 0%, rgba(20, 25, 35, 0.95) 100%);
  border: 1px solid rgba(159, 122, 234, 0.4);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.connector-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.connector-brand-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.connector-logo-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(159, 122, 234, 0.2);
  border: 1px solid rgba(236, 201, 75, 0.45);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.connector-badge-active {
  background: rgba(56, 161, 105, 0.2);
  border: 1px solid rgba(72, 187, 120, 0.45);
  color: #68d391;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Toggle Switch */
.connector-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.connector-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.connector-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #2d3748;
  transition: 0.2s;
  border-radius: 24px;
}
.connector-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}
.connector-switch input:checked + .connector-slider {
  background-color: #38a169;
}
.connector-switch input:checked + .connector-slider:before {
  transform: translateX(20px);
}

.connector-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.connector-webhook-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px dashed var(--border-color);
  border-radius: 6px;
}

/* ==========================================================
   DARK / GOLD MODAL FORMS, CLOSE BUTTONS & FOOTER ACTIONS
   ========================================================== */

.pos-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 18, 24, 0.85);
}

.pos-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pos-modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: rgba(236, 201, 75, 0.14);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pos-modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.pos-modal-subtitle {
  margin: 2px 0 0 0;
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Close (X) Button Styling Across All Modals */
.pos-modal-close,
.modal-close-btn,
.btn-close-modal {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

.pos-modal-close svg,
.modal-close-btn svg,
.btn-close-modal svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

.pos-modal-close:hover,
.modal-close-btn:hover,
.btn-close-modal:hover {
  background: rgba(229, 62, 62, 0.25);
  color: #fc8181;
  transform: scale(1.04);
}

/* 2-Column Dark/Gold Modal Form Grid */
.pos-form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 560px) {
  .pos-form-row-2col {
    grid-template-columns: 1fr;
  }
}

.pos-form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
}

.pos-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
}

.req-star {
  color: #f59e0b;
  font-weight: 800;
}

.pos-form-input,
#modal-new-reservation input,
#modal-new-reservation select,
#modal-new-reservation textarea,
#modal-edit-table input,
#modal-edit-table select,
#modal-table-layout-item input,
#modal-table-layout-item select,
#modal-connected-apps select {
  background: #141821;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-arabic);
  font-size: 0.84rem;
  font-weight: 600;
  color-scheme: dark;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.pos-form-input:focus,
#modal-new-reservation input:focus,
#modal-new-reservation select:focus,
#modal-new-reservation textarea:focus,
#modal-edit-table input:focus,
#modal-edit-table select:focus,
#modal-table-layout-item input:focus,
#modal-table-layout-item select:focus,
#modal-connected-apps select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.pos-form-input option,
#modal-new-reservation select option,
#modal-edit-table select option,
#modal-table-layout-item select option,
#modal-connected-apps select option {
  background: #141821;
  color: #f8fafc;
}

/* Modal Footer & Action Buttons */
.pos-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: rgba(15, 18, 24, 0.85);
}

.floor-plan-footer {
  justify-content: space-between !important;
}

.pos-btn-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #ecc94b, #d69e2e);
  border: 1px solid #f6e05e;
  border-radius: 8px;
  color: #0a0c10;
  font-family: var(--font-arabic);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pos-btn-confirm svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.pos-btn-confirm:hover {
  background: linear-gradient(135deg, #f6e05e, #ecc94b);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(236, 201, 75, 0.35);
}

.pos-btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #e2e8f0;
  font-family: var(--font-arabic);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pos-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.pos-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  background: rgba(229, 62, 62, 0.16);
  border: 1px solid rgba(229, 62, 62, 0.45);
  border-radius: 8px;
  color: #fc8181;
  font-family: var(--font-arabic);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pos-btn-danger:hover {
  background: #e53e3e;
  color: #fff;
}

/* Dine-in Hold Order on Table / Send to Kitchen Button in Cart Footer */
.btn-hold-table-order {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, rgba(236, 201, 75, 0.2), rgba(214, 158, 46, 0.28));
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  color: var(--accent-gold);
  font-family: var(--font-arabic);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-hold-table-order:hover {
  background: var(--accent-gold);
  color: #0a0c10;
}

/* ============================================================
   RESERVATIONS TIMELINE SCHEDULE (OPENTABLE / ODOO GANTT VIEW)
   & SPLIT CHECK / SPLIT BILL & ALREADY-SENT LOCKED ITEMS
   ============================================================ */

.floor-view-segmented-control {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.floor-view-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-arabic);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.floor-view-seg-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.floor-view-seg-btn.active {
  background: linear-gradient(135deg, rgba(229, 62, 62, 0.25), rgba(221, 107, 32, 0.28));
  border-color: rgba(236, 201, 75, 0.55);
  color: #f6e05e;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.floor-timeline-view-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(10, 14, 23, 0.65);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex: 1;
  min-height: 440px;
  overflow: hidden;
}

.timeline-schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-date-picker-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-date-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #e2e8f0;
}

.timeline-date-input {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.timeline-today-btn {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.timeline-legend-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.timeline-legend-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.timeline-legend-pill.confirmed::before {
  background: #f6ad55;
}

.timeline-legend-pill.seated::before {
  background: #fc8181;
}

.timeline-legend-pill.empty-hint {
  color: #93c5fd;
  border: 1px dashed rgba(59, 130, 246, 0.4);
}

.timeline-legend-pill.empty-hint::before {
  background: #60a5fa;
}

.timeline-gantt-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(88vh - 235px);
  flex: 1 1 auto;
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #0b0f19;
}

.timeline-gantt-table {
  width: 100%;
  min-width: 1360px;
  border-collapse: collapse;
  table-layout: fixed;
  direction: rtl;
}

.timeline-gantt-table th,
.timeline-gantt-table td {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0;
  vertical-align: middle;
}

.timeline-gantt-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #111827;
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 10px 4px;
  text-align: center;
  white-space: nowrap;
}

.timeline-gantt-table thead th.timeline-th-table {
  width: 155px;
  min-width: 155px;
  position: sticky;
  right: 0;
  z-index: 7;
  background: #1e293b;
  color: #f8fafc;
  text-align: right;
  padding: 10px 12px;
}

.timeline-td-table-info {
  position: sticky;
  right: 0;
  z-index: 4;
  background: #131c2e;
  padding: 8px 10px !important;
  width: 155px;
  min-width: 155px;
}

.timeline-table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 0.85rem;
  color: #f8fafc;
}

.timeline-table-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 3px;
}

.timeline-slot-td {
  position: relative;
  height: 54px;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
  transition: background 0.15s ease;
}

.timeline-slot-td:hover {
  background: rgba(59, 130, 246, 0.14);
}

.timeline-slot-td.slot-empty-cell::after {
  content: "+ حجز";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(147, 197, 253, 0.85);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.timeline-slot-td.slot-empty-cell:hover::after {
  opacity: 1;
}

.timeline-res-block {
  margin: 4px 5px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-res-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.5);
}

.timeline-res-block.status-confirmed {
  background: linear-gradient(135deg, rgba(237, 137, 54, 0.3), rgba(214, 158, 46, 0.35));
  border: 1px solid #f6ad55;
  color: #fbd38d;
}

.timeline-res-block.status-seated {
  background: linear-gradient(135deg, rgba(229, 62, 62, 0.32), rgba(197, 48, 48, 0.38));
  border: 1px solid #fc8181;
  color: #feb2b2;
}

.timeline-res-block-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
}

.timeline-res-block-sub {
  font-size: 0.7rem;
  opacity: 0.92;
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-reservation-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(246, 173, 85, 0.45);
  border-radius: 10px;
}

/* Upcoming reservation warning pill on Floor Map card */
.floor-card-upcoming-pill {
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(237, 137, 54, 0.18);
  border: 1px solid rgba(246, 173, 85, 0.55);
  color: #fbd38d;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
}

.floor-card-seated-waiting {
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(236, 201, 75, 0.14);
  border: 1px dashed rgba(236, 201, 75, 0.55);
  color: #fef08a;
  font-size: 0.73rem;
  font-weight: 800;
}

/* Split Check Button in Cart Footer */
.btn-split-check-cart {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(59, 130, 246, 0.25));
  border: 1px solid #38bdf8;
  border-radius: var(--radius-sm);
  color: #7dd3fc;
  font-family: var(--font-arabic);
  font-size: 0.81rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-split-check-cart:hover {
  background: #0284c7;
  color: #ffffff;
}

/* Split Check Modal Styles */
.split-check-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.split-mode-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #94a3b8;
  font-family: var(--font-arabic);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.split-mode-tab-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(37, 99, 235, 0.28));
  border-color: #38bdf8;
  color: #f8fafc;
  box-shadow: 0 3px 12px rgba(2, 132, 199, 0.25);
}

.split-items-instruction-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.split-check-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 2px;
  margin-bottom: 14px;
}

.split-check-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.split-check-item-row.selected {
  border-color: #38bdf8;
  background: rgba(2, 132, 199, 0.15);
}

.split-item-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
}

.split-item-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #0284c7;
  cursor: pointer;
}

.split-item-title {
  font-weight: 800;
  font-size: 0.86rem;
  color: #f8fafc;
}

.split-item-unit-price {
  font-size: 0.75rem;
  color: #94a3b8;
}

.split-item-qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  padding: 3px 6px;
}

.split-qty-step-btn {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-weight: 800;
  cursor: pointer;
}

.split-qty-step-btn:hover {
  background: #38bdf8;
  color: #0b0f19;
}

.split-qty-val {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  min-width: 36px;
  text-align: center;
}

.split-item-line-total {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.88rem;
  color: #38bdf8;
  min-width: 78px;
  text-align: left;
}

.split-equal-controls-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.split-equal-quick-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.split-guest-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0b0f19;
  color: #cbd5e1;
  font-family: var(--font-arabic);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.split-guest-btn.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}

.split-equal-breakdown-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.split-guest-share-card {
  padding: 10px;
  border-radius: 8px;
  background: #0b0f19;
  border: 1px solid rgba(56, 189, 248, 0.35);
  text-align: center;
}

.split-guest-share-title {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 700;
}

.split-guest-share-amount {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 900;
  color: #38bdf8;
  margin-top: 4px;
}

.split-check-summary-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.split-summary-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.split-summary-col.highlight {
  background: rgba(2, 132, 199, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 8px;
  padding: 6px;
}

.split-summary-label {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 700;
}

.split-summary-val {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 900;
  color: #f8fafc;
}

.split-summary-col.highlight .split-summary-val {
  color: #38bdf8;
  font-size: 1.05rem;
}

.split-payment-methods-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.split-pay-method-btn {
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.8);
  color: #cbd5e1;
  font-family: var(--font-arabic);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.split-pay-method-btn.active {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  color: #6ee7b7;
}

/* Locked Already-Sent Table Items in POS Cart */
.cart-already-sent-section {
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px dashed rgba(246, 173, 85, 0.45);
}

.cart-already-sent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 800;
  color: #fbd38d;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-item-row.already-sent-locked {
  opacity: 0.82;
  background: rgba(255, 255, 255, 0.03);
  border-right: 3px solid #f6ad55;
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.already-sent-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(237, 137, 54, 0.22);
  color: #fbd38d;
  border: 1px solid rgba(246, 173, 85, 0.4);
}

/* Crispy Crust POS - Clean Shift Styling & User Header Badges */
#pos-archive-shift-select, .pos-select, select {
  height: 38px !important;
  min-height: 38px !important;
  min-width: 310px !important;
  padding: 6px 32px 6px 14px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: #f8fafc !important;
  background-color: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}

/* Top Header Logged-In User Identity Pill */
.pos-user-badge-wrap {
  display: inline-flex;
  align-items: center;
}
.pos-user-badge-wrap .cc-header-user-widget {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
}
.pos-user-badge-wrap .cc-header-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  flex-shrink: 0;
}
.pos-user-badge-wrap .cc-header-user-info {
  display: flex;
  flex-direction: column;
  text-align: right;
}
.pos-user-badge-wrap .cc-header-user-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}
.pos-user-badge-wrap .cc-header-user-role {
  font-size: 0.66rem;
  color: #f59e0b;
}
.pos-user-badge-wrap .pos-user-code-badge {
  font-family: monospace;
  font-size: 0.66rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}
.pos-user-badge-wrap .cc-header-logout-btn {
  background: transparent;
  border: 1px solid #ef4444;
  color: #fca5a5;
  border-radius: 5px;
  padding: 0.25rem 0.55rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: background 0.15s;
}
.pos-user-badge-wrap .cc-header-logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* Off-Hours Lock & Status Styling */
.pos-off-hours-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-badge.off-hours {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

/* ========================================================
   Streamlined Modern Header Architecture (3-Zone Precision)
   ======================================================== */
.pos-navbar, .pos-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  padding: 0 16px !important;
  background: #0f172a !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  z-index: 1000 !important;
}

.pos-navbar .brand-section {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

.pos-navbar .brand-logo {
  height: 32px !important;
  width: auto !important;
}

/* Center Zone Nav Tabs */
.pos-navbar .nav-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.pos-navbar .nav-tab-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
}

.pos-navbar .nav-tab-btn:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.pos-navbar .nav-tab-btn.active {
  color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  font-weight: 700 !important;
}

.pos-navbar .nav-tab-btn .svg-icon {
  width: 14px !important;
  height: 14px !important;
}

/* Branch Management Dropdown */
.branch-mgmt-dropdown-wrap {
  position: relative;
}

.branch-mgmt-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 195px;
  background: #0f172a;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  padding: 6px;
  z-index: 9999;
}

.mgmt-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  text-align: right;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.mgmt-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.mgmt-menu-item.active {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}

/* Left Zone: Header Status Panel */
.header-status-panel {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

/* Consolidated Operational Status Capsule */
.status-capsule {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 12px !important;
  border-radius: 9999px !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(51, 65, 85, 0.7) !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  height: 32px !important;
}

.status-capsule-clock {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #34d399;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
}

.status-separator {
  color: #475569;
  user-select: none;
}

#pos-header-shift-label {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 12px;
}

/* Compact User Profile Dropdown */
.pos-user-dropdown-wrap {
  position: relative;
}

.pos-user-menu-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 34px !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  background: rgba(30, 41, 59, 0.9) !important;
  border: 1px solid rgba(51, 65, 85, 0.8) !important;
  font-size: 12px !important;
  color: #e2e8f0 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.pos-user-menu-btn:hover {
  background: rgba(51, 65, 85, 0.9) !important;
  border-color: rgba(71, 85, 105, 0.9) !important;
}

.pos-user-avatar-mini {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.pos-user-avatar-mini svg {
  width: 13px;
  height: 13px;
}

#pos-user-display-name {
  font-weight: 600;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-caret-icon {
  width: 12px;
  height: 12px;
  color: #94a3b8;
}

.pos-user-menu-dropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  width: 224px;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid rgba(51, 65, 85, 0.9);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  padding: 8px;
  z-index: 9999;
  box-sizing: border-box;
}

.user-menu-header {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  margin-bottom: 4px;
}

.user-menu-fullname {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
}

.user-menu-code {
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  color: #f59e0b;
  margin-top: 2px;
}

.user-menu-item {
  width: 100%;
  text-align: right;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 6px;
  color: #cbd5e1;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.user-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.user-menu-divider {
  margin: 4px 0;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
}

.user-menu-item.logout {
  color: #fb7185;
}

.user-menu-item.logout:hover {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
}

/* Guarantee 0 wrap on 1024px+ */
@media (min-width: 1024px) {
  .pos-navbar, .pos-header {
    flex-wrap: nowrap !important;
  }
  .pos-navbar .nav-tabs {
    flex-wrap: nowrap !important;
  }
  .header-status-panel {
    flex-wrap: nowrap !important;
  }
}

/* ==========================================================================
   GLOBAL DARK THIN SCROLLBARS & SEARCH INPUT EXECUTIVE GLASS / AUTOFILL FIX
   ========================================================================== */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.22) transparent;
}
*::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.38);
}
*::-webkit-scrollbar-corner {
  background: transparent;
}
.upsell-strip::-webkit-scrollbar,
.category-tabs::-webkit-scrollbar,
.category-filter-pills::-webkit-scrollbar,
.cart-upsell-chips-container::-webkit-scrollbar {
  display: none;
}

.menu-top-toolbar .search-input-box {
  background: rgba(15, 23, 42, 0.9) !important;
  border: none !important;
  border-radius: 12px;
  height: 42px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.menu-top-toolbar .search-input-box svg {
  right: 14px;
  stroke: #94a3b8;
  z-index: 2;
}

#pos-search-input,
.menu-top-toolbar .search-input {
  background: rgba(15, 23, 42, 0.9) !important;
  background-color: rgba(15, 23, 42, 0.9) !important;
  color: #f8fafc !important;
  caret-color: #f59e0b !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 12px;
  height: 42px;
  padding: 0 14px;
  padding-inline-start: 38px;
  box-sizing: border-box;
  font-family: 'Cairo', sans-serif !important;
  color-scheme: dark;
  -webkit-appearance: none;
  appearance: none;
}

#pos-search-input:focus,
.menu-top-toolbar .search-input:focus {
  outline: none !important;
  border-color: rgba(245, 158, 11, 0.65) !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.16) !important;
  background: rgba(15, 23, 42, 0.95) !important;
  color: #f8fafc !important;
}

#pos-search-input::placeholder,
.search-input::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}

#pos-search-input:-webkit-autofill,
#pos-search-input:-webkit-autofill:hover,
#pos-search-input:-webkit-autofill:focus,
#pos-search-input:-webkit-autofill:active,
.search-input:-webkit-autofill,
.search-input:-webkit-autofill:hover,
.search-input:-webkit-autofill:focus,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
  box-shadow: 0 0 0 1000px #0f172a inset !important;
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: #f59e0b !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  transition: background-color 999999s ease-in-out 0s;
}

/* Dedicated Cashier Sales Dark-Glass Camera Button & BOM Meal Code Badge */
.btn-cashier-camera-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  color: #f8fafc !important;
  font-family: 'Cairo', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.btn-cashier-camera-dark svg {
  stroke: #38bdf8;
  flex-shrink: 0;
}

.btn-cashier-camera-dark:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.28);
  transform: translateY(-1px);
}

.btn-cashier-camera-dark:active {
  transform: translateY(0);
}

.recipe-meal-code-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  line-height: 1.3;
  flex-shrink: 0;
}

/* ==========================================================================
   WH-2 BRANCH FRIDGE RECEIVING REVIEW & COMPACT FINTECH STOCK (#tab-inventory)
   Zero Unicode Emojis - Cairo Font - Section 8 Mobile-First (<768px)
   ========================================================================== */
.wh2-receiving-screen {
  padding: 1rem 1.25rem 1.5rem;
  gap: 1rem;
  background: var(--bg-primary);
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
  font-family: 'Cairo', sans-serif !important;
}

.wh2-receiving-screen *,
.wh2-receiving-screen button,
.wh2-receiving-screen input,
.wh2-receiving-screen code {
  font-family: 'Cairo', sans-serif !important;
}

/* 1. Compact Top QR/Barcode Transfer Manifest Lookup Bar */
.wh2-lookup-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
  width: 100%;
}

.wh2-lookup-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

.wh2-lookup-icon {
  position: absolute;
  right: 12px;
  color: #f59e0b;
  pointer-events: none;
}

.wh2-lookup-input {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 12px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.88);
  border: 1.5px dashed rgba(245, 158, 11, 0.55);
  color: #f8fafc;
  font-size: 0.85rem;
  font-weight: 700;
  box-sizing: border-box;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.wh2-lookup-input::placeholder {
  color: #64748b;
}

.wh2-lookup-input:focus {
  outline: none;
  border-style: solid;
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.18);
}

.wh2-lookup-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.wh2-camera-btn {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(56, 189, 248, 0.55) !important;
  color: #f8fafc !important;
  padding: 0 14px !important;
  height: 42px;
  border-radius: 10px;
  font-size: 0.82rem !important;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
}

.wh2-camera-btn svg {
  stroke: #38bdf8 !important;
  flex-shrink: 0;
}

.wh2-camera-btn:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.24);
}

/* 2. Strict Read-Only Incoming Shipment Acceptance / Rejection Banner */
.wh2-incoming-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(11, 17, 32, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.wh2-incoming-banner.has-pending-shipments {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.97));
  border: 1px solid rgba(245, 158, 11, 0.55);
  box-shadow: 0 8px 26px rgba(245, 158, 11, 0.12), inset 0 1px 0 rgba(251, 191, 36, 0.14);
}

.wh2-incoming-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.wh2-incoming-banner-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 280px;
}

.wh2-incoming-pulse-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #64748b;
  flex-shrink: 0;
}

.wh2-incoming-banner.has-pending-shipments .wh2-incoming-pulse-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.24), 0 0 12px #f59e0b;
  animation: wh2BannerPulse 1.8s infinite;
}

@keyframes wh2BannerPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: 0.72; }
}

.wh2-incoming-banner-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.3;
}

.wh2-incoming-banner.has-pending-shipments .wh2-incoming-banner-title {
  color: #fbbf24;
}

.wh2-incoming-banner-title svg {
  flex-shrink: 0;
  color: #f59e0b;
}

.wh2-incoming-banner-sub {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

.wh2-incoming-banner-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.wh2-pending-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  white-space: nowrap;
}

.wh2-pending-count-pill.has-pending {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.65);
  color: #fbbf24;
}

.wh2-incoming-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
  gap: 12px;
}

.wh2-no-pending-shipments {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
}

.wh2-no-pending-shipments svg {
  color: #10b981;
  flex-shrink: 0;
}

.wh2-shipment-card {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: 13px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wh2-shipment-card.highlighted {
  border-color: #10b981;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.98));
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.28), 0 10px 26px rgba(16, 185, 129, 0.18);
}

.wh2-shipment-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wh2-shipment-id-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.wh2-shipment-top-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.wh2-shipment-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
}

.wh2-shipment-card.highlighted .wh2-shipment-status-dot {
  background: #10b981;
}

.wh2-shipment-code {
  font-size: 0.92rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.3px;
}

.wh2-shipment-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.wh2-shipment-time {
  font-size: 0.73rem;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
}

.wh2-btn-inspect-shipment {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
  cursor: pointer;
}

.wh2-btn-inspect-shipment:hover {
  border-color: #f59e0b;
  color: #fbbf24;
}

.wh2-shipment-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.wh2-shipment-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #38bdf8;
}

.wh2-shipment-pill.packs {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.32);
  color: #34d399;
}

.wh2-shipment-pill.weight {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.32);
  color: #fbbf24;
}

.wh2-readonly-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  padding: 2px 7px;
}

/* Strict Read-Only Manifest List */
.wh2-shipment-manifest-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 215px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.wh2-manifest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.wh2-manifest-item-info {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.wh2-manifest-code {
  font-size: 0.69rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fbbf24;
  white-space: nowrap;
  flex-shrink: 0;
}

.wh2-manifest-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wh2-manifest-qty-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  white-space: nowrap;
}

.wh2-manifest-op-qty {
  font-size: 0.8rem;
  font-weight: 900;
  color: #38bdf8;
}

.wh2-manifest-pack-qty {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

.wh2-manifest-empty {
  text-align: center;
  font-size: 0.76rem;
  color: #94a3b8;
  padding: 8px;
}

/* Quick Issue Tags & Notes Input */
.wh2-shipment-review-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wh2-issue-tags-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

.wh2-issue-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wh2-issue-tag-pill {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.wh2-issue-tag-pill:hover {
  border-color: rgba(245, 158, 11, 0.55);
  color: #f8fafc;
}

.wh2-issue-tag-pill.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
  font-weight: 800;
}

.wh2-shipment-note-input {
  width: 100%;
  min-height: 38px;
  padding: 7px 11px;
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 600;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wh2-shipment-note-input::placeholder {
  color: #64748b;
}

.wh2-shipment-note-input:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.16);
}

.wh2-shipment-note-input.note-required-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.26);
}

/* Accept / Reject Decision Buttons */
.wh2-shipment-decision-actions {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 8px;
}

.wh2-btn-accept-shipment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(52, 211, 153, 0.65);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #022c22;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.wh2-btn-accept-shipment:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}

.wh2-btn-reject-shipment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.65);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.wh2-btn-reject-shipment:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2);
  border-color: #f87171;
  color: #fee2e2;
}

.wh2-btn-accept-shipment:disabled,
.wh2-btn-reject-shipment:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 3. Always-Visible 17-Item WH-2 Fridge Stock Sleek Compact Fintech Card Grid */
.wh2-fridge-stock-section {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
}

.wh2-fridge-stock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.wh2-fridge-stock-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wh2-fridge-stock-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
}

.wh2-fridge-stock-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.wh2-stock-summary-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
  white-space: nowrap;
}

.wh2-stock-summary-pill.optimal {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.wh2-stock-summary-pill.low {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.wh2-stock-summary-pill.out {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

.wh2-stock-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.wh2-stock-card {
  background: rgba(11, 17, 32, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  box-sizing: border-box;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.wh2-stock-card:hover {
  transform: translateY(-1px);
}

.wh2-stock-card.status-optimal {
  border-color: rgba(16, 185, 129, 0.3);
}

.wh2-stock-card.status-low {
  border-color: rgba(245, 158, 11, 0.45);
}

.wh2-stock-card.status-out {
  border-color: rgba(239, 68, 68, 0.36);
}

.wh2-stock-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.wh2-stock-card-title {
  font-size: 0.83rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wh2-stock-card-code {
  font-size: 0.69rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: #fbbf24;
  white-space: nowrap;
  flex-shrink: 0;
}

.wh2-stock-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wh2-stock-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.wh2-stock-hero-val {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
}

.wh2-stock-status-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.wh2-stock-status-pill.optimal {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.36);
  color: #34d399;
}

.wh2-stock-status-pill.low {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: #fbbf24;
}

.wh2-stock-status-pill.out {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.38);
  color: #f87171;
}

.wh2-stock-progress-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.wh2-stock-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.wh2-stock-progress-fill.optimal {
  background: #10b981;
}

.wh2-stock-progress-fill.low {
  background: #f59e0b;
}

.wh2-stock-progress-fill.out {
  background: #ef4444;
}

.wh2-stock-card-footer {
  font-size: 0.71rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 5px;
  border-top: 1px dashed rgba(148, 163, 184, 0.14);
}

/* ==========================================================================
   WH-2 SECTION 8 MOBILE-FIRST RESPONSIVE (<768px)
   ========================================================================== */
@media (max-width: 768px) {
  .wh2-receiving-screen {
    padding: 10px !important;
    gap: 10px !important;
    height: auto !important;
    overflow-x: hidden !important;
  }

  .wh2-lookup-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  .wh2-lookup-input-wrap,
  .wh2-lookup-actions {
    width: 100% !important;
  }

  .wh2-lookup-input {
    width: 100% !important;
    font-size: 0.8rem !important;
  }

  .wh2-incoming-banner {
    padding: 10px 12px !important;
  }

  .wh2-incoming-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .wh2-manifest-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
  }

  .wh2-manifest-name {
    white-space: normal !important;
  }

  .wh2-manifest-qty-group {
    justify-content: flex-end !important;
  }

  .wh2-shipment-decision-actions {
    grid-template-columns: 1fr !important;
  }

  .wh2-fridge-stock-section {
    padding: 10px !important;
    gap: 10px !important;
  }

  .wh2-stock-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .wh2-stock-card {
    padding: 9px 10px !important;
    gap: 6px !important;
  }

  .wh2-stock-card-title {
    font-size: 0.75rem !important;
  }

  .wh2-stock-hero-val {
    font-size: 0.96rem !important;
  }

  .wh2-stock-card-footer {
    font-size: 0.65rem !important;
    white-space: normal !important;
    line-height: 1.3 !important;
  }
}

/* ============================================================================
   STAFF, COURIERS & SHIFT OPERATIONS HUB (#tab-staff-ops)
   ============================================================================ */
.staff-ops-container {
  background: var(--bg-primary, #020617);
  padding: 16px;
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
}

.staff-ops-shell {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

.staff-ops-header-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}

.staff-ops-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.staff-ops-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.staff-ops-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.staff-ops-main-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
}

.staff-ops-subtitle {
  margin: 2px 0 0 0;
  font-size: 0.82rem;
  color: #94a3b8;
}

.staff-ops-branch-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  font-size: 0.8rem;
  font-weight: 700;
}

.staff-ops-subtabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.staff-ops-subtab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.staff-ops-subtab:hover {
  border-color: rgba(245, 158, 11, 0.4);
  color: #f8fafc;
}

.staff-ops-subtab.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.55);
  color: #f59e0b;
  font-weight: 800;
}

.staff-ops-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.staff-ops-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  box-sizing: border-box;
  margin-bottom: 0 !important;
}

.staff-ops-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.staff-ops-card-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
}

.staff-ops-hint-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: 999px;
}

.staff-ops-count-pill {
  font-size: 0.78rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 3px 10px;
  border-radius: 999px;
}

.staff-ops-scanner-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.staff-ops-scanner-bar .pos-scanner-input {
  flex: 1 1 auto;
  min-width: 0;
}

.staff-ops-scanner-bar .pos-scanner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.staff-ops-feedback {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
}

.staff-ops-feedback.success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.staff-ops-feedback.error {
  background: rgba(220, 38, 38, 0.14);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #f87171;
}

.staff-ops-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.staff-ops-kpi-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.staff-ops-kpi-card .kpi-label {
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 600;
}

.staff-ops-kpi-card .kpi-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
}

.staff-ops-kpi-card .text-emerald { color: #10b981; }
.staff-ops-kpi-card .text-gold { color: #f59e0b; }
.staff-ops-kpi-card .text-info { color: #38bdf8; }
.staff-ops-kpi-card .text-crimson { color: #f87171; }

.staff-ops-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.staff-ops-list-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}

.staff-ops-present-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  cursor: pointer;
}

.staff-ops-present-row:hover {
  border-color: rgba(16, 185, 129, 0.6);
}

.staff-ops-roster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
}

.staff-ops-roster-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  text-align: right;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.staff-ops-roster-card:hover {
  border-color: rgba(245, 158, 11, 0.55);
}

.staff-ops-roster-card.is-present {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
}

.staff-ops-roster-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.staff-ops-code-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 7px;
  border-radius: 6px;
}

.staff-ops-status-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.staff-ops-status-pill.in {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
}

.staff-ops-status-pill.out {
  background: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
}

.staff-ops-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.staff-ops-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}

.staff-ops-form-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.staff-ops-field-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.staff-ops-field-block label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
}

.staff-ops-row-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.staff-ops-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-ops-pill {
  padding: 7px 12px;
  border-radius: 999px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.staff-ops-pill.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fbbf24;
  font-weight: 800;
}

.staff-ops-unit-display {
  padding: 10px 12px;
  border-radius: 8px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f59e0b;
  font-weight: 800;
  font-size: 0.85rem;
}

.staff-ops-primary-btn,
.staff-ops-danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  border: none;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  width: 100%;
}

.staff-ops-primary-btn {
  background: #f59e0b;
  color: #0b1120;
}

.staff-ops-primary-btn:hover {
  background: #fbbf24;
}

.staff-ops-danger-btn {
  background: #dc2626;
  color: #ffffff;
}

.staff-ops-danger-btn:hover {
  background: #ef4444;
}

.staff-ops-courier-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.staff-ops-courier-card {
  background: #1e293b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.staff-ops-courier-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.staff-ops-courier-due {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.84rem;
  font-weight: 800;
  color: #34d399;
}

.staff-ops-settle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 9px;
  background: #10b981;
  color: #022c22;
  border: none;
  font-weight: 800;
  font-size: 0.84rem;
  cursor: pointer;
  width: 100%;
}

.staff-ops-drawer-close-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.staff-ops-expected-box,
.staff-ops-actual-box {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.staff-ops-expected-label {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 700;
}

.staff-ops-expected-val {
  font-size: 1.55rem;
  font-weight: 800;
  color: #f59e0b;
}

.staff-ops-expected-formula {
  font-size: 0.74rem;
  color: #64748b;
}

.staff-ops-actual-input {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
}

.staff-ops-variance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
}

.staff-ops-variance-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
}

.staff-ops-variance-pill.match {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

.staff-ops-variance-pill.short {
  background: rgba(220, 38, 38, 0.18);
  color: #f87171;
}

.staff-ops-variance-pill.over {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.staff-ops-variance-pill.neutral {
  background: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
}

.staff-ops-empty {
  text-align: center;
  padding: 18px 12px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .staff-ops-container {
    padding: 10px !important;
  }

  .staff-ops-subtabs {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .staff-ops-subtab {
    padding: 9px 8px !important;
    font-size: 0.78rem !important;
  }

  .staff-ops-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .staff-ops-grid-2,
  .staff-ops-courier-cards,
  .staff-ops-drawer-close-grid,
  .staff-ops-row-2col,
  .staff-ops-roster-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .staff-ops-scanner-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .staff-ops-scanner-bar .pos-scanner-input {
    width: 100% !important;
  }

  .staff-ops-scanner-bar .pos-scanner-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }
}

/* ============================================================================
   KDS ORDER NOTES BANNER & ITEM ADD-ONS
   ============================================================================ */
.kds-order-notes-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  background: rgba(245, 158, 11, 0.16);
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  border-radius: 8px;
  color: #fde68a;
  font-size: 0.85rem;
  line-height: 1.45;
}

.kds-order-notes-banner svg {
  flex-shrink: 0;
  stroke: #f59e0b;
  margin-top: 2px;
}

.kds-order-notes-banner strong {
  color: #fbbf24;
  font-weight: 800;
  margin-left: 4px;
}

.kds-delivery-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 5px 8px;
  margin-bottom: 8px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 6px;
  color: #bae6fd;
  font-size: 0.78rem;
  font-weight: 600;
}

.kds-item-addons-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 1.25rem 6px 0;
}

.kds-item-addon-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  font-size: 0.74rem;
  font-weight: 700;
}

/* ============================================================================
   DEDICATED DELIVERY & DISPATCH SCREEN (#tab-delivery-dispatch)
   ============================================================================ */
.delivery-dispatch-container {
  background: var(--bg-primary, #020617);
  padding: 16px;
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
}

.dispatch-driver-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dispatch-default-driver-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 800;
}

.dispatch-driver-select {
  min-width: 210px;
  height: 38px;
  font-size: 0.82rem;
  font-weight: 700;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  padding: 0 10px;
}

.dispatch-refresh-btn {
  padding: 7px 14px !important;
  height: 38px;
}

.dispatch-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.staff-ops-kpi-card .text-orange {
  color: #fb923c;
}

.dispatch-pill-preparing {
  color: #fb923c !important;
  background: rgba(251, 146, 60, 0.14) !important;
  border-color: rgba(251, 146, 60, 0.38) !important;
}

.dispatch-kitchen-panel {
  border-color: rgba(251, 146, 60, 0.28);
}

.dispatch-preparing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 10px;
}

.dispatch-preparing-card {
  background: rgba(15, 23, 42, 0.72);
  border: 1px dashed rgba(251, 146, 60, 0.35);
  border-radius: 10px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.dispatch-preparing-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.dispatch-preparing-zone {
  font-size: 0.78rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dispatch-preparing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 0.75rem;
}

.dispatch-kitchen-elapsed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fdba74;
  font-weight: 700;
}

.dispatch-preparing-driver {
  color: #94a3b8;
  font-weight: 600;
}

.dispatch-preparing-driver.is-assigned {
  color: #38bdf8;
  font-weight: 700;
}

.dispatch-pill-ready {
  color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.14) !important;
  border-color: rgba(245, 158, 11, 0.38) !important;
}

.dispatch-pill-out {
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.14) !important;
  border-color: rgba(56, 189, 248, 0.38) !important;
}

.dispatch-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dispatch-order-card {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.dispatch-order-card.is-ready {
  border-color: rgba(245, 158, 11, 0.45);
}

.dispatch-order-card.is-out {
  border-color: rgba(56, 189, 248, 0.45);
}

.dispatch-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.dispatch-order-num-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dispatch-order-num {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 900;
  color: #fbbf24;
}

.dispatch-seq-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.dispatch-status-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}

.dispatch-status-badge.ready {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.38);
}

.dispatch-status-badge.preparing {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.38);
}

.dispatch-status-badge.out {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.38);
}

.dispatch-customer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: #f8fafc;
}

.dispatch-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  direction: ltr;
}

.dispatch-phone-link:hover {
  background: rgba(56, 189, 248, 0.22);
}

.dispatch-address-box {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.82rem;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  padding: 7px 10px;
}

.dispatch-address-box svg {
  flex-shrink: 0;
  margin-top: 2px;
  stroke: #f59e0b;
}

.dispatch-notes-box {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fde68a;
  font-size: 0.8rem;
  font-weight: 700;
}

.dispatch-items-summary {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.5;
  padding: 4px 2px;
}

.dispatch-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dispatch-cod-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dispatch-cod-label {
  font-size: 0.72rem;
  color: #94a3b8;
}

.dispatch-cod-amount {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 900;
  color: #34d399;
}

.dispatch-driver-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-size: 0.76rem;
  font-weight: 800;
}

.btn-dispatch-out {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #020617;
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.btn-dispatch-out:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* Branch Delivery Dispatch Hub: Driver Availability Strip & Cash Custody */
.dispatch-drivers-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.dispatch-driver-chip {
  flex: 1 1 210px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.14s ease, background 0.16s ease;
}

.dispatch-driver-chip:hover {
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
}

.dispatch-driver-chip.is-available {
  border-right: 3px solid #10b981;
}

.dispatch-driver-chip.is-busy {
  border-right: 3px solid #38bdf8;
}

.dispatch-driver-chip.is-selected {
  background: rgba(245, 158, 11, 0.14);
  border-color: #f59e0b;
}

.dispatch-driver-chip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dispatch-driver-chip-name {
  color: #f8fafc;
  font-size: 0.88rem;
  font-weight: 800;
}

.dispatch-driver-chip-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.85);
  padding: 2px 6px;
  border-radius: 5px;
}

.dispatch-driver-chip-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.dispatch-driver-status-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.dispatch-driver-status-pill.is-available {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.dispatch-driver-status-pill.is-busy {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.dispatch-driver-cash-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: #94a3b8;
}

.dispatch-driver-cash-pill.has-custody {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.dispatch-inline-assign-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

.dispatch-inline-driver-select {
  flex: 1 1 165px;
  min-width: 150px;
  font-size: 0.82rem;
  padding: 8px 10px;
}

.dispatch-inline-assign-row .btn-dispatch-out {
  flex: 1 1 165px;
  width: auto;
}

.btn-dispatch-delivered {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #f8fafc;
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.btn-dispatch-delivered:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.dispatch-pending-cash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.dispatch-order-card.is-pending-cash {
  border-right: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.06);
}

.dispatch-status-badge.pending-cash,
.dispatch-pill-pending-cash {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.dispatch-pending-cash-meta {
  font-size: 0.82rem;
  color: #cbd5e1;
}

.dispatch-cod-amount.is-custody-amt {
  color: #fbbf24;
  font-size: 1.15rem;
}

.btn-dispatch-out:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-dispatch-settle {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #020617;
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.btn-dispatch-settle:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-dispatch-settle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Delivery Cycle v72: Stage Filter Bar & Per-Driver Cash Handover Summary Cards */
.dispatch-stage-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dispatch-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
  font-family: 'Cairo', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dispatch-stage-pill:hover {
  border-color: rgba(245, 158, 11, 0.5);
  color: #f8fafc;
}

.dispatch-stage-pill.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: #f59e0b;
  color: #fbbf24;
}

.dispatch-stage-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 800;
}

.dispatch-stage-pill.active .dispatch-stage-pill-count {
  background: #f59e0b;
  color: #020617;
}

.dispatch-driver-settlement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}

.dispatch-settlement-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.dispatch-settlement-card.has-unsettled {
  border-color: rgba(245, 158, 11, 0.45);
  border-right: 4px solid #f59e0b;
}

.dispatch-settlement-card.is-clear {
  border-right: 4px solid #10b981;
}

.dispatch-settlement-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.dispatch-settlement-driver-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dispatch-settlement-driver-name {
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 800;
}

.dispatch-settlement-model-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

.dispatch-settlement-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dispatch-settlement-count-chip {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.dispatch-settlement-count-chip.is-active {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.dispatch-settlement-count-chip.is-unsettled {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
}

.dispatch-settlement-count-chip.is-settled {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.dispatch-settlement-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dispatch-settlement-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dispatch-settlement-metric.is-highlight {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}

.dispatch-settlement-metric.is-fee {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.32);
}

.dispatch-settlement-metric-label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 700;
}

.dispatch-settlement-metric-val {
  font-size: 0.96rem;
  font-weight: 900;
  color: #f8fafc;
}

.dispatch-settlement-metric.is-highlight .dispatch-settlement-metric-val {
  color: #34d399;
}

.dispatch-settlement-metric.is-fee .dispatch-settlement-metric-val {
  color: #fbbf24;
}

.dispatch-order-finance-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 6px 8px;
}

.dispatch-order-finance-row span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dispatch-order-finance-sep {
  color: #475569;
}

.btn-dispatch-stage-advance {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-family: 'Cairo', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dispatch-stage-advance:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.26);
  transform: translateY(-1px);
}

.btn-dispatch-stage-advance.is-ready-btn {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
}

.btn-dispatch-stage-advance.is-ready-btn:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.26);
}

.btn-dispatch-stage-advance:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dispatch-status-badge.created {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Z-Closeout Delivery Cash Reconciliation Strip */
.shift-delivery-reconcile-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 1rem;
  padding: 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(245, 158, 11, 0.24);
}

.shift-reconcile-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.55);
}

.shift-reconcile-label {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 700;
}

.shift-reconcile-val {
  font-size: 0.98rem;
  font-weight: 900;
  color: #f8fafc;
}

@media (max-width: 900px) {
  .shift-delivery-reconcile-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .dispatch-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .delivery-dispatch-container {
    padding: 10px;
  }

  .dispatch-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dispatch-driver-controls {
    width: 100%;
  }

  .dispatch-driver-select {
    flex: 1 1 100%;
    min-width: 0;
  }
}

/* Fast Sandwich Add-on Chips on POS Cart Rows (CC-4001 - CC-4004) */
.cart-addons-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px dashed rgba(148, 163, 184, 0.2);
}

.cart-addon-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.55);
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.25;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.cart-addon-chip:hover {
  border-color: rgba(245, 158, 11, 0.65);
  color: #fde68a;
}

.cart-addon-chip.active {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
  color: #fef3c7;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}

.cart-addon-chip-price {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 800;
  color: #fbbf24;
}

.cart-item-addons-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}

.cart-item-addon-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 1px 6px;
  border-radius: 999px;
}

/* ============================================================================
   DEDICATED CUSTOMER SERVICE (WHATSAPP & PHONE ORDERS) SCREEN (#tab-customer-service)
   Dark #020617 / #0f172a + #f59e0b Enterprise Call Center Styling
   ============================================================================ */
.customer-service-container {
  background: #020617;
  padding: 16px;
}

.cs-shell {
  max-width: 1480px;
  margin: 0 auto;
  width: 100%;
}

.cs-header-card {
  background: linear-gradient(145deg, #0f172a, #020617) !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
}

.cs-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cs-dispatch-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px !important;
  background: rgba(245, 158, 11, 0.14) !important;
  border: 1px solid rgba(245, 158, 11, 0.42) !important;
  color: #fbbf24 !important;
  font-weight: 800;
}

.cs-dispatch-jump-btn:hover {
  background: rgba(245, 158, 11, 0.24) !important;
}

.cs-workspace-grid {
  display: grid;
  grid-template-columns: minmax(410px, 1.05fr) minmax(420px, 1.15fr);
  gap: 16px;
  align-items: start;
}

.cs-crm-panel,
.cs-menu-panel,
.cs-log-card {
  background: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 14px;
}

.cs-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.65);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.cs-reset-btn:hover {
  border-color: rgba(245, 158, 11, 0.55);
  color: #fbbf24;
}

.cs-channel-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.cs-channel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #020617;
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}

.cs-channel-btn.active.is-whatsapp {
  background: rgba(16, 185, 129, 0.16);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.cs-channel-btn.active.is-phone {
  background: rgba(245, 158, 11, 0.16);
  border-color: #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}

.cs-phone-lookup-block {
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.cs-field-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  color: #cbd5e1;
  margin-bottom: 5px;
}

.cs-phone-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cs-input {
  width: 100%;
  background: #020617;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  color: #f8fafc;
  padding: 8px 11px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.cs-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.18);
}

.cs-phone-input {
  direction: ltr;
  text-align: left;
  font-family: var(--font-mono, monospace);
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.cs-lookup-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 39px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #020617;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
}

.cs-lookup-btn:hover {
  filter: brightness(1.08);
}

.cs-crm-banner {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.cs-crm-banner.is-returning {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #6ee7b7;
}

.cs-crm-banner.is-new {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fde68a;
}

.cs-crm-banner.is-loading {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

.cs-reorder-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  font-size: 0.74rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}

.cs-reorder-btn:hover {
  background: rgba(245, 158, 11, 0.3);
}

.cs-crm-history-box {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 112px;
  overflow-y: auto;
}

.cs-crm-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 0.74rem;
  color: #cbd5e1;
}

.cs-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.cs-field {
  margin-bottom: 10px;
}

.cs-form-grid .cs-field {
  margin-bottom: 0;
}

.cs-textarea {
  resize: vertical;
  min-height: 54px;
}

.cs-select {
  cursor: pointer;
}

.cs-cart-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.cs-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  color: #f8fafc;
}

.cs-cart-count-pill {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fbbf24;
  font-size: 0.74rem;
  font-weight: 800;
}

.cs-cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.cs-cart-empty {
  text-align: center;
  padding: 18px 10px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.6);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  font-size: 0.82rem;
}

.cs-cart-item {
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 8px 10px;
}

.cs-cart-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cs-cart-item-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: #f8fafc;
}

.cs-cart-item-price {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 800;
  color: #fbbf24;
  white-space: nowrap;
}

.cs-cart-qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cs-qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cs-qty-btn:hover {
  border-color: #f59e0b;
  color: #fbbf24;
}

.cs-qty-btn.is-remove {
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.cs-qty-val {
  min-width: 22px;
  text-align: center;
  font-family: var(--font-mono, monospace);
  font-weight: 800;
  font-size: 0.84rem;
  color: #f8fafc;
}

.cs-totals-box {
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.cs-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.cs-total-row.cs-grand-total {
  padding-top: 7px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.98rem;
  font-weight: 900;
  color: #f8fafc;
}

.cs-total-row.cs-grand-total strong {
  color: #34d399;
  font-size: 1.08rem;
}

.cs-submit-order-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #020617;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.cs-submit-order-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.cs-submit-order-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Fast Menu Picker Column */
.cs-menu-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.cs-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cs-search-wrap svg {
  position: absolute;
  right: 11px;
  stroke: #94a3b8;
  pointer-events: none;
}

.cs-search-input {
  padding-right: 34px !important;
}

.cs-cat-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cs-cat-pill,
.cs-filter-pill {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #020617;
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.cs-cat-pill.active,
.cs-filter-pill.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
}

.cs-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 9px;
  max-height: 610px;
  overflow-y: auto;
  padding-left: 2px;
}

.cs-menu-card {
  background: linear-gradient(160deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  transition: border-color 0.14s ease, transform 0.12s ease;
}

.cs-menu-card:hover {
  border-color: rgba(245, 158, 11, 0.65);
  transform: translateY(-1px);
}

.cs-menu-card-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.35;
}

.cs-menu-card-code {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  color: #64748b;
}

.cs-menu-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.cs-menu-card-price {
  font-family: var(--font-mono, monospace);
  font-size: 0.86rem;
  font-weight: 900;
  color: #fbbf24;
}

.cs-menu-card-add {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font-size: 1rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Follow-up Table */
.cs-log-head {
  flex-wrap: wrap;
  gap: 10px;
}

.cs-log-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cs-log-channel-tabs {
  display: flex;
  gap: 6px;
}

.cs-log-search {
  width: 230px;
  height: 34px;
  font-size: 0.8rem;
}

.cs-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.cs-followup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.cs-followup-table th {
  text-align: right;
  padding: 10px 10px;
  background: rgba(2, 6, 23, 0.85);
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  white-space: nowrap;
}

.cs-followup-table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  vertical-align: middle;
}

.cs-followup-table tbody tr:hover {
  background: rgba(30, 41, 59, 0.45);
}

.cs-empty-td {
  text-align: center !important;
  color: #94a3b8 !important;
  padding: 24px !important;
}

.cs-channel-badge,
.dispatch-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.cs-channel-badge.is-whatsapp,
.dispatch-source-badge.is-whatsapp {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #34d399;
}

.cs-channel-badge.is-phone,
.dispatch-source-badge.is-phone {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: #fbbf24;
}

.dispatch-source-badge.is-storefront {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #7dd3fc;
}

.dispatch-source-badge.is-pos {
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: #cbd5e1;
}

.cs-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.cs-status-pill.is-new {
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.42);
  color: #c084fc;
}

.cs-status-pill.is-kitchen {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: #fbbf24;
}

.cs-status-pill.is-driver {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #38bdf8;
}

.cs-status-pill.is-delivered {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #34d399;
}

.cs-action-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cs-quick-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  white-space: nowrap;
}

.cs-quick-action.is-call {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

.cs-quick-action.is-wa {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.cs-quick-action.is-dispatch {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.38);
  color: #fbbf24;
}

.cs-quick-action.is-ticket {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.36);
  color: #d8b4fe;
}

/* Sub-tabs & Alert Banner */
.cs-subtabs {
  margin-top: 12px;
}

.cs-subtab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f59e0b;
  color: #020617;
  font-size: 0.72rem;
  font-weight: 900;
  font-family: var(--font-mono, monospace);
}

.cs-subtab-badge.is-ticket {
  background: #ef4444;
  color: #ffffff;
}

.cs-pending-store-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fde68a;
  font-size: 0.84rem;
  font-weight: 800;
}

.cs-submit-feedback {
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.cs-submit-feedback.is-error {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.48);
  color: #fca5a5;
}

.cs-submit-feedback.is-success {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

/* Storefront Approval Queue & Driver Dispatch Controls */
.cs-storefront-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.cs-store-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-store-order-card {
  background: rgba(2, 6, 23, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-store-order-card.is-pending {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.18);
}

.cs-store-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.cs-store-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.cs-btn-approve {
  flex: 1;
  min-width: 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #020617;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.cs-btn-reject {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.cs-driver-assign-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cs-driver-inline-select {
  height: 32px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #020617;
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.76rem;
  min-width: 145px;
}

.cs-driver-assign-btn {
  height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #020617;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

/* Support Tickets Section */
.cs-tickets-grid {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.cs-ticket-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.cs-ticket-status-pill.is-open {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.cs-ticket-status-pill.is-in_progress {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.cs-ticket-status-pill.is-closed {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
}

/* Mobile Bottom Sheet Elements (Hidden on Desktop > 900px) */
.cs-sheet-handle-row,
.cs-sheet-close-btn,
.cs-mobile-bottom-bar,
.cs-mobile-sheet-backdrop {
  display: none;
}

@media (max-width: 1024px) {
  .cs-workspace-grid,
  .cs-storefront-split,
  .cs-tickets-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .customer-service-container {
    padding: 10px;
    padding-bottom: 84px;
  }

  /* Show Menu Picker cleanly on top; CRM/Cart becomes slide-up Bottom Sheet */
  .cs-crm-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 18px 18px 0 0;
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-bottom: none;
    background: #0f172a;
    box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.75);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s;
    margin: 0;
    padding-bottom: 24px;
  }

  .cs-crm-panel.cs-sheet-open {
    transform: translateY(0);
    visibility: visible;
  }

  .cs-sheet-handle-row {
    display: flex;
    justify-content: center;
    padding: 4px 0 10px;
    cursor: pointer;
  }

  .cs-sheet-drag-bar {
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
  }

  .cs-sheet-close-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 7px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
  }

  .cs-mobile-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 1100;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(245, 158, 11, 0.55);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    cursor: pointer;
  }

  .cs-mobile-bottom-bar.is-hidden {
    display: none;
  }

  .cs-mobile-bar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .cs-mobile-bar-channel {
    font-size: 0.72rem;
    font-weight: 800;
    color: #34d399;
  }

  .cs-mobile-bar-meta {
    font-family: var(--font-mono, monospace);
    font-size: 0.86rem;
    font-weight: 900;
    color: #f8fafc;
  }

  .cs-mobile-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #020617;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
  }

  .cs-mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1150;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(2px);
  }

  .cs-mobile-sheet-backdrop.cs-sheet-open {
    display: block;
  }

  .cs-form-grid {
    grid-template-columns: 1fr;
  }

  .cs-log-search {
    width: 100%;
  }

  .cs-menu-grid {
    grid-template-columns: repeat(2, 1fr);
    max-height: none;
  }
}

/* ============================================================================
   UNIFIED STAFF, ROLES, PERMISSIONS & DRIVERS MANAGEMENT HUB (#tab-staff-ops)
   ============================================================================ */
.staff-mgmt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.staff-mgmt-search-wrap {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
}

.staff-mgmt-search-input {
  width: 100%;
  min-height: 42px;
  background: #020617;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  color: #f8fafc;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 0.88rem;
}

.staff-mgmt-search-input:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.staff-mgmt-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  white-space: nowrap;
}

.staff-mgmt-filter-pills {
  margin-top: 4px;
}

.staff-mgmt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  margin-top: 6px;
}

.staff-mgmt-card {
  background: #0b1220;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.staff-mgmt-card:hover {
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.staff-mgmt-card.is-suspended {
  opacity: 0.72;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(15, 23, 42, 0.65);
}

.staff-mgmt-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.staff-mgmt-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #94a3b8;
}

.staff-mgmt-status-btn {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.staff-mgmt-status-btn.active {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.42);
}

.staff-mgmt-status-btn.active:hover {
  background: rgba(16, 185, 129, 0.24);
}

.staff-mgmt-status-btn.suspended {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.42);
}

.staff-mgmt-status-btn.suspended:hover {
  background: rgba(239, 68, 68, 0.24);
}

.staff-mgmt-perms-box {
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.staff-mgmt-perms-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.staff-mgmt-perms-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.staff-mgmt-perm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.staff-mgmt-perm-pill:hover {
  border-color: rgba(245, 158, 11, 0.5);
  color: #f8fafc;
}

.staff-mgmt-perm-pill.on {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.staff-mgmt-perm-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #475569;
  flex-shrink: 0;
}

.staff-mgmt-perm-pill.on .staff-mgmt-perm-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.staff-mgmt-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed rgba(148, 163, 184, 0.15);
}

.staff-mgmt-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.77rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
  flex: 1 1 auto;
}

.staff-mgmt-action-btn.primary {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.staff-mgmt-action-btn.primary:hover {
  background: rgba(245, 158, 11, 0.28);
}

.staff-mgmt-action-btn.secondary {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.staff-mgmt-action-btn.secondary:hover {
  background: rgba(56, 189, 248, 0.24);
}

.staff-mgmt-action-btn.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
  flex: 0 1 auto;
}

.staff-mgmt-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.24);
}

.staff-mgmt-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.staff-mgmt-mini-btn.in {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.staff-mgmt-mini-btn.in:hover {
  background: rgba(16, 185, 129, 0.26);
}

.staff-mgmt-mini-btn.out {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.42);
  color: #f87171;
}

.staff-mgmt-mini-btn.out:hover {
  background: rgba(239, 68, 68, 0.24);
}

/* Staff Add/Edit Modal & Role Presets */
.staff-editor-modal-card {
  width: min(760px, 95vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.staff-editor-modal-body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.staff-mgmt-next-code-banner {
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed rgba(245, 158, 11, 0.45);
  border-radius: 10px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
  color: #fde68a;
}

.staff-mgmt-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.staff-mgmt-preset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #020617;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}

.staff-mgmt-preset-btn:hover {
  border-color: rgba(245, 158, 11, 0.55);
  color: #f8fafc;
}

.staff-mgmt-preset-btn.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35);
}

/* 80mm Staff Thermal ID Card Preview */
.staff-id-80mm-card {
  width: 300px;
  max-width: 100%;
  margin: 0 auto;
  background: #ffffff;
  color: #020617;
  border: 2px solid #020617;
  border-radius: 10px;
  padding: 16px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.staff-id-80mm-brand {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #0f172a;
  border-bottom: 2px solid #020617;
  padding-bottom: 6px;
}

.staff-id-80mm-code {
  font-family: var(--font-mono, monospace);
  font-size: 1.35rem;
  font-weight: 900;
  color: #020617;
  letter-spacing: 0.08em;
}

.staff-id-80mm-name {
  font-size: 1.08rem;
  font-weight: 900;
  color: #0f172a;
}

.staff-id-80mm-role {
  display: inline-block;
  margin: 0 auto;
  padding: 3px 12px;
  border-radius: 999px;
  background: #020617;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.staff-id-80mm-meta {
  font-size: 0.76rem;
  color: #334155;
  font-weight: 700;
}

.staff-id-80mm-barcode {
  margin-top: 6px;
  padding: 8px 6px 4px;
  border-top: 1px dashed #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.staff-id-80mm-barcode svg {
  max-width: 100%;
  height: auto;
}

/* Tab 3: Active Drivers Summary Grid */
.courier-drivers-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.courier-driver-summary-card {
  background: #0b1220;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.courier-driver-summary-card.has-active {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.06);
}

.courier-driver-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.courier-driver-summary-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  color: #cbd5e1;
  padding-top: 6px;
  border-top: 1px dashed rgba(148, 163, 184, 0.18);
}

@media (max-width: 768px) {
  .staff-mgmt-grid {
    grid-template-columns: 1fr;
  }

  .staff-mgmt-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .courier-drivers-summary-grid {
    grid-template-columns: 1fr;
  }
}


