/* ==========================================================================
   ProductTrack Pro — High-Craft Light Mode & Precision Ledger UI (Taste Skill)
   Fonts: Outfit (Display) • Plus Jakarta Sans (UI) • JetBrains Mono (Data)
   ========================================================================== */

:root {
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;

  /* High-Craft Warm Stone / Alabaster Light Palette (No Pure #000000, No AI Purple) */
  --bg-app: #F6F6F3;
  --bg-surface: #FFFFFF;
  --bg-subtle: #EFEFE9;
  --bg-muted: #E4E4DC;

  --border-color: #E2E2DC;
  --border-grid: #E8E8E2;
  --border-strong: #CBCBC2;

  --text-main: #111315;
  --text-muted: #5A6065;
  --text-subtle: #8A9096;

  /* Single Primary Accent: Deep Botanical Emerald */
  --excel-green: #0B6B3A;
  --excel-green-hover: #08522C;
  --excel-green-light: #EDF5F0;

  /* Semantic Ledger Tokens (Lila Ban Applied — Deep Slate/Teal replaces AI Purple) */
  --color-blue: #1D4ED8;
  --color-purple: #1F4E5B;
  --color-emerald: #0B6B3A;
  --color-amber: #B45309;
  --color-rose: #BE123C;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snappy: cubic-bezier(0.32, 0.72, 0, 1);

  --shadow-sm: 0 2px 6px -1px rgba(17, 19, 21, 0.04), 0 1px 2px -1px rgba(17, 19, 21, 0.03);
  --shadow-md: 0 10px 24px -8px rgba(17, 19, 21, 0.06), 0 2px 6px -2px rgba(17, 19, 21, 0.04);
  --shadow-lg: 0 20px 40px -15px rgba(17, 19, 21, 0.08), 0 4px 12px -4px rgba(17, 19, 21, 0.04);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tracker Main Wrapper */
.tracker-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background-color: var(--bg-app);
  overflow: hidden;
}

/* Main Body Scrollable Viewport */
.main-body {
  flex: 1 1 0%;
  min-height: 0;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  scroll-behavior: smooth;
}
.main-body::-webkit-scrollbar {
  width: 8px;
}
.main-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.main-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.main-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Header */
.app-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
}

.excel-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-titles {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.sheet-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}

/* Header KPIs */
.header-kpis {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 4px 14px;
  border-radius: var(--radius-sm);
}

.kpi-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.kpi-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.kpi-num {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 3px 8px;
  font-size: 0.75rem;
}

.btn-primary {
  background-color: var(--excel-green);
  color: #ffffff;
  border-color: var(--excel-green);
}
.btn-primary:hover {
  background-color: var(--excel-green-hover);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background-color: var(--bg-subtle);
}

.btn-danger-ghost {
  background: transparent;
  color: var(--color-rose);
  border-color: transparent;
}
.btn-danger-ghost:hover {
  background-color: #ffe4e6;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}
.btn-icon.text-rose:hover {
  color: var(--color-rose);
}

/* Sub-toolbar (search & filters) */
.sub-toolbar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 6px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  width: 280px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.8rem;
  width: 100%;
  color: var(--text-main);
}

.filter-select {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 0.8rem;
  color: var(--text-main);
  outline: none;
}
.filter-select:focus {
  border-color: var(--excel-green);
}

.toolbar-stats-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Toast Banner */
.toast-banner {
  background: var(--excel-green-light);
  border-bottom: 1px solid #c8e6c9;
  color: #1b5e20;
  padding: 6px 20px;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.toast-banner button {
  background: none;
  border: none;
  color: #1b5e20;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Main Body */
.main-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  position: relative;
}

/* Excel Grid Table */
.grid-table-container {
  flex: 1;
  overflow: auto;
  background-color: var(--bg-surface);
}

.excel-grid {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8rem;
}

/* Header Letters: A, B, C... */
.excel-grid thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-letters th {
  background-color: #f1f5f9;
  border-right: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
  padding: 2px 4px;
  height: 20px;
}

.header-titles th {
  background-color: #f8fafc;
  border-right: 1px solid var(--border-strong);
  border-bottom: 2px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  text-align: left;
  padding: 6px 10px;
  white-space: nowrap;
  height: 32px;
}

.col-num {
  width: 44px;
  min-width: 44px;
  text-align: center !important;
  background-color: #f1f5f9 !important;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border-right: 1px solid var(--border-strong) !important;
  position: sticky;
  left: 0;
  z-index: 5;
}

.th-num {
  text-align: right !important;
  font-family: var(--font-mono);
}

/* Cells */
.excel-grid td {
  border-right: 1px solid var(--border-grid);
  border-bottom: 1px solid var(--border-grid);
  padding: 6px 10px;
  white-space: nowrap;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
}

.excel-grid tbody tr:hover td {
  background-color: rgba(16, 124, 65, 0.03);
}

/* Badges */
.badge-barcode {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  color: #334155;
  font-weight: 600;
  letter-spacing: 0.05em;
  display: inline-block;
}

.badge-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  color: var(--color-blue);
  font-weight: 600;
  margin-right: 4px;
}

.badge-category {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.72rem;
}

.badge-unit {
  font-size: 0.72rem;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
}
.status-emerald { background: #dcfce7; color: #15803d; }
.status-blue { background: #dbeafe; color: #1d4ed8; }
.status-amber { background: #fef3c7; color: #b45309; }
.status-purple { background: #ede9fe; color: #6d28d9; }
.status-rose { background: #ffe4e6; color: #be123c; }

.actions-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Sticky Footer Totals */
.excel-grid tfoot {
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.footer-totals td {
  background-color: #f1f5f9;
  border-top: 2px solid var(--border-strong);
  border-bottom: 2px solid var(--border-strong);
  border-right: 1px solid var(--border-strong);
  padding: 6px 10px;
  height: 36px;
}

.footer-label {
  font-size: 0.8rem;
  color: var(--text-main);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}
.empty-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Colors */
.text-blue { color: var(--color-blue); }
.text-purple { color: var(--color-purple); }
.text-emerald { color: var(--color-emerald); }
.text-amber { color: var(--color-amber); }
.text-rose { color: var(--color-rose); }
.bg-slate-50 { background-color: #f8fafc; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }
.text-xs { font-size: 0.72rem; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-800 { color: #1e293b; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }

/* Product Master & Reconciliation Views */
.master-panel, .reconcile-panel {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background-color: var(--bg-app);
}

.master-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.master-intro h2, .reconcile-intro h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Live Converter Card */
.calculator-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.calc-label-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--excel-green);
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.calc-fields {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calc-field label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.calc-field select, .calc-field input {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 0.82rem;
  outline: none;
}
.calc-field select:focus, .calc-field input:focus {
  border-color: var(--excel-green);
}

.calc-equal {
  font-size: 1.1rem;
  color: var(--text-subtle);
  padding-top: 14px;
}

.calc-output {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
}

.calc-output-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.calc-output-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-emerald);
}

.calc-output-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Clean Tables (Master & Reconciliation) */
.table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.clean-table th {
  background-color: #f8fafc;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.74rem;
  padding: 8px 12px;
  text-align: left;
}

.clean-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.clean-table tbody tr:hover {
  background-color: #f8fafc;
}

.section-title {
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  background: #f8fafc;
}

/* Reconciliation KPIs */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid transparent;
}
.kpi-card.card-blue { border-top-color: var(--color-blue); }
.kpi-card.card-purple { border-top-color: var(--color-purple); }
.kpi-card.card-emerald { border-top-color: var(--color-emerald); }
.kpi-card.card-amber { border-top-color: var(--color-amber); }

.kpi-card-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kpi-card-val {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 4px 0;
}

.kpi-card-sub {
  font-size: 0.72rem;
  color: var(--text-subtle);
}

/* Bottom Tab Bar */
.app-tabbar {
  background-color: #f1f5f9;
  border-top: 1px solid var(--border-color);
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  flex-shrink: 0;
  justify-content: space-between;
}

.sheet-tabs {
  display: flex;
  align-items: flex-end;
  height: 100%;
  gap: 2px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-top: 2px solid transparent;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  height: 100%;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  background: var(--bg-surface);
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--bg-surface);
  color: var(--excel-green);
  font-weight: 600;
  border-top: 2px solid var(--excel-green);
}

.tabbar-right {
  font-size: 0.7rem;
  color: var(--text-subtle);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  animation: modal-enter 0.15s ease-out;
}

.modal-card-lg {
  max-width: 660px;
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

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

.modal-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--excel-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-title-text {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.modal-subtitle {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.1s ease;
}
.modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-form {
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: calc(90vh - 65px);
  overflow-y: auto;
}

.form-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

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

.section-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.active-unit-badge {
  font-size: 0.72rem;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

.field-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 4px;
}

.label-icon {
  font-size: 0.8rem;
}

.req-star {
  color: #ef4444;
  font-weight: 700;
}

.form-row {
  display: grid;
  gap: 10px;
}
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

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

.input-field {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 0.84rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input-field:focus {
  border-color: var(--excel-green);
  box-shadow: 0 0 0 2px var(--excel-green-light);
  background: #ffffff;
}

/* Product Quick Search */
.product-quick-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.product-quick-search-input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 26px 6px 28px;
  font-size: 0.78rem;
  color: #1e293b;
  outline: none;
  transition: all 0.15s ease;
}
.product-quick-search-input:focus {
  background: #ffffff;
  border-color: var(--excel-green);
  box-shadow: 0 0 0 2px var(--excel-green-light);
}

.search-icon-sm {
  position: absolute;
  left: 8px;
  color: #94a3b8;
  pointer-events: none;
}

.btn-clear-search {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  font-size: 1rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.btn-clear-search:hover {
  color: #0f172a;
}

.product-select-lg {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #1e293b;
  outline: none;
}
.product-select-lg:focus {
  border-color: var(--excel-green);
  box-shadow: 0 0 0 2px var(--excel-green-light);
}

/* Selected Product Banner */
.selected-product-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 8px 12px;
}

.prod-badge-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prod-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #14532d;
}

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

.tag-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}

.tag-barcode {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.tag-cat {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.tag-eq {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-family: var(--font-mono);
}

/* Unit Segmented Picker */
.unit-selector-wrapper {
  margin-top: 4px;
}

.segmented-unit-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.unit-segment-btn {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.unit-segment-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.active-unit-btn {
  border-color: var(--excel-green) !important;
  background: #f0fdf4 !important;
  box-shadow: 0 0 0 2px rgba(16, 124, 65, 0.15);
}

.unit-btn-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.unit-radio-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: inline-block;
  flex-shrink: 0;
  position: relative;
}

.unit-radio-circle.checked {
  border-color: var(--excel-green);
  background: var(--excel-green);
  box-shadow: inset 0 0 0 2.5px #ffffff;
}

.unit-name {
  font-size: 0.8rem;
  color: #1e293b;
}

.unit-btn-desc {
  font-size: 0.68rem;
  color: #64748b;
  margin-left: 22px;
  font-family: var(--font-mono);
}

/* Qty Inputs Grid */
.qty-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.qty-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qty-card-ordered { border-top: 3px solid #2563eb; }
.qty-card-purchased { border-top: 3px solid #7c3aed; }
.qty-card-billed { border-top: 3px solid #059669; }

.qty-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  min-height: 20px;
}

.qty-unit-pill {
  font-size: 0.65rem;
  font-weight: 600;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 3px;
  color: #64748b;
}

.btn-quick-match {
  background: #f3e8ff;
  border: 1px solid #e9d5ff;
  color: #6b21a8;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 3px;
  padding: 1px 6px;
  cursor: pointer;
  transition: all 0.1s ease;
}
.qty-card-billed .btn-quick-match {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}
.btn-quick-match:hover {
  filter: brightness(0.92);
}

.qty-number-input {
  width: 100%;
  padding: 5px 8px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  outline: none;
  transition: all 0.15s ease;
}
.qty-number-input.input-blue:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.qty-number-input.input-purple:focus {
  background: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}
.qty-number-input.input-emerald:focus {
  background: #ffffff;
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

/* Live Calculation Summary Bar */
.live-calculation-summary-bar {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calc-metric-item {
  display: flex;
  flex-direction: column;
}

.calc-metric-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.03em;
}

.calc-metric-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 1px;
}

.calc-metric-sub {
  font-size: 0.65rem;
  color: #94a3b8;
}

.calc-metric-divider {
  width: 1px;
  height: 28px;
  background: #e2e8f0;
}

.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  padding: 7px 18px;
}

.mb-0 { margin-bottom: 0; }

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

/* Columns Visibility Dropdown */
.columns-menu-wrapper {
  position: relative;
  display: inline-block;
}

.columns-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.columns-dropdown-card {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  width: 250px;
  padding: 8px;
  animation: modal-enter 0.12s ease-out;
}

.columns-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 6px 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 6px;
}

.columns-dropdown-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-subtle);
}

.btn-link {
  background: none;
  border: none;
  color: var(--color-blue);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}
.btn-link:hover {
  text-decoration: underline;
}

.columns-list {
  max-height: 290px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.column-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 0.76rem;
  user-select: none;
  color: var(--text-main);
  transition: background-color 0.1s ease;
}
.column-checkbox-item:hover {
  background-color: var(--bg-subtle);
}

.column-checkbox-item input[type="checkbox"] {
  accent-color: var(--excel-green);
  cursor: pointer;
  width: 14px;
  height: 14px;
}

/* Template Download Box */
.template-download-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

/* Daily Date Workflow Bar */
.daily-date-nav-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.date-controls-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-date-nav {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #334155;
  transition: all 0.1s ease;
}
.btn-date-nav:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-date-today {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.1s ease;
}
.btn-date-today:hover {
  background: #dcfce7;
}

.date-picker-input {
  background: #ffffff;
  border: 1.5px solid var(--excel-green);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.date-info-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  padding: 4px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
}

.date-info-day {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}

.date-info-ref {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 1px 6px;
  border-radius: 3px;
}

.date-sync-indicator {
  font-size: 0.74rem;
}

.sync-saving {
  color: #2563eb;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  display: inline-block;
}

.sync-saved {
  color: #16a34a;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.sync-check {
  font-size: 0.82rem;
  font-weight: 700;
}

/* Filter Toggle Pill */
.filter-toggle-pill {
  display: flex;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 2px;
}

.pill-btn {
  border: none;
  background: none;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.1s ease;
}
.pill-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

/* Category Group Header Rows */
.category-header-row {
  background: #f8fafc !important;
  border-top: 2px solid #cbd5e1;
  border-bottom: 1.5px solid #cbd5e1;
}

.category-header-cell {
  padding: 8px 14px !important;
}

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

.category-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-icon {
  font-size: 1.1rem;
}

.cat-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cat-count {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

.cat-active-pill {
  font-size: 0.66rem;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #bae6fd;
}

.category-subtotal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-subtotal-kpis {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: #475569;
}

.sub-stat {
  font-family: var(--font-mono);
}

.cat-bulk-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-cat-bulk {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #6b21a8;
  cursor: pointer;
  transition: all 0.1s ease;
}
.btn-cat-bulk:hover {
  background: #f3e8ff;
  border-color: #d8b4fe;
}

.btn-cat-bulk-emerald {
  color: #047857;
}
.btn-cat-bulk-emerald:hover {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

/* Product Row & Inline Inputs */
.product-data-row {
  transition: background-color 0.1s ease;
}
.product-data-row:hover {
  background-color: #f1f5f9;
}

.row-active-entry {
  background-color: #f0fdf4 !important;
}

.prod-row-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.8rem;
}

.col-input-cell {
  padding: 3px 6px !important;
  width: 155px;
  min-width: 145px;
}

.col-ordered, .col-purchased, .col-billed {
  width: 155px !important;
  min-width: 145px !important;
}

.inline-qty-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
  background: #ffffff;
  outline: none;
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
}
.inline-qty-input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(16, 124, 65, 0.2);
  border-color: var(--excel-green);
}

.has-val-blue {
  color: #1d4ed8;
  font-weight: 700;
  background: #eff6ff !important;
  border-color: #93c5fd !important;
}

.has-val-purple {
  color: #6d28d9;
  font-weight: 700;
  background: #faf5ff !important;
  border-color: #d8b4fe !important;
}

.has-val-emerald {
  color: #047857;
  font-weight: 700;
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}

.has-val-overbilled {
  color: #be123c !important;
  font-weight: 700 !important;
  background: #fff1f2 !important;
  border: 1.5px solid #f43f5e !important;
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.15) !important;
}

.status-overbilled {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fecdd3;
  font-weight: 700;
}

.badge-overbilled-val {
  display: inline-block;
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fda4af;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.78rem;
}

.text-overbilled {
  color: #e11d48 !important;
}

.cell-overbilled-alert {
  background-color: #fff1f2 !important;
}

.row-overbilled-warning td {
  background-color: #fffdfd;
}

.btn-save-sheet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #107c41;
  color: #ffffff;
  border: 1px solid #0d6937;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn-save-sheet:hover {
  background: #0d6937;
  box-shadow: 0 2px 4px rgba(16, 124, 65, 0.25);
}

.kpi-chip-warning {
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
}

.text-danger {
  color: #e11d48 !important;
}

.inline-input-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
}

.btn-cell-quick-match {
  background: #f3e8ff;
  border: 1px solid #d8b4fe;
  color: #6b21a8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  transition: all 0.1s ease;
}
.btn-cell-quick-match:hover {
  background: #e9d5ff;
}

.btn-match-emerald {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}
.btn-match-emerald:hover {
  background: #d1fae5;
}

.inline-remarks-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 3px 6px;
  font-size: 0.76rem;
  color: #334155;
  border-radius: 4px;
  outline: none;
}
.inline-remarks-input:focus {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 0 0 1px #cbd5e1;
}

.btn-row-clear {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 3px;
  transition: all 0.1s ease;
}
.btn-row-clear:hover {
  color: #ef4444;
  background: #fee2e2;
}

.search-clear-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}
.search-clear-btn:hover {
  color: #0f172a;
}

/* ==========================================================================
   Multi-Category Filter Group & Interactive Badges
   ========================================================================== */
.multi-cat-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.multi-cat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-right: 2px;
}

.btn-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-cat-pill:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.btn-cat-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-cat-pill.active-vegetable {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border-color: #34d399 !important;
}

.btn-cat-pill.active-fruit {
  background: #fff1f2 !important;
  color: #9f1239 !important;
  border-color: #fda4af !important;
}

.btn-cat-pill.active-keerai {
  background: #f0fdf4 !important;
  color: #166534 !important;
  border-color: #86efac !important;
}

.btn-cat-pill.inactive {
  opacity: 0.6;
  background: #f8fafc;
  border-style: dashed;
}

.cat-pill-indicator {
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

/* ==========================================================================
   Saved Dates Quick Dropdown
   ========================================================================== */
.saved-dates-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.btn-saved-dates-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-saved-dates-toggle:hover,
.btn-saved-dates-toggle.active {
  background: #dcfce7;
  border-color: #86efac;
}

.saved-dates-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 320px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 100;
  overflow: hidden;
  animation: fadeInDown 0.15s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.saved-dates-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
}

.saved-dates-menu-header .badge-count {
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 9999px;
  font-size: 0.7rem;
}

.saved-dates-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 0;
}

.saved-date-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s ease;
}

.saved-date-item:hover {
  background: #f8fafc;
}

.saved-date-item.current-date {
  background: #eff6ff;
  border-left: 3px solid #2563eb;
}

.saved-date-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.saved-date-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
}

.saved-date-meta {
  font-size: 0.72rem;
  color: #64748b;
}

.saved-date-badge-ok {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.saved-date-badge-pending {
  background: #fef3c7;
  color: #b45309;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.saved-date-badge-alert {
  background: #ffe4e6;
  color: #be123c;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.saved-dates-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 0.76rem;
  color: #94a3b8;
}

/* ==========================================================================
   Sheet 3: Date-wise History & Audit Ledger Table
   ========================================================================== */
.reconcile-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

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

.section-title-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ledger-table th {
  background: #f8fafc;
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border-bottom: 2px solid #cbd5e1;
}

.ledger-table td {
  padding: 10px 12px;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.85rem;
}

.ledger-date-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ledger-date-str {
  font-size: 0.9rem;
  color: #0f172a;
}

.badge-current-pill {
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.badge-items-count {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.btn-open-sheet {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #107c41;
  color: #ffffff;
  border: 1px solid #0d6937;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-open-sheet:hover {
  background: #0d6937;
  box-shadow: 0 2px 4px rgba(16, 124, 65, 0.2);
}

.highlight-current-date-row {
  background-color: #f8fafc;
}

.section-divider {
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}

/* Same-Day Multi-List Navigation Bar */
.daily-lists-nav-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.day-lists-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.day-lists-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.day-lists-pills-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-list-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.btn-list-tab:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #0f172a;
}

.active-list-tab {
  background: #0284c7 !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.list-tab-name {
  font-weight: 700;
}

.list-tab-badge {
  background: rgba(0, 0, 0, 0.1);
  color: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
}

.active-list-tab .list-tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.btn-create-list-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f0fdf4;
  border: 1.5px dashed #86efac;
  color: #166534;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-create-list-tab:hover {
  background: #dcfce7;
  border-color: #22c55e;
  border-style: solid;
}

.day-lists-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.current-list-meta {
  font-size: 0.74rem;
  color: #64748b;
}

.current-list-meta strong {
  color: #0f172a;
}

.btn-list-action {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  color: #475569;
  transition: all 0.12s ease;
}

.btn-list-action:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-list-action.text-danger {
  color: #dc2626;
  border-color: #fecaca;
}

.btn-list-action.text-danger:hover {
  background: #fef2f2;
}

/* List tags in saved dates dropdown and Sheet 3 ledger */
.saved-date-val-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.saved-date-list-tag {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #bae6fd;
}

.ledger-list-tag {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #bae6fd;
}

.modal-sm {
  max-width: 440px !important;
}

/* ==========================================================================
   INDIVIDUAL UNIT DROPDOWNS IN ORDERED, PURCHASED, BILLED CELLS
   ========================================================================== */
.qty-unit-cell {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
}

.qty-unit-cell .inline-qty-input {
  flex: 1;
  min-width: 48px;
}

.unit-inline-select {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  padding: 3px 4px;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  max-width: 58px;
  flex-shrink: 0;
}

.unit-inline-select:hover {
  border-color: #94a3b8;
  background: #ffffff;
}

.unit-inline-select:focus {
  border-color: var(--excel-green);
  box-shadow: 0 0 0 2px var(--excel-green-light);
  background: #ffffff;
}

/* ==========================================================================
   EXECUTIVE HOME DASHBOARD & ENTRY LAUNCHER
   ========================================================================== */
.dashboard-container {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Hero Launcher Card */
.dash-hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 1.5px solid #bbf7d0;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: 0 4px 16px -2px rgba(16, 124, 65, 0.08);
}

.dash-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-hero-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-hero-icon {
  font-size: 2rem;
  background: #dcfce7;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid #86efac;
}

.dash-hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.dash-hero-sub {
  font-size: 0.84rem;
  color: #475569;
  margin-top: 2px;
}

.btn-hero-start {
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(16, 124, 65, 0.25);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-hero-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 124, 65, 0.32);
}

/* Step-by-Step Config Grid */
.launcher-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid #dcfce7;
}

.launcher-card-step {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.launcher-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.step-num {
  background: #107c41;
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.74rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
  flex: 1;
}

.btn-mini-add {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-mini-add:hover {
  background: #d1fae5;
  border-color: #34d399;
}

.launcher-date-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.launcher-date-nav .date-picker-input {
  flex: 1;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}

.launcher-date-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.78rem;
}

.launcher-lists-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.launcher-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Executive KPI Tiles */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.dash-kpi-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  border-top-width: 4px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.dash-kpi-card.border-blue { border-top-color: #2563eb; }
.dash-kpi-card.border-purple { border-top-color: #7c3aed; }
.dash-kpi-card.border-emerald { border-top-color: #059669; }
.dash-kpi-card.border-amber { border-top-color: #d97706; }
.dash-kpi-card.border-rose { border-top-color: #e11d48; }

.dash-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dash-kpi-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #64748b;
}

.dash-kpi-icon {
  font-size: 1.1rem;
}

.dash-kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.2;
}

.dash-kpi-footer {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 6px;
}

/* Two Column Layout */
.dash-two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .dash-two-col-grid {
    grid-template-columns: 1fr;
  }
}

.dash-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.dash-panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.dash-panel-sub {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 1px;
}

.dash-cat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-cat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.dash-cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-cat-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-cat-stats {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-stat-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.progress-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.progress-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
}

.progress-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.fill-purple { background: #9333ea; }
.fill-emerald { background: #10b981; }

.dash-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.dash-history-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.active-history-item {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
}

.dash-hist-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.dash-hist-sub {
  font-size: 0.72rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.badge-list-mini {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #bae6fd;
}

.dash-hist-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   PACKING HUB CARD & MULTI-LIST CONTROLS
   ========================================================================== */
.packing-hub-card {
  background: #ffffff !important;
  border: 1px solid #d1fae5 !important;
  border-radius: 10px !important;
  margin-bottom: 14px !important;
  box-shadow: 0 2px 8px -2px rgba(16, 185, 129, 0.08), 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
  overflow: hidden !important;
}

.packing-hub-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 16px !important;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

.packing-hub-title-group {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.packing-hub-icon-wrap {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.15rem !important;
  flex-shrink: 0 !important;
}

.packing-hub-headings {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.packing-hub-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.packing-hub-title {
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  color: #065f46 !important;
  letter-spacing: -0.01em !important;
}

.packing-hub-parent-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2px 8px !important;
  background: #e2e8f0 !important;
  color: #334155 !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
}

.packing-hub-parent-badge strong {
  color: #0f172a !important;
  margin-left: 3px !important;
}

.packing-hub-multi-pill {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2px 9px !important;
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
}

.packing-hub-subtext {
  font-size: 0.72rem !important;
  color: #64748b !important;
}

.packing-hub-actions-group {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-left: auto !important;
}

.packing-active-badge-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  padding: 3px 8px !important;
  border-radius: 7px !important;
}

.packing-active-label {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
}

.packing-active-name {
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  color: #059669 !important;
  padding-right: 4px !important;
}

.btn-hub-action {
  all: unset !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 3px 8px !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 5px !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: #475569 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.btn-hub-action:hover {
  background: #ffffff !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

.btn-hub-action-danger {
  color: #dc2626 !important;
  border-color: #fecdd3 !important;
  background: #fff1f2 !important;
}

.btn-hub-action-danger:hover {
  background: #ffe4e6 !important;
  border-color: #f87171 !important;
  color: #b91c1c !important;
}

.packing-hub-export-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.btn-hub-export {
  all: unset !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 13px !important;
  border-radius: 7px !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
  white-space: nowrap !important;
}

.btn-hub-export-primary {
  background: linear-gradient(180deg, #107c41 0%, #0c6133 100%) !important;
  color: #ffffff !important;
  border: 1px solid #084323 !important;
  box-shadow: 0 1px 2px rgba(16, 124, 65, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.btn-hub-export-primary:hover {
  background: linear-gradient(180deg, #138d4a 0%, #0e6f3a 100%) !important;
  box-shadow: 0 3px 8px rgba(16, 124, 65, 0.35) !important;
  transform: translateY(-1px) !important;
}

.btn-hub-export-secondary {
  background: #ffffff !important;
  color: #107c41 !important;
  border: 1px solid #107c41 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.btn-hub-export-secondary:hover {
  background: #ecfdf5 !important;
  border-color: #0c6133 !important;
  color: #0c6133 !important;
  transform: translateY(-1px) !important;
}

/* Tabs Row */
.packing-hub-tabs-row {
  padding: 8px 16px !important;
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
}

.packing-hub-tabs-scroll {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
}

.packing-tabs-legend {
  font-size: 0.73rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  margin-right: 4px !important;
}

.packing-pill-tab {
  all: unset !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 6px 12px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #334155 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.packing-pill-tab:hover {
  background: #f1f5f9 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}

.packing-pill-tab.active {
  background: #059669 !important;
  border-color: #047857 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3) !important;
}

.pill-tab-indicator {
  font-size: 0.65rem !important;
  opacity: 0.85 !important;
}

.pill-tab-badge {
  padding: 1px 6px !important;
  border-radius: 4px !important;
  font-size: 0.69rem !important;
  background: #e2e8f0 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}

.packing-pill-tab.active .pill-tab-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.btn-hub-add-tab {
  all: unset !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 6px 12px !important;
  background: #ffffff !important;
  border: 1px dashed #10b981 !important;
  border-radius: 8px !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  color: #059669 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.btn-hub-add-tab:hover {
  background: #ecfdf5 !important;
  border-style: solid !important;
  color: #047857 !important;
}

/* ==========================================================================
   GLOBAL EXPORT DROPDOWN MENU
   ========================================================================== */
.export-dropdown-wrap {
  position: relative !important;
  display: inline-block !important;
}

.btn-export-main {
  all: unset !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 6px 14px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 7px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.btn-export-main:hover {
  background: #ffffff !important;
  border-color: #107c41 !important;
  color: #107c41 !important;
  box-shadow: 0 3px 8px rgba(16, 124, 65, 0.16) !important;
  transform: translateY(-1px) !important;
}

.export-excel-icon {
  color: #107c41 !important;
  display: flex !important;
  align-items: center !important;
}

.export-caret {
  font-size: 0.72rem !important;
  color: #64748b !important;
  transition: transform 0.2s ease !important;
}

.export-dropdown-menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  right: 0 !important;
  width: 340px !important;
  max-width: 90vw !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9px !important;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.2), 0 6px 12px -4px rgba(0, 0, 0, 0.1) !important;
  z-index: 9999 !important;
  padding: 8px 6px !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.export-dropdown-menu[style*="display: none"] {
  display: none !important;
}

.export-menu-header {
  padding: 4px 10px 6px !important;
  font-size: 0.69rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #64748b !important;
  border-bottom: 1px solid #f1f5f9 !important;
  margin-bottom: 3px !important;
}

.export-menu-item {
  all: unset !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  padding: 9px 12px !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  border: 1px solid transparent !important;
  width: 100% !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.export-menu-item:hover {
  background: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
}

.export-menu-item:hover .export-item-title {
  color: #107c41 !important;
}

.export-item-icon {
  font-size: 1.25rem !important;
  flex-shrink: 0 !important;
  margin-top: 1px !important;
}

.export-item-title {
  font-size: 0.81rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  transition: color 0.15s ease !important;
}

.export-item-desc {
  font-size: 0.69rem !important;
  color: #64748b !important;
  line-height: 1.3 !important;
  margin-top: 2px !important;
}

/* Packing Report Toolbar Buttons */
.btn-report-print {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-report-print:hover {
  background: #1e293b;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.btn-report-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #ffffff;
  color: #107c41;
  border: 1.5px solid #107c41;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-report-export:hover {
  background: #f0fdf4;
  border-color: #0d6937;
  color: #0d6937;
  box-shadow: 0 2px 6px rgba(16, 124, 65, 0.15);
}

.print-doc-header, .print-doc-footer {
  display: none !important;
}

/* Comprehensive Print UI/UX */
@media print {
  @page {
    size: landscape;
    margin: 8mm 10mm;
  }

  html, body, .tracker-wrapper, .main-body, .main-content {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .grid-table-container {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    border: none !important;
  }

  /* Hide all app chrome, navigation bars, toolbars, filters, alert banners, and footers */
  .app-header,
  .daily-date-nav-bar,
  .daily-lists-nav-bar,
  .sub-toolbar,
  .toast-banner,
  .sheet-mode-header-bar,
  .report-toolbar-card,
  .app-tabbar,
  .date-sync-indicator,
  .saved-dates-dropdown-wrap,
  .saved-dates-menu,
  .columns-menu-wrapper,
  .columns-dropdown-card,
  .modal-overlay,
  .modal-backdrop,
  .modal,
  .top-nav,
  .top-sub-bar,
  .date-quick-nav,
  .day-lists-bar,
  .btn-report-print,
  .btn-report-export,
  .btn-export-main,
  .export-dropdown-wrap,
  .bottom-bar,
  .bottom-sheets-nav,
  .sheet-tab-bar,
  .sidebar,
  .btn-hub-export,
  .packing-hub-card,
  .sheet-mode-store-filter {
    display: none !important;
  }

  /* Print document official header */
  .print-doc-header {
    display: block !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid #000000 !important;
  }

  .print-doc-header-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
  }

  .print-doc-brand {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .print-doc-icon {
    font-size: 1.5rem !important;
  }

  .print-doc-title {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #000000 !important;
    margin: 0 !important;
    text-transform: uppercase !important;
    letter-spacing: -0.01em !important;
  }

  .print-doc-sub {
    font-size: 0.72rem !important;
    color: #475569 !important;
    margin: 2px 0 0 0 !important;
  }

  .print-doc-timestamp {
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
  }

  .print-doc-meta-strip {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 6px 10px !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .print-meta-box {
    font-size: 0.76rem !important;
    color: #334155 !important;
  }

  .print-meta-lbl {
    font-weight: 800 !important;
    color: #0f172a !important;
    margin-right: 4px !important;
    font-size: 0.7rem !important;
  }

  .print-meta-val {
    font-weight: 700 !important;
    color: #000000 !important;
  }

  .packing-report-container {
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
  }

  .packing-report-sheet {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background-image: none !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .report-grid-row {
    display: flex !important;
    align-items: flex-start !important;
    gap: 14px !important;
    margin-bottom: 16px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .report-table-box {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .report-table {
    border: 1.5px solid #000000 !important;
    border-collapse: collapse !important;
    background: #ffffff !important;
    width: 100% !important;
  }

  .report-table th,
  .report-table td {
    border: 1px solid #000000 !important;
    color: #000000 !important;
    height: 23px !important;
    font-size: 0.76rem !important;
  }

  .report-header-store {
    background: #f1f5f9 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    font-weight: 800 !important;
    border-bottom: 1.5px solid #000000 !important;
    text-align: center !important;
  }

  .report-inline-input {
    color: #000000 !important;
    font-weight: 700 !important;
    text-align: right !important;
    border: none !important;
    background: transparent !important;
  }

  .print-doc-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 18px !important;
    padding-top: 8px !important;
    border-top: 1px solid #000000 !important;
    font-size: 0.72rem !important;
    color: #334155 !important;
  }
}

/* ==========================================================================
   COMPONENT LAYOUT & PACKING OVERRIDES (MOVED FROM INLINE COMPONENT STYLES)
   ========================================================================== */
.qty-unit-cell {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    width: 100% !important;
}
.qty-unit-cell .inline-qty-input {
    flex: 1 1 auto !important;
    min-width: 46px !important;
    width: 55px !important;
}
.unit-inline-select {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    padding: 3px 3px !important;
    cursor: pointer !important;
    outline: none !important;
    width: 54px !important;
    min-width: 50px !important;
    flex: 0 0 auto !important;
}
.unit-inline-select:hover {
    border-color: #94a3b8 !important;
    background: #ffffff !important;
}
.unit-inline-select:focus {
    border-color: #107c41 !important;
    box-shadow: 0 0 0 2px rgba(16, 124, 65, 0.2) !important;
    background: #ffffff !important;
}
.col-input-cell {
    min-width: 145px !important;
    width: 155px !important;
    padding: 3px 5px !important;
}
.col-ordered, .col-purchased, .col-billed {
    min-width: 145px !important;
    width: 155px !important;
}

.main-body {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    scroll-behavior: smooth !important;
}
.main-body::-webkit-scrollbar {
    width: 8px !important;
}
.main-body::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
}
.main-body::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 4px !important;
}
.main-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8 !important;
}

.dashboard-container {
    flex: 1 0 auto !important;
    padding: 24px 28px 60px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.dash-banner-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px 24px !important;
    box-shadow: 0 2px 12px -2px rgba(0, 0, 0, 0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}
.dash-banner-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
}
.dash-banner-title-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}
.dash-banner-icon {
    font-size: 1.8rem !important;
    background: #ecfdf5 !important;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    border: 1px solid #a7f3d0 !important;
    flex-shrink: 0 !important;
}
.dash-banner-title {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
}
.dash-banner-sub {
    font-size: 0.82rem !important;
    color: #64748b !important;
    margin-top: 3px !important;
}
.btn-banner-start {
    padding: 9px 20px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    box-shadow: 0 3px 10px rgba(16, 124, 65, 0.22) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #107c41 !important;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}
.btn-banner-start:hover {
    background: #0d6334 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 14px rgba(16, 124, 65, 0.3) !important;
}
.dash-control-strip {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    padding-top: 14px !important;
    border-top: 1px solid #f1f5f9 !important;
}
.dash-control-group {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}
.dash-control-label {
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}
.dash-date-stepper {
    display: flex !important;
    align-items: center !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 7px !important;
    overflow: hidden !important;
}
.btn-stepper {
    background: transparent !important;
    border: none !important;
    padding: 5px 8px !important;
    cursor: pointer !important;
    color: #475569 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
}
.btn-stepper:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}
.date-stepper-input {
    border: none !important;
    background: transparent !important;
    padding: 5px 8px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    outline: none !important;
    border-left: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
}
.btn-dash-today {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 5px 10px !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}
.btn-dash-today:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
}
.header-dash-nav-pill {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #f1f5f9 !important;
    padding: 5px 12px !important;
    border-radius: 9999px !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.8rem !important;
    color: #334155 !important;
    font-weight: 600 !important;
}
.dash-pill-divider { color: #cbd5e1 !important; }
.dash-pill-badge {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    padding: 1px 7px !important;
    border-radius: 9999px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
}
.launcher-lists-pills, .launcher-cat-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}
.dash-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 16px !important;
}
.dash-kpi-card {
    background: #ffffff !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    border-top-width: 4px !important;
    padding: 16px 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    display: flex !important;
    flex-direction: column !important;
}
.dash-kpi-card.border-blue { border-top-color: #2563eb !important; }
.dash-kpi-card.border-purple { border-top-color: #7c3aed !important; }
.dash-kpi-card.border-emerald { border-top-color: #059669 !important; }
.dash-kpi-card.border-amber { border-top-color: #d97706 !important; }
.dash-kpi-card.border-rose { border-top-color: #e11d48 !important; }
.dash-kpi-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 8px !important;
}
.dash-kpi-label {
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    color: #64748b !important;
}
.dash-kpi-value {
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    line-height: 1.2 !important;
}
.dash-kpi-footer {
    font-size: 0.74rem !important;
    color: #64748b !important;
    margin-top: 6px !important;
}
.dash-two-col-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
}
@media (max-width: 1024px) {
    .dash-two-col-grid { grid-template-columns: 1fr !important; }
}
.dash-panel {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
.dash-panel-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
.dash-panel-title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}
.dash-panel-sub {
    font-size: 0.76rem !important;
    color: #64748b !important;
    margin-top: 1px !important;
}
.dash-cat-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}
.dash-cat-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 12px 14px !important;
}
.dash-cat-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 10px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}
.dash-cat-name-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.dash-cat-stats {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.dash-stat-badge {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}
.progress-bar-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}
.progress-bar-label {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 0.7rem !important;
    color: #64748b !important;
    font-weight: 600 !important;
}
.progress-track {
    height: 6px !important;
    background: #e2e8f0 !important;
    border-radius: 9999px !important;
    overflow: hidden !important;
}
.progress-fill {
    height: 100% !important;
    border-radius: 9999px !important;
    transition: width 0.3s ease !important;
}
.fill-purple { background: #9333ea !important; }
.fill-emerald { background: #10b981 !important; }
.dash-recent-lists {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)) !important;
    gap: 14px !important;
}
.recent-list-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 9px !important;
    padding: 12px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    transition: all 0.18s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}
.recent-list-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-1px) !important;
}
.recent-list-card.active-recent-list {
    background: #f0fdf4 !important;
    border-color: #86efac !important;
}
.rl-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}
.rl-title-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.rl-icon {
    font-size: 1.1rem !important;
}
.rl-name {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}
.rl-date {
    font-size: 0.74rem !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}
.rl-badge-items {
    background: #f1f5f9 !important;
    color: #475569 !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
}
.rl-stats-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #f8fafc !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    border: 1px solid #f1f5f9 !important;
}
.rl-stat-chip {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}
.rl-bottom {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}
.rl-ref {
    font-size: 0.7rem !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    color: #94a3b8 !important;
}
.rl-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.btn-delete-list {
    background: #fff1f2 !important;
    border: 1px solid #fecdd3 !important;
    color: #e11d48 !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    transition: all 0.15s ease !important;
}
.btn-delete-list:hover {
    background: #ffe4e6 !important;
    border-color: #f43f5e !important;
    color: #be123c !important;
}
.status-badge-sm {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}
.status-badge-sm.emerald { background: #dcfce7 !important; color: #15803d !important; }
.status-badge-sm.amber { background: #fef3c7 !important; color: #b45309 !important; }
.status-badge-sm.blue { background: #dbeafe !important; color: #1d4ed8 !important; }
.status-badge-sm.rose { background: #ffe4e6 !important; color: #be123c !important; }
.status-badge-sm.slate { background: #f1f5f9 !important; color: #64748b !important; }
.badge-current-active {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    background: #dcfce7 !important;
    color: #15803d !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    border: 1px solid #86efac !important;
}
.dash-shortcuts-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 14px !important;
}
.dash-shortcut-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}
.dash-shortcut-card:hover {
    border-color: #107c41 !important;
    background: #f0fdf4 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(16, 124, 65, 0.08) !important;
}
.shortcut-icon {
    font-size: 1.4rem !important;
    background: #f8fafc !important;
    width: 42px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    flex-shrink: 0 !important;
}
.shortcut-title {
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}
.shortcut-desc {
    font-size: 0.72rem !important;
    color: #64748b !important;
    margin-top: 2px !important;
}

/* PO Matrix View Styles */
.po-view-wrapper {
    display: flex !important;
    flex-direction: column !important;
    padding: 12px 18px !important;
    gap: 12px !important;
}
.po-view-banner {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%) !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}
.po-view-title-group {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}
.po-view-icon-badge {
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    background: #107c41 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.3rem !important;
    box-shadow: 0 2px 6px rgba(16, 124, 65, 0.25) !important;
}
.po-view-headings h2 {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #14532d !important;
    margin: 0 !important;
}
.po-view-headings p {
    font-size: 0.78rem !important;
    color: #15803d !important;
    margin: 2px 0 0 0 !important;
}
.po-store-chips-bar {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}
.po-store-chip {
    background: #ffffff !important;
    border: 1px solid #86efac !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    color: #166534 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
}
.po-store-chip-name {
    background: #dcfce7 !important;
    color: #166534 !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    font-weight: 800 !important;
    font-size: 0.72rem !important;
}
.po-toolbar-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}
.po-filter-tabs {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.po-filter-tab {
    padding: 5px 12px !important;
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}
.po-filter-tab:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}
.po-filter-tab.active {
    background: #107c41 !important;
    border-color: #107c41 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(16, 124, 65, 0.2) !important;
}
.po-matrix-table-wrap {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}
.po-matrix-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 0.82rem !important;
    color: #1e293b !important;
}
.po-matrix-table th {
    background: #f8fafc !important;
    color: #334155 !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    border: 1px solid #e2e8f0 !important;
    padding: 8px 10px !important;
    white-space: nowrap !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
}
.po-matrix-table th.th-store {
    background: #f0fdf4 !important;
    color: #166534 !important;
    border-color: #bbf7d0 !important;
    text-align: right !important;
    min-width: 60px !important;
}
.po-matrix-table th.th-total-ord {
    background: #dbeafe !important;
    color: #1e40af !important;
    border-color: #bfdbfe !important;
    text-align: right !important;
    min-width: 90px !important;
}
.po-matrix-table td {
    border: 1px solid #e2e8f0 !important;
    padding: 6px 10px !important;
    white-space: nowrap !important;
    font-size: 0.8rem !important;
}
.po-matrix-table tr:hover td {
    background: #f8fafc !important;
}
.po-matrix-table td.td-store {
    text-align: right !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 0.82rem !important;
}
.po-matrix-table td.td-store.has-qty {
    font-weight: 700 !important;
    color: #0f172a !important;
    background: #fcfdfd !important;
}
.po-matrix-table td.td-store.empty-qty {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}
.po-matrix-table td.td-total-ord {
    text-align: right !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-weight: 800 !important;
    color: #1e40af !important;
    background: #eff6ff !important;
    font-size: 0.85rem !important;
}
.po-cat-header-row td {
    background: #f1f5f9 !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    font-size: 0.84rem !important;
    padding: 8px 12px !important;
    border-top: 2px solid #cbd5e1 !important;
    border-bottom: 1px solid #cbd5e1 !important;
}
.po-cat-subtotal-row td {
    background: #f8fafc !important;
    font-weight: 700 !important;
    color: #334155 !important;
    border-top: 1px dashed #cbd5e1 !important;
    border-bottom: 2px solid #cbd5e1 !important;
    font-size: 0.8rem !important;
}
.po-grand-total-row td {
    background: #0f172a !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.88rem !important;
    padding: 10px 12px !important;
    border: none !important;
}
.po-grand-total-row td.td-store,
.po-grand-total-row td.td-total-ord {
    color: #ffffff !important;
    background: #1e293b !important;
}
.po-empty-state {
    padding: 48px 24px !important;
    text-align: center !important;
    background: #ffffff !important;
    border: 1px dashed #cbd5e1 !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
}

/* Store Matrix Columns in Sheet 1: Daily Order Tracking */
.store-filter-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #f1f5f9 !important;
    padding: 3px 6px !important;
    border-radius: 7px !important;
    border: 1px solid #cbd5e1 !important;
}
.store-filter-label {
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin-right: 2px !important;
}
.btn-store-pill {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 5px !important;
    padding: 2px 7px !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    transition: all 0.15s ease !important;
    line-height: 1.4 !important;
}
.btn-store-pill:hover {
    border-color: #107c41 !important;
    color: #107c41 !important;
    background: #f0fdf4 !important;
}
.btn-store-pill.active {
    background: #107c41 !important;
    color: #ffffff !important;
    border-color: #107c41 !important;
    box-shadow: 0 1px 3px rgba(16, 124, 65, 0.25) !important;
}
.btn-store-pill .store-pill-badge {
    font-size: 0.68rem !important;
    opacity: 0.85 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}
.btn-store-toggle {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 5px !important;
    padding: 2px 7px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    cursor: pointer !important;
    margin-left: 4px !important;
    transition: all 0.15s ease !important;
}
.btn-store-toggle:hover {
    background: #cbd5e1 !important;
    color: #0f172a !important;
}
.btn-store-toggle.active {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border-color: #a7f3d0 !important;
}
th.th-store-col {
    background: #f0fdf4 !important;
    color: #166534 !important;
    border-color: #bbf7d0 !important;
    text-align: right !important;
    min-width: 52px !important;
    width: 58px !important;
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    user-select: none !important;
    padding: 4px 6px !important;
}
th.th-store-col:hover {
    background: #dcfce7 !important;
    color: #14532d !important;
}
th.th-store-col.active-store-col {
    background: #15803d !important;
    color: #ffffff !important;
    border-color: #15803d !important;
}
td.td-store-col {
    text-align: right !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 0.78rem !important;
    padding: 3px 6px !important;
    border-right: 1px solid #e2e8f0 !important;
    min-width: 52px !important;
    width: 58px !important;
}
td.td-store-col.has-store-qty {
    font-weight: 700 !important;
    color: #166534 !important;
    background: #f0fdf4 !important;
}
td.td-store-col.empty-store-qty {
    color: #cbd5e1 !important;
    font-weight: 400 !important;
}
td.td-store-col.active-store-col {
    background: #dcfce7 !important;
    border-left: 2px solid #16a34a !important;
    border-right: 2px solid #16a34a !important;
    font-weight: 800 !important;
    color: #14532d !important;
}

/* Sheet View Switcher Bar */
.sheet-mode-header-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #ffffff !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 8px 16px !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}
.sheet-mode-tabs {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.sheet-mode-tab {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}
.sheet-mode-tab:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}
.sheet-mode-tab.active {
    background: #107c41 !important;
    border-color: #107c41 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(16, 124, 65, 0.25) !important;
}
.sheet-mode-tab .mode-tab-icon {
    font-size: 1rem !important;
}
.sheet-mode-tab .mode-tab-badge {
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    background: rgba(0, 0, 0, 0.08) !important;
    padding: 2px 7px !important;
    border-radius: 9999px !important;
}
.sheet-mode-tab.active .mode-tab-badge {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}
.sheet-mode-tab .mode-tab-badge-emerald {
    background: #dcfce7 !important;
    color: #166534 !important;
}
.sheet-mode-tab.active .mode-tab-badge-emerald {
    background: #ffffff !important;
    color: #107c41 !important;
}

/* Store filter buttons in sheet mode bar */
.sheet-mode-store-filter {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #f8fafc !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    flex-wrap: wrap !important;
}
.btn-sm-store {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 5px !important;
    padding: 3px 8px !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}
.btn-sm-store:hover {
    border-color: #107c41 !important;
    color: #107c41 !important;
    background: #f0fdf4 !important;
}
.btn-sm-store.active {
    background: #107c41 !important;
    color: #ffffff !important;
    border-color: #107c41 !important;
}
.btn-sm-toggle-cols {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 5px !important;
    padding: 3px 8px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    cursor: pointer !important;
    margin-left: 4px !important;
}

/* Package Dropdown in Packing View */
.package-select {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 3px 6px !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    cursor: pointer !important;
    outline: none !important;
    width: 100% !important;
    max-width: 110px !important;
}
.package-select:focus {
    border-color: #107c41 !important;
    box-shadow: 0 0 0 2px rgba(16, 124, 65, 0.15) !important;
}

/* Packing View Summary Bar & Analytics */
.packing-summary-bar {
    display: flex !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 10px 16px !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    flex-wrap: wrap !important;
}
.packing-kpi-card {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-left: 4px solid #107c41 !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    min-width: 220px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}
.kpi-icon-wrap {
    font-size: 1.4rem !important;
    line-height: 1 !important;
}
.kpi-info {
    display: flex !important;
    flex-direction: column !important;
}
.kpi-title {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}
.kpi-values {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 4px !important;
}
.kpi-val-primary {
    color: #15803d !important;
}
.kpi-val-secondary {
    color: #1e40af !important;
}
.kpi-unit {
    font-size: 0.72rem !important;
    color: #64748b !important;
    font-weight: 600 !important;
}
.kpi-sep {
    color: #cbd5e1 !important;
    margin: 0 2px !important;
}
.packing-summary-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    flex: 1 !important;
    min-width: 280px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
}
.summary-group-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}
.summary-group-title {
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}
.btn-clear-pill-filter {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    color: #e11d48 !important;
    background: #ffe4e6 !important;
    border: 1px solid #fecdd3 !important;
    border-radius: 4px !important;
    padding: 1px 6px !important;
    cursor: pointer !important;
}
.package-pill-list, .store-pill-list {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}
.pkg-pill, .store-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 2px 7px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}
.pkg-pill:hover, .store-pill:hover {
    border-color: #107c41 !important;
    background: #ecfdf5 !important;
    color: #107c41 !important;
}
.pkg-pill.active {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
}
.store-pill.active {
    background: #15803d !important;
    border-color: #15803d !important;
    color: #ffffff !important;
}
.pkg-pill .pkg-pill-count, .store-pill .store-pill-val {
    font-size: 0.68rem !important;
    opacity: 0.9 !important;
    background: rgba(0, 0, 0, 0.08) !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
}
.pkg-pill.active .pkg-pill-count, .store-pill.active .store-pill-val {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* Imported PO Table Dual-Tier Header */
.th-store-group {
    background: #f0fdf4 !important;
    color: #166534 !important;
    border-color: #bbf7d0 !important;
    text-align: center !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em !important;
    padding: 6px 8px !important;
}
.th-store-group.active-store-head {
    background: #15803d !important;
    color: #ffffff !important;
    border-color: #15803d !important;
}
.th-total-group {
    background: #eff6ff !important;
    color: #1e40af !important;
    border-color: #bfdbfe !important;
    text-align: center !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    padding: 6px 8px !important;
}
.th-sub-metric {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-align: right !important;
    padding: 4px 6px !important;
    border-color: #e2e8f0 !important;
    min-width: 48px !important;
    width: 52px !important;
}
.th-store-box {
    background: #fbfdfc !important;
    color: #15803d !important;
    border-left: 1px solid #bbf7d0 !important;
}
.th-store-kg {
    background: #f0fdf4 !important;
    color: #166534 !important;
    border-right: 1px solid #bbf7d0 !important;
}
.th-total-box {
    background: #f0f7ff !important;
    color: #1d4ed8 !important;
    border-left: 1px solid #bfdbfe !important;
}
.th-total-kg {
    background: #eff6ff !important;
    color: #1e40af !important;
    border-right: 1px solid #bfdbfe !important;
}

/* Store Input Cells */
.store-cell-input {
    width: 100% !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    text-align: right !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 3px 5px !important;
    border-radius: 4px !important;
    outline: none !important;
    transition: all 0.15s ease !important;
}
.store-cell-input:focus {
    background: #ffffff !important;
    border-color: #107c41 !important;
    box-shadow: 0 0 0 2px rgba(16, 124, 65, 0.2) !important;
}
.store-input-box {
    color: #047857 !important;
}
.store-input-kg {
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* UNORDERED: Bold Red Text & Alert Highlight */
.store-cell-input.cell-unordered-red,
input.cell-unordered-red {
    color: #dc2626 !important;
    font-weight: 800 !important;
    background: #fef2f2 !important;
    border: 1.5px solid #f87171 !important;
}
.store-cell-input.cell-unordered-red:focus {
    background: #ffffff !important;
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25) !important;
}
td.td-store-box-cell.has-unordered,
td.td-store-kg-cell.has-unordered {
    background: #fff5f5 !important;
}

/* OVER-PACKED: Amber Alert */
.store-cell-input.cell-overpacked-amber,
input.cell-overpacked-amber {
    color: #d97706 !important;
    font-weight: 800 !important;
    background: #fffbeb !important;
    border: 1.5px solid #fcd34d !important;
}
td.td-store-box-cell.has-overpacked,
td.td-store-kg-cell.has-overpacked {
    background: #fefce8 !important;
}

/* MATCHED: Emerald Style */
.store-cell-input.cell-matched-emerald,
input.cell-matched-emerald {
    color: #059669 !important;
    font-weight: 700 !important;
    background: #f0fdf4 !important;
}

/* Product Row Audit Badges */
.badge-audit-unordered {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.02em;
}
.badge-audit-overpacked {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    margin-left: 6px;
    vertical-align: middle;
}
.badge-audit-matched {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    margin-left: 6px;
    vertical-align: middle;
}

/* Audit Summary Bar */
.packing-audit-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-top: 10px;
    flex-wrap: wrap;
}
.audit-bar-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.audit-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}
.audit-pill-red {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}
.audit-pill-red:hover, .audit-pill-red.active {
    background: #dc2626;
    color: #ffffff;
    border-color: #b91c1c;
}
.audit-pill-amber {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}
.audit-pill-amber:hover, .audit-pill-amber.active {
    background: #d97706;
    color: #ffffff;
    border-color: #b45309;
}
.audit-pill-green {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
    cursor: default;
}
.pill-red-dot {
    color: #ef4444;
    font-size: 0.7rem;
    margin-left: 2px;
}
.th-has-unordered {
    background: #fef2f2 !important;
    color: #991b1b !important;
}
.th-unordered-badge {
    font-size: 0.7rem;
    margin-left: 3px;
}

td.td-store-box-cell {
    background: #fcfdfc !important;
    border-left: 1px solid #e2e8f0 !important;
    padding: 2px 4px !important;
    text-align: right !important;
}
td.td-store-kg-cell {
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    padding: 2px 4px !important;
    text-align: right !important;
}
td.td-total-box-cell {
    background: #f8fbff !important;
    color: #1d4ed8 !important;
    font-weight: 700 !important;
    border-left: 1px solid #dbeafe !important;
    padding: 4px 6px !important;
    text-align: right !important;
}
td.td-total-kg-cell {
    background: #eff6ff !important;
    color: #1e40af !important;
    font-weight: 800 !important;
    border-right: 1px solid #dbeafe !important;
    padding: 4px 6px !important;
    text-align: right !important;
}

.sheet-mode-tab .mode-tab-badge.mode-tab-badge-blue {
    background: #dbeafe !important;
    color: #1e40af !important;
}
.sheet-mode-tab.active .mode-tab-badge.mode-tab-badge-blue {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.packing-report-container {
    padding: 20px 24px;
    background: #f1f5f9;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.report-toolbar-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 12px;
}
.report-toolbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.report-toolbar-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.report-date-badge {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
}
.packing-report-sheet {
    background: #ffffff;
    border: 1px solid #94a3b8;
    padding: 24px 28px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: fit-content;
    min-width: 900px;
    background-image: 
        linear-gradient(to right, #f8fafc 1px, transparent 1px),
        linear-gradient(to bottom, #f8fafc 1px, transparent 1px);
    background-size: 20px 20px;
}
.report-grid-row {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}
.report-table-box {
    background: #ffffff;
}
.report-overall-box {
    width: 210px;
    min-width: 210px;
}
.report-custom-box {
    width: 210px;
    min-width: 210px;
}
.report-store-box {
    width: 165px;
    min-width: 165px;
}
.report-table {
    width: 100%;
    border-collapse: collapse;
    border: 1.5px solid #000000;
    background: #ffffff;
}
.report-table th,
.report-table td {
    border: 1px solid #000000;
    height: 25px;
    line-height: 1.2;
    padding: 3px 6px;
    vertical-align: middle;
}
.report-header-store {
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
    background: #ffffff;
    color: #000000;
    letter-spacing: 0.03em;
    padding: 4px 6px;
}
.report-cell-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #000000;
    padding-left: 8px;
    white-space: nowrap;
}
.report-cell-val {
    font-size: 0.85rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-align: right;
    padding-right: 8px;
    color: #000000;
    font-weight: 500;
}
.report-row-total td {
    border-top: 1.5px solid #000000;
    border-bottom: 1.5px solid #000000;
    font-weight: 700;
}
.report-row-total .report-cell-label {
    font-weight: 800;
}
.report-row-total .report-cell-val {
    font-weight: 800;
    font-size: 0.9rem;
}
.report-cell-input {
    padding: 0 !important;
}
.report-inline-input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    padding: 2px 6px;
    outline: none;
    color: #000000;
    text-align: right;
}
.report-inline-input:hover {
    background: rgba(16, 124, 65, 0.05);
}
.report-inline-input:focus {
    background: #ffffff;
    box-shadow: inset 0 0 0 1.5px #107c41;
}
.report-inline-input::-webkit-outer-spin-button,
.report-inline-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.report-inline-input[type=number] {
    -moz-appearance: textfield;
}
.store-cell-other-hint {
    font-size: 0.65rem;
    line-height: 1;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    padding-top: 2px;
    text-align: center;
    white-space: nowrap;
}
.sheet-mode-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
[x-cloak] { display: none !important; }

/* ==========================================================================
   UI/UX ENHANCEMENTS: UNIFIED EXPORT MENU, STICKY MATRIX COLUMNS,
   QUICK-FILL PO BADGES, VARIANCE PROGRESS BARS, COLLAPSIBLE CATEGORIES,
   TOAST AUTO-DISMISS, COMPACT TOOLBARS & TABLET/PRINT RESPONSIVENESS
   ========================================================================== */

/* 1. Unified Export Dropdown Menu */
.unified-export-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 280px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.16), 0 4px 10px -2px rgba(15, 23, 42, 0.08);
    padding: 6px;
    z-index: 120;
}

.export-menu-section-title {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 6px 10px 4px;
}

.export-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border: none;
    background: transparent;
    border-radius: 7px;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease, transform 0.1s ease;
}

.export-menu-item:hover {
    background: #f0fdf4;
}

.export-item-icon {
    font-size: 1.05rem;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    flex-shrink: 0;
}

.export-menu-item:hover .export-item-icon {
    background: #dcfce7;
    border-color: #86efac;
}

.export-item-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.export-item-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
}

.export-item-sub {
    font-size: 0.68rem;
    color: #64748b;
}

.export-menu-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 5px 4px;
}

/* 2. Toast Auto-Dismiss Progress Bar */
.toast-banner {
    position: relative;
    overflow: hidden;
}

.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #107c41, #22c55e);
    width: 100%;
    animation: toastProgressShrink 3.5s linear forwards;
}

@keyframes toastProgressShrink {
    from { width: 100%; }
    to { width: 0%; }
}

/* 3. Collapsible Category Headers */
.category-toggle-btn {
    cursor: pointer;
    user-select: none;
    padding: 2px 6px;
    border-radius: 5px;
    transition: background 0.15s ease;
}

.category-toggle-btn:hover {
    background: rgba(15, 23, 42, 0.06);
}

.cat-chevron {
    display: inline-block;
    font-size: 0.65rem;
    color: #475569;
    margin-right: 4px;
    transition: transform 0.18s ease;
}

.cat-chevron.collapsed {
    transform: rotate(-90deg);
}

/* 4. Sticky Left Columns in Packing Matrix (.po-matrix-grid) */
.po-matrix-grid th.sticky-col,
.po-matrix-grid td.sticky-col {
    position: sticky;
    z-index: 15;
}

.po-matrix-grid thead th.sticky-col {
    z-index: 25;
}

.po-matrix-grid td.sticky-col {
    background-color: #ffffff;
}

.po-matrix-grid tr.row-active-entry td.sticky-col {
    background-color: #f0fdf4;
}

.po-matrix-grid tr.row-unordered-alert td.sticky-col {
    background-color: #fef2f2;
}

.po-matrix-grid th.sticky-col-num,
.po-matrix-grid td.sticky-col-num {
    left: 0;
    min-width: 38px;
    max-width: 38px;
}

.po-matrix-grid th.sticky-col-barcode,
.po-matrix-grid td.sticky-col-barcode {
    left: 38px;
    min-width: 90px;
    max-width: 90px;
}

.po-matrix-grid th.sticky-col-name,
.po-matrix-grid td.sticky-col-name {
    left: 128px;
    min-width: 195px;
    max-width: 220px;
}

.po-matrix-grid th.sticky-col-unit,
.po-matrix-grid td.sticky-col-unit {
    left: 323px;
    min-width: 54px;
    max-width: 54px;
}

.po-matrix-grid th.sticky-col-pkg,
.po-matrix-grid td.sticky-col-pkg {
    left: 377px;
    min-width: 112px;
    box-shadow: 3px 0 6px -2px rgba(15, 23, 42, 0.12);
    border-right: 2px solid #cbd5e1 !important;
}

.po-matrix-grid tfoot td.sticky-col-footer-label {
    left: 0;
    z-index: 20;
    background: #f8fafc;
    box-shadow: 3px 0 6px -2px rgba(15, 23, 42, 0.12);
}

/* 5. Auto-Fill Button & Clickable PO Store Quick-Fill Hint Badge */
.btn-hub-autofill {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    color: #1d4ed8 !important;
    border: 1px solid #93c5fd !important;
    font-weight: 700 !important;
}

.btn-hub-autofill:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    border-color: #60a5fa !important;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.15);
}

.po-quick-fill-hint {
    display: block;
    width: 100%;
    margin-top: 2px;
    padding: 1px 3px;
    font-size: 0.62rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px dashed #7dd3fc;
    border-radius: 3px;
    cursor: pointer;
    text-align: center;
    line-height: 1.15;
    transition: all 0.12s ease;
    white-space: nowrap;
}

.po-quick-fill-hint:hover {
    background: #0284c7;
    color: #ffffff;
    border-style: solid;
    border-color: #0369a1;
}

/* 6. Total Kg Variance & Progress Bar */
.total-kg-val-wrap {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 3px;
    line-height: 1.15;
}

.total-kg-po-denom {
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748b;
}

.packing-variance-bar {
    width: 100%;
    height: 4px;
    background: #dbeafe;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 3px;
}

.packing-variance-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.25s ease;
}

.packing-variance-fill.fill-emerald {
    background: #10b981;
}

.packing-variance-fill.fill-amber {
    background: #f59e0b;
}

.packing-variance-fill.fill-blue {
    background: #3b82f6;
}

/* 7. Compact Toolbar Spacing & Active Focus Highlight */
.daily-date-nav-bar {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.daily-lists-nav-bar {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

.sub-toolbar {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.excel-grid tr.product-data-row:focus-within {
    outline: 1.5px solid rgba(16, 124, 65, 0.45);
    outline-offset: -1px;
}

/* 8. Tablet Touch Targets */
@media (max-width: 1024px) {
    .store-cell-input,
    .inline-qty-input {
        min-height: 30px;
        font-size: 0.85rem;
    }

    .po-quick-fill-hint {
        padding: 3px 4px;
        font-size: 0.68rem;
    }
}

/* ==========================================================================
   9. EXPORT & PRINT HUB UI/UX ENHANCEMENTS
   ========================================================================== */
.export-dropdown-menu {
    width: 390px !important;
    padding: 8px !important;
    border-radius: 10px !important;
}

.export-menu-header-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 5px 10px 8px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    margin-bottom: 4px !important;
}

.export-menu-header-title {
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #475569 !important;
}

.export-scope-pill {
    all: unset !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 2px 8px !important;
    border-radius: 999px !important;
    font-size: 0.67rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

.export-scope-pill.active {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border-color: #6ee7b7 !important;
}

.export-scope-pill:hover {
    filter: brightness(0.96);
}

.export-item-body {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.export-item-title-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}

.export-format-tag {
    flex-shrink: 0 !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.03em !important;
    background: #f0fdf4 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

.export-format-tag.tag-print {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
}

.export-menu-divider {
    height: 1px !important;
    background: #e2e8f0 !important;
    margin: 4px 6px !important;
}

.export-menu-print-item:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
}

.export-menu-print-item:hover .export-item-title {
    color: #1d4ed8 !important;
}

.btn-hub-print {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.btn-hub-print:hover {
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* Packing Report Toolbar Scope Selector & Enhanced Cards */
.report-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.report-scope-pills {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    padding: 3px 5px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

.report-scope-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #64748b;
    padding: 0 4px;
}

.report-scope-pill {
    all: unset;
    box-sizing: border-box;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 0.73rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.14s ease;
}

.report-scope-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.report-scope-pill.active {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.report-header-overall {
    background: #ecfdf5 !important;
    color: #065f46 !important;
}

.report-header-extra {
    background: #f8fafc !important;
    color: #334155 !important;
}

.report-row-subweight td {
    background: #f8fafc !important;
    font-size: 0.72rem !important;
    color: #475569 !important;
    font-weight: 600 !important;
}

/* Consolidated Store × Package Cross-Tab Dispatch Table */
.report-crosstab-section {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 2px dashed #cbd5e1;
}

.report-crosstab-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.report-crosstab-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.report-crosstab-sub {
    font-size: 0.73rem;
    color: #64748b;
}

.report-crosstab-table {
    width: 100%;
    border-collapse: collapse;
    border: 1.5px solid #334155;
    background: #ffffff;
    font-size: 0.78rem;
}

.report-crosstab-table th,
.report-crosstab-table td {
    border: 1px solid #cbd5e1;
    padding: 6px 10px;
}

.report-crosstab-table thead th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    border-bottom: 1.5px solid #334155;
}

.report-crosstab-table .crosstab-th-total,
.report-crosstab-table .crosstab-td-total {
    background: #f0fdf4;
    color: #166534;
}

.report-crosstab-table .crosstab-th-kg,
.report-crosstab-table .crosstab-td-kg {
    background: #eef2ff;
    color: #3730a3;
}

.report-crosstab-table tr.crosstab-row-empty td {
    color: #94a3b8;
}

.report-crosstab-table tfoot tr.crosstab-footer-row td {
    background: #f8fafc;
    border-top: 2px solid #0f172a;
    color: #0f172a;
    font-size: 0.8rem;
}

.report-crosstab-table tfoot tr.crosstab-footer-row td.crosstab-td-total {
    background: #dcfce7;
    color: #14532d;
}

.report-crosstab-table tfoot tr.crosstab-footer-row td.crosstab-td-kg {
    background: #e0e7ff;
    color: #1e1b4b;
}

/* ==========================================================================
   10. COMPREHENSIVE PRINT MEDIA LAYOUT (ALL VIEWS)
   ========================================================================== */
@media print {
    @page {
        size: landscape;
        margin: 7mm 9mm;
    }

    /* Hide all interactive chrome, toolbars, filters, action buttons, and unentered catalog rows */
    .app-header,
    .daily-date-nav-bar,
    .daily-lists-nav-bar,
    .sub-toolbar,
    .sheet-mode-switcher-bar,
    .packing-hub-card,
    .packing-summary-bar,
    .packing-audit-bar,
    .report-toolbar-card,
    .reconcile-header-bar,
    .app-tabbar,
    .toast-banner,
    .po-quick-fill-hint,
    .btn-row-clear,
    .btn-cell-quick-match,
    .cat-bulk-buttons,
    .cat-collapse-chevron,
    .cat-chevron,
    .header-letters,
    .col-actions,
    .print-empty-row {
        display: none !important;
    }

    /* Disable sticky positioning so full tables print cleanly across pages */
    .po-matrix-grid th.sticky-col,
    .po-matrix-grid td.sticky-col,
    .excel-grid th,
    .excel-grid td {
        position: static !important;
        box-shadow: none !important;
    }

    /* Clean print table styling for Consolidated, Packing Matrix & Reconcile Ledger */
    .excel-grid,
    .clean-table,
    .report-crosstab-table {
        width: 100% !important;
        border-collapse: collapse !important;
        border: 1.5px solid #000000 !important;
        font-size: 0.72rem !important;
    }

    .excel-grid th,
    .excel-grid td,
    .clean-table th,
    .clean-table td,
    .report-crosstab-table th,
    .report-crosstab-table td {
        border: 1px solid #334155 !important;
        padding: 3px 5px !important;
        color: #000000 !important;
    }

    .excel-grid thead th,
    .clean-table thead th,
    .report-crosstab-table thead th {
        background: #f1f5f9 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        font-weight: 800 !important;
        border-bottom: 1.5px solid #000000 !important;
    }

    /* Render inputs and selects as crisp printed text */
    .inline-qty-input,
    .store-cell-input,
    .inline-text-input,
    .unit-inline-select,
    .package-select {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #000000 !important;
        font-weight: 700 !important;
        padding: 0 2px !important;
        min-height: 0 !important;
        height: auto !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
    }

    /* Hide zero/empty placeholders in print inputs */
    .inline-qty-input::placeholder,
    .store-cell-input::placeholder,
    .inline-text-input::placeholder,
    .report-inline-input::placeholder {
        color: transparent !important;
    }

    .packing-variance-bar {
        display: none !important;
    }

    .category-header-row td {
        background: #e2e8f0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        font-weight: 800 !important;
    }

    .footer-totals td,
    .crosstab-footer-row td {
        background: #f1f5f9 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        border-top: 1.5px solid #000000 !important;
        font-weight: 800 !important;
    }

    .report-crosstab-section {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .taste-grain-overlay {
        display: none !important;
    }
}

/* ==========================================================================
   11. TASTE SKILL REDESIGN SYSTEM (HIGH-CRAFT LIGHT MODE & DOUBLE-BEZEL UI)
   ========================================================================== */

/* 11.1 Fixed Tactile Grain / Paper Overlay (Zero Layout Shift, Pointer-Events None) */
.taste-grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.022;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* 11.2 Display Typography & Strict Tabular Numerals */
h1, h2, h3, .brand-title, .dash-banner-title, .dash-panel-title, .modal-title-text, .report-sheet-title, .packing-hub-title, .reconcile-title, .kpi-card-val, .t-kpi-val {
    font-family: var(--font-display);
    letter-spacing: -0.028em;
}

.kpi-num,
.kpi-card-val,
.t-kpi-val,
.rl-metric-val,
.inline-qty-input,
.store-cell-input,
.report-inline-input,
.font-mono,
.list-tab-badge,
.pill-tab-badge,
.store-pill-badge,
.psm-value,
.summary-num,
.excel-grid td,
.clean-table td,
.report-crosstab-table td {
    font-variant-numeric: tabular-nums;
}

/* 11.3 Double-Bezel (Doppelrand) Container Architecture */
.taste-bezel-shell {
    background: rgba(17, 19, 21, 0.032);
    border: 1px solid rgba(17, 19, 21, 0.075);
    padding: 6px;
    border-radius: 22px;
    box-shadow: 0 1px 2px rgba(17, 19, 21, 0.02);
    transition: border-color 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring);
}

.taste-bezel-shell:hover {
    border-color: rgba(11, 107, 58, 0.18);
}

.taste-bezel-shell > .dash-banner-card,
.taste-bezel-shell > .dash-panel,
.taste-bezel-shell > .dash-telemetry-card,
.taste-bezel-shell > .dash-shortcuts-panel {
    background: #FFFFFF !important;
    border: 1px solid rgba(17, 19, 21, 0.06) !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 32px -12px rgba(17, 19, 21, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    margin: 0 !important;
}

/* 11.4 Top App Header & KPI Bar Refinement */
.app-header {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color) !important;
    padding: 10px 24px !important;
    box-shadow: 0 4px 20px -10px rgba(17, 19, 21, 0.04);
}

.brand-title {
    font-family: var(--font-display) !important;
    font-size: 1.18rem !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.03em !important;
}

.sheet-title {
    background: var(--bg-subtle) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-muted) !important;
    border-radius: 999px !important;
    padding: 2px 10px !important;
    font-weight: 600 !important;
}

.header-kpis {
    background: var(--bg-app) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 5px 16px !important;
    box-shadow: inset 0 1px 2px rgba(17, 19, 21, 0.03);
}

.header-dash-nav-pill {
    background: var(--bg-app) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 999px !important;
    padding: 6px 16px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 11.5 Button-in-Button CTA & Tactile Spring Physics */
.btn,
.btn-export-main,
.sheet-mode-tab,
.packing-pill-tab,
.btn-list-tab,
.dash-shortcut-card,
.tab-item {
    transition: transform 0.2s var(--ease-spring), background-color 0.2s var(--ease-spring), border-color 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-spring), color 0.2s var(--ease-spring) !important;
}

.btn:active,
.btn-export-main:active,
.sheet-mode-tab:active,
.packing-pill-tab:active,
.btn-list-tab:active,
.dash-shortcut-card:active {
    transform: scale(0.98) !important;
}

.btn-primary {
    background: var(--excel-green) !important;
    border-color: var(--excel-green) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px -2px rgba(11, 107, 58, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.btn-primary:hover {
    background: var(--excel-green-hover) !important;
    border-color: var(--excel-green-hover) !important;
    box-shadow: 0 6px 16px -3px rgba(11, 107, 58, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.taste-btn-nested {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 7px 8px 7px 16px !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
}

.taste-btn-arrow-circle {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s var(--ease-spring), background-color 0.25s var(--ease-spring);
}

.taste-btn-nested:hover .taste-btn-arrow-circle {
    transform: translateX(2px) scale(1.05);
    background: rgba(255, 255, 255, 0.28);
}

/* 11.6 Executive Home Dashboard — Asymmetric Bento Architecture */
.dashboard-container {
    max-width: 1480px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px 24px 88px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
}

.dash-banner-card {
    padding: 22px 26px !important;
}

.dash-banner-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--excel-green);
    margin-bottom: 6px;
}

.eyebrow-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--excel-green);
    box-shadow: 0 0 0 4px rgba(11, 107, 58, 0.14);
}

.eyebrow-ref-chip {
    background: var(--excel-green-light);
    color: var(--excel-green);
    border: 1px solid rgba(11, 107, 58, 0.2);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.66rem;
}

.dash-banner-title {
    font-family: var(--font-display) !important;
    font-size: clamp(1.35rem, 2vw, 1.7rem) !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.03em !important;
    line-height: 1.15 !important;
}

.dash-banner-sub {
    font-size: 0.84rem !important;
    color: var(--text-muted) !important;
    margin-top: 4px !important;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.dash-sub-sep {
    color: var(--border-strong);
}

.dash-sub-stores {
    color: var(--excel-green);
    font-weight: 600;
    background: var(--excel-green-light);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
}

.dash-control-strip {
    margin-top: 16px !important;
    padding-top: 14px !important;
    border-top: 1px solid var(--border-grid) !important;
}

/* Asymmetric 12-Column Split (7fr Left / 5fr Right) */
.dash-bento-asymmetric {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 18px;
    align-items: start;
}

.dash-bento-right-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bento-kicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-subtle);
    margin-bottom: 3px;
}

/* Left Bento List Cards with Micro-Fulfillment Bar */
.recent-list-card {
    background: var(--bg-app) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 14px !important;
    padding: 14px 16px !important;
    transition: transform 0.22s var(--ease-spring), border-color 0.22s var(--ease-spring), box-shadow 0.22s var(--ease-spring) !important;
}

.recent-list-card:hover {
    background: #FFFFFF !important;
    border-color: var(--border-strong) !important;
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-1px);
}

.recent-list-card.active-recent-list {
    background: #FFFFFF !important;
    border-color: var(--excel-green) !important;
    box-shadow: 0 10px 26px -10px rgba(11, 107, 58, 0.14), inset 0 0 0 1px rgba(11, 107, 58, 0.12) !important;
}

.rl-stats-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-grid) !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    margin: 10px 0 8px !important;
}

.rl-metric-cell {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.rl-metric-lbl {
    font-size: 0.64rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-subtle);
}

.rl-metric-val {
    font-family: var(--font-mono);
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-main);
}

.rl-progress-track {
    height: 4px;
    width: 100%;
    background: var(--bg-muted);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
}

.rl-progress-fill {
    height: 100%;
    background: var(--excel-green);
    border-radius: 999px;
    transition: width 0.4s var(--ease-spring);
}

/* Right Bento: Live Telemetry Card */
.dash-telemetry-card {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.telemetry-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.telemetry-active-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--excel-green);
    background: var(--excel-green-light);
    border: 1px solid rgba(11, 107, 58, 0.2);
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.telemetry-kpi-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.telemetry-kpi-box {
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.t-kpi-val {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.t-kpi-sub {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-subtle);
}

.telemetry-bars-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
}

.telemetry-bar-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.telemetry-bar-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.telemetry-bar-track {
    height: 6px;
    width: 100%;
    background: var(--bg-subtle);
    border-radius: 999px;
    overflow: hidden;
}

.telemetry-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.45s var(--ease-spring);
}

.telemetry-bar-fill.fill-emerald {
    background: var(--excel-green);
}

.telemetry-bar-fill.fill-ink {
    background: var(--text-main);
}

/* Right Bento: 2x2 Workflow Launcher Matrix */
.dash-shortcuts-panel {
    padding: 18px 20px;
}

.shortcuts-panel-head {
    margin-bottom: 10px;
}

.dash-shortcuts-panel .dash-shortcuts-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
}

.dash-shortcut-card {
    background: var(--bg-app) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 13px !important;
    padding: 14px 15px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    gap: 10px !important;
    cursor: pointer !important;
}

.dash-shortcut-card:hover {
    background: #FFFFFF !important;
    border-color: var(--excel-green) !important;
    box-shadow: 0 10px 24px -10px rgba(11, 107, 58, 0.14) !important;
    transform: translateY(-2px) !important;
}

.shortcut-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.shortcut-arrow-badge {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.22s var(--ease-spring), background-color 0.22s var(--ease-spring), color 0.22s var(--ease-spring), border-color 0.22s var(--ease-spring);
}

.dash-shortcut-card:hover .shortcut-arrow-badge {
    background: var(--excel-green);
    border-color: var(--excel-green);
    color: #FFFFFF;
    transform: translateX(2px);
}

/* 11.7 Double-Bezel Treatment on Packing Hub, Report Container & Modals */
.packing-hub-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(17, 19, 21, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 0 0 5px rgba(17, 19, 21, 0.028), 0 12px 28px -10px rgba(17, 19, 21, 0.06) !important;
    margin: 10px 20px 8px !important;
}

.modal-card {
    border-radius: 18px !important;
    border: 1px solid rgba(17, 19, 21, 0.09) !important;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.14), 0 24px 48px -12px rgba(17, 19, 21, 0.24) !important;
}

/* 11.8 Reduced Motion & Staggered Entrance */
@media (prefers-reduced-motion: no-preference) {
    .taste-bezel-shell {
        animation: tasteFadeUp 0.38s var(--ease-spring) both;
    }
    .dash-bento-asymmetric > .taste-bezel-shell {
        animation-delay: 0.05s;
    }
    .dash-bento-right-stack > .taste-bezel-shell:nth-child(1) {
        animation-delay: 0.09s;
    }
    .dash-bento-right-stack > .taste-bezel-shell:nth-child(2) {
        animation-delay: 0.13s;
    }
}

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

/* 11.9 Responsive Collapse (< 1024px & < 768px) */
@media (max-width: 1024px) {
    .dash-bento-asymmetric {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 12px 12px 84px !important;
    }
    .telemetry-kpi-strip,
    .dash-shortcuts-panel .dash-shortcuts-grid,
    .rl-stats-row {
        grid-template-columns: 1fr !important;
    }
}




/* ==========================================================================
   CONSOLIDATED FINANCIAL & LOSS AUDIT STYLES (MATCHING SAMPLE_SHEET.XLSX)
   ========================================================================== */

.financial-audit-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.financial-audit-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.fin-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.15s ease;
}

.fin-stat-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.fin-stat-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 4px;
}

.fin-stat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
}

.fin-stat-payment .fin-stat-dot { background: #8b5cf6; }
.fin-stat-payment .fin-stat-val { color: #6d28d9; }

.fin-stat-loss .fin-stat-dot { background: #10b981; }
.fin-stat-loss .fin-stat-val { color: #047857; }

.fin-stat-loss-alert {
    background: #fff1f2;
    border-color: #fecdd3;
}
.fin-stat-loss-alert .fin-stat-dot { background: #f43f5e; }
.fin-stat-loss-alert .fin-stat-val { color: #be123c; }

.fin-stat-dispatch .fin-stat-dot { background: #0284c7; }
.fin-stat-dispatch .fin-stat-val { color: #0369a1; }

.fin-stat-canteen .fin-stat-dot { background: #d97706; }
.fin-stat-canteen .fin-stat-val { color: #b45309; }

.fin-stat-cash .fin-stat-dot { background: #059669; }

.fin-stat-val {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.2;
}

.fin-stat-val .fin-unit {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
}

.fin-stat-sub {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 4px;
}

.fin-cash-input-row {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 8px;
    margin-top: 2px;
}

.fin-cash-input-row:focus-within {
    border-color: #059669;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

.cash-on-hand-input {
    all: unset;
    font-size: 1.15rem;
    color: #047857;
    width: 100%;
}

.cash-notes-input {
    all: unset;
    font-size: 0.72rem;
    color: #475569;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    padding: 3px 6px;
    margin-top: 5px;
    width: 100%;
    box-sizing: border-box;
}

.cash-notes-input:focus {
    border-style: solid;
    border-color: #059669;
}

.financial-audit-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.btn-ops-kpi-toggle {
    all: unset;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-ops-kpi-toggle:hover,
.btn-ops-kpi-toggle.active {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
}

.badge-loss-count {
    background: #f43f5e;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
}

/* Operations KPI Matrix Table */
.ops-kpi-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 14px;
}

.ops-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ops-kpi-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #1e293b;
}

.ops-kpi-date {
    font-size: 0.74rem;
    font-weight: 600;
    color: #64748b;
}

.ops-kpi-table-wrap {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
}

.ops-kpi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.ops-kpi-table th {
    background: #f1f5f9;
    padding: 7px 12px;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid #cbd5e1;
}

.ops-kpi-table th.th-kpi-num {
    text-align: right;
    width: 18%;
}

.ops-kpi-table th.th-kpi-total {
    background: #e2e8f0;
    color: #0f172a;
}

.ops-kpi-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.ops-kpi-table tr:hover td {
    background: #f8fafc;
}

.ops-kpi-table .td-particular-name {
    font-weight: 600;
    color: #334155;
}

.ops-kpi-table .row-subtle-kpi td {
    font-size: 0.74rem;
}

.ops-kpi-table .row-financial-kpi td {
    background: #faf5ff;
    border-top: 1px solid #e9d5ff;
}

.ops-kpi-table .row-loss-kpi td {
    background: #fff1f2;
    border-top: 1px solid #fecdd3;
}

/* Exceptional Loss Section */
.exceptional-loss-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
}

.loss-watchlist-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #be123c;
    margin-bottom: 8px;
}

.loss-watchlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px;
}

.loss-item-card {
    background: #ffffff;
    border: 1px solid #fecdd3;
    border-left: 3px solid #f43f5e;
    border-radius: 6px;
    padding: 8px 10px;
}

.loss-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.loss-item-name {
    font-weight: 700;
    font-size: 0.78rem;
    color: #0f172a;
}

.loss-item-tamil {
    font-size: 0.72rem;
    color: #64748b;
    margin-left: 4px;
}

.loss-item-amt {
    font-size: 0.78rem;
    font-weight: 800;
    color: #e11d48;
    font-family: ui-monospace, SFMono-Regular, monospace;
}

.loss-item-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.7rem;
    color: #475569;
}

/* Tamil Column and Badges in Grid */
.col-tamil-name {
    font-size: 0.76rem;
    color: #475569;
    white-space: nowrap;
}

.prod-tamil-name {
    font-weight: 500;
}

.inline-rate-input {
    width: 65px !important;
    text-align: right;
}

.has-val-rate {
    color: #6d28d9 !important;
    font-weight: 700 !important;
}

.val-total-amt {
    color: #6d28d9;
}

.badge-variance {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    display: inline-block;
}

.badge-excess {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.badge-shortage {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

.badge-zero {
    color: #94a3b8;
}

.inline-qty-canteen {
    color: #b45309 !important;
}

.has-val-canteen {
    color: #b45309 !important;
    font-weight: 700 !important;
}

.badge-loss-pill {
    background: #ffe4e6;
    color: #be123c;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #fecdd3;
    display: inline-block;
}

.status-loss {
    background: #fff1f2 !important;
    color: #be123c !important;
    border: 1px solid #fecdd3 !important;
}

.row-loss-warning {
    background: #fff5f5 !important;
}

/* ==========================================================================
   SHEET 4: OPERATIONS & FINANCIAL AUDIT REPORT STYLES
   ========================================================================== */
.audit-report-container {
    padding: 16px 20px 40px;
    background: #f8fafc;
    min-height: calc(100vh - 180px);
}

.audit-subtabs-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    gap: 12px;
    flex-wrap: wrap;
}

.audit-subtabs-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.audit-subtabs-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.86rem;
    color: #1e293b;
}

.audit-title-icon {
    font-size: 1.1rem;
}

.audit-pill-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.audit-pill-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.audit-pill-tab:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.audit-pill-tab.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.2);
}

.audit-subtabs-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-audit-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-audit-action:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.btn-audit-print {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.btn-audit-print:hover {
    background: #0369a1;
    border-color: #0369a1;
}

/* Audit Section Cards */
.audit-section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.audit-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}

.audit-section-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.audit-sec-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #4f46e5;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.84rem;
    flex-shrink: 0;
}

.audit-sec-num-rose {
    background: #e11d48;
}

.audit-sec-num-teal {
    background: #0d9488;
}

.audit-sec-num-blue {
    background: #0284c7;
}

.audit-sec-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.audit-sec-sub {
    font-size: 0.78rem;
    color: #64748b;
    margin: 2px 0 0 0;
}

.audit-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
}

.audit-badge-indigo {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.audit-badge-rose {
    background: #ffe4e6;
    color: #be123c;
    border: 1px solid #fecdd3;
}

.audit-badge-amber {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.audit-badge-teal {
    background: #ccfbf1;
    color: #0f766e;
    border: 1px solid #99f6e4;
}

.audit-badge-blue {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

/* Executive KPI Grid */
.audit-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.audit-kpi-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.audit-kpi-lbl {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.03em;
}

.audit-kpi-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.dot-emerald { background: #10b981; }
.dot-blue { background: #3b82f6; }
.dot-amber { background: #f59e0b; }
.dot-rose { background: #ef4444; }
.dot-teal { background: #14b8a6; }
.dot-purple { background: #a855f7; }
.dot-slate { background: #94a3b8; }

.audit-kpi-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    margin: 8px 0 4px;
}

.audit-kpi-unit {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
}

.audit-kpi-footer {
    font-size: 0.72rem;
    color: #64748b;
}

.audit-kpi-payment { border-left: 4px solid #10b981; }
.audit-kpi-dispatch { border-left: 4px solid #3b82f6; }
.audit-kpi-canteen { border-left: 4px solid #f59e0b; }
.audit-kpi-fulfillment { border-left: 4px solid #14b8a6; }
.audit-kpi-cash { border-left: 4px solid #a855f7; }

.audit-kpi-loss-danger {
    border-left: 4px solid #ef4444;
    background: #fff5f5;
}

.audit-kpi-loss-ok {
    border-left: 4px solid #10b981;
}

.audit-loss-tag {
    color: #be123c;
    font-weight: 700;
}

/* Audit Tables */
.audit-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    background: #ffffff;
}

.audit-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 12px;
    border-bottom: 1.5px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
}

.audit-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f8fafc;
    color: #334155;
}

.audit-table tbody tr:hover {
    background: #f8fafc;
}

.audit-row-leakage {
    background: #fff5f5 !important;
}

.audit-total-row td {
    background: #f1f5f9 !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    border-top: 2px solid #cbd5e1 !important;
    padding: 11px 12px !important;
}

.audit-cat-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

/* Fulfillment Progress Bars */
.fulfillment-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fulfillment-bar-track {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.fulfillment-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.bar-green { background: #10b981; }
.bar-amber { background: #f59e0b; }
.bar-red { background: #ef4444; }

.fulfillment-bar-label {
    min-width: 48px;
    font-size: 0.78rem;
    text-align: right;
}

/* Store Badge Code */
.store-badge-code {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    background: #e2e8f0;
    color: #1e293b;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Audit Status Tags */
.audit-status-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.tag-loss { background: #ffe4e6; color: #be123c; border: 1px solid #fecdd3; }
.tag-overbilled { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.tag-pending-bill { background: #e0e7ff; color: #4338ca; border: 1px solid #c7d2fe; }
.tag-canteen { background: #fefce8; color: #854d0e; border: 1px solid #fef08a; }
.tag-free { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }
.tag-normal { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.tag-fulfilled { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.tag-partial { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tag-shortage { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.tag-empty { background: #f8fafc; color: #94a3b8; border: 1px solid #e2e8f0; }

/* Empty state */
.audit-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

.audit-empty-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 8px;
}

.audit-empty-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.audit-empty-desc {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

/* Official Sign-off Card */
.audit-signoff-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
}

.audit-signoff-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
}

.audit-signoff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.audit-signoff-box {
    text-align: center;
}

.audit-signoff-role {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 35px;
}

.audit-signoff-line {
    border-bottom: 1px dashed #94a3b8;
    margin-bottom: 6px;
}

.audit-signoff-meta {
    font-size: 0.7rem;
    color: #64748b;
}

@media print {
    .audit-subtabs-bar {
        display: none !important;
    }
    .audit-section-card {
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
        page-break-inside: avoid;
        margin-bottom: 20px !important;
    }
    .audit-kpi-grid {
        grid-template-columns: repeat(6, 1fr) !important;
    }
}

