/* 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;
}

/* 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-header, header {
  overflow: visible !important;
  position: relative !important;
  z-index: 50 !important;
}

.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;
  overflow: visible !important;
  z-index: 50 !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, #pos-user-dropdown-container {
  position: relative !important;
  display: inline-block !important;
  z-index: 60 !important;
}

.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;
}

/* Compact CEO & User Profile Dropdown Container */
#pos-user-menu-dropdown {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  right: 0 !important;
  left: auto !important;
  width: 270px !important;
  min-width: 270px !important;
  max-width: 270px !important;
  background-color: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  padding: 8px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4) !important;
  z-index: 99999 !important;
  box-sizing: border-box !important;
}

/* Enforce Strict 16px x 16px on ALL SVGs Inside the Dropdown */
#pos-user-menu-dropdown svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  margin: 0 !important;
}

/* User Profile Header */
#pos-user-menu-dropdown .dropdown-user-header {
  padding: 8px 12px 10px 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-bottom: 6px !important;
}

/* Action Rows */
#pos-user-menu-dropdown button,
#pos-user-menu-dropdown a {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-direction: row !important;
  gap: 10px !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #cbd5e1 !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  text-align: right !important;
  transition: all 0.15s ease !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

#pos-user-menu-dropdown button:hover,
#pos-user-menu-dropdown a:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #f8fafc !important;
}

#pos-user-menu-dropdown button.text-rose-400:hover {
  background-color: rgba(244, 63, 94, 0.12) !important;
  color: #fb7185 !important;
}

/* 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;
  }
}

/* ==========================================================
   FOODICS-STYLE EXECUTIVE POS SETTINGS & MENU CONTROL
   ========================================================== */

/* Executive Navigation Tabs Bar */
.pos-exec-tabs-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.pos-exec-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pos-exec-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.pos-exec-tab-btn.active {
  background: #f59e0b;
  color: #0b1120;
  border-color: #f59e0b;
}

/* Executive Tab Panes */
.pos-exec-tab-pane {
  display: none;
}

.pos-exec-tab-pane.active {
  display: block;
}

/* On-Grid Live Edit Mode Badge on Product Cards */
.pos-live-edit-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 10;
  background: #10b981;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  animation: pulse-edit 1.8s infinite;
}

@keyframes pulse-edit {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Mobile-Only Screens Menu Dropdown (Hidden on Desktop) */
#pos-screens-menu-dropdown {
  display: none;
}

.mobile-screens-caret {
  display: none;
}

.menu-card.pos-live-edit-active {
  outline: 2px dashed #10b981;
  outline-offset: -2px;
}

/* Executive Console Category Select Visibility Fix */
.exec-menu-cat-select,
.exec-item-category-select,
#table-exec-menu-items select,
.exec-menu-table-wrap select {
  color: #f8fafc !important;
  background-color: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 6px !important;
  padding: 6px 26px 6px 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  height: 36px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f8fafc' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left 8px center !important;
  cursor: pointer !important;
}

.exec-menu-cat-select option,
.exec-item-category-select option,
#table-exec-menu-items select option,
.exec-menu-table-wrap select option {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

/* Base styles for modern orders filter select */
.pos-orders-filter-select {
  background-color: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pos-orders-filter-select option {
  background-color: #1e293b;
  color: #f8fafc;
}

/* Menu Items Executive Table Styling */
.exec-menu-table-wrap table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.exec-item-thumb-btn {
  position: relative;
  width: 44px;
  height: 36px;
  border-radius: 5px;
  overflow: hidden;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exec-item-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.exec-item-thumb-btn:hover .exec-thumb-overlay {
  opacity: 1;
}

.exec-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  font-size: 10px;
}

/* Receipt Preview Box */
#exec-receipt-preview-box {
  background: #ffffff !important;
  color: #111827 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  border: 1px solid #e5e7eb;
}

#exec-receipt-preview-box .receipt-logo {
  max-width: 65px;
  margin: 0 auto 6px auto;
  display: block;
  filter: grayscale(100%) contrast(150%);
}

/* Cart Upsell Chips Dynamic Bar */
.cart-upsell-chips-container {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.upsell-chip {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.upsell-chip:hover {
  background: #f59e0b;
  color: #0b1120;
}

/* ==========================================================
   FULL-PAGE ARCHITECTURAL SVG DINING FLOOR PLAN (#tab-tables)
   ========================================================== */
.floor-plan-fullpage-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary, #0b1120);
  overflow: hidden;
}

.floor-plan-architectural-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.architectural-table-card {
  position: relative;
  background: rgba(15, 23, 42, 0.78);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  min-height: 220px;
  box-sizing: border-box;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  user-select: none;
}

.architectural-table-card:hover {
  transform: translateY(-2px);
}

.architectural-table-card.selected-table {
  box-shadow: 0 0 0 3px #f59e0b, 0 8px 24px rgba(0, 0, 0, 0.6);
  border-color: #f59e0b !important;
}

.architectural-table-card.status-available {
  border-color: rgba(16, 185, 129, 0.6);
  background: linear-gradient(165deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.architectural-table-card.status-occupied {
  border-color: rgba(244, 63, 94, 0.65);
  background: linear-gradient(165deg, rgba(244, 63, 94, 0.14) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.architectural-table-card.status-reserved {
  border-color: rgba(245, 158, 11, 0.75);
  background: linear-gradient(165deg, rgba(245, 158, 11, 0.15) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.architectural-table-card.status-cleaning {
  border-color: rgba(6, 182, 212, 0.65);
  background: linear-gradient(165deg, rgba(6, 182, 212, 0.14) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.arch-svg-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 105px;
  padding: 4px 0;
}

.arch-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arch-table-badge {
  font-family: var(--font-mono, monospace);
  font-weight: 900;
  font-size: 0.95rem;
  color: #f8fafc;
}

.arch-status-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.status-available .arch-status-pill {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-occupied .arch-status-pill {
  background: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.status-reserved .arch-status-pill {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-cleaning .arch-status-pill {
  background: rgba(6, 182, 212, 0.2);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.arch-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #94a3b8;
}

.arch-card-details {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.74rem;
  min-height: 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.btn-arch-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.76rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-arch-action.act-available {
  background: #10b981;
  color: #ffffff;
}

.btn-arch-action.act-available:hover {
  background: #059669;
}

.btn-arch-action.act-occupied {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.btn-arch-action.act-occupied:hover {
  background: #f43f5e;
  color: #ffffff;
}

.btn-arch-action.act-reserved {
  background: #f59e0b;
  color: #0b1120;
}

.btn-arch-action.act-reserved:hover {
  background: #d97706;
}

.btn-arch-action.act-cleaning {
  background: #06b6d4;
  color: #ffffff;
}

.btn-arch-action.act-cleaning:hover {
  background: #0891b2;
}

/* ==========================================================
   MOBILE & TABLET WAITER RESPONSIVE POS SYSTEM (< 1024px)
   ========================================================== */

/* Tablet Optimization (769px to 1024px) */
@media (max-width: 1024px) {
  #tab-pos .pos-cart-panel,
  .pos-cart-panel {
    width: 38% !important;
    flex: 0 0 38% !important;
    max-width: 38% !important;
  }

  .pos-layout-grid .pos-menu-panel,
  .pos-menu-panel {
    width: 62% !important;
    flex: 0 0 62% !important;
    max-width: 62% !important;
  }

  .menu-items-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
  }
}

/* Handheld Mobile Waiter Mode (<= 768px) */
@media (max-width: 768px) {
  :root {
    font-size: 13px !important;
  }

  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative !important;
  }

  /* Compact Header & Non-Clipping */
  .pos-header, header, .pos-navbar, .nav-tabs#pos-nav-tabs, .brand-section {
    overflow: visible !important;
    position: relative !important;
    z-index: 1000 !important;
  }

  .pos-navbar.pos-header,
  .pos-navbar,
  .pos-header,
  header#pos-header {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 0 10px !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .brand-section {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
  }

  .brand-section .brand-logo {
    max-height: 28px !important;
    height: 28px !important;
    width: auto !important;
  }

  .branch-selector-container {
    display: none !important;
  }

  /* Force desktop nav tabs to hide on mobile */
  .nav-tabs#pos-nav-tabs,
  .pos-navbar .nav-tabs,
  .nav-tabs,
  .pos-nav-tabs,
  .header-nav,
  .pos-nav,
  #pos-top-nav,
  .pos-nav-tab,
  #pos-nav-tabs .nav-tab-btn {
    display: none !important;
  }

  /* Center mobile screen switcher */
  .pos-screens-dropdown-wrap,
  #pos-screens-dropdown-wrap,
  #mobile-screens-dropdown-wrap {
    position: relative !important;
    overflow: visible !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    width: auto !important;
    min-width: 0 !important;
  }

  .nav-tabs#pos-nav-tabs::-webkit-scrollbar {
    display: none !important;
  }

  /* Avatar Profile Button on Left */
  .header-status-panel {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex: 0 0 auto !important;
  }

  .pos-header-right-meta #pos-network-status,
  .pos-header-right-meta .text-slate-600,
  .pos-header-right-meta #pos-header-shift-label {
    display: none !important;
  }

  #btn-pos-user-menu,
  .pos-user-menu-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    border-radius: 50% !important;
  }

  /* Scoped Full-Width Mobile View Panels Layout */
  .view-panel:not(.active),
  #tab-pos:not(.active) {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  .view-panel.active {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  #tab-pos.active,
  #tab-pos.view-panel.active {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .main-view-container {
    height: calc(100dvh - 50px) !important;
    max-height: calc(100dvh - 50px) !important;
    overflow: hidden !important;
  }

  /* Full-Width Touch Menu */
  .pos-layout-grid .pos-menu-panel,
  .pos-menu-panel {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    height: 100% !important;
    padding-bottom: 74px !important; /* Clears sticky bottom bar */
  }

  .menu-top-toolbar {
    padding: 0.4rem 0.6rem !important;
    gap: 0.4rem !important;
  }

  .category-filter-pills {
    padding: 0.35rem 0.6rem !important;
    gap: 0.35rem !important;
  }

  .cat-pill {
    padding: 0.35rem 0.7rem !important;
    font-size: 0.74rem !important;
  }

  /* Mobile Navigation Switcher */
  .mobile-screens-caret {
    display: inline-block !important;
  }

  /* Hide secondary desktop header tabs on mobile to ensure clean single-word indicator */
  #nav-tables,
  #nav-kitchen,
  #nav-orders,
  #nav-shift,
  #branch-mgmt-dropdown-wrap {
    display: none !important;
  }

  #pos-screens-menu-dropdown {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 12px !important;
    left: auto !important;
    width: 220px !important;
    min-width: 220px !important;
    background-color: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7) !important;
    z-index: 999999 !important;
  }

  #pos-screens-menu-dropdown:not(.hidden) {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }

  .pos-screen-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 700;
    color: #f8fafc;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .pos-screen-item:hover,
  .pos-screen-item:active {
    background: rgba(255, 255, 255, 0.08);
  }

  .pos-screen-item.active {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
  }

  .pos-screen-item .svg-icon,
  #pos-screens-menu-dropdown .pos-screen-item svg,
  #pos-screens-menu-dropdown svg {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    color: #f59e0b !important;
  }

  /* 2-Column Product Cards Grid on Mobile */
  #pos-menu-grid, .pos-products-grid, .menu-items-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    align-content: flex-start !important;
  }

  .menu-card, .pos-prod-card {
    min-height: 195px !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 8px !important;
    box-sizing: border-box !important;
  }

  .menu-card img, .pos-prod-card img, .pos-prod-img-wrap img {
    height: 95px !important;
    max-height: 95px !important;
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important;
  }

  .pos-prod-img-wrap {
    height: 95px !important;
    max-height: 95px !important;
    width: 100% !important;
  }

  .menu-card-title, .pos-prod-name {
    font-size: 0.8rem !important;
    line-height: 1.25 !important;
    height: 2.5em !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  /* Persistent Floating Bottom Bar */
  .mobile-waiter-bottom-bar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 62px !important;
    background: #0f172a !important;
    border-top: 1px solid rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6) !important;
    padding: 0.5rem 0.85rem !important;
    align-items: center !important;
    justify-content: space-between !important;
    z-index: 100 !important;
  }

  /* ==========================================================
     MOBILE CART BOTTOM SHEET OVERHAUL (<= 768px)
     ========================================================== */
  .pos-cart-sidebar,
  #pos-cart-sidebar,
  .pos-cart-pane,
  #pos-cart-panel,
  .pos-cart-panel {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 85dvh !important;
    max-height: 85dvh !important;
    background-color: #0f172a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 20px 20px 0 0 !important;
    z-index: 100000 !important;
    transform: translateY(105%) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8) !important;
    padding: 10px 12px 14px 12px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .pos-cart-sidebar.mobile-drawer-open,
  #pos-cart-sidebar.mobile-drawer-open,
  .pos-cart-pane.mobile-drawer-open,
  #pos-cart-panel.mobile-drawer-open,
  .pos-cart-panel.mobile-drawer-open {
    transform: translateY(0%) !important;
  }

  #mobile-cart-backdrop,
  .mobile-cart-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(2px) !important;
    z-index: 99999 !important;
  }

  /* Row 1: Drag handle pill centered at top */
  .cart-mobile-drawer-handle {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 0 6px 0 !important;
    background: transparent !important;
    border: none !important;
    margin: 0 0 4px 0 !important;
    flex-shrink: 0 !important;
    width: 100% !important;
  }

  .mobile-drawer-pill {
    width: 42px !important;
    height: 4px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.35) !important;
    margin: 0 auto !important;
  }

  .cart-header {
    padding: 0 0 4px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .cart-header-top-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    white-space: nowrap !important;
    margin-bottom: 6px !important;
  }

  .cart-header-top-row h2 {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #f8fafc !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  .cart-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
  }

  #btn-clear-cart {
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    padding: 4px 6px !important;
    white-space: nowrap !important;
  }

  .btn-close-mobile-cart,
  .btn-close-cart-drawer {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
  }

  /* Row 2: Order Channel Segmented Control */
  .order-type-tabs,
  #pos-order-type-group {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 4px 0 0 0 !important;
    padding: 3px !important;
    background: rgba(15, 23, 42, 0.7) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .order-type-btn {
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 6px 4px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
  }

  .order-type-btn svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
  }

  /* Row 3: Table Selector Bar */
  /* Row 3: Table Selector Bar */
  .cart-table-badge,
  #cart-table-badge {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 6px 0 !important;
    border-radius: 8px !important;
    background: rgba(30, 41, 59, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    flex-shrink: 0 !important;
  }

  .cart-table-badge[style*="display: none"],
  #cart-table-badge[style*="display: none"],
  body:not([data-dining-mode="dine_in"]) .cart-table-badge,
  body:not([data-dining-mode="dine_in"]) #cart-table-badge {
    display: none !important;
  }

  /* Row 3: Delivery Info Bar (Conditional strictly to delivery mode) */
  .cart-delivery-badge,
  #cart-delivery-badge,
  #pos-delivery-info-bar,
  .pos-delivery-customer-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 6px 0 !important;
    border-radius: 8px !important;
    background: rgba(30, 41, 59, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    flex-shrink: 0 !important;
  }

  .cart-delivery-badge[style*="display: none"],
  #cart-delivery-badge[style*="display: none"],
  #pos-delivery-info-bar[style*="display: none"],
  .pos-delivery-customer-row[style*="display: none"],
  body:not([data-dining-mode="delivery"]) .cart-delivery-badge,
  body:not([data-dining-mode="delivery"]) #cart-delivery-badge,
  body:not([data-dining-mode="delivery"]) #pos-delivery-info-bar,
  body:not([data-dining-mode="delivery"]) .pos-delivery-customer-row {
    display: none !important;
  }

  .cart-table-badge-info,
  .cart-delivery-badge-info {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
  }

  #table-badge-label,
  #delivery-badge-label {
    white-space: nowrap !important;
    overflow: visible !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #f8fafc !important;
  }

  .btn-table-badge-select,
  .btn-delivery-badge-edit {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 4px 10px !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    color: #f59e0b !important;
    border-radius: 6px !important;
    cursor: pointer !important;
  }

  /* Scrollable Cart Items Area (Maximized Mobile Space) */
  #pos-cart-items,
  #pos-cart-items-list,
  .pos-cart-items,
  .cart-items-scroll,
  .cart-items-container {
    flex: 1 1 auto !important;
    min-height: 220px !important;
    max-height: calc(85dvh - 340px) !important;
    overflow-y: auto !important;
    margin: 6px 0 !important;
    padding: 4px 0 !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    scrollbar-width: thin !important;
  }

  .cart-item-row {
    padding: 8px 10px !important;
    background: rgba(30, 41, 59, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .cart-item-main {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .cart-item-title {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    color: #f8fafc !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .cart-item-price {
    font-size: 0.86rem !important;
    font-weight: 800 !important;
    color: #f59e0b !important;
    white-space: nowrap !important;
    font-family: var(--font-mono) !important;
  }

  .cart-item-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: 6px !important;
    margin-top: 4px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    width: 100% !important;
  }

  .qty-stepper {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .qty-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .qty-number {
    min-width: 24px !important;
    text-align: center !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    font-family: var(--font-mono) !important;
  }

  .cart-item-delete {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 6px !important;
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #f87171 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  /* Compact Sticky Checkout Footer */
  .cart-upsell-bar,
  #pos-cart-upsell-bar {
    display: none !important;
  }

  .cart-footer {
    margin-top: auto !important;
    flex-shrink: 0 !important;
    padding-top: 8px !important;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 14px)) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    background: #0f172a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    position: relative !important;
    z-index: 4 !important;
  }

  .cart-summary-line {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    white-space: nowrap !important;
    font-size: 0.76rem !important;
    padding: 2px 4px !important;
    margin-bottom: 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .cart-summary-line.total {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    white-space: nowrap !important;
    font-size: 0.95rem !important;
    font-weight: 900 !important;
    padding: 3px 4px !important;
    margin-bottom: 3px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f59e0b !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .cash-tender-row,
  #pos-cash-chips {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    height: 30px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 2px 0 !important;
  }

  .cash-chip {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
    background: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
    cursor: pointer !important;
    padding: 0 !important;
  }

  .change-due-box {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 4px 8px !important;
    margin-bottom: 6px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px dashed #10b981 !important;
    color: #68d391 !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .change-due-box span {
    white-space: nowrap !important;
    font-size: 11px !important;
  }

  .change-due-box .val {
    white-space: nowrap !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    font-family: var(--font-mono) !important;
  }

  .payment-methods-grid,
  #pos-payment-group {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    height: 38px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 3px 0 !important;
  }

  .pay-method-btn {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
  }

  .pay-method-btn svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
  }

  .btn-checkout-print,
  #btn-submit-order {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
    margin-top: 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-sizing: border-box !important;
  }

  .btn-hold-table-order,
  #btn-hold-table-order {
    width: 100% !important;
    height: 38px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    margin-bottom: 2px !important;
  }

  .btn-split-check-cart,
  #btn-cart-split-check {
    width: 100% !important;
    height: 36px !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    margin-bottom: 2px !important;
  }

  /* ==========================================================
     SCREEN 2: DINING FLOOR PLAN OVERHAUL (#tab-tables)
     ========================================================== */
  .floor-top-command-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 0.6rem 0.8rem !important;
  }

  .floor-top-command-bar h2 {
    font-size: 0.95rem !important;
    white-space: normal !important;
  }

  .floor-top-command-bar p {
    display: none !important;
  }

  .floor-top-command-bar .stock-badge {
    white-space: nowrap !important;
    width: fit-content !important;
    font-size: 0.68rem !important;
  }

  .floor-actions-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 6px !important;
  }

  .floor-view-segmented-control {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .floor-view-seg-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 6px 4px !important;
    font-size: 0.74rem !important;
    white-space: nowrap !important;
  }

  .floor-action-buttons-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .floor-action-buttons-row .btn-floor-action {
    width: 100% !important;
    justify-content: center !important;
    padding: 6px 4px !important;
    font-size: 0.74rem !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  .floor-actions-group .pos-btn-cancel {
    width: 100% !important;
    justify-content: center !important;
    padding: 6px 8px !important;
    font-size: 0.74rem !important;
    box-sizing: border-box !important;
  }

  .floor-plan-toolbar,
  #floor-map-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 0.5rem 0.6rem !important;
  }

  .floor-zone-tabs,
  #floor-zone-tabs {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .floor-zone-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .floor-status-legend {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 10px !important;
    width: 100% !important;
    font-size: 0.72rem !important;
  }

  .floor-status-legend::-webkit-scrollbar {
    display: none !important;
  }

  .floor-plan-grid,
  #floor-plan-grid,
  .floor-plan-architectural-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .floor-plan-fullpage-body {
    padding: 8px !important;
    scrollbar-width: none !important;
  }

  .floor-plan-fullpage-body::-webkit-scrollbar {
    display: none !important;
  }

  .architectural-table-card {
    min-height: auto !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .arch-svg-container {
    min-height: 55px !important;
    max-height: 65px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .arch-svg-container svg {
    max-height: 55px !important;
    width: auto !important;
  }

  .btn-arch-action {
    padding: 5px 4px !important;
    font-size: 0.72rem !important;
    white-space: nowrap !important;
    width: 100% !important;
    justify-content: center !important;
  }

  /* ==========================================================
     SCREEN 3: KITCHEN DISPLAY SYSTEM OVERHAUL (#tab-kitchen / KDS)
     ========================================================== */
  .kds-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 0.65rem 0.8rem !important;
  }

  .kds-stats-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .kds-stat-item {
    justify-content: space-between !important;
    padding: 6px 10px !important;
    background: rgba(15, 23, 42, 0.6) !important;
    border-radius: 6px !important;
    font-size: 0.76rem !important;
  }

  .kds-grid,
  #kds-orders-grid {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
    gap: 12px !important;
    padding: 10px 10px 24px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .kds-ticket,
  .kds-card {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .kds-ticket-body,
  .kds-card-body {
    flex: 0 0 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .kds-ticket-actions button {
    width: 100% !important;
    height: 42px !important;
  }

  /* ==========================================================
     SCREEN 4: ORDERS MANAGEMENT OVERHAUL (#tab-orders)
     ========================================================== */
  .orders-header-card {
    padding: 0.6rem 0.8rem !important;
  }

  .orders-header-card > div {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .orders-header-card > div > div:last-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .orders-header-card .pos-toggle-label,
  .orders-header-card .btn-refresh-orders,
  .orders-header-card #orders-total-count-badge {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .orders-header-card h2 {
    font-size: 0.95rem !important;
  }

  .orders-header-card p {
    display: none !important;
  }

  .orders-toolbar-card {
    padding: 0.6rem 0.8rem !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .orders-toolbar-card > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .orders-toolbar-card .search-input-box,
  #orders-search-input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Orders Tab 2-Row Modern Command Bar */
  .orders-toolbar-card {
    padding: 8px 10px !important;
    gap: 8px !important;
  }

  .orders-toolbar-row1 {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .orders-toolbar-row1 .search-input-box {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .orders-quick-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .orders-quick-actions > * {
    flex: 1 1 auto !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .orders-toolbar-row2 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding-top: 6px !important;
  }

  .orders-toolbar-row2 > div {
    min-width: 0 !important;
    width: 100% !important;
  }

  .pos-orders-filter-select {
    width: 100% !important;
    min-width: 0 !important;
    height: 34px !important;
    font-size: 11px !important;
    padding: 4px 6px !important;
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 6px !important;
  }

  .pos-orders-filter-select option {
    background-color: #1e293b !important;
    color: #f8fafc !important;
  }

  .orders-timeframe-pills,
  #orders-timeframe-pills,
  .orders-channel-pills,
  #orders-channel-pills,
  .orders-status-pills,
  #orders-status-pills,
  #orders-today-shifts-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .orders-timeframe-pills::-webkit-scrollbar,
  .orders-channel-pills::-webkit-scrollbar,
  .orders-status-pills::-webkit-scrollbar,
  #orders-today-shifts-pills::-webkit-scrollbar {
    display: none !important;
  }

  .orders-timeframe-pills .cat-pill,
  .orders-channel-pills .cat-pill,
  .orders-status-pills .cat-pill,
  #orders-today-shifts-pills .cat-pill {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* Orders Table -> Zero-Scroll Mobile Card Layout (<= 768px) */
  #tab-orders {
    padding: 0.75rem !important;
    overflow-x: hidden !important;
  }

  .orders-table-card {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    flex: none !important;
  }

  .orders-table-card .pos-table-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .orders-table,
  .orders-table-card table,
  .orders-table tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .orders-table thead,
  .orders-table-card table thead {
    display: none !important;
  }

  .orders-table tbody tr:not(.orders-empty-row) {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    gap: 6px 10px !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(15, 23, 42, 0.88) !important;
    border: 1px solid rgba(51, 65, 85, 0.85) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin-bottom: 10px !important;
  }

  .orders-table tbody tr.orders-empty-row {
    display: block !important;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
  }

  .orders-table tbody tr.orders-empty-row td {
    display: block !important;
    width: 100% !important;
    white-space: normal !important;
  }

  .orders-table tbody tr:not(.orders-empty-row) td {
    padding: 0 !important;
    border: none !important;
    white-space: normal !important;
    min-width: 0 !important;
    text-align: right !important;
  }

  /* Row 1 (Top): Order Number, Channel/Order Type badge, Status pill */
  .orders-table tbody tr td.ord-cell-num {
    grid-row: 1 !important;
    grid-column: 1 !important;
  }

  .orders-table tbody tr td.ord-cell-num > div {
    flex-wrap: nowrap !important;
    gap: 5px !important;
  }

  .orders-table tbody tr td.ord-cell-num code {
    font-size: 0.78rem !important;
  }

  .orders-table tbody tr td.ord-cell-channel {
    grid-row: 1 !important;
    grid-column: 2 !important;
  }

  .orders-table tbody tr td.ord-cell-channel > div {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .orders-table tbody tr td.ord-cell-channel .ord-delivery-addr {
    flex-basis: 100% !important;
    max-width: 100% !important;
    font-size: 0.72rem !important;
    margin-top: 2px !important;
  }

  .orders-table tbody tr td.ord-cell-status {
    grid-row: 1 !important;
    grid-column: 3 !important;
    width: 100% !important;
    text-align: left !important;
  }

  /* Row 2 (Middle): Customer/Table & time on one side, Payment Method + Total on the other */
  .orders-table tbody tr td.ord-cell-items {
    grid-row: 2 !important;
    grid-column: 1 / 3 !important;
    text-align: right !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  }

  .orders-table tbody tr td.ord-cell-items .ord-customer-notes {
    max-width: 100% !important;
    margin-inline: 0 !important;
  }

  .orders-table tbody tr td.ord-cell-time {
    grid-row: 3 !important;
    grid-column: 1 / 3 !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    font-size: 0.75rem !important;
  }

  .orders-table tbody tr td.ord-cell-time > div {
    margin-top: 0 !important;
  }

  .orders-table tbody tr td.ord-cell-total {
    grid-row: 2 !important;
    grid-column: 3 !important;
    width: 100% !important;
    align-self: center !important;
    text-align: left !important;
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    white-space: nowrap !important;
  }

  .orders-table tbody tr td.ord-cell-pay {
    grid-row: 3 !important;
    grid-column: 3 !important;
    width: 100% !important;
    align-self: center !important;
    text-align: left !important;
    white-space: nowrap !important;
  }

  .orders-table tbody tr td.ord-cell-pay span {
    font-size: 0.74rem !important;
    color: var(--text-muted) !important;
  }

  /* Row 3 (Bottom): Action buttons aligned horizontally side-by-side */
  .orders-table tbody tr td.ord-cell-actions {
    grid-row: 4 !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    padding-top: 8px !important;
    margin-top: 2px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
  }

  .orders-table tbody tr td.ord-cell-actions .ord-actions-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .orders-table tbody tr td.ord-cell-actions .btn-orders-action {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    justify-content: center !important;
    padding: 7px 6px !important;
    font-size: 0.73rem !important;
    min-height: 36px !important;
    gap: 4px !important;
  }

  /* ==========================================================
     SCREEN 5: SHIFT & STOCKTAKE HUB OVERHAUL (#tab-shifts)
     ========================================================== */
  #tab-shifts {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: 100% !important;
    max-height: calc(100dvh - 54px) !important;
    padding-bottom: 40px !important;
    scrollbar-width: none !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  #tab-shifts::-webkit-scrollbar {
    display: none !important;
  }

  #tab-shifts > * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .shift-header,
  .pos-archive-toolbar,
  .pos-subtabs,
  .pos-subtabs-nav,
  .shift-archive-bar,
  #pos-shift-archive-bar,
  .pos-shift-subtabs,
  .shift-reconciliation-panel {
    overflow: visible !important;
    scrollbar-width: none !important;
  }

  .shift-header::-webkit-scrollbar,
  .pos-archive-toolbar::-webkit-scrollbar,
  .shift-archive-bar::-webkit-scrollbar,
  #pos-shift-archive-bar::-webkit-scrollbar,
  .pos-shift-subtabs::-webkit-scrollbar {
    display: none !important;
  }

  #tab-shifts > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #tab-shifts > div:first-child > div:last-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #tab-shifts h2 {
    font-size: 1rem !important;
    white-space: normal !important;
  }

  #tab-shifts p {
    display: none !important;
  }

  .responsible-user-pill,
  #shift-responsible-user-pill {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 11.5px !important;
    padding: 6px 10px !important;
    white-space: normal !important;
    text-align: right !important;
    line-height: 1.4 !important;
  }

  .responsible-user-pill span,
  #shift-responsible-user-pill span,
  .responsible-user-pill strong,
  #shift-responsible-user-pill strong {
    white-space: normal !important;
  }

  .shift-archive-bar,
  #pos-shift-archive-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #pos-shift-period-pills {
    display: flex !important;
    overflow-x: visible !important;
    white-space: normal !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: 6px !important;
  }

  #pos-shift-period-pills .pill {
    width: auto !important;
    flex: 0 1 auto !important;
    padding: 5px 10px !important;
    font-size: 0.74rem !important;
    white-space: nowrap !important;
  }

  #pos-shift-period-pills::-webkit-scrollbar {
    display: none !important;
  }

  .shift-toolbar-controls {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .shift-select-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    width: 100% !important;
  }

  #pos-archive-shift-select,
  .shift-select-wrapper select {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    font-size: 12px !important;
    padding: 6px 10px !important;
    box-sizing: border-box !important;
  }

  .shift-export-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .shift-archive-bar button,
  .shift-export-actions button {
    width: 100% !important;
    flex: 1 1 auto !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .pos-shift-subtabs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pos-shift-subtabs .subtab-btn,
  #subtab-btn-cash,
  #subtab-btn-stocktake {
    font-size: 11.5px !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    height: auto !important;
    padding: 8px 6px !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  #tab-shifts .kpi-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  /* Single full-width vertical column for Cash Reconciliation / Petty Cash AND Stocktake / Waste */
  .zreport-actions-grid,
  .audit-grid-layout {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .audit-col-main,
  .audit-col-waste,
  .actual-cash-input-box,
  #petty-cash-card {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* 10-item stocktake table horizontal scroll container */
  .pos-audit-table-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }

  .pos-audit-table-wrapper table,
  .pos-audit-table-wrapper .pos-table {
    min-width: 520px !important;
    width: 100% !important;
  }

  .pos-audit-table-wrapper th,
  .pos-audit-table-wrapper td {
    white-space: nowrap !important;
  }

  /* ==========================================================
     SCREENS 6 & 7: INVENTORY & RECIPES OVERHAUL (#tab-inventory & #tab-recipes)
     ========================================================== */
  .scanner-toolbar-card > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .scanner-toolbar-card h2 {
    font-size: 0.95rem !important;
  }

  .scanner-toolbar-card p {
    display: none !important;
  }

  #btn-fetch-erp-transfers {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .scanner-input-row {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  #manual-scan-input {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #btn-execute-scan {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .inventory-container .pos-table-wrapper,
  .branch-stock-panel .pos-table-wrapper,
  .erp-transfers-panel .pos-table-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }

  .inventory-table,
  #table-inbound-transfers,
  .branch-stock-panel table,
  .erp-transfers-panel table {
    min-width: 600px !important;
    width: 100% !important;
  }

  .inventory-table th,
  .inventory-table td,
  #table-inbound-transfers th,
  #table-inbound-transfers td,
  .branch-stock-panel table th,
  .branch-stock-panel table td,
  .erp-transfers-panel table th,
  .erp-transfers-panel table td {
    white-space: nowrap !important;
  }

  .recipes-header-card > div {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .recipes-header-card h2 {
    font-size: 0.95rem !important;
  }

  .recipes-header-card p {
    display: none !important;
  }

  .recipes-grid,
  #pos-recipes-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 6px !important;
    box-sizing: border-box !important;
  }

  /* ==========================================================
     SCREEN 8: POS EXECUTIVE SETTINGS OVERHAUL (#tab-pos-settings)
     ========================================================== */
  .exec-console-topbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 0.6rem 0.8rem !important;
  }

  .exec-console-topbar h2 {
    font-size: 0.95rem !important;
    white-space: normal !important;
  }

  .exec-console-topbar p {
    display: none !important;
  }

  .exec-console-topbar > div:last-child {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .exec-console-topbar button {
    width: 100% !important;
    justify-content: center !important;
  }

  .pos-exec-tabs-bar {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    padding: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pos-exec-tab-btn {
    padding: 8px 6px !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pos-exec-scroll-body {
    padding: 8px !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .pos-exec-tab-pane {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
}

/* ==========================================================
   KITCHEN ORDER TICKET (KOT / EXPEDITER SLIP 80MM) & KDS UI
   ========================================================== */
.kds-card-footer-actions {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}

.kds-card-footer-actions .btn-kds-advance {
  flex: 1 1 auto;
  margin: 0;
}

.btn-kds-print-kot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.85);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: inherit;
  flex: 0 0 auto;
}

.btn-kds-print-kot:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: var(--accent-gold, #f59e0b);
  color: var(--accent-gold, #f59e0b);
}

.btn-kds-print-kot:active {
  transform: scale(0.98);
}

.btn-kds-print-kot svg {
  flex-shrink: 0;
}

/* 80mm Thermal Kitchen Order Ticket (KOT / Expediter Slip) */
.kot-slip {
  width: 72mm;
  margin: 0 auto;
  padding: 1mm 0 3mm 0;
  font-family: 'Cairo', 'Courier New', monospace;
  color: #000000;
  background: #ffffff;
  direction: rtl;
  line-height: 1.35;
  font-size: 13px;
  box-sizing: border-box;
}

.kot-header {
  text-align: center;
  border-bottom: 2px dashed #000000;
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.kot-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 3px;
  color: #000000;
}

.kot-giant-order-num {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
  margin: 4px 0;
  letter-spacing: 1px;
  direction: ltr;
  unicode-bidi: isolate;
  color: #000000;
}

.kot-channel-badge {
  display: inline-block;
  border: 2px solid #000000;
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 900;
  border-radius: 4px;
  margin: 3px 0 5px 0;
  background: #000000;
  color: #ffffff;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.kot-meta-info {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 3px;
  padding: 0 2px;
  color: #000000;
}

.kot-items-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0;
}

.kot-item-row td {
  padding: 5px 0;
  vertical-align: top;
  border-bottom: 1px dashed #777777;
}

.kot-item-lead {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.kot-qty-badge {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.5px;
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  color: #000000;
}

.kot-item-name {
  font-size: 13.5px;
  font-weight: 900;
  color: #000000;
}

.kot-modifier-list {
  margin: 2px 0 0 0;
  padding-right: 14px;
  list-style: none;
}

.kot-modifier-item {
  font-size: 11.5px;
  font-weight: 800;
  color: #000000;
  margin-top: 2px;
}

.kot-footer {
  border-top: 2px dashed #000000;
  padding-top: 6px;
  margin-top: 6px;
  text-align: center;
}

.kot-instructions-box {
  border: 1px solid #000000;
  padding: 5px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  background: #f8fafc;
  color: #000000;
}

.kot-total-count {
  font-size: 12.5px;
  font-weight: 900;
  margin: 4px 0;
  color: #000000;
}

.kot-cut-line {
  font-family: monospace;
  font-size: 11px;
  letter-spacing: -0.5px;
  margin-top: 6px;
  color: #000000;
}

@media (max-width: 768px) {
  .kds-card-footer-actions {
    display: flex;
    gap: 6px;
    width: 100%;
  }

  .kds-card-footer-actions .btn-kds-advance {
    flex: 1 1 auto;
    font-size: 0.88rem !important;
    padding: 0.65rem 0.5rem !important;
  }

  .btn-kds-print-kot {
    flex: 0 0 auto;
    font-size: 0.78rem !important;
    padding: 0.65rem 0.65rem !important;
  }
}

/* Desktop Navigation Tabs Display (> 768px) */
@media (min-width: 769px) {
  .header-nav-tab, .nav-tab, .nav-tab-btn, .pos-nav-tab {
    display: inline-flex !important;
  }
}

/* Enforce single-word no-wrap in 52px header */
.header-nav-tab, .nav-tab, .nav-tab-btn, .pos-nav-tab, #mobile-screens-dropdown-btn, .mobile-screens-trigger, .pos-mobile-nav-trigger {
  white-space: nowrap !important;
  text-overflow: ellipsis;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  padding: 6px 12px !important;
}

#mobile-screens-dropdown-btn, .mobile-screens-trigger, .pos-mobile-nav-trigger {
  display: inline-flex !important;
}

.top-navbar, .pos-navbar, .header-container, #pos-top-header {
  overflow: visible !important;
}

/* === [Agent-1: chrome-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 {
  -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;
}

@media (min-width: 769px) {
  #btn-close-mobile-cart,
  .btn-close-mobile-cart,
  .btn-close-cart-drawer,
  #cart-mobile-drawer-handle,
  .cart-mobile-drawer-handle,
  #mobile-waiter-bar,
  .mobile-waiter-bottom-bar,
  .mobile-waiter-bar,
  #btn-open-mobile-cart,
  .btn-mobile-review-cart,
  #mobile-cart-backdrop,
  .mobile-cart-backdrop {
    display: none !important;
  }
}

@media (max-width: 768px) {
  #btn-close-mobile-cart,
  .btn-close-mobile-cart,
  .btn-close-cart-drawer {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    background: rgba(15, 23, 42, 0.88) !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
    color: #f8fafc !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
  }

  #btn-close-mobile-cart:hover,
  #btn-close-mobile-cart:active,
  .btn-close-mobile-cart:hover,
  .btn-close-mobile-cart:active,
  .btn-close-cart-drawer:hover,
  .btn-close-cart-drawer:active {
    background: rgba(30, 41, 59, 0.96) !important;
    border-color: rgba(245, 158, 11, 0.45) !important;
    color: #f59e0b !important;
  }
}
/* === [/Agent-1: chrome-fix] === */

/* === [Agent-2: cart-unlock] === */
.pos-off-hours-banner,
#pos-off-hours-banner {
  display: none !important;
}

#pos-cart-panel,
.pos-cart-panel,
.pos-cart-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Cairo', sans-serif !important;
}

#pos-cart-panel .order-type-tabs,
.pos-cart-panel .order-type-tabs {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 3px !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

#pos-cart-panel .order-type-btn,
.pos-cart-panel .order-type-btn {
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 0 6px !important;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.8rem !important;
  line-height: 1 !important;
}

body:not([data-dining-mode="dine_in"]) #cart-table-badge,
body:not([data-dining-mode="dine_in"]) .cart-table-badge {
  display: none !important;
}

#cart-items-container,
#pos-cart-items-list,
.cart-items-container,
.cart-items-scroll {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  min-height: 140px !important;
  padding: 10px !important;
  box-sizing: border-box !important;
  font-family: 'Cairo', sans-serif !important;
}

@media (min-width: 769px) {
  #pos-cart-panel,
  .pos-cart-panel,
  .pos-cart-sidebar {
    height: 100% !important;
    max-height: 100% !important;
  }

  #pos-cart-panel .cart-footer,
  .pos-cart-panel .cart-footer {
    padding-bottom: 16px !important;
  }

  #cart-items-container,
  #pos-cart-items-list,
  .cart-items-container,
  .cart-items-scroll {
    max-height: none !important;
  }
}

/* Hide clutter when cart is empty */
#pos-cart-panel.cart-is-empty #pos-cart-upsell-bar,
#pos-cart-panel.cart-is-empty .cart-upsell-bar,
#pos-cart-panel.cart-is-empty #pos-cash-chips,
#pos-cart-panel.cart-is-empty .cash-tender-row,
#pos-cart-panel.cart-is-empty #cart-change-due-box,
#pos-cart-panel.cart-is-empty .change-due-box {
  display: none !important;
}

/* Upsell Bar: 2 clean inline pills without scrollbar */
#pos-cart-upsell-bar,
.cart-upsell-bar {
  padding: 6px 10px !important;
  gap: 6px !important;
  overflow: hidden !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  background: rgba(15, 23, 42, 0.72) !important;
  border-top: 1px solid rgba(245, 158, 11, 0.18) !important;
  font-family: 'Cairo', sans-serif !important;
}

#pos-cart-upsell-bar > span {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  font-size: 0.72rem !important;
  font-family: 'Cairo', sans-serif !important;
}

#cart-upsell-chips,
.cart-upsell-chips-container {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
  overflow: hidden !important;
  padding-bottom: 0 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

#cart-upsell-chips .upsell-chip,
.cart-upsell-bar .upsell-chip {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  justify-content: center !important;
  padding: 4px 8px !important;
  font-size: 0.72rem !important;
  font-family: 'Cairo', sans-serif !important;
  border-radius: 999px !important;
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.32) !important;
  color: #f59e0b !important;
}

/* Cash Denomination Pills: super-compact 28px row */
#pos-cash-chips,
.cash-tender-row {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 6px !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  margin: 2px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#pos-cash-chips .cash-chip,
.cash-tender-row .cash-chip {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  border-radius: 6px !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  color: #f8fafc !important;
  font-family: 'Cairo', sans-serif !important;
}
/* === [/Agent-2: cart-unlock] === */

/* === [Agent-3: menu-grid] === */
#pos-menu-grid,
.menu-items-grid,
.products-grid,
#products-grid,
.pos-products-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)) !important;
  gap: 14px !important;
  padding: 12px !important;
  align-content: flex-start !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.menu-card,
.pos-prod-card,
.prod-card {
  font-family: 'Cairo', sans-serif !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96)) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  padding: 0 !important;
  min-height: 235px !important;
  height: auto !important;
  position: relative;
  cursor: pointer;
  opacity: 1 !important;
  filter: none !important;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.menu-card:hover,
.pos-prod-card:hover,
.prod-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.6), 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.menu-card:active,
.pos-prod-card:active,
.prod-card:active {
  transform: scale(0.96) !important;
  transition: transform 0.08s ease;
}

.pos-prod-card.in-cart,
.menu-card.in-cart,
.prod-card.in-cart {
  border-color: rgba(16, 185, 129, 0.78) !important;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35), 0 8px 22px rgba(16, 185, 129, 0.16) !important;
}

@keyframes posCardTapPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.65), 0 0 0 2px rgba(16, 185, 129, 0.85);
  }
  55% {
    transform: scale(1.02);
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0), 0 0 18px rgba(16, 185, 129, 0.45);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35), 0 8px 22px rgba(16, 185, 129, 0.16);
  }
}

.pos-prod-card.pos-card-tapped,
.menu-card.pos-card-tapped {
  animation: posCardTapPulse 0.28s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.pos-prod-img-wrap,
.menu-card-thumb-wrap {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 16 / 10 !important;
  height: 115px !important;
  min-height: 115px !important;
  max-height: 115px !important;
  background: #020617 !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  border-radius: 12px 12px 0 0 !important;
}

.pos-prod-img-wrap.no-image {
  aspect-ratio: auto !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  background: rgba(30, 41, 59, 0.65) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.pos-prod-img-wrap img,
.menu-card-thumb-wrap img,
.menu-card img,
.pos-prod-card img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
  transition: transform 0.25s ease;
}

.pos-prod-card:hover .pos-prod-img-wrap img {
  transform: scale(1.04);
}

.pos-prod-img-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.56) 0%, rgba(2, 6, 23, 0.05) 48%, rgba(2, 6, 23, 0.52) 100%);
  pointer-events: none;
  z-index: 1;
}

.pos-prod-code-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(2, 6, 23, 0.84);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.25px;
  direction: ltr;
  unicode-bidi: isolate;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pos-prod-cat-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #f8fafc;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 54%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pos-prod-body,
.menu-card-details {
  padding: 10px 11px 11px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.pos-prod-name,
.menu-card-title {
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  line-height: 1.35 !important;
  height: auto !important;
  min-height: calc(0.92rem * 1.35 * 2) !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  margin: 0 !important;
}

.pos-prod-stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 20px;
}

.pos-prod-incart-badge {
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.69rem !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  line-height: 1.3 !important;
  white-space: nowrap;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(245, 158, 11, 0.2)) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(16, 185, 129, 0.72) !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.18);
}

.pos-stock-badge,
.menu-card-badge {
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.69rem !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  line-height: 1.3 !important;
  white-space: nowrap;
}

.pos-stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.pos-stock-badge.in-stock,
.menu-card-badge.in-stock {
  background: rgba(16, 185, 129, 0.14) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.32) !important;
}

.pos-stock-badge.prep-stock {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.menu-card.out-of-stock,
.pos-prod-card.out-of-stock,
.prod-card.out-of-stock {
  opacity: 0.68 !important;
  filter: grayscale(0.28) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  cursor: not-allowed !important;
}

.menu-card.out-of-stock:hover,
.pos-prod-card.out-of-stock:hover,
.prod-card.out-of-stock:hover {
  transform: none !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  box-shadow: none !important;
}

.pos-stock-badge.out-of-stock,
.menu-card-badge.out-of-stock {
  background: rgba(239, 68, 68, 0.16) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.42) !important;
}

.pos-prod-footer,
.menu-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-top: auto !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(148, 163, 184, 0.14) !important;
  flex-shrink: 0 !important;
}

.pos-prod-price,
.menu-card-price {
  font-family: 'Cairo', sans-serif !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #f59e0b !important;
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 3px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.pos-prod-price .pos-prod-currency,
.pos-prod-currency {
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #fbbf24 !important;
}

.pos-add-btn {
  font-family: 'Cairo', sans-serif !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(245, 158, 11, 0.16));
  border: 1px solid rgba(16, 185, 129, 0.55);
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.pos-add-btn:not(:disabled):hover,
.pos-prod-card:not(.out-of-stock):hover .pos-add-btn:not(:disabled) {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #f59e0b;
  color: #020617;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.32);
}

.pos-add-btn:disabled,
.pos-add-btn.is-disabled {
  opacity: 0.42 !important;
  background: rgba(30, 41, 59, 0.65) !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
  pointer-events: none;
}

.pos-add-btn.is-added {
  background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
  border-color: #fde68a !important;
  color: #020617 !important;
  transform: scale(0.95);
}

@keyframes mobileWaiterBarPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
  }
  45% {
    transform: scale(1.015);
    box-shadow: 0 -4px 20px rgba(245, 158, 11, 0.42), 0 0 0 1px rgba(16, 185, 129, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
  }
}

#mobile-waiter-bar:active,
.mobile-waiter-bar:active {
  transform: scale(0.985);
}

#mobile-waiter-bar.is-pulsing,
.mobile-waiter-bar.is-pulsing {
  animation: mobileWaiterBarPulse 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 768px) {
  #pos-menu-grid,
  .menu-items-grid,
  .products-grid,
  #products-grid,
  .pos-products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  .menu-card,
  .pos-prod-card,
  .prod-card {
    min-height: 215px !important;
    padding: 0 !important;
  }

  .pos-prod-img-wrap,
  .menu-card-thumb-wrap {
    height: 105px !important;
    min-height: 105px !important;
    max-height: 105px !important;
  }

  .pos-prod-img-wrap img,
  .menu-card-thumb-wrap img,
  .menu-card img,
  .pos-prod-card img {
    height: 100% !important;
    max-height: none !important;
    border-radius: 0 !important;
  }

  .pos-prod-body,
  .menu-card-details {
    padding: 8px 9px 9px !important;
    gap: 5px !important;
  }

  .pos-prod-name,
  .menu-card-title {
    font-size: 0.86rem !important;
    line-height: 1.35 !important;
    height: auto !important;
    min-height: calc(0.86rem * 1.35 * 2) !important;
  }

  .pos-prod-price,
  .menu-card-price {
    font-size: 0.94rem !important;
  }

  .pos-add-btn {
    padding: 4px 8px !important;
    font-size: 0.74rem !important;
  }
}
/* === [/Agent-3: menu-grid] === */

/* ==========================================================================
   DESKTOP FULL-HEIGHT POS VIEWPORT LOCK (>= 769px) - ZERO BOTTOM BLACK BAR
   ========================================================================== */
@media (min-width: 769px) {
  html,
  body {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  main.main-view-container,
  .main-view-container {
    margin-top: 52px !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: calc(100vh - 52px) !important;
    max-height: calc(100vh - 52px) !important;
    min-height: calc(100vh - 52px) !important;
    overflow: hidden !important;
  }

  .pos-main-layout,
  .pos-workspace,
  #tab-pos.active,
  #tab-pos.view-panel.active {
    height: calc(100vh - 52px) !important;
    max-height: calc(100vh - 52px) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
  }

  #tab-pos .pos-cart-panel,
  #pos-cart-panel,
  .pos-cart-panel,
  .pos-cart-sidebar,
  #tab-pos .pos-menu-panel,
  .pos-layout-grid .pos-menu-panel,
  .pos-menu-panel {
    height: 100% !important;
    max-height: 100% !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .view-panel.active:not(#tab-pos) {
    height: 100% !important;
    max-height: 100% !important;
  }
}

/* ==========================================================
   AUTO-ACCEPT ONLINE ORDERS PILL TOGGLE SWITCH
   ========================================================== */
.pos-auto-accept-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  user-select: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.pos-auto-accept-pill:hover {
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--text-main);
}

.pos-auto-accept-pill .pos-pill-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.pos-auto-accept-pill .pos-pill-switch-track {
  position: relative;
  direction: ltr;
  display: inline-flex;
  align-items: center;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: #334155;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pos-auto-accept-pill .pos-pill-switch-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e1;
  transform: translateX(2px);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.pos-auto-accept-pill .pos-pill-switch-input:checked + .pos-pill-switch-track {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: rgba(251, 191, 36, 0.7);
}

.pos-auto-accept-pill .pos-pill-switch-input:checked + .pos-pill-switch-track .pos-pill-switch-thumb {
  transform: translateX(18px);
  background: #0f172a;
}

.pos-auto-accept-pill:has(.pos-pill-switch-input:checked) {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fde68a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.16);
}

.pos-auto-accept-pill .pos-pill-switch-input:focus-visible + .pos-pill-switch-track {
  outline: 2px solid rgba(245, 158, 11, 0.65);
  outline-offset: 2px;
}

/* ==========================================================
   KDS TICKET CARD & BOARD UN-SQUISH (DESKTOP & BASE)
   ========================================================== */
#tab-kds .kds-toolbar {
  flex: 0 0 auto;
}

.kds-ticket,
.kds-card {
  flex: 0 0 auto;
  height: auto;
  min-height: auto;
  max-height: none;
  overflow: visible;
}

.kds-ticket-body,
.kds-card-body {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  overflow: visible;
}

.kds-ticket-footer,
.kds-card-footer {
  flex: 0 0 auto;
}

@media (min-width: 769px) {
  #tab-kds.kds-container,
  #tab-kds.view-panel.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  #tab-kds .kds-grid,
  #kds-orders-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    align-content: flex-start;
    align-items: start;
  }
}





/* ==========================================================================
   MVP-LEAN-V82: UNIFIED POS DELIVERY TAB, STREAMLINED CS HUB,
   AND 4-COLUMN SINGLE-VIEWPORT DELIVERY KANBAN BOARD
   ========================================================================== */

/* 1. Unified 3-Tab Order Mode & Compact Inline Delivery Customer Block */
.order-type-tabs.order-type-tabs-3 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
}

.pos-inline-delivery-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  margin: 0 10px 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
}

.pos-del-channel-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pos-del-ch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  border-radius: 7px;
  background: #020617;
  border: 1px solid rgba(51, 65, 85, 0.75);
  color: #94a3b8;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pos-del-ch-btn.active.is-wa {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #34d399;
}

.pos-del-ch-btn.active.is-tel {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
}

.pos-del-phone-row {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 6px;
}

.pos-del-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pos-del-input {
  width: 100%;
  height: 31px;
  padding: 0 9px;
  background: #020617;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 7px;
  color: #f8fafc;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.78rem;
  font-weight: 600;
  outline: none;
}

.pos-del-input:focus {
  border-color: #f59e0b;
}

.pos-del-lookup-btn {
  width: 34px;
  height: 31px;
  border-radius: 7px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pos-del-crm-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.pos-del-crm-status.is-new {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

.pos-del-reorder-btn {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f59e0b;
  color: #0f172a;
  border: none;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

/* 2. Customer Service Hub Prominent CTA */
.cs-new-delivery-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #0f172a !important;
  border: none;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.85rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cs-new-delivery-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

/* 3. Compact 4-Column Delivery Kanban Board (Zero Endless Scrolling) */
.dispatch-shell.v82-kanban-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px 20px !important;
}

/* Row 1: Single-Line 44px Compact Toolbar */
.dispatch-compact-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.dispatch-toolbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dispatch-toolbar-brand h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 900;
  color: #f8fafc;
}

.dispatch-toolbar-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.dispatch-toolbar-controls .dispatch-driver-select {
  width: auto !important;
  min-width: 125px !important;
  max-width: 210px !important;
  height: 32px !important;
  padding: 0 10px !important;
  font-size: 0.78rem !important;
  margin: 0 !important;
}

.dispatch-toolbar-controls .dispatch-refresh-btn {
  height: 32px !important;
  padding: 0 12px !important;
  font-size: 0.78rem !important;
}

/* Row 2: Single Compact Driver Cash Custody Strip */
.dispatch-custody-strip-wrap {
  background: #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 8px 12px;
}

.dispatch-custody-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.dispatch-custody-strip-head h3 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 800;
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dispatch-custody-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 8px;
}

.v82-driver-custody-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: border-color 0.15s ease;
}

.v82-driver-custody-card.is-selected {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.v82-driver-custody-card.has-unsettled {
  border-color: rgba(245, 158, 11, 0.45);
}

.v82-drv-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  cursor: pointer;
}

.v82-drv-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.v82-drv-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: #f8fafc;
}

.v82-drv-code {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  background: #020617;
  color: #94a3b8;
}

.v82-drv-status {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
}

.v82-drv-status.is-available {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
}

.v82-drv-status.is-busy {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}

.v82-drv-metrics-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.v82-drv-settle-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #0f172a;
  border: none;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.v82-drv-settle-btn:disabled {
  background: rgba(51, 65, 85, 0.5);
  color: #64748b;
  cursor: not-allowed;
}

/* Mobile Stage Filter Bar (Hidden on Desktop >= 1100px) */
.v82-mobile-stage-tabs {
  display: none;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

@media (max-width: 1099px) {
  .v82-mobile-stage-tabs {
    display: flex !important;
  }
}

/* Row 3: 4-Column Side-by-Side Kanban Grid */
.dispatch-kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

@media (max-width: 1099px) {
  .dispatch-kanban-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .dispatch-kanban-board {
    grid-template-columns: 1fr;
  }
}

.dispatch-kanban-col {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  max-height: calc(100vh - 235px);
  overflow: hidden;
}

@media (max-width: 1099px) {
  .dispatch-kanban-col {
    max-height: none;
    min-height: 220px;
  }
}

.dispatch-kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 11px;
  background: rgba(2, 6, 23, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.dispatch-kanban-col-head h3 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 900;
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dispatch-kanban-col-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

/* Collapsible Settled Orders Drawer */
.dispatch-settled-drawer {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  overflow: hidden;
}

.dispatch-settled-drawer summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  color: #94a3b8;
  user-select: none;
}

.dispatch-settled-drawer summary::-webkit-details-marker {
  display: none;
}

.dispatch-settled-drawer[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #f8fafc;
}

.dispatch-settled-drawer-body {
  padding: 10px 12px;
  max-height: 240px;
  overflow-y: auto;
}

/* ==========================================================================
   v83: SHIFT-LINKED DELIVERY PERIOD FILTERS & COURIER PERFORMANCE MODAL
   ========================================================================== */
.btn-courier-report-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.btn-courier-report-toolbar:hover {
  background: rgba(245, 158, 11, 0.24);
  border-color: #f59e0b;
}

.courier-report-modal-card {
  max-width: 980px !important;
  width: 95% !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(2, 6, 23, 0.99) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.courier-report-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.courier-report-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.courier-report-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.courier-report-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.courier-report-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

@media (max-width: 760px) {
  .courier-report-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.courier-report-kpi-box {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.courier-report-kpi-box span {
  font-size: 0.73rem;
  color: #94a3b8;
  font-weight: 700;
}

.courier-report-kpi-box strong {
  font-size: 1rem;
  font-weight: 900;
  color: #f8fafc;
}

.courier-report-table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  overflow-x: auto;
  background: rgba(15, 23, 42, 0.72);
}

.courier-report-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Cairo', sans-serif;
  font-size: 0.82rem;
  text-align: right;
}

.courier-report-table thead tr {
  background: rgba(2, 6, 23, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.courier-report-table th {
  padding: 10px 12px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #cbd5e1;
  white-space: nowrap;
}

.courier-report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  vertical-align: middle;
}

.courier-report-table tbody tr:hover {
  background: rgba(30, 41, 59, 0.55);
}

.courier-report-table tfoot tr {
  background: rgba(245, 158, 11, 0.1);
  border-top: 2px solid rgba(245, 158, 11, 0.45);
}

.courier-report-table tfoot td {
  padding: 11px 12px;
  font-weight: 900;
  font-size: 0.86rem;
  color: #f8fafc;
  border-bottom: none;
}

.courier-drv-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.courier-drv-code-pill {
  font-family: monospace;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: #020617;
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.btn-courier-export-csv {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.48);
  color: #34d399;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-courier-export-csv:hover {
  background: rgba(16, 185, 129, 0.28);
}

.btn-courier-print {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border: none;
  color: #020617;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.btn-courier-print:hover {
  filter: brightness(1.06);
}

/* ==========================================================================
   v84: UNIFIED PHONE-LINKED CUSTOMER REGISTRY & CRM 360 HUB
   ========================================================================== */
.cs-subtab-badge.is-crm {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.crm-kpi-strip {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-bottom: 16px !important;
}

@media (max-width: 1024px) {
  .crm-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .crm-kpi-strip {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

.crm-toolbar-card {
  padding: 12px 14px !important;
  margin-bottom: 16px !important;
}

.crm-filter-toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 12px !important;
}

.crm-search-wrap {
  position: relative;
  flex: 1 1 250px;
  min-width: 210px;
  display: flex;
  align-items: center;
}

.crm-search-wrap svg {
  position: absolute;
  right: 11px;
  color: #94a3b8;
  pointer-events: none;
}

.crm-toolbar-input {
  width: 100%;
  height: 36px;
  padding: 0 34px 0 12px;
  background: #1e293b;
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 9px;
  color: #f8fafc;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
  box-sizing: border-box;
}

.crm-toolbar-input:focus,
.crm-toolbar-select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.16);
}

.crm-toolbar-select {
  height: 36px;
  padding: 0 10px;
  min-width: 124px;
  background: #1e293b;
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 9px;
  color: #f8fafc;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.8rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.crm-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  flex-wrap: wrap;
}

.crm-customers-table tbody tr.crm-customer-row {
  cursor: pointer;
  transition: background 0.14s ease;
}

.crm-customers-table tbody tr.crm-customer-row:hover {
  background: rgba(245, 158, 11, 0.08) !important;
}

.crm-segment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.crm-segment-badge.is-vip {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #fbbf24;
}

.crm-segment-badge.is-repeat {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.48);
  color: #34d399;
}

.crm-segment-badge.is-new {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}

.crm-segment-badge.is-inactive {
  background: rgba(220, 38, 38, 0.16);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: #f87171;
}

.crm-open-ticket-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fca5a5;
  margin-right: 4px;
}

.crm-note-preview {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 7px;
  border-radius: 5px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  font-size: 0.7rem;
  font-weight: 700;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.crm-row-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.73rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #1e293b;
  color: #f8fafc;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.crm-row-btn.is-profile {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.crm-row-btn.is-order {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(56, 189, 248, 0.13);
  color: #38bdf8;
}

.crm-row-btn.is-wa {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
}

.crm-row-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* Mobile Stack Cards for CRM Customer Registry (< 768px) */
@media (max-width: 768px) {
  .crm-toolbar-select {
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;
  }

  .crm-toolbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .crm-toolbar-actions button {
    width: 100%;
    justify-content: center;
  }

  #crm-customers-table thead {
    display: none !important;
  }

  #crm-customers-table,
  #crm-customers-table tbody {
    display: block !important;
    width: 100% !important;
  }

  #crm-customers-table tbody tr.crm-customer-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 12px 14px !important;
    margin-bottom: 10px !important;
    border-radius: 12px !important;
    background: rgba(15, 23, 42, 0.92) !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
  }

  #crm-customers-table tbody tr.crm-customer-row td {
    border: none !important;
    padding: 2px 0 !important;
  }

  #crm-customers-table tbody tr.crm-customer-row td.crm-col-customer,
  #crm-customers-table tbody tr.crm-customer-row td.crm-col-last-order,
  #crm-customers-table tbody tr.crm-customer-row td.crm-col-actions {
    grid-column: 1 / -1 !important;
    white-space: normal !important;
  }
}

/* Customer 360 Profile Modal */
.crm-360-modal-card {
  max-width: 880px !important;
  width: 95% !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.99) 0%, rgba(2, 6, 23, 0.99) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.34) !important;
  border-radius: 16px !important;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.78) !important;
  overflow: hidden;
}

.crm-360-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: #0b1120;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.crm-360-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.crm-360-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: #f59e0b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.crm-360-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-360-name-row h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: #f8fafc;
}

.crm-360-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px;
  font-size: 0.78rem;
  color: #94a3b8;
}

.crm-360-phone {
  color: #fbbf24;
  font-weight: 800;
}

.crm-meta-sep {
  color: rgba(148, 163, 184, 0.35);
}

.crm-360-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

@media (max-width: 640px) {
  .crm-360-quick-actions {
    grid-template-columns: 1fr;
  }
}

.crm-360-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.83rem;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.crm-360-action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.crm-360-action-btn.is-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #020617 !important;
}

.crm-360-action-btn.is-info {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8 !important;
}

.crm-360-action-btn.is-emerald {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.48);
  color: #34d399 !important;
}

.crm-360-modal-body {
  padding: 14px 18px 18px !important;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.crm-360-notes-card {
  background: #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
}

.crm-360-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.crm-360-section-head h4 {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
  color: #f8fafc;
}

.crm-save-notes-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 8px;
  background: #10b981;
  color: #020617;
  border: none;
  font-family: 'Cairo', sans-serif !important;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.crm-save-notes-btn:hover {
  filter: brightness(1.08);
}

.crm-360-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.crm-360-edit-grid .crm-col-full {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .crm-360-edit-grid {
    grid-template-columns: 1fr;
  }
}

.crm-360-tickets-section {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 12px;
  padding: 10px 12px;
}

.crm-360-tickets-list,
.crm-360-orders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-360-order-item {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.crm-360-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-360-order-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}


