/* Crispy Crust Enterprise Design System (V29 Standard) - Standalone Odoo-Grade WMS Inventory App */
/* Strict Standards: Zero Unicode emojis, 100% Cairo font, 100% Western numerals, 13.5px root */

:root {
  font-size: 13.5px;
  --bg-primary: #020617;
  --bg-card: #0f172a;
  --bg-drawer: #0f172a;
  --bg-elevated: #1e293b;
  --bg-surface-subtle: rgba(15, 23, 42, 0.70);
  --bg-header: #0b1120;

  --brand-gold: #f59e0b;
  --brand-gold-hover: #fbbf24;
  --gold-active-tint: rgba(245, 158, 11, 0.14);
  --gold-active-border: rgba(245, 158, 11, 0.45);
  --brand-crimson: #dc2626;
  --status-emerald: #10b981;
  --status-info: #38bdf8;
  --status-warning: #f59e0b;
  --status-purple: #a855f7;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-default: rgba(51, 65, 85, 0.65);
}

*,
*::before,
*::after,
body,
button,
input,
select,
textarea,
table,
th,
td,
.font-mono,
code,
pre {
  font-family: 'Cairo', sans-serif !important;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Zero Ugly White Scrollbars Standard across all containers */
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: #020617;
}
*::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* -------------------------------------------------------------
   1. FIXED 52px TOP HEADER
   ------------------------------------------------------------- */
.erp-top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  width: 100%;
  z-index: 99990;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  direction: rtl;
  box-sizing: border-box;
}

.erp-header-right-cell,
.erp-header-cell.start {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 8px;
}

.erp-drawer-toggle-btn,
.erp-header-btn,
#app-drawer-toggle-btn,
#btn-drawer-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  outline: none;
}

.erp-drawer-toggle-btn:hover,
.erp-header-btn:hover,
#app-drawer-toggle-btn:hover,
#btn-drawer-toggle:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: var(--brand-gold);
  color: var(--brand-gold);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.32);
}

.erp-header-center-cell,
.erp-header-cell.center {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  max-height: 34px;
  width: auto;
  object-fit: contain;
  cursor: pointer;
}

.erp-header-left-cell,
.erp-header-cell.end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.erp-clock-capsule,
.erp-compact-shift-pill {
  direction: rtl;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-pulse-dot,
.erp-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
  animation: pulse-dot 2s infinite;
}

.erp-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--status-emerald);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--status-emerald);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.erp-pill-sep {
  color: var(--text-muted);
}

/* -------------------------------------------------------------
   2. SLIDE-OUT RIGHT DRAWER (300px)
   ------------------------------------------------------------- */
.erp-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
  z-index: 999998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}

.erp-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.erp-side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 310px;
  max-width: 88vw;
  height: 100dvh;
  z-index: 999999;
  background: var(--bg-drawer);
  border-left: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.erp-side-drawer.open {
  transform: translateX(0);
}

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

.erp-drawer-logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gold-active-tint);
  border: 1px solid var(--gold-active-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.erp-drawer-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.erp-drawer-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}

.erp-drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.erp-drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Executive CEO Identity Card */
.erp-drawer-ceo-card {
  margin: 12px 14px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--gold-active-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.erp-drawer-ceo-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.8);
  border: 1.5px solid var(--brand-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.erp-drawer-ceo-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.erp-drawer-ceo-name {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-primary);
}

.erp-drawer-ceo-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.erp-drawer-role-badge {
  color: var(--brand-gold);
  font-weight: 700;
}

.erp-drawer-shift-dot {
  width: 6px;
  height: 6px;
  background: var(--status-emerald);
  border-radius: 50%;
}

.erp-drawer-body {
  padding: 0 14px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.erp-drawer-section {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px;
}

.erp-drawer-section-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-right: 4px;
}

.erp-drawer-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.erp-drawer-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: right;
  transition: all 0.18s ease;
}

.erp-drawer-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.erp-drawer-item.active {
  background: var(--gold-active-tint);
  border: 1px solid var(--gold-active-border);
  color: var(--brand-gold);
  font-weight: 800;
}

.erp-drawer-item svg {
  flex-shrink: 0;
}

/* -------------------------------------------------------------
   3. MAIN WORKSPACE LAYOUT & CARDS RHYTHM
   ------------------------------------------------------------- */
.main-content,
main,
.dash {
  padding-top: 68px !important;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 84px !important;
  max-width: 1540px;
  margin: 0 auto;
}

.panel-card,
.card,
.metric-card-container,
.data-table-container {
  margin-bottom: 16px !important;
}

.toolbar,
.section-toolbar,
.toolbar-container,
.action-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  align-items: center !important;
}

/* Sticky Quick Barcode Scanner Bar */
.wms-scanner-bar {
  background: linear-gradient(90deg, #0f172a, #1e293b);
  border: 1px solid var(--gold-active-border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.wms-scanner-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-default);
  border-radius: 8px;
  padding: 6px 12px;
  transition: border-color 0.2s;
}

.wms-scanner-input-wrap:focus-within {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 2px var(--gold-active-tint);
}

.wms-scanner-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 700;
}

.wms-scanner-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.wms-scanner-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scanner-test-pill {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.scanner-test-pill:hover {
  border-color: var(--brand-gold);
  color: var(--brand-gold);
}

/* Top Banner Header */
.wms-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.wms-page-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wms-title-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gold-active-tint);
  border: 1.5px solid var(--brand-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-gold);
}

.wms-page-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
}

.wms-page-sub {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.wms-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Nav Tabs bar - Zero Horizontal Scrollbars */
.wms-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.wms-tabs-bar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.wms-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.wms-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.wms-tab-btn.active {
  background: var(--gold-active-tint);
  border-color: var(--brand-gold);
  color: var(--brand-gold);
  font-weight: 800;
}

.wms-tab-badge {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
}

.wms-tab-btn.active .wms-tab-badge {
  background: var(--brand-gold);
  color: #020617;
}

/* -------------------------------------------------------------
   4. MODULE 1: ODOO-STYLE KANBAN CARDS
   ------------------------------------------------------------- */
.wms-kanban-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.wms-kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.wms-kanban-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

.wms-kanban-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wms-kanban-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wms-kanban-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wms-kanban-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.wms-kanban-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wms-kanban-icon.blue { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.wms-kanban-icon.amber { background: var(--gold-active-tint); color: var(--brand-gold); }
.wms-kanban-icon.emerald { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.wms-kanban-icon.purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

.wms-kanban-count-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.wms-kanban-count {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
}

.wms-kanban-count-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.wms-kanban-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------
   5. DATA TABLES & PANELS
   ------------------------------------------------------------- */
.wms-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.wms-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.wms-panel-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wms-table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.wms-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 12.5px;
}

.wms-table th {
  background: #111a2e;
  color: var(--text-secondary);
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}

.wms-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.wms-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.wms-table tr:last-child td {
  border-bottom: none;
}

/* -------------------------------------------------------------
   6. MODULE 2: SUB-LOCATIONS & PACK SPLITTING ENGINE
   ------------------------------------------------------------- */
.wms-locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.wms-location-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wms-location-card:hover,
.wms-location-card.selected {
  border-color: var(--brand-gold);
  background: rgba(30, 41, 59, 0.6);
}

.wms-loc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wms-loc-code {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-gold);
}

.wms-strategy-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.wms-strategy-badge.fefo {
  background: rgba(220, 38, 38, 0.18);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #f87171;
}

.wms-strategy-badge.fifo {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.wms-loc-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.wms-loc-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.wms-temp-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
}

.wms-temp-pill.cold {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

/* Pack Splitting Box */
.wms-split-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(15, 23, 42, 0.9));
  border: 1.5px solid var(--gold-active-border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}

.wms-split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: end;
}

/* -------------------------------------------------------------
   7. BUTTONS, INPUTS & CONTROLS
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-gold);
  color: #020617;
}

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

.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-default);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-danger {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.5);
  color: #f87171;
}

.btn-danger:hover {
  background: var(--brand-crimson);
  color: #fff;
}

.btn-success {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.btn-success:hover {
  background: var(--status-emerald);
  color: #020617;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
  border-radius: 6px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-control {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--brand-gold);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-gold {
  background: var(--gold-active-tint);
  border: 1px solid var(--gold-active-border);
  color: var(--brand-gold);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.badge-crimson {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #f87171;
}

.badge-info {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

/* -------------------------------------------------------------
   8. MODALS & CONNECTED APPS GRID
   ------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(5px);
  z-index: 999995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 680px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

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

.modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* -------------------------------------------------------------
   9. 80mm ADHESIVE THERMAL BARCODE LABEL PRINTING
   ------------------------------------------------------------- */
#thermal-label-print-area {
  display: none;
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  body * {
    visibility: hidden;
  }
  #thermal-label-print-area,
  #thermal-label-print-area * {
    visibility: visible;
  }
  #thermal-label-print-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
    padding: 2mm;
    margin: 0 auto;
    font-family: 'Cairo', sans-serif !important;
    color: #000 !important;
  }
  .thermal-label-card {
    page-break-after: always;
    border: 1px dashed #000;
    padding: 4mm;
    margin-bottom: 3mm;
    text-align: center;
  }
}

.thermal-label-preview {
  width: 80mm;
  max-width: 100%;
  background: #ffffff;
  color: #000000;
  padding: 12px;
  border-radius: 6px;
  border: 1.5px solid #000000;
  font-size: 11px;
  line-height: 1.3;
  margin: 0 auto;
  text-align: center;
}

.thermal-label-preview .brand-title {
  font-size: 13px;
  font-weight: 800;
  border-bottom: 1.5px solid #000;
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.thermal-barcode-svg {
  width: 100%;
  max-height: 48px;
  margin: 6px 0;
}

/* -------------------------------------------------------------
   10. TOAST NOTIFICATIONS & AUDIO INDICATOR
   ------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  animation: toast-in 0.25s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-success {
  background: #064e3b;
  border: 1px solid #059669;
  color: #ecfdf5;
}

.toast-error {
  background: #7f1d1d;
  border: 1px solid #dc2626;
  color: #fef2f2;
}

.toast-info {
  background: #0c4a6e;
  border: 1px solid #0284c7;
  color: #f0f9ff;
}

/* -------------------------------------------------------------
   11. MOBILE RESPONSIVE ADAPTATIONS (<= 768px)
   ------------------------------------------------------------- */
@media (max-width: 768px) {
  .erp-top-header {
    padding: 0 10px;
  }
  .brand-logo {
    max-height: 28px;
  }
  .erp-compact-shift-pill {
    padding: 3px 8px !important;
    font-size: 11px !important;
    gap: 4px !important;
  }
  .main-content,
  main,
  .dash {
    padding-top: 64px !important;
    padding-left: 12px;
    padding-right: 12px;
  }
  .wms-scanner-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .wms-kanban-grid {
    grid-template-columns: 1fr;
  }
  .wms-locations-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================
   12. DAY-1 LEAN SUPERMARKET & PHARMACY BARCODE ARCHITECTURE
   ============================================================= */

/* 12.1 Cashier-Style Receiving Terminal (#pos-receiving) */
.pos-terminal-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-top: 16px;
}

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

.pos-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.75));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Scanned Item Staging Box Styles */
.staging-box-empty {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
  background: rgba(15, 23, 42, 0.5);
  border: 1.5px dashed rgba(148, 163, 184, 0.22);
  border-radius: 12px;
}

.staging-box-active {
  background: linear-gradient(145deg, rgba(20, 30, 50, 0.95), rgba(15, 23, 42, 0.85));
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.12);
  animation: stagingFadeIn 0.25s ease-out;
}

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

.sim-chips-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.sim-chip-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.sim-chip-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.sim-chip-code {
  font-family: 'Cairo', sans-serif !important;
  color: #f59e0b;
  font-weight: 800;
}

/* Camera Scanner Modal & Laser Line */
.camera-scanner-frame {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 280px;
  background: #020617;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(245, 158, 11, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.camera-scanner-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-laser-line {
  position: absolute;
  left: 6%;
  right: 6%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ef4444, #f59e0b, #ef4444, transparent);
  box-shadow: 0 0 14px #ef4444, 0 0 8px #f59e0b;
  animation: laserSweep 2s infinite ease-in-out;
  pointer-events: none;
  z-index: 10;
}

@keyframes laserSweep {
  0% { top: 12%; opacity: 0.8; }
  50% { top: 86%; opacity: 1; }
  100% { top: 12%; opacity: 0.8; }
}

.camera-reticle {
  position: absolute;
  width: 70%;
  height: 60%;
  border: 2px dashed rgba(245, 158, 11, 0.6);
  border-radius: 10px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.35);
}

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

.pos-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pos-scanner-box {
  background: #0b1120;
  border: 2px solid var(--brand-gold);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.14);
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
}

.pos-scanner-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--brand-gold);
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.pos-scanner-input::placeholder {
  color: #64748b;
  font-size: 12.5px;
  font-weight: 500;
}

.pos-scanner-cam-btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 800;
  border-radius: 9px;
}

.pos-multiplier-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.multiplier-pill {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.multiplier-pill:hover {
  background: #334155;
  color: #f8fafc;
}

.multiplier-pill.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: var(--brand-gold);
  color: var(--brand-gold);
}

.multiplier-custom-input {
  width: 70px;
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  text-align: center;
  padding: 6px 8px;
  font-size: 13px;
}

.multiplier-custom-input:focus {
  border-color: var(--brand-gold);
  outline: none;
}

.pos-quick-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .pos-quick-items-grid {
    grid-template-columns: 1fr;
  }
}

.pos-quick-item-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: right;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pos-quick-item-card:hover {
  background: #273549;
  border-color: var(--brand-gold);
  transform: translateY(-2px);
}

.pos-item-code-chip {
  align-self: flex-start;
  background: rgba(245, 158, 11, 0.14);
  color: var(--brand-gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.pos-item-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.pos-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* POS Cart Table */
.pos-cart-table {
  width: 100%;
  border-collapse: collapse;
}

.pos-cart-table th {
  background: #0b1120;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border-default);
}

.pos-cart-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: var(--text-primary);
  vertical-align: middle;
}

.pos-cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #1e293b;
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.qty-btn:hover {
  background: #334155;
}

.pos-cart-footer {
  margin-top: 16px;
  padding-top: 14px;
  padding-bottom: 16px;
  border-top: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 3;
}

.pos-cart-total-badge {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-gold);
}

/* 12.2 Pharmacy Spec Checker & Barcode Guide (#barcode-guide) */
.spec-checker-search-bar {
  background: #0b1120;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.spec-checker-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #38bdf8;
  font-size: 15px;
  font-weight: 700;
}

.master-spec-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  border: 2px solid rgba(56, 189, 248, 0.4);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 20px;
  align-items: center;
}

@media (max-width: 800px) {
  .master-spec-card {
    grid-template-columns: 1fr;
  }
}

.spec-header-title {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.spec-attributes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.spec-attr-box {
  background: rgba(11, 17, 32, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
}

.spec-attr-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 3px;
}

.spec-attr-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}

.spec-barcode-render {
  background: #ffffff;
  padding: 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid #e2e8f0;
}

.spec-barcode-text {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 2px;
  margin-top: 4px;
}

/* Dark-Glass 2-Column Search & Filter Bar (#barcode-guide) */
.barcode-guide-toolbar {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.barcode-guide-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.barcode-guide-search-wrap:focus-within {
  border-color: var(--brand-gold);
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.barcode-guide-search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

.barcode-guide-search-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.barcode-guide-select {
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.72);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-family: 'Cairo', sans-serif !important;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.barcode-guide-select:focus {
  border-color: var(--brand-gold);
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.barcode-dir-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 12px;
  row-gap: 0;
  margin-top: 12px;
}

@media (max-width: 1100px) {
  .barcode-dir-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .barcode-guide-toolbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .barcode-dir-grid {
    grid-template-columns: 1fr;
  }
}

.barcode-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.barcode-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.barcode-card-row1 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.barcode-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.barcode-code-pill {
  background: var(--gold-active-tint);
  border: 1px solid var(--gold-active-border);
  color: var(--brand-gold);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.barcode-item-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.barcode-stock-pill {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.barcode-card-meta-line {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.barcode-card-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.barcode-svg-box {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.barcode-svg-box svg {
  max-width: 100%;
  height: 40px;
  display: block;
  margin: auto;
}

.barcode-print-btn {
  flex-shrink: 0;
  height: 48px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--brand-gold);
  border: 1px solid var(--brand-gold);
  color: #020617;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.barcode-print-btn:hover {
  background: var(--brand-gold-hover);
  border-color: var(--brand-gold-hover);
}

/* Series D: Meal Barcodes & BOM Summary Cards */
.barcode-card-series-d {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.72));
}

.barcode-card-series-d:hover {
  border-color: rgba(245, 158, 11, 0.65);
}

.barcode-price-pill {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #34d399;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.barcode-bom-summary {
  margin-top: 7px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.barcode-bom-summary strong {
  color: var(--brand-gold);
  font-weight: 800;
}

.barcode-btn-series-d {
  border-color: rgba(245, 158, 11, 0.55) !important;
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

.barcode-btn-series-d:hover {
  background: rgba(245, 158, 11, 0.22) !important;
}

.barcode-print-btn-d {
  height: auto;
  min-height: 44px;
  padding: 6px 11px;
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
  max-width: 145px;
}

@media (max-width: 480px) {
  .barcode-card-action-row {
    flex-direction: column;
    align-items: stretch;
  }
  .barcode-print-btn-d {
    max-width: none;
    width: 100%;
  }
}

.barcode-dir-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.barcode-dir-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-gold);
}

.barcode-svg-plate {
  background: #ffffff;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 12.3 Large Shelf / Pallet Freezer Sticker (#modal-pallet-shelf-sticker) */
.pallet-sticker-sheet {
  background: #ffffff;
  color: #000000;
  border: 3px solid #000000;
  border-radius: 10px;
  padding: 24px;
  max-width: 580px;
  margin: 0 auto;
  font-family: 'Cairo', sans-serif !important;
  text-align: right;
  direction: rtl;
}

.pallet-sticker-header {
  border-bottom: 2px solid #000000;
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pallet-sticker-brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.pallet-sticker-tag {
  background: #000000;
  color: #ffffff;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 4px;
}

.pallet-sticker-item-title {
  font-size: 20px;
  font-weight: 800;
  color: #000000;
  margin: 0 0 16px 0;
  line-height: 1.35;
}

.pallet-sticker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.pallet-sticker-cell {
  border: 1.5px solid #000000;
  padding: 8px 12px;
  border-radius: 6px;
}

.pallet-sticker-cell.expiry {
  background: #fef2f2;
  border: 2.5px solid #dc2626;
}

.pallet-sticker-cell-label {
  font-size: 11px;
  color: #4b5563;
  font-weight: 700;
  margin-bottom: 2px;
}

.pallet-sticker-cell-val {
  font-size: 15px;
  font-weight: 800;
  color: #000000;
}

.pallet-sticker-cell.expiry .pallet-sticker-cell-val {
  color: #b91c1c;
}

.pallet-sticker-barcode-row {
  border-top: 2px dashed #000000;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* 12.4 Standard A4 24-Label Sheet Engine (3 cols x 8 rows = 70mm x 37mm) */
.a4-preview-scroll {
  max-height: 75vh;
  overflow-y: auto;
  background: #475569;
  padding: 20px;
  border-radius: 10px;
  display: flex;
  justify-content: center;
}

.a4-sheet-page {
  background: #ffffff;
  color: #000000;
  width: 210mm;
  min-height: 297mm;
  padding: 10mm 7mm;
  box-sizing: border-box;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
  font-family: 'Cairo', sans-serif !important;
  direction: rtl;
}

.a4-labels-grid {
  display: grid;
  grid-template-columns: repeat(3, 70mm);
  grid-template-rows: repeat(8, 37mm);
  gap: 0;
  justify-content: center;
}

.a4-single-label {
  width: 70mm;
  height: 37mm;
  border: 0.5px dashed #cbd5e1;
  padding: 2mm 3mm;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  background: #ffffff;
  overflow: hidden;
}

.a4-label-top-brand {
  font-size: 7pt;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

.a4-label-name {
  font-size: 8.5pt;
  font-weight: 800;
  color: #000000;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64mm;
}

.a4-label-barcode-svg {
  width: 92%;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.a4-label-code-text {
  font-size: 9pt;
  font-weight: 900;
  font-family: monospace;
  letter-spacing: 1.5px;
  color: #000000;
  line-height: 1;
}

/* =============================================================
   13. STRICT PRINT MEDIA QUERIES (@media print)
   ============================================================= */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .erp-top-header,
  .erp-side-drawer,
  .erp-drawer-backdrop,
  .wms-scanner-bar,
  .wms-page-header,
  .wms-tabs-bar,
  .wms-section,
  .modal-backdrop:not(.print-active) {
    display: none !important;
  }

  .modal-backdrop.print-active {
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  .modal-backdrop.print-active .modal-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .modal-backdrop.print-active .modal-header,
  .modal-backdrop.print-active .modal-footer,
  .modal-backdrop.print-active .no-print {
    display: none !important;
  }

  .pallet-sticker-sheet {
    box-shadow: none !important;
    margin: 0 auto !important;
    page-break-inside: avoid;
  }

  .a4-preview-scroll {
    background: transparent !important;
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .a4-sheet-page {
    box-shadow: none !important;
    margin: 0 !important;
    padding: 8mm 6mm !important;
    width: 100% !important;
    min-height: auto !important;
    page-break-after: always;
  }

  .a4-single-label {
    border: 1px dashed #e2e8f0 !important;
  }

  @page {
    size: A4 portrait;
    margin: 4mm;
  }
}

/* =============================================================
   14. MANDATORY MOBILE-FIRST RESPONSIVE ARCHITECTURE (< 768px)
   Codified from DESIGN_SYSTEM.md Section 8
   ============================================================= */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  /* 1. Zero Horizontal Overflow */
  body, .main-content, .wms-section {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* 2. Navigation Tabs arranged in clean responsive grid (5th tab full-width) */
  .wms-tabs-bar {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    overflow-x: visible !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .wms-tabs-bar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .wms-tabs-bar .wms-tab-btn:nth-child(5) {
    grid-column: 1 / -1 !important;
  }
  .wms-tab-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 10px 6px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
    gap: 4px !important;
  }
  .wms-tab-badge {
    margin-inline-start: 0 !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
  }

  /* 3. KPI Summary Cards Grid: Strict 2x2 */
  .metric-card-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .metric-card-container .panel-card {
    padding: 12px !important;
  }
  .metric-card-container .panel-card div:nth-child(2) {
    font-size: 18px !important;
  }

  /* 4. Ultra-Compact Scanner Bar: Single Row Input + Camera Button */
  .pos-scanner-box {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 7px 10px !important;
    margin-bottom: 10px !important;
  }
  .pos-scanner-box > svg {
    display: none;
  }
  .pos-scanner-input {
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
    font-size: 12.5px !important;
    padding: 6px 4px !important;
    box-sizing: border-box !important;
  }
  .pos-scanner-cam-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    width: auto !important;
  }

  /* 5. Terminal Grid: Stack columns vertically */
  .pos-terminal-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* 6. Table-to-Card Transformation on Mobile */
  .pos-cart-table thead,
  #stock-overview-table thead,
  #pos-dispatch-cart-table thead {
    display: none !important;
  }

  .pos-cart-table tbody tr,
  #stock-overview-table tbody tr,
  #pos-dispatch-cart-table tbody tr {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
    border-radius: 12px !important;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  }

  /* First cell (Item Name + Barcode) and control/summary cells span full card width */
  .pos-cart-table tbody tr td:first-child,
  .pos-cart-table tbody tr td:nth-child(2),
  .pos-cart-table tbody tr td:nth-child(3),
  #stock-overview-table tbody tr td:first-child,
  #stock-overview-table tbody tr td:nth-child(2),
  #pos-dispatch-cart-table tbody tr td:first-child,
  #pos-dispatch-cart-table tbody tr td:nth-child(2),
  #pos-dispatch-cart-table tbody tr td:nth-child(3) {
    grid-column: 1 / -1 !important;
    white-space: normal !important;
    word-break: break-word !important;
    font-size: 13px !important;
    padding: 4px 0 !important;
  }

  /* Last cell (Actions / buttons) spans full width */
  .pos-cart-table tbody tr td:last-child,
  #stock-overview-table tbody tr td:last-child,
  #pos-dispatch-cart-table tbody tr td:last-child {
    grid-column: 1 / -1 !important;
    display: flex !important;
    justify-content: stretch !important;
    padding-top: 8px !important;
    border-top: 1px dashed rgba(148, 163, 184, 0.18) !important;
  }
  .pos-cart-table tbody tr td:last-child .btn,
  #stock-overview-table tbody tr td:last-child .btn,
  #pos-dispatch-cart-table tbody tr td:last-child .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Regular cells have label badges */
  .pos-cart-table tbody tr td,
  #stock-overview-table tbody tr td,
  #pos-dispatch-cart-table tbody tr td {
    padding: 4px 2px !important;
    border: none !important;
    font-size: 12px !important;
  }

  /* Empty row styling */
  .pos-cart-table tbody tr td[colspan],
  #stock-overview-table tbody tr td[colspan],
  #pos-dispatch-cart-table tbody tr td[colspan] {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    padding: 24px 10px !important;
  }

  /* Multipliers grid on mobile */
  .staging-multipliers {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }

  /* Header action wrap */
  .wms-page-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .wms-header-actions {
    display: flex !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .wms-header-actions .btn {
    flex: 1 !important;
    justify-content: center !important;
    font-size: 11.5px !important;
    padding: 8px 10px !important;
  }
}

/* =============================================================
   13. CONTINUOUS CAMERA VIEWFINDER & DIRECT SUPERMARKET CART STYLES
   ============================================================= */

/* 13.1 Sleek Docked Live Camera Viewfinder */
.docked-camera-box {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.9));
  border: 2px solid rgba(245, 158, 11, 0.45);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.docked-camera-box.flash-emerald {
  border-color: #10b981 !important;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.55) !important;
}

.docked-camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(30, 41, 59, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 8px;
}

.docked-camera-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
}

.docked-camera-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.docked-camera-viewport-wrap {
  position: relative;
  width: 100%;
  min-height: 220px;
  max-height: 320px;
  background: #000000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.docked-camera-viewport-wrap div {
  width: 100% !important;
}

/* Floating Success Badge */
.docked-camera-float-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(16, 185, 129, 0.95);
  color: #ffffff;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.docked-camera-float-badge.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.docked-camera-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 10px;
}

.btn-finish-camera-scan {
  background: #dc2626 !important;
  border: 1px solid #ef4444 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  padding: 8px 18px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.btn-finish-camera-scan:hover {
  background: #b91c1c !important;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.4) !important;
}

/* 13.2 Direct Cart Quantity Stepper & Multiplier Chips */
.cart-qty-stepper-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cart-stepper-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #f8fafc;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.cart-stepper-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #f59e0b;
}

.cart-numeric-input {
  width: 62px !important;
  height: 32px !important;
  text-align: center;
  font-size: 14px !important;
  font-weight: 800 !important;
  background: #020617 !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  color: #f8fafc !important;
  border-radius: 8px !important;
  padding: 0 4px !important;
  font-family: 'Cairo', sans-serif !important;
}

.cart-chips-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cart-multiplier-chip {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Cairo', sans-serif !important;
}

.cart-multiplier-chip:hover {
  background: rgba(56, 189, 248, 0.28);
  color: #ffffff;
  border-color: #38bdf8;
}

/* =============================================================
   14. SLEEK STOCK OVERVIEW CARDS (#stock-overview)
   ============================================================= */

.stock-kpi-summary-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px !important;
}

.stock-kpi-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
}

.stock-kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stock-kpi-val {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.stock-kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.stock-overview-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  padding: 12px 14px;
}

.stock-toolbar-row1 {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.stock-search-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.stock-search-wrap:focus-within {
  border-color: var(--brand-gold);
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.stock-search-input {
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

.stock-search-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.stock-refresh-btn {
  flex-shrink: 0;
  width: auto !important;
  height: 42px;
  padding: 0 14px !important;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.stock-refresh-btn:hover {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--brand-gold);
}

.stock-series-select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.72);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-family: 'Cairo', sans-serif !important;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.stock-series-select:focus {
  border-color: var(--brand-gold);
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.stock-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  column-gap: 12px;
  row-gap: 0;
  margin-bottom: 20px;
}

.stock-card-executive {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.stock-card-executive:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.stock-card-right {
  flex: 1;
  min-width: 0;
}

.stock-card-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.stock-code-pill {
  background: var(--gold-active-tint);
  border: 1px solid var(--gold-active-border);
  color: var(--brand-gold);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.stock-series-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.stock-series-badge.series-a {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #f87171;
}

.stock-series-badge.series-b {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #34d399;
}

.stock-series-badge.series-c {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #38bdf8;
}

.stock-card-title {
  margin: 0 0 3px 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
}

.stock-card-sub {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.35;
  word-break: break-word;
}

.stock-card-left {
  min-width: 96px;
  width: auto;
  max-width: 140px;
  flex-shrink: 0;
}

.stock-card-balance-box {
  width: 100%;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.stock-card-balance-box.is-empty {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.stock-card-balance-box.has-stock {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #10b981;
}

.stock-card-packs-val {
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  color: inherit;
}

.stock-card-packs-unit {
  font-size: 0.72rem;
  font-weight: 700;
}

.stock-card-weight-val {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  line-height: 1.2;
  white-space: nowrap;
}

/* =============================================================
   15. SHIFT & MOVEMENT LEDGER TAB (#shift-logs)
   ============================================================= */

.shift-ledger-filter-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shift-ledger-dropdowns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.shift-filter-select {
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.7);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-family: 'Cairo', sans-serif !important;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.shift-filter-select:focus {
  border-color: var(--brand-gold);
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.shift-ledger-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.shift-kpi-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.shift-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 14px 16px;
}

.shift-kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.shift-kpi-val {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.shift-kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.shift-ledger-list-container {
  margin-top: 8px;
}

.shift-ledger-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.shift-ledger-list-title {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* =============================================================
   16. FINTECH-STYLE COLLAPSIBLE TRANSACTION CARDS (#shift-logs)
   ============================================================= */

.fintech-movement-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.fintech-movement-card:hover {
  border-color: rgba(148, 163, 184, 0.32);
}

.fintech-movement-card.inbound {
  border-right: 4px solid #10b981;
}

.fintech-movement-card.outbound {
  border-right: 4px solid #f59e0b;
}

.fintech-card-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: background 0.15s ease;
}

.fintech-card-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.fintech-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.fintech-icon-badge {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fintech-icon-badge.inbound {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
}

.fintech-icon-badge.outbound {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
}

.fintech-meta-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.fintech-main-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fintech-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fintech-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.fintech-qty-pill-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.fintech-qty-pill {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.fintech-qty-pill.inbound {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.fintech-qty-pill.outbound {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}

.fintech-weight-tiny {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  text-align: left;
}

.fintech-chevron {
  width: 18px;
  height: 18px;
  color: #94a3b8;
  transition: transform 0.25s ease, color 0.25s ease;
  flex-shrink: 0;
}

.fintech-movement-card.expanded .fintech-chevron {
  transform: rotate(180deg);
  color: #f8fafc;
}

.fintech-card-drawer {
  display: none;
  background: rgba(2, 6, 23, 0.55);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 10px 14px;
}

.fintech-movement-card.expanded .fintech-card-drawer {
  display: block;
}

.fintech-drawer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.74rem;
  color: #94a3b8;
}

.fintech-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.1);
}

.fintech-item-row:last-child {
  border-bottom: none;
}

.fintech-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fintech-item-name {
  color: #f8fafc;
  font-size: 0.85rem;
  font-weight: 600;
}

.fintech-item-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fintech-item-qty {
  color: #f8fafc;
  font-size: 0.88rem;
  font-weight: 700;
}

.fintech-item-weight {
  color: #94a3b8;
  font-size: 0.78rem;
}

/* =============================================================
   16B. UNIFIED FINTECH LEDGER CARDS (.wms-ledger-card)
   ============================================================= */

.wms-ledger-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(2, 6, 23, 0.35);
  box-sizing: border-box;
  max-width: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.wms-ledger-card:hover {
  border-color: rgba(148, 163, 184, 0.34);
}

.wms-ledger-card.cat-inbound {
  border-right: 4px solid #10b981;
}

.wms-ledger-card.cat-prep {
  border-right: 4px solid #38bdf8;
}

.wms-ledger-card.cat-outbound {
  border-right: 4px solid #f59e0b;
}

.wms-ledger-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  height: auto;
  min-height: 0;
}

.wms-ledger-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.wms-ledger-dir-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

.wms-ledger-dir-pill.cat-inbound {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #10b981;
}

.wms-ledger-dir-pill.cat-prep {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #38bdf8;
}

.wms-ledger-dir-pill.cat-outbound {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.wms-ledger-ref-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 800;
  direction: ltr;
  white-space: nowrap;
}

.wms-ledger-timestamp {
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
  direction: ltr;
}

.wms-ledger-card-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  height: auto;
  min-height: 0;
}

.wms-ledger-mid-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  height: auto;
  flex: 1 1 auto;
}

.wms-ledger-title {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.35;
  word-break: break-word;
}

.wms-ledger-route {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.wms-ledger-route-arrow {
  color: #f59e0b;
  flex-shrink: 0;
}

.wms-ledger-metrics {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.wms-ledger-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  height: auto;
  min-height: 0;
}

.wms-ledger-bottom-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
}

.wms-ledger-bottom-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wms-ledger-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.wms-ledger-status-pill.tone-deposited {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.wms-ledger-status-pill.tone-in_prep {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.wms-ledger-status-pill.tone-pending {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.wms-ledger-status-pill.tone-dispatched {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.wms-ledger-status-pill.tone-rejected {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.42);
  color: #f87171;
}

.wms-ledger-note {
  font-size: 11.5px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 7px;
  padding: 3px 8px;
  word-break: break-word;
}

.wms-ledger-reprint-btn,
.wms-ledger-details-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  transition: all 0.18s ease;
}

.wms-ledger-reprint-btn:hover {
  background: rgba(245, 158, 11, 0.24);
  border-color: #f59e0b;
}

.wms-ledger-details-btn {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.72);
  color: #cbd5e1;
}

.wms-ledger-details-btn:hover {
  border-color: rgba(148, 163, 184, 0.5);
  color: #f8fafc;
}

.wms-ledger-drawer {
  display: none;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.18);
}

.wms-ledger-card.expanded .wms-ledger-drawer {
  display: block;
}

/* Mobile Overrides for New Components (< 768px) */
@media (max-width: 768px) {
  .wms-ledger-card {
    height: auto !important;
    min-height: 0 !important;
    padding: 12px 14px !important;
    gap: 8px !important;
  }

  .wms-ledger-card-mid {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .wms-ledger-mid-main {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .wms-ledger-metrics {
    width: 100% !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
  }

  .stock-kpi-summary-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .stock-kpi-card {
    padding: 10px 12px !important;
  }

  .stock-kpi-val {
    font-size: 17px !important;
  }

  .stock-cards-container {
    grid-template-columns: 1fr !important;
  }

  .stock-card-executive {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .stock-overview-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .stock-toolbar-row1 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .stock-toolbar-row1 .stock-search-wrap {
    flex: 1 1 100% !important;
    min-width: 100% !important;
  }

  .stock-toolbar-row1 .stock-refresh-btn {
    flex: 1 1 auto !important;
    justify-content: center !important;
    white-space: normal !important;
    text-align: center !important;
    min-height: 40px !important;
    padding: 6px 10px !important;
  }

  .shift-kpi-summary-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .shift-kpi-card {
    padding: 12px !important;
  }

  .shift-kpi-val {
    font-size: 17px !important;
  }

  .shift-ledger-dropdowns-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .shift-ledger-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .shift-ledger-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .fintech-card-header {
    padding: 12px 12px !important;
    gap: 8px !important;
  }

  .fintech-icon-badge {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }

  .fintech-main-title {
    font-size: 0.92rem !important;
  }

  .fintech-subtitle {
    font-size: 0.74rem !important;
  }

  .fintech-qty-pill {
    font-size: 0.8rem !important;
    padding: 3px 8px !important;
  }

  .fintech-weight-tiny {
    font-size: 0.7rem !important;
  }

  .fintech-card-drawer {
    padding: 8px 12px !important;
  }

  .fintech-item-name {
    font-size: 0.8rem !important;
  }

  .fintech-item-qty {
    font-size: 0.82rem !important;
  }

  .fintech-item-weight {
    font-size: 0.74rem !important;
  }

  .cart-qty-stepper-box {
    width: 100% !important;
    justify-content: flex-start !important;
  }
}

/* =============================================================
   17. DUAL-MODE SCALE WEIGHT & GS1 BARCODE ENGINE STYLES
   ============================================================= */

.sim-chip-scale {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: rgba(245, 158, 11, 0.7) !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.1)) !important;
  color: #fbbf24 !important;
  font-weight: 800 !important;
}

.sim-chip-scale:hover {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.28) !important;
  color: #fef3c7 !important;
}

.cart-dual-mode-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.cart-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 9px;
  padding: 2px;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
}

.cart-mode-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-family: 'Cairo', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cart-mode-btn:hover {
  color: #f8fafc;
}

.cart-mode-btn.active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.45);
}

.cart-mode-btn.active-weight {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.55);
}

.cart-qty-control-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.btn-cart-multiplier {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cart-multiplier:hover {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

.scale-weight-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 10px;
  padding: 8px;
}

.scale-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.scale-weight-input {
  width: 104px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: rgba(15, 23, 42, 0.92);
  color: #fbbf24;
  outline: none;
}

.scale-weight-input:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.scale-unit-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}

.scale-unit-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-family: 'Cairo', sans-serif;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.scale-unit-btn.active {
  background: #f59e0b;
  color: #0f172a;
}

.scale-chips-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.scale-chip-btn {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(30, 41, 59, 0.85);
  color: #fde68a;
  font-family: 'Cairo', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.scale-chip-btn:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #fbbf24;
  color: #ffffff;
}

.scale-summary-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.scale-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.38);
  width: fit-content;
}

@media (max-width: 768px) {
  .sim-chip-scale {
    width: 100%;
    justify-content: center;
    white-space: normal !important;
    text-align: center;
    line-height: 1.4;
    padding: 7px 10px !important;
  }

  .cart-mode-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cart-mode-btn {
    justify-content: center;
    padding: 6px 6px;
  }

  .scale-input-row {
    justify-content: space-between;
  }

  .scale-weight-input {
    flex: 1;
    min-width: 90px;
  }
}

/* =============================================================
   18. 80MM THERMAL TRANSFER RECEIPT MODAL & PAPER PREVIEW
   ============================================================= */
.thermal-manifest-modal-card {
  max-width: 460px;
  width: 95%;
}

.thermal-manifest-modal-body {
  padding: 14px;
  background: #0b1120;
  max-height: 74vh;
  overflow-y: auto;
}

.thermal-transfer-receipt-paper {
  background: #ffffff;
  color: #000000;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 14px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  font-family: 'Cairo', sans-serif;
  direction: rtl;
}

.trf-header {
  text-align: center;
  border-bottom: 2px dashed #0f172a;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.trf-brand {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.4px;
  color: #000000;
}

.trf-subtitle {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
}

.trf-meta-box {
  background: #f8fafc;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  padding: 7px 8px;
  margin-bottom: 8px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trf-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.trf-meta-label {
  color: #334155;
  font-weight: 700;
  flex-shrink: 0;
}

.trf-meta-val {
  color: #000000;
  font-weight: 900;
  text-align: left;
  word-break: break-word;
}

.trf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
  margin-bottom: 8px;
  table-layout: fixed;
}

.trf-table th,
.trf-table td {
  border-bottom: 1px solid #cbd5e1;
  padding: 5px 3px;
  vertical-align: top;
}

.trf-table thead th {
  border-top: 1.5px solid #000000;
  border-bottom: 1.5px solid #000000;
  background: #f1f5f9;
  font-weight: 900;
  font-size: 10px;
  color: #000000;
}

.trf-item-name {
  font-weight: 800;
  color: #000000;
  line-height: 1.3;
}

.trf-item-meta {
  font-size: 9px;
  color: #475569;
  margin-top: 1px;
}

.trf-totals-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px dashed #0f172a;
  border-bottom: 1.5px dashed #0f172a;
  padding: 6px 4px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 900;
}

.trf-codes-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 6px;
  border: 1px dashed #64748b;
  border-radius: 4px;
  background: #ffffff;
  margin-bottom: 8px;
}

.trf-qr-wrap svg {
  display: block;
  width: 120px;
  height: 120px;
  max-width: 100%;
}

.trf-barcode-wrap {
  width: 100%;
  text-align: center;
  overflow: hidden;
}

.trf-barcode-wrap svg {
  display: block;
  width: 100%;
  max-width: 280px;
  height: 44px;
  margin: 0 auto;
}

.trf-payload-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  color: #0f172a;
  word-break: break-all;
  text-align: center;
  direction: ltr;
}

.trf-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 6px;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  color: #0f172a;
}

.trf-sig-line {
  margin-top: 18px;
  border-top: 1px dashed #475569;
  padding-top: 3px;
}

.thermal-manifest-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

@media (max-width: 768px) {
  .thermal-manifest-modal-card {
    width: 96% !important;
    max-width: 100% !important;
  }

  .thermal-manifest-modal-body {
    padding: 10px;
    max-height: 68vh;
  }

  .thermal-transfer-receipt-paper {
    padding: 10px 8px;
    max-width: 100%;
  }

  .trf-table {
    font-size: 9.5px;
  }

  .thermal-manifest-footer {
    flex-direction: column-reverse;
  }

  .thermal-manifest-footer .btn {
    width: 100%;
    justify-content: center;
  }
}

/* =============================================================
   14. CUSTOM DARK-GLASS PILLS & CART ROUTING FOOTER (V30)
   ============================================================= */
.wms-pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.wms-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  backdrop-filter: blur(8px);
}

.wms-pill-btn:hover {
  border-color: rgba(245, 158, 11, 0.5);
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.9);
}

.wms-pill-btn.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.75);
  color: #fbbf24;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.18);
}

.wms-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  width: 100%;
}

.wms-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-family: 'Cairo', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.wms-chip-btn:hover {
  border-color: rgba(245, 158, 11, 0.45);
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.85);
}

.wms-chip-btn.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.75);
  color: #fbbf24;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.16);
}

.wms-chip-count {
  font-size: 10.5px;
  opacity: 0.85;
}

.wms-pill-btn-add {
  border-style: dashed;
  border-color: rgba(56, 189, 248, 0.55);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.wms-pill-btn-add:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.18);
  color: #e0f2fe;
}

.wms-cart-routing-box {
  padding: 12px 16px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wms-routing-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #94a3b8;
}

.wms-locked-prep-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
  font-size: 12.5px;
  font-weight: 800;
  width: fit-content;
  max-width: 100%;
}

.wms-new-supplier-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.wms-new-supplier-input {
  flex: 1;
  min-width: 180px;
  height: 36px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 600;
}

.wms-dest-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.wms-dest-card {
  text-align: right;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wms-dest-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(30, 41, 59, 0.88);
}

.wms-dest-card.active {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.78);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.16);
}

.wms-dest-card-title {
  font-size: 12px;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wms-dest-card.active .wms-dest-card-title {
  color: #fbbf24;
}

.wms-dest-card-sub {
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 600;
}

.docked-camera-box.flash-crimson {
  border-color: #ef4444 !important;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.45) !important;
}

.docked-camera-float-badge.reject {
  background: rgba(220, 38, 38, 0.94) !important;
  border-color: #fca5a5 !important;
  color: #ffffff !important;
}

.wms-pill-btn-prep.active {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.78) !important;
  color: #34d399 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.22) !important;
}

/* =========================================================================
   CASHIER-STYLE DUAL-MODE WORKSPACE (CLEAN PRODUCT GRID + COMPACT CART)
   ========================================================================= */
.cashier-dual-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.cashier-catalog-panel,
.cashier-cart-panel {
  min-width: 0;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-sizing: border-box;
}

.cashier-catalog-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  box-sizing: border-box;
}

.cashier-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.cashier-filter-pills .wms-pill-btn {
  padding: 5px 11px;
  font-size: 11.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Zero Inner Scrollbars on Catalog Product Grids */
.wms-catalog-grid,
.cashier-product-grid,
#receiving-product-grid,
#dispatch-product-grid,
.prep-batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 10px;
  padding: 12px 14px;
  width: 100%;
  box-sizing: border-box;
  max-height: none !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}

.cashier-product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #f8fafc;
  text-align: right;
  cursor: pointer;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cashier-product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.65);
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
}

.cashier-product-card:active {
  transform: translateY(0);
}

.cashier-product-card.in-cart {
  border-color: rgba(16, 185, 129, 0.78);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.92));
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.18);
}

.cashier-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.cashier-code-badge {
  font-size: 10.5px !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  font-weight: 900 !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.cashier-stock-pill {
  font-size: 10.5px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cashier-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  min-height: 2.38rem;
}

.cashier-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  width: 100%;
  min-width: 0;
}

.cashier-unit-pill {
  font-size: 10.5px;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.cashier-add-hint {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 800;
  color: #fbbf24;
  white-space: nowrap;
  flex-shrink: 0;
}

.cashier-card-incart-badge {
  font-size: 10.5px;
  font-weight: 900;
  color: #10b981;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cashier-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 28px 12px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.45);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: 10px;
}

/* =========================================================================
   COMPACT CART ITEM CARDS & INLINE ROUTING
   ========================================================================= */
.wms-cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  min-height: 110px;
  width: 100%;
  box-sizing: border-box;
}

.wms-cart-empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 28px 12px;
  font-size: 12.5px;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  border-radius: 10px;
}

.wms-cart-item-card {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.wms-cart-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.wms-cart-item-identity {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}

.wms-cart-item-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.3;
  word-break: break-word;
}

.wms-cart-remove-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #f87171;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.wms-cart-remove-btn:hover {
  background: #dc2626;
  color: #ffffff;
}

.wms-cart-item-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.wms-cart-item-mid .cart-mode-toggle {
  width: auto !important;
  display: inline-flex !important;
}

.wms-cart-item-mid .cart-mode-btn {
  padding: 3px 9px;
  font-size: 11px;
}

.wms-cart-inline-summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  color: #10b981;
  white-space: nowrap;
}

.wms-cart-inline-summary.is-low-stock {
  color: #f59e0b;
}

.wms-cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.wms-cart-item-bottom .cart-qty-control-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
}

.wms-cart-item-bottom .cart-step-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 15px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  flex-shrink: 0;
}

.wms-cart-item-bottom .cart-numeric-input {
  flex: 1 1 52px;
  min-width: 44px;
  max-width: 72px;
  width: auto !important;
  height: 30px !important;
  font-size: 14px !important;
  text-align: center;
}

.wms-cart-item-bottom .btn-cart-multiplier {
  height: 30px;
  padding: 0 8px;
  font-size: 11.5px;
  flex-shrink: 0;
}

.wms-cart-item-bottom .scale-weight-controls {
  width: 100%;
  padding: 6px 8px;
  gap: 5px;
  box-sizing: border-box;
}

.wms-cart-routing-inline {
  margin-top: 0;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  gap: 8px;
}

.wms-cart-routing-inline .wms-pill-btn {
  padding: 5px 11px;
  font-size: 11.5px;
}

.dispatch-cart-footer-dual {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.dispatch-dual-actions-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.dispatch-action-btn-print,
.dispatch-action-btn-silent {
  flex: 1 1 220px;
  justify-content: center;
  min-height: 44px;
  font-weight: 800 !important;
  font-size: 13px !important;
}

.btn-amber-dispatch {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #0f172a !important;
  border: 1px solid rgba(251, 191, 36, 0.7) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.btn-amber-dispatch:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #020617 !important;
}

/* =========================================================================
   PREP BATCH SELECTOR & CLOSED-LOOP BATCH RECEIVING (DARK SLATE / AMBER)
   ========================================================================= */
#prep-batch-selector-panel {
  width: 100%;
  box-sizing: border-box;
}

.prep-selector-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.78);
  border-bottom: 1px solid rgba(245, 158, 11, 0.24);
}

.prep-selector-title {
  font-size: 13px;
  font-weight: 800;
  color: #fbbf24;
}

.prep-multiplier-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.prep-mult-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #cbd5e1;
}

.prep-mult-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.prep-mult-chip {
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prep-mult-chip:hover {
  border-color: rgba(245, 158, 11, 0.65);
  color: #fbbf24;
}

.prep-mult-chip.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fbbf24;
}

.prep-mult-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.prep-mult-stepper .cart-step-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  font-weight: 900;
  border-radius: 7px;
}

.prep-mult-stepper .cart-numeric-input {
  width: 52px !important;
  height: 28px !important;
  text-align: center;
  font-size: 13px !important;
}

.prep-recipe-card.is-selected {
  border-color: #f59e0b !important;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.94)) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.22);
}

.prep-selected-batch-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 12px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-sizing: border-box;
}

.prep-banner-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.prep-banner-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #f8fafc;
}

.prep-banner-meta {
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
}

.prep-banner-clear-btn {
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(220, 38, 38, 0.14);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.prep-banner-clear-btn:hover {
  background: #dc2626;
  color: #ffffff;
}

.prep-closed-loop-notice {
  margin: 10px 12px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.45);
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

#receiving-prep-batches-panel {
  padding: 12px;
  width: 100%;
  box-sizing: border-box;
}

.prep-batches-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.prep-panel-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #34d399;
}

.prep-panel-sub {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 2px;
}

.prep-panel-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prep-receipt-batches-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prep-empty-batches-box {
  padding: 24px 14px;
  text-align: center;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px dashed rgba(148, 163, 184, 0.28);
}

.prep-empty-title {
  font-size: 13px;
  font-weight: 800;
  color: #e2e8f0;
  margin-bottom: 4px;
}

.prep-empty-sub {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.5;
}

.prep-receipt-batch-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(16, 185, 129, 0.42);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.prep-receipt-batch-card.is-highlighted {
  border-color: #fbbf24;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.28);
}

.prep-batch-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.prep-batch-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.prep-target-code-badge {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 800;
}

.prep-status-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.prep-status-pill.ready {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.prep-status-pill.pending {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.prep-status-pill.received {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.prep-status-pill.rejected {
  background: rgba(220, 38, 38, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.prep-batch-product-title {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
}

.prep-batch-metrics-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.65);
  padding: 6px 10px;
  border-radius: 8px;
}

.prep-batch-metrics-row strong {
  color: #fbbf24;
}

.prep-batch-ing-line {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

.prep-batch-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.prep-batch-approve-btn,
.prep-batch-reject-btn {
  flex: 1 1 170px;
  min-height: 38px;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.prep-reject-box {
  margin-top: 4px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prep-reject-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prep-reject-chip {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(15, 23, 42, 0.85);
  color: #fecaca;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.prep-reject-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
}

.prep-reject-confirm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.prep-tracker-section {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.24);
}

.prep-tracker-header {
  font-size: 12px;
  font-weight: 800;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.prep-tracker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prep-tracker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.prep-tracker-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.prep-tracker-name {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
}

/* Mobile Sticky Bottom Cart Review Bar */
.wms-mobile-cart-bar {
  display: none;
}

@media (min-width: 769px) {
  .wms-mobile-cart-bar {
    display: none !important;
  }
}

@media (max-width: 1080px) {
  .cashier-dual-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .cashier-dual-workspace {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wms-catalog-grid,
  .cashier-product-grid,
  #receiving-product-grid,
  #dispatch-product-grid,
  .prep-batch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    max-height: none !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
  }

  .cashier-product-card {
    padding: 9px;
    min-width: 0;
    overflow: hidden;
  }

  .cashier-card-top {
    flex-wrap: wrap;
    gap: 4px;
  }

  .cashier-stock-pill {
    font-size: 10px;
    padding: 2px 5px;
    max-width: 100%;
    white-space: normal;
    line-height: 1.25;
    flex-shrink: 1;
  }

  .cashier-card-name {
    font-size: 0.85rem;
  }

  .dispatch-dual-actions-wrap {
    flex-direction: column;
  }

  .dispatch-action-btn-print,
  .dispatch-action-btn-silent {
    width: 100%;
    flex: 1 1 auto;
  }

  .prep-batch-actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .prep-batch-approve-btn,
  .prep-batch-reject-btn {
    width: 100%;
    flex: 1 1 auto;
  }

  .wms-mobile-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 950;
    background: rgba(11, 17, 32, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(245, 158, 11, 0.45);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.55);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    box-sizing: border-box;
  }

  .wms-mobile-bar-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
  }

  .wms-mobile-bar-title {
    font-size: 11.5px;
    font-weight: 800;
    color: #f59e0b;
    white-space: nowrap;
  }

  .wms-mobile-bar-meta {
    font-size: 11px;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .wms-mobile-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f59e0b;
    color: #0b1120;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 12.5px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* =========================================================
   PREP DEPARTMENT STATION (#section-prep-station)
   ========================================================= */
.prep-station-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.prep-history-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: rgba(245, 158, 11, 0.38);
  color: #fbbf24;
}

.prep-history-link-btn:hover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
}

.prep-station-section-card {
  margin-bottom: 16px !important;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-sizing: border-box;
  max-width: 100%;
}

.prep-section-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.prep-section-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.prep-section-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.prep-section-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prep-station-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prep-station-batch-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.prep-station-batch-card.is-in-prep {
  border-color: rgba(56, 189, 248, 0.45);
}

.prep-station-batch-card.is-highlighted {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
}

.prep-raw-materials-box {
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(51, 65, 85, 0.65);
  border-radius: 10px;
  padding: 10px 12px;
}

.prep-raw-materials-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.prep-raw-materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.prep-raw-material-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  min-width: 0;
}

.prep-raw-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.prep-raw-item-code {
  font-size: 10.5px;
  font-weight: 800;
  color: #f59e0b;
}

.prep-raw-item-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
}

.prep-raw-item-qty {
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
  white-space: nowrap;
  flex-shrink: 0;
}

.prep-notes-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.prep-quick-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.prep-quick-tag-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.prep-quick-tag-btn:hover,
.prep-quick-tag-btn.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
}

.prep-quick-tag-btn.is-issue.active,
.prep-quick-tag-btn.is-issue:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #fca5a5;
}

.prep-note-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: #090d16;
  color: #f8fafc;
  font-size: 12.5px;
  outline: none;
}

.prep-note-input:focus {
  border-color: #f59e0b;
}

.prep-station-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.prep-station-primary-btn,
.prep-station-secondary-btn {
  flex: 1 1 220px;
  min-height: 40px;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
}

.prep-status-pill.pending_receipt {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.prep-status-pill.in_prep {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}

.prep-status-pill.completed {
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #c084fc;
}

/* Prep Ledger Table */
.prep-ledger-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.prep-ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.prep-ledger-table thead th {
  text-align: right;
  padding: 0.55rem 0.75rem;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-default);
  background: rgba(2, 6, 23, 0.45);
}

.prep-ledger-table tbody td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.45);
  vertical-align: middle;
  color: var(--text-primary);
}

.prep-ledger-table tbody tr:last-child td {
  border-bottom: none;
}

.prep-ledger-product-name {
  font-weight: 800;
  color: #f8fafc;
  margin-top: 2px;
}

.prep-ledger-note-text {
  font-size: 11.5px;
  color: var(--text-secondary);
  max-width: 240px;
  white-space: normal;
  word-break: break-word;
}

/* 80mm Prep Finished Sticker Preview */
.prep-80mm-sticker-paper {
  max-width: 310px;
  margin: 0 auto;
  background: #ffffff;
  color: #000000;
  border-radius: 6px;
  padding: 12px;
  border: 2px solid #000000;
}

.prep-80mm-header {
  text-align: center;
  border-bottom: 2px dashed #000000;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.prep-80mm-brand {
  font-size: 14px;
  font-weight: 900;
  color: #000000;
}

.prep-80mm-sub {
  font-size: 11px;
  font-weight: 800;
  color: #1e293b;
}

.prep-80mm-product-title {
  font-size: 15px;
  font-weight: 900;
  color: #000000;
  text-align: center;
  margin-bottom: 6px;
  line-height: 1.35;
}

.prep-80mm-code-banner {
  background: #000000;
  color: #ffffff;
  text-align: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 8px;
}

.prep-80mm-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border: 1px solid #000000;
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 8px;
  font-size: 11px;
}

.prep-80mm-metric-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.prep-80mm-metric-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #334155;
}

.prep-80mm-metric-val {
  font-size: 12px;
  font-weight: 900;
  color: #000000;
}

.prep-80mm-codes-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px dashed #334155;
  border-radius: 4px;
  padding: 8px 6px;
}

@media (max-width: 768px) {
  .prep-station-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .prep-station-section-card {
    padding: 12px !important;
  }

  .prep-raw-materials-grid {
    grid-template-columns: 1fr !important;
  }

  .prep-station-actions-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .prep-station-primary-btn,
  .prep-station-secondary-btn {
    width: 100% !important;
    flex: 1 1 auto !important;
  }

  .mobile-stack-table thead,
  .prep-ledger-table thead {
    display: none !important;
  }

  .mobile-stack-table tbody tr,
  .prep-ledger-table tbody tr {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 12px !important;
    margin-bottom: 10px !important;
    border-radius: 12px !important;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
  }

  .mobile-stack-table td,
  .prep-ledger-table td {
    border-bottom: none !important;
    padding: 2px 4px !important;
  }

  .mobile-stack-table td.col-span-full,
  .prep-ledger-table td.col-span-full {
    grid-column: 1 / -1 !important;
    white-space: normal !important;
    word-break: break-word !important;
    padding-bottom: 6px !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;
  }
}

/* =========================================================
   TOP ROUTING BAR, LOCKED PREP BOM ROWS & MOBILE BOTTOM SHEET
   ========================================================= */
.wms-top-routing-bar {
  margin: 0 0 14px 0 !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background: rgba(15, 23, 42, 0.88) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  width: 100%;
  box-sizing: border-box;
  gap: 8px !important;
}

.wms-sheet-handle-bar {
  display: none;
}

.wms-cart-sheet-backdrop {
  display: none;
}

/* Locked Prep Batch Scale Toolbar & Standard Recipe Rows */
.prep-batch-scale-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(245, 158, 11, 0.42);
  margin-bottom: 4px;
  box-sizing: border-box;
}

.prep-batch-lock-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.prep-batch-lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.prep-batch-weighed-progress {
  font-size: 11px;
  font-weight: 800;
  color: #34d399;
}

.btn-print-all-scale {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.65);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #020617;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.btn-print-all-scale:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.wms-locked-bom-row {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.wms-locked-bom-row.is-weighed {
  border-color: rgba(16, 185, 129, 0.58);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.1), rgba(15, 23, 42, 0.95));
}

.wms-locked-bom-row.is-shortage {
  border-color: rgba(239, 68, 68, 0.65);
  background: linear-gradient(145deg, rgba(220, 38, 38, 0.1), rgba(15, 23, 42, 0.95));
}

.wms-locked-bom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.wms-locked-bom-identity {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}

.wms-locked-lock-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  flex-shrink: 0;
}

.wms-locked-bom-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.wms-locked-req-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

.wms-locked-avail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 800;
}

.wms-locked-avail.avail-ok {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #34d399;
}

.wms-locked-avail.avail-short {
  background: rgba(220, 38, 38, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.55);
  color: #fca5a5;
}

.wms-locked-cost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.wms-locked-bom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px dashed rgba(148, 163, 184, 0.16);
}

.wms-locked-weighed-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.wms-locked-pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #94a3b8;
}

.btn-scale-barcode-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  margin-right: auto;
}

.btn-scale-barcode-print:hover {
  background: rgba(56, 189, 248, 0.28);
  border-color: #38bdf8;
  color: #ffffff;
}

.btn-scale-barcode-print.is-printed {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
}

@media (max-width: 768px) {
  .wms-top-routing-bar {
    margin: 0 0 10px 0 !important;
    padding: 9px 10px !important;
  }

  .wms-cart-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(4px);
    z-index: 1090;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }

  .wms-cart-sheet-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  #pos-receiving-cart-card.wms-mobile-bottom-sheet,
  #pos-dispatch-cart-card.wms-mobile-bottom-sheet {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    max-height: 86vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 20px 20px 0 0;
    z-index: 1100;
    background: #0f172a;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-bottom: none;
    box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.85);
    padding: 10px 12px 18px 12px;
    margin: 0 !important;
    transform: translateY(105%);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease, visibility 0.28s;
    box-sizing: border-box;
  }

  #pos-receiving-cart-card.wms-mobile-bottom-sheet.mobile-sheet-open,
  #pos-dispatch-cart-card.wms-mobile-bottom-sheet.mobile-sheet-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .wms-sheet-handle-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0 10px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    position: relative;
  }

  .wms-sheet-drag-pill {
    position: absolute;
    left: 50%;
    top: 4px;
    transform: translateX(-50%);
    width: 46px;
    height: 5px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
    cursor: pointer;
  }

  .wms-sheet-close-btn {
    margin-right: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(220, 38, 38, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fca5a5;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
  }

  body.wms-sheet-open-lock {
    overflow: hidden;
  }

  .prep-batch-scale-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-print-all-scale {
    width: 100%;
  }

  .btn-scale-barcode-print {
    width: 100%;
    margin-right: 0;
  }
}

/* ===== Two-Stage Prep Batch & Dynamic Target Quantity Calculator ===== */
.prep-selector-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.prep-stage-filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.prep-stage-tab {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prep-stage-tab:hover {
  border-color: rgba(245, 158, 11, 0.6);
  color: #fbbf24;
}

.prep-stage-tab.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
}

.prep-stage-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.prep-stage-pill.stage-1 {
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.45);
  color: #c4b5fd;
}

.prep-stage-pill.stage-2 {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #6ee7b7;
}

.prep-card-badges-left,
.prep-banner-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.prep-calc-empty-hint {
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px dashed rgba(148, 163, 184, 0.28);
}

.prep-calc-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.prep-calc-inputs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.prep-calc-kg-equiv {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.prep-calc-kg-input {
  width: 72px !important;
  height: 28px !important;
  text-align: center;
  font-size: 12.5px !important;
}

.prep-calc-unit-tag {
  font-size: 11.5px;
  font-weight: 800;
  color: #fbbf24;
}

.prep-water-spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 768px) {
  .prep-selector-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .prep-stage-filter-tabs {
    width: 100%;
  }

  .prep-stage-tab {
    flex: 1;
    text-align: center;
  }

  .prep-calc-inputs-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================
   SERIES E (STAFF & COURIERS), PLU EXPORT & ATTENDANCE BAR
   ========================================================= */
.barcode-btn-series-e {
  border-color: rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
}

.barcode-btn-series-e:hover {
  background: rgba(56, 189, 248, 0.22) !important;
}

.barcode-btn-plu {
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #34d399 !important;
  background: rgba(15, 23, 42, 0.78) !important;
}

.barcode-btn-plu:hover {
  background: rgba(16, 185, 129, 0.16) !important;
}

.barcode-card-series-e {
  border-color: rgba(56, 189, 248, 0.34);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.78));
}

.barcode-card-series-e:hover {
  border-color: rgba(56, 189, 248, 0.7);
}

.barcode-role-pill {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.barcode-print-btn-e {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #020617;
  height: auto;
  min-height: 44px;
  padding: 6px 11px;
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
  max-width: 155px;
}

.barcode-print-btn-e:hover {
  background: #7dd3fc;
  border-color: #7dd3fc;
}

.staff-next-code-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
}

.staff-id-80mm-card {
  border: 2px solid #000000;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
  background: #ffffff;
  color: #000000;
  direction: rtl;
}

.staff-id-80mm-brand {
  font-size: 11px;
  font-weight: 800;
  color: #000000;
  border-bottom: 1.5px dashed #000000;
  padding-bottom: 5px;
  margin-bottom: 8px;
}

.staff-id-80mm-code {
  display: inline-block;
  background: #000000;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.staff-id-80mm-name {
  font-size: 16px;
  font-weight: 900;
  color: #000000;
  margin-bottom: 3px;
  line-height: 1.3;
}

.staff-id-80mm-role {
  display: inline-block;
  border: 1px solid #000000;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 800;
  color: #000000;
  margin-bottom: 6px;
}

.staff-id-80mm-meta {
  font-size: 11px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 3px;
  word-break: break-word;
}

.staff-id-80mm-barcode {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1.5px dashed #000000;
}

.staff-id-80mm-barcode svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.attendance-driver-scan-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.attendance-scan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.attendance-scan-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.attendance-scan-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.attendance-scan-input {
  width: 100%;
  min-width: 0;
  height: 42px;
}

.attendance-scan-submit-btn {
  height: 42px;
  white-space: nowrap;
}

.attendance-recent-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.attendance-punch-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
}

.attendance-punch-chip.check-in {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.attendance-punch-chip.check-out {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

@media (max-width: 768px) {
  .attendance-scan-inputs-row {
    grid-template-columns: 1fr;
  }

  .attendance-scan-submit-btn {
    width: 100%;
  }

  .barcode-print-btn-e {
    max-width: none;
    width: 100%;
  }
}

/* =========================================================
   ADMIN STAFF, PERMISSIONS & RECORDS HUB (#section-staff-admin)
   ========================================================= */
.staff-admin-subnav-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.staff-admin-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.staff-admin-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.staff-admin-card {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.82));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease;
}

.staff-admin-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
}

.staff-admin-card.is-suspended {
  opacity: 0.72;
  border-color: rgba(220, 38, 38, 0.4);
}

.staff-admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.staff-admin-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 11.5px;
  color: var(--text-secondary);
  padding: 6px 10px;
  background: rgba(2, 6, 23, 0.45);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.staff-status-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.staff-status-toggle-btn.active {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.staff-status-toggle-btn.suspended {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(220, 38, 38, 0.45);
  color: #fca5a5;
}

.staff-perms-matrix-box {
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.staff-perms-group-title {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  margin-bottom: 6px;
}

.staff-perms-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.staff-perm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  transition: all 0.15s ease;
}

.staff-perm-pill.on {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  font-weight: 800;
}

.staff-perm-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #475569;
}

.staff-perm-pill.on .staff-perm-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.staff-admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.staff-admin-records-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.staff-record-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 768px) {
  .staff-admin-subtabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .staff-admin-subtabs .wms-pill-btn:last-child {
    grid-column: 1 / -1;
  }

  .staff-admin-cards-grid {
    grid-template-columns: 1fr;
  }

  .staff-admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .staff-admin-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .staff-record-card {
    flex-direction: column;
    align-items: stretch;
  }
}


