/* Crispy Crust Enterprise Monorepo - Universal POS Mobile Responsive Adapter */
/* Strict Engineering Standards: Zero Unicode emojis, Clean geometric SVGs, 13.5px base typography, 100% Western digits */

/* ==========================================================================
   1. DESKTOP PRESERVATION GUARANTEE (> 768px)
   Strictly zero layout changes or mobile elements displayed on desktop viewports.
   ========================================================================== */
@media (min-width: 769px) {
  #mobile-screens-dropdown-wrap,
  .mobile-screens-dropdown-wrap,
  #pos-screens-menu-dropdown,
  .pos-screens-menu-dropdown,
  .pos-mobile-only,
  #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;
  }
}

/* ==========================================================================
   2. UNIVERSAL MOBILE INDUSTRIAL VIEWPORT (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    font-size: 13.5px !important;
  }

  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    -webkit-text-size-adjust: 100% !important;
  }

  /* 2.1 Hide Desktop Top Navigation Tabs on Mobile */
  .pos-nav,
  .header-nav,
  .nav-tabs,
  #pos-nav-tabs,
  .pos-nav-tab,
  .branch-selector-container {
    display: none !important;
  }

  /* 2.2 Unified 52px POS Mobile Header (Strictly 3 Elements Row) */
  .pos-navbar.pos-header,
  .pos-navbar,
  .pos-header,
  header#pos-header,
  header {
    display: flex !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    background-color: #0b1120 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: space-between !important;
    z-index: 99999 !important;
    direction: rtl !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    overflow: visible !important;
  }

  /* Element 1 (Right): Compact Brand Logo */
  .brand-section {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
  }

  .brand-section .brand-logo {
    height: 28px !important;
    max-height: 28px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  /* Element 2 (Center): Single-Word Screen Switcher Dropdown */
  #mobile-screens-dropdown-wrap,
  .pos-screens-dropdown-wrap {
    display: inline-flex !important;
    position: relative !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
    z-index: 999999 !important;
  }

  #mobile-screens-dropdown-btn,
  .pos-mobile-nav-trigger {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(245, 158, 11, 0.12) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: #f59e0b !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    height: 34px !important;
    box-sizing: border-box !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  #pos-screens-menu-dropdown,
  .pos-screens-menu-dropdown {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    padding: 6px !important;
    min-width: 180px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    overflow: visible !important;
  }

  #pos-screens-menu-dropdown.hidden {
    display: none !important;
  }

  .pos-screen-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    background: transparent !important;
    border: none !important;
    color: #cbd5e1 !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-align: right !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.15s ease !important;
  }

  .pos-screen-item:hover,
  .pos-screen-item.active {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #f59e0b !important;
    font-weight: 700 !important;
  }

  /* Element 3 (Left): Circular Avatar Profile Button */
  .header-status-panel {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
  }

  #pos-status-capsule.erp-compact-shift-pill,
  .erp-compact-shift-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 3px 8px !important;
    height: 28px !important;
    border-radius: 999px !important;
    background: rgba(30, 41, 59, 0.78) !important;
    border: 1px solid rgba(51, 65, 85, 0.75) !important;
    font-size: 10.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
  }

  #pos-status-capsule .erp-clock-wrap {
    gap: 4px !important;
  }

  #pos-status-capsule .erp-pulse-dot {
    width: 6px !important;
    height: 6px !important;
  }

  .pos-user-dropdown-wrap {
    display: inline-flex !important;
    position: relative !important;
  }

  #btn-pos-user-menu,
  .pos-user-menu-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    border-radius: 50% !important;
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    color: #f59e0b !important;
    cursor: pointer !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  #btn-pos-user-menu svg {
    width: 18px !important;
    height: 18px !important;
  }

  #pos-user-menu-dropdown {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: auto !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    padding: 8px !important;
    min-width: 210px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
    z-index: 10000 !important;
  }

  /* 2.3 Cashier Sub-Toolbar Proportion & Non-Clipping */
  .menu-top-toolbar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .menu-top-toolbar .search-input-box {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 36px !important;
    background: rgba(15, 23, 42, 0.9) !important;
    border-radius: 12px !important;
  }

  .menu-top-toolbar .search-input,
  #pos-search-input {
    width: 100% !important;
    height: 36px !important;
    font-size: 0.8rem !important;
    padding: 0 32px 0 10px !important;
    box-sizing: border-box !important;
    background: rgba(15, 23, 42, 0.9) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 12px !important;
  }

  #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;
  }

  .menu-top-toolbar #btn-pos-cashier-camera-scan,
  .menu-top-toolbar .btn-cashier-camera-dark {
    flex: 0 0 auto !important;
    height: 36px !important;
    white-space: nowrap !important;
    padding: 0 9px !important;
    font-size: 0.73rem !important;
    border-radius: 10px !important;
    gap: 5px !important;
  }

  .menu-top-toolbar #btn-focus-scanner {
    flex: 0 0 auto !important;
    height: 36px !important;
    white-space: nowrap !important;
    padding: 0 8px !important;
    font-size: 0.72rem !important;
  }

  /* 2.4 Form Rows & 2-Column Responsive Stacking */
  .form-row-2col,
  .pos-form-row-2col {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  /* 2.5 Receipt 80mm Designer Split-View Stack */
  #pane-exec-receipt > div {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    width: 100% !important;
  }

  .receipt-preview-container,
  .exec-receipt-preview-card {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  /* 2.6 Shift Hub & Waste Log Clean Tables & Subtitles */
  .pos-audit-table-wrapper,
  .pos-mini-table-wrapper,
  .pos-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
  }

  .pos-audit-table-wrapper table,
  .pos-mini-table-wrapper table {
    min-width: 480px !important;
  }

  .audit-schedule-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .audit-schedule-info {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  /* 2.7 Floor Plan Viewport De-clutter & Bottom Sticky Bar */
  .floor-top-command-bar {
    padding: 6px 10px !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .floor-top-command-bar .pos-btn-cancel {
    display: none !important;
  }

  .floor-top-command-bar h2 {
    font-size: 0.95rem !important;
  }

  .floor-top-command-bar p {
    display: none !important;
  }

  .floor-plan-fullpage-body {
    padding: 8px 10px 72px 10px !important;
  }

  /* Mobile Floor Plan Grid (Clean 2-Column Proportional Cards) */
  .floor-plan-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .arch-table-card {
    min-height: 215px !important;
    padding: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    overflow: visible !important;
  }

  .arch-table-card svg {
    max-height: 75px !important;
    width: 100% !important;
  }

  .floor-plan-bottom-bar {
    position: sticky !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    padding: 0 10px !important;
    background: #0f172a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    z-index: 100 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.5) !important;
  }

  .floor-plan-bottom-bar .pos-btn-cancel {
    display: none !important;
  }

  .floor-table-action-drawer {
    padding: 8px 10px !important;
    font-size: 0.78rem !important;
  }

  /* 2.8 Clean Product Cards in Settings */
  .exec-menu-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .exec-menu-table-wrap table {
    min-width: 580px !important;
  }
}

/* ==========================================================================
   UNIFIED V29 52PX FIXED HEADER & RIGHT SLIDE-OUT HAMBURGER DRAWER STANDARD
   ========================================================================== */

*, body, button, input, select, textarea, table, th, td, .font-mono, code, pre {
  font-family: 'Cairo', sans-serif !important;
}

#app-top-header,
.erp-top-header,
header.pos-header#app-top-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  width: 100% !important;
  z-index: 99990 !important;
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  padding: 0 14px !important;
  background: #0b1120 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-sizing: border-box !important;
}

.erp-header-right-cell {
  justify-self: start !important;
  display: flex !important;
  align-items: center !important;
}

.erp-drawer-toggle-btn {
  width: 38px !important;
  height: 38px !important;
  border-radius: 8px !important;
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #f59e0b !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  padding: 0 !important;
}

.erp-drawer-toggle-btn:hover {
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
}

.erp-header-center-cell {
  justify-self: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.erp-header-center-cell .brand-logo {
  height: 36px !important;
  width: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

.erp-header-left-cell {
  justify-self: end !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.erp-compact-shift-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 10px !important;
  height: 30px !important;
  border-radius: 999px !important;
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(51, 65, 85, 0.7) !important;
  font-size: 11.5px !important;
  color: #e2e8f0 !important;
}

.erp-clock-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  color: #34d399 !important;
  font-weight: 700 !important;
}

.erp-pulse-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  box-shadow: 0 0 6px #10b981 !important;
}

.erp-pill-sep {
  color: #475569 !important;
}

.erp-shift-short {
  color: #e2e8f0 !important;
  font-weight: 700 !important;
}

.erp-drawer-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(2, 6, 23, 0.72) !important;
  backdrop-filter: blur(3px) !important;
  z-index: 999998 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.24s ease !important;
}

.erp-drawer-backdrop.open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.erp-side-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 310px !important;
  max-width: 88vw !important;
  height: 100dvh !important;
  z-index: 999999 !important;
  background: #0f172a !important;
  border-left: 1px solid rgba(245, 158, 11, 0.3) !important;
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.75) !important;
  display: flex !important;
  flex-direction: column !important;
  transform: translateX(105%) !important;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.erp-side-drawer.open {
  transform: translateX(0) !important;
}

.erp-drawer-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 14px !important;
  background: #090d16 !important;
  border-bottom: 1px solid rgba(245, 158, 11, 0.22) !important;
  flex-shrink: 0 !important;
}

.erp-drawer-logo-badge {
  width: 36px !important;
  height: 36px !important;
  border-radius: 9px !important;
  background: rgba(245, 158, 11, 0.14) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.erp-drawer-title {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
}

.erp-drawer-subtitle {
  display: block !important;
  font-size: 11px !important;
  color: #94a3b8 !important;
}

.erp-drawer-close-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  color: #cbd5e1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.erp-drawer-ceo-card {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  margin: 10px 12px 0 !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.92)) !important;
  border: 1px solid rgba(245, 158, 11, 0.38) !important;
  flex-shrink: 0 !important;
}

.erp-drawer-ceo-avatar {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 50% !important;
  background: rgba(245, 158, 11, 0.18) !important;
  border: 1px solid rgba(245, 158, 11, 0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.erp-drawer-ceo-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  min-width: 0 !important;
}

.erp-drawer-ceo-name {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  line-height: 1.2 !important;
}

.erp-drawer-ceo-meta {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.erp-drawer-role-badge {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.14) !important;
  padding: 1px 7px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.erp-drawer-shift-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  box-shadow: 0 0 6px #10b981 !important;
}

.erp-drawer-shift-text {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #34d399 !important;
}

.erp-drawer-body {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 10px 12px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.erp-drawer-section {
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 12px !important;
  padding: 10px !important;
  margin-bottom: 4px !important;
}

.erp-drawer-system-section {
  background: rgba(9, 13, 22, 0.85) !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
}

.erp-drawer-section-header {
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  padding: 2px 6px 6px !important;
  letter-spacing: 0px !important;
}

.erp-drawer-items {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.erp-drawer-item {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: #cbd5e1 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  text-align: right !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
}

.erp-drawer-item:hover {
  background: rgba(30, 41, 59, 0.9) !important;
  color: #ffffff !important;
}

.erp-drawer-item.active {
  background: rgba(245, 158, 11, 0.14) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #f59e0b !important;
  font-weight: 800 !important;
}

.main-content {
  padding-top: 68px !important;
}

@media (min-width: 769px) {
  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;
  }
}

.panel-card,
.card,
.stat-card,
.metric-card,
.data-table-container {
  margin-bottom: 16px !important;
}

.toolbar,
.section-toolbar,
.toolbar-container,
.action-bar {
  gap: 12px !important;
}

#cc-mobile-topbar.cc-mobile-topbar,
.pos-screens-dropdown-wrap,
#pos-screens-menu-dropdown {
  display: none !important;
}

@media (max-width: 768px) {
  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(100dvh - 52px) !important;
    max-height: calc(100dvh - 52px) !important;
  }

  .erp-header-center-cell .brand-logo {
    height: 30px !important;
  }

  #tab-inventory .pos-branch-stock-actions,
  #tab-recipes .recipes-header-actions {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  #tab-inventory #btn-receive-starter-kit,
  #tab-inventory #btn-refresh-stock,
  #tab-recipes #btn-print-meals-barcodes-a4 {
    width: 100% !important;
    justify-content: center !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.3 !important;
    min-height: 40px !important;
  }

  /* Section 8: Inventory Scan-to-Receive & WH-2 Branch Operational Table (< 768px) */
  #tab-inventory.inventory-container,
  #tab-recipes.recipes-container {
    padding: 10px !important;
    gap: 10px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #tab-inventory .scanner-toolbar-card {
    padding: 12px !important;
    gap: 10px !important;
  }

  #tab-inventory .pos-scanner-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  #tab-inventory .pos-scanner-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #tab-inventory .pos-scanner-actions .btn-scanner-action,
  #tab-inventory #btn-pos-scan-factory-qr,
  #tab-inventory #btn-fetch-erp-transfers {
    width: 100% !important;
    min-height: 44px !important;
    padding: 8px 10px !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.25 !important;
    font-size: 0.78rem !important;
  }

  #tab-inventory .scanner-input-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #tab-inventory #manual-scan-input {
    width: 100% !important;
    min-height: 44px !important;
    font-size: 13.5px !important;
    box-sizing: border-box !important;
  }

  #tab-inventory #btn-execute-scan {
    width: 100% !important;
    min-height: 44px !important;
    justify-content: center !important;
  }

  #tab-inventory .branch-stock-panel .pos-table-wrapper,
  #tab-inventory .erp-transfers-panel .pos-table-wrapper {
    overflow-x: visible !important;
    border: none !important;
    padding: 4px 0 !important;
  }

  #tab-inventory .branch-stock-panel table,
  #tab-inventory .erp-transfers-panel table,
  #tab-inventory #branch-stock-tbody,
  #tab-inventory #erp-transfers-tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #tab-inventory .branch-stock-panel table thead,
  #tab-inventory .erp-transfers-panel table thead {
    display: none !important;
  }

  #tab-inventory #branch-stock-tbody tr {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px 10px !important;
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(51, 65, 85, 0.85) !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #tab-inventory #branch-stock-tbody tr td {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 2px !important;
    border: none !important;
    padding: 3px 0 !important;
    white-space: normal !important;
    min-width: 0 !important;
    width: auto !important;
    text-align: right !important;
  }

  #tab-inventory #branch-stock-tbody tr td[data-label]::before {
    content: attr(data-label);
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
  }

  #tab-inventory #branch-stock-tbody tr td:nth-child(2) {
    grid-column: 1 / -1 !important;
    font-size: 0.95rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    padding-bottom: 6px !important;
  }

  #tab-inventory #branch-stock-tbody tr td:nth-child(2)::before {
    display: none !important;
  }

  #tab-inventory #branch-stock-tbody tr td:nth-child(1) {
    grid-column: 1 / -1 !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  #tab-inventory #branch-stock-tbody tr td:nth-child(4) {
    grid-column: 1 / -1 !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: rgba(30, 41, 59, 0.55) !important;
    padding: 6px 8px !important;
    border-radius: 6px !important;
  }

  #tab-inventory #erp-transfers-tbody tr {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(51, 65, 85, 0.85) !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #tab-inventory #erp-transfers-tbody tr td {
    display: block !important;
    width: 100% !important;
    border: none !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  #tab-inventory #erp-transfers-tbody tr td .btn-inspect-action,
  #tab-inventory #erp-transfers-tbody tr td .btn-scanner-action {
    flex: 1 1 46% !important;
    min-height: 40px !important;
    justify-content: center !important;
  }

  /* Section 8: Recipe BOM Directory (< 768px) */
  #tab-recipes .recipes-header-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #tab-recipes #pos-recipes-grid,
  #tab-recipes .recipes-grid,
  #tab-recipes .recipes-directory-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  #tab-recipes .recipe-card {
    padding: 12px !important;
    gap: 10px !important;
  }

  #tab-recipes .recipe-card-identity {
    gap: 10px !important;
  }

  #tab-recipes .recipe-card-thumb {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
  }

  #tab-recipes .recipe-card-title {
    font-size: 0.95rem !important;
    white-space: normal !important;
  }

  #tab-recipes .recipe-card-barcode-strip svg {
    max-height: 38px !important;
  }

  #tab-recipes .bom-ingredient-clean-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }

  #tab-recipes .bom-ingredient-left {
    justify-content: flex-start !important;
  }

  /* Section 9: Kitchen Display System (#tab-kds) Un-Squish (< 768px) */
  #tab-kds.view-panel.active,
  #tab-kds.kds-container {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #tab-kds .kds-toolbar {
    flex: 0 0 auto !important;
  }

  #tab-kds .kds-grid,
  #tab-kds #kds-orders-grid,
  .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;
  }

  #tab-kds .kds-ticket,
  #tab-kds .kds-card,
  .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;
  }

  #tab-kds .kds-ticket-body,
  #tab-kds .kds-card-body,
  .kds-ticket-body,
  .kds-card-body {
    flex: 0 0 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #tab-kds .kds-ticket-footer,
  #tab-kds .kds-card-footer,
  .kds-ticket-footer,
  .kds-card-footer {
    flex: 0 0 auto !important;
  }
}


