/* hub-inventory.css — Clean Spreadsheet & Tree-Table Styling for Inventory Hub */

.inv-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f8fafc;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a;
}

/* ── Topbar & Search/Filter Header ── */
.inv-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  gap: 16px;
  flex-wrap: wrap;
}

.inv-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inv-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0;
}

.inv-subtitle {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

.inv-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Prominent AUDIT / ADJUST Action Button ── */
.inv-btn-audit-adjust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.16);
  transition: all 0.15s ease;
}

.inv-btn-audit-adjust:hover {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-color: #475569;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.2);
}

.inv-btn-audit-adjust:active {
  transform: translateY(0);
}

.inv-btn-audit-adjust.active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3), 0 2px 6px rgba(180, 83, 9, 0.35);
  animation: inv-pulse-glow 2.2s infinite;
}

@keyframes inv-pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5), 0 2px 6px rgba(180, 83, 9, 0.35); }
  70% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0), 0 2px 6px rgba(180, 83, 9, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0), 0 2px 6px rgba(180, 83, 9, 0.35); }
}

/* ── Summary Cards ── */
.inv-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  padding: 14px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.inv-stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inv-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.04em;
}

.inv-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

/* ── Controls Bar ── */
.inv-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  gap: 12px;
  flex-wrap: wrap;
}

.inv-search-wrap {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.inv-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.inv-search-input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  background: #ffffff;
  box-sizing: border-box;
}

.inv-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.inv-filter-chips {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.inv-chip {
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inv-chip:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.inv-chip[data-filter="all"] {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}
.inv-chip[data-filter="all"].active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
  box-shadow: 0 1px 3px rgba(30, 41, 59, 0.2);
}

.inv-chip[data-filter="active"] {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}
.inv-chip[data-filter="active"].active {
  background: #059669;
  color: #ffffff;
  border-color: #047857;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.25);
}

.inv-chip[data-filter="conditioning"] {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309;
}
.inv-chip[data-filter="conditioning"].active {
  background: #d97706;
  color: #ffffff;
  border-color: #b45309;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.25);
}

.inv-chip[data-filter="in_production"] {
  background: #f3e8ff;
  border-color: #e9d5ff;
  color: #7e22ce;
}
.inv-chip[data-filter="in_production"].active {
  background: #9333ea;
  color: #ffffff;
  border-color: #7e22ce;
  box-shadow: 0 1px 3px rgba(147, 51, 234, 0.25);
}

.inv-chip[data-filter="library"] {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.inv-chip[data-filter="library"].active {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.inv-chip[data-filter="inactive"] {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}
.inv-chip[data-filter="inactive"].active {
  background: #475569;
  color: #ffffff;
  border-color: #334155;
  box-shadow: 0 1px 3px rgba(71, 85, 105, 0.25);
}

.inv-chip[data-filter="retired"] {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.inv-chip[data-filter="retired"].active {
  background: #dc2626;
  color: #ffffff;
  border-color: #991b1b;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.25);
}

.inv-chip[data-filter="core"],
.inv-chip[data-filter="seasonal"] {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}
.inv-chip[data-filter="core"].active,
.inv-chip[data-filter="seasonal"].active {
  background: #334155;
  color: #ffffff;
  border-color: #1e293b;
}

.inv-chip[data-filter="syndicate"] {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #7e22ce;
}
.inv-chip[data-filter="syndicate"].active {
  background: #7e22ce;
  color: #ffffff;
  border-color: #6b21a8;
  box-shadow: 0 1px 3px rgba(126, 34, 206, 0.25);
}

/* ── Spreadsheet Grid Table ── */
.inv-table-wrap {
  flex: 1;
  overflow: auto;
  background: #ffffff;
}

.inv-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  min-width: 900px;
}

.inv-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 10px 14px;
  border-bottom: 2px solid #cbd5e1;
  border-right: 1px solid #f1f5f9;
  white-space: nowrap;
}

.inv-header-lock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inv-header-lock-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.inv-header-lock-btn.unlocked {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309;
}

.inv-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #f8fafc;
  vertical-align: middle;
}

/* Row Hierarchies */
/* Level 1: Master Beer Row */
.inv-row-beer {
  background: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.1s ease;
}

.inv-row-beer:hover {
  background: #f8fafc;
}

.inv-row-beer td {
  border-top: 1px solid #e2e8f0;
}

.inv-beer-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-caret {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: transform 0.15s ease;
}

.inv-caret.open {
  transform: rotate(90deg);
}

.inv-beer-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 13.5px;
}

.inv-beer-subtitle {
  font-size: 11.5px;
  color: #64748b;
  margin-left: 4px;
  font-weight: 400;
}

/* Level 2: Batch Sub-Row */
.inv-row-batch {
  background: #f8fafc;
  font-size: 12.5px;
  border-top: 1px solid #f1f5f9;
}

.inv-row-batch:hover {
  background: #f1f5f9;
}

.inv-batch-cell {
  padding-left: 32px !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-batch-num {
  font-weight: 700;
  color: #1e293b;
}

.inv-batch-abv {
  font-size: 11px;
  color: #64748b;
  background: #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* Level 3: Format Sub-Sub-Row (Specific packaging under batch) */
.inv-row-format {
  background: #ffffff;
  font-size: 12px;
  color: #334155;
}

.inv-row-format:hover {
  background: #fafafa;
}

.inv-format-cell {
  padding-left: 56px !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-format-name {
  font-weight: 600;
  color: #334155;
}

.inv-tree-line-batch {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-left: 2px solid #cbd5e1;
  border-bottom: 2px solid #cbd5e1;
  margin-right: 2px;
  border-bottom-left-radius: 3px;
}

.inv-tree-line-format {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-left: 2px dashed #cbd5e1;
  border-bottom: 2px dashed #cbd5e1;
  margin-right: 2px;
  border-bottom-left-radius: 3px;
}

/* Status Badges & Channel Pills */
.inv-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.inv-pill-ontap {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.inv-pill-onshelf {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* ── Interactive On / Off Shelf Quick Toggle Button ── */
.inv-shelf-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
}

.inv-shelf-toggle-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #94a3b8;
  transform: translateY(-0.5px);
}

.inv-shelf-toggle-btn.is-on-shelf {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
}

.inv-shelf-toggle-btn.is-on-shelf:hover {
  background: #dbeafe;
  color: #1e40af;
  border-color: #60a5fa;
}

.inv-shelf-toggle-btn .inv-btn-dot {
  display: inline-block;
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.inv-shelf-toggle-btn.is-on-shelf .inv-btn-dot {
  background: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.inv-pill-inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.inv-channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.inv-channel-pill.active {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.inv-channel-pill.pending {
  background: #f8fafc;
  color: #94a3b8;
  border-style: dashed;
}

.inv-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.inv-badge-dot.green { background: #10b981; }
.inv-badge-dot.blue { background: #3b82f6; }
.inv-badge-dot.gray { background: #94a3b8; }
.inv-badge-dot.amber { background: #f59e0b; }

/* ── Beergang Quick Adjust & Stock Badge ── */
.inv-bg-adjust-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inv-badge-stock {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.inv-badge-stock.in {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.inv-badge-stock.out {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.inv-btn-quick-adjust {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  transition: all 0.15s ease;
}

.inv-btn-quick-adjust:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
  transform: scale(1.05);
}

.spinning {
  animation: inv-spin 1s linear infinite;
}

@keyframes inv-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── View Switcher (By Beer vs By Format) ── */
.inv-view-toggle-wrap {
  display: inline-flex;
  background: #e2e8f0;
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.inv-view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: #475569;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inv-view-toggle-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.inv-view-toggle-btn:hover:not(.active) {
  color: #1e293b;
  background: rgba(255,255,255,0.5);
}

/* ── 6-Stage Lifecycle Pipeline Badges ── */
.inv-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.inv-stage-pill.in_tank {
  background: #f3e8ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

.inv-stage-pill.conditioning {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.inv-stage-pill.ready {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.inv-stage-pill.allocated {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.inv-stage-pill.low_stock {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.inv-stage-pill.depleted {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

/* ── Format Matrix View Styles ── */
.inv-format-matrix-wrap {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

.inv-format-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.inv-format-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 12px;
}

.inv-format-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inv-format-icon {
  font-size: 20px;
}

.inv-format-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.inv-format-summary-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inv-format-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

/* ── By Format Master Table Styles & Frozen Columns ── */
.inv-master-format-table {
  border-collapse: separate;
  border-spacing: 0;
}

.inv-master-format-table th {
  background: #f8fafc;
  color: #475569;
}

.inv-master-format-table .inv-format-item-row:hover td {
  background: #f8fafc;
}

/* Frozen / Sticky Columns (Spreadsheet Left Pane: Beer Name, Format, Available) */
.inv-master-format-table th.inv-col-sticky-1,
.inv-master-format-table td.inv-col-sticky-1 {
  position: sticky;
  left: 0;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
}

.inv-master-format-table th.inv-col-sticky-2,
.inv-master-format-table td.inv-col-sticky-2 {
  position: sticky;
  left: 240px;
  width: 105px;
  min-width: 105px;
  max-width: 105px;
}

.inv-master-format-table th.inv-col-sticky-3,
.inv-master-format-table td.inv-col-sticky-3 {
  position: sticky;
  left: 345px;
  width: 115px;
  min-width: 115px;
  max-width: 115px;
  border-right: 2px solid #cbd5e1 !important;
  box-shadow: 4px 0 8px -3px rgba(0, 0, 0, 0.08);
}

.inv-master-format-table th.inv-col-sticky-1,
.inv-master-format-table th.inv-col-sticky-2,
.inv-master-format-table th.inv-col-sticky-3 {
  z-index: 30;
  background: #f8fafc;
}

.inv-master-format-table td.inv-col-sticky-1,
.inv-master-format-table td.inv-col-sticky-2,
.inv-master-format-table td.inv-col-sticky-3 {
  z-index: 5;
  background: #ffffff;
}

.inv-master-format-table .inv-format-item-row:hover td.inv-col-sticky-1,
.inv-master-format-table .inv-format-item-row:hover td.inv-col-sticky-2,
.inv-master-format-table .inv-format-item-row:hover td.inv-col-sticky-3 {
  background: #f8fafc;
}

.inv-master-format-table .inv-format-item-row.inv-row-staged td.inv-col-sticky-1,
.inv-master-format-table .inv-format-item-row.inv-row-staged td.inv-col-sticky-2,
.inv-master-format-table .inv-format-item-row.inv-row-staged td.inv-col-sticky-3 {
  background: #fefce8;
}

.inv-master-format-table .inv-format-item-row.inv-row-staged:hover td.inv-col-sticky-1,
.inv-master-format-table .inv-format-item-row.inv-row-staged:hover td.inv-col-sticky-2,
.inv-master-format-table .inv-format-item-row.inv-row-staged:hover td.inv-col-sticky-3 {
  background: #fef9c3;
}

.inv-master-format-table .inv-format-item-row.has-discrepancy td.inv-col-sticky-1,
.inv-master-format-table .inv-format-item-row.has-discrepancy td.inv-col-sticky-2,
.inv-master-format-table .inv-format-item-row.has-discrepancy td.inv-col-sticky-3 {
  background: #fef2f2;
}

.inv-master-format-table .inv-format-item-row.has-discrepancy:hover td.inv-col-sticky-1,
.inv-master-format-table .inv-format-item-row.has-discrepancy:hover td.inv-col-sticky-2,
.inv-master-format-table .inv-format-item-row.has-discrepancy:hover td.inv-col-sticky-3 {
  background: #fee2e2;
}

.inv-group-separator-row td {
  background: #f1f5f9;
  padding: 8px 16px;
  border-top: 2px solid #e2e8f0;
  border-bottom: 1px solid #cbd5e1;
}

.inv-group-separator-content {
  position: sticky;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inv-group-icon {
  font-size: 16px;
}

.inv-group-label {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.inv-group-casesize {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
}

.inv-cell-beer-batch {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inv-beer-title {
  font-size: 13.5px;
  color: #0f172a;
}

.inv-batch-tag {
  font-size: 10.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #64748b;
}

.inv-clickable-beer-card {
  cursor: pointer;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.inv-beer-title.inv-clickable-beer-card:hover,
.inv-beer-name.inv-clickable-beer-card:hover {
  color: #2563eb !important;
  text-decoration: underline;
}

.inv-batch-tag.inv-clickable-beer-card:hover,
.inv-batch-num.inv-clickable-beer-card:hover {
  color: #3b82f6 !important;
  text-decoration: underline;
}

.inv-format-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  background: #f8fafc;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

/* Spreadsheet-Aligned Format Badges */
.inv-format-badge.fmt-can_16oz {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.inv-format-badge.fmt-bottle_750 {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

.inv-format-badge.fmt-bottle_500 {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.inv-format-badge.fmt-bottle_375 {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #7e22ce;
}

.inv-format-badge.fmt-bottle_1500,
.inv-format-badge.fmt-bottle_3000 {
  background: #fdf2f8;
  border-color: #fbcfe8;
  color: #9d174d;
}

/* Kegs — Subtle Purple Palette Variations */
.inv-format-badge.fmt-keg_20l {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}

.inv-format-badge.fmt-keg_30l {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #7e22ce;
}

.inv-format-badge.fmt-keg_50l {
  background: #f3e8ff;
  border-color: #d8b4fe;
  color: #581c87;
}

/* Draft Pours — Light Blue */
.inv-format-badge.fmt-pour,
.inv-format-badge.fmt-other_pour {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

/* Format Pills Filter Strip */
.inv-format-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.inv-format-pill {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inv-format-pill:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.inv-format-pill[data-fmt="all"] {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}
.inv-format-pill[data-fmt="all"].active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
  box-shadow: 0 1px 3px rgba(30, 41, 59, 0.2);
}

.inv-format-pill[data-fmt="can_16oz"] {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.inv-format-pill[data-fmt="can_16oz"].active {
  background: #d97706;
  color: #ffffff;
  border-color: #b45309;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.25);
}

.inv-format-pill[data-fmt="bottle_750"] {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}
.inv-format-pill[data-fmt="bottle_750"].active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0369a1;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25);
}

.inv-format-pill[data-fmt="bottle_500"] {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.inv-format-pill[data-fmt="bottle_500"].active {
  background: #16a34a;
  color: #ffffff;
  border-color: #15803d;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.25);
}

.inv-format-pill[data-fmt="bottle_375"] {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #7e22ce;
}
.inv-format-pill[data-fmt="bottle_375"].active {
  background: #9333ea;
  color: #ffffff;
  border-color: #7e22ce;
  box-shadow: 0 1px 3px rgba(147, 51, 234, 0.25);
}

.inv-format-pill[data-fmt="bottle_1500"] {
  background: #fdf2f8;
  border-color: #fbcfe8;
  color: #9d174d;
}
.inv-format-pill[data-fmt="bottle_1500"].active {
  background: #9d174d;
  color: #ffffff;
  border-color: #831843;
  box-shadow: 0 1px 3px rgba(157, 23, 77, 0.25);
}

.inv-format-pill[data-fmt="bottle_3000"] {
  background: #fdf2f8;
  border-color: #fbcfe8;
  color: #9d174d;
}
.inv-format-pill[data-fmt="bottle_3000"].active {
  background: #9d174d;
  color: #ffffff;
  border-color: #831843;
  box-shadow: 0 1px 3px rgba(157, 23, 77, 0.25);
}

.inv-format-pill[data-fmt="kegs"] {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}
.inv-format-pill[data-fmt="kegs"].active {
  background: #7c3aed;
  color: #ffffff;
  border-color: #6d28d9;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.25);
}

/* Count numbers */
.inv-count-num {
  font-size: 13px;
  font-weight: 700;
}

.inv-count-num.highlight {
  color: #0f172a;
}

.inv-count-num.highlight-lib {
  color: #1d4ed8;
}

.inv-bw-mode .inv-count-num.highlight-lib {
  color: #0f172a;
}

.inv-count-num.dim {
  color: #94a3b8;
}

.inv-total-onhand-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.inv-total-ea {
  font-size: 14px;
  font-weight: 800;
}

.inv-total-ea.positive {
  color: #0f172a;
}

.inv-total-ea.zero {
  color: #94a3b8;
}

.inv-total-bbl {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}

/* Channel Cells & Badges */
.inv-channel-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-woo-pills {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.inv-pill-stock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.inv-pill-stock.in {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.inv-pill-stock.out {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.inv-pill-stock.neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.inv-pill-stock.delisted {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.inv-bg-exp-date {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}

.inv-pill-holds {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
}

.inv-pill-holds.active {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.inv-pill-holds.zero {
  background: transparent;
  color: #94a3b8;
}

.inv-pill-unlinked {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
}

/* QuickBooks Badge & Interactive Popover */
.inv-qbo-pill-wrap {
  cursor: pointer;
  position: relative;
  display: inline-flex;
}

.inv-qbo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 5px;
  font-size: 11.5px;
  color: #14532d;
  transition: all 0.15s ease;
}

.inv-qbo-badge:hover {
  background: #dcfce7;
  border-color: #86efac;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.inv-qbo-committed-tag {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
}

.inv-qbo-popover {
  position: absolute;
  z-index: 1000;
  width: 360px;
  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);
  overflow: hidden;
  font-family: inherit;
  animation: inv-popover-in 0.15s ease-out;
}

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

.inv-qbo-popover-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 16px;
}

.inv-qbo-popover-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: #0f172a;
}

.inv-qbo-popover-subtitle {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.inv-qbo-popover-body {
  padding: 14px 16px;
}

.inv-qbo-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.inv-qbo-sum-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inv-qbo-sum-card.highlight {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.inv-qbo-sum-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}

.inv-qbo-sum-val {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.inv-qbo-invoices-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inv-qbo-invoices-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 4px;
}

.inv-qbo-empty-invoices {
  font-size: 11.5px;
  color: #94a3b8;
  font-style: italic;
  padding: 8px 0;
}

.inv-qbo-invoices-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.inv-qbo-invoice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  font-size: 11.5px;
}

.inv-qbo-inv-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.inv-qbo-inv-doc {
  font-size: 10px;
  font-weight: 700;
  color: #2563eb;
}

.inv-qbo-inv-client {
  color: #0f172a;
  font-weight: 600;
}

.inv-qbo-inv-qty {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.inv-qbo-inv-count {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}

.inv-qbo-inv-date {
  font-size: 10px;
  color: #64748b;
}

.inv-bg-cell-stacked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  line-height: 1.2;
}

.inv-bg-sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid #e2e8f0;
  letter-spacing: 0.02em;
  display: inline-block;
}

/* Adjust Mode Banner & Inline Controls */
.inv-adjust-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  padding: 10px 24px;
}

.inv-adjust-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inv-adjust-banner-icon {
  font-size: 20px;
}

.inv-adjust-banner-content strong {
  font-size: 13px;
  color: #92400e;
}

.inv-adjust-banner-content p {
  font-size: 11.5px;
  color: #b45309;
  margin: 0;
}

.inv-stepper-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 1px;
}

.inv-step-btn {
  background: #f1f5f9;
  border: none;
  width: 22px;
  height: 22px;
  font-size: 14px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.1s ease;
}

.inv-step-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.inv-stepper-input {
  width: 44px;
  border: none;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  padding: 2px 0;
}

.inv-inline-select {
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  background: #ffffff;
  color: #1e293b;
  outline: none;
}

/* ── Status Badges ── */
.inv-badge-batch-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.inv-badge-batch-status.act {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.inv-badge-batch-status.cond {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.inv-badge-batch-status.prod {
  background: #f3e8ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

.inv-badge-batch-status.lib {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.inv-badge-batch-status.inact {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

.inv-badge-batch-status.ret {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

/* ── Channel Steppers in Adjust Mode ── */
.inv-channel-cell.adjusting {
  background: #f8fafc;
  border-radius: 4px;
  padding: 2px 4px;
}

.inv-channel-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inv-channel-stepper-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #ffffff;
  border: 1px solid #93c5fd;
  border-radius: 5px;
  padding: 1px;
  box-shadow: 0 1px 2px rgba(59, 130, 246, 0.08);
}

.inv-channel-stepper-wrap:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.inv-channel-stepper-input {
  width: 48px;
  border: none;
  text-align: center;
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  outline: none;
  padding: 2px 0;
  background: transparent;
}

.inv-channel-stepper-input:focus {
  background: #eff6ff;
  border-radius: 3px;
}

.inv-bg-sync-qb-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.inv-bg-sync-qb-btn:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0284c7;
  transform: translateY(-0.5px);
  box-shadow: 0 1px 3px rgba(3, 105, 161, 0.15);
}

.inv-bg-sync-qb-btn:active {
  transform: translateY(0);
}

/* ── B&W Mode Button & Resets ── */
.inv-bw-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 2px;
}

.inv-bw-toggle-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.inv-bw-toggle-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

.inv-bw-toggle-btn.active svg {
  color: #ffffff;
}

/* B&W Mode Resets for Format Pills, Table Badges & Status Chips (keeps functional system colors intact) */
.inv-bw-mode .inv-format-pill {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
  box-shadow: none !important;
}
.inv-bw-mode .inv-format-pill:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.inv-bw-mode .inv-format-pill.active {
  background: #1e293b !important;
  color: #ffffff !important;
  border-color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(30, 41, 59, 0.2) !important;
}

.inv-bw-mode .inv-format-badge {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

.inv-bw-mode .inv-chip {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
  box-shadow: none !important;
}
.inv-bw-mode .inv-chip:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.inv-bw-mode .inv-chip.active {
  background: #1e293b !important;
  color: #ffffff !important;
  border-color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(30, 41, 59, 0.2) !important;
}

/* ── Settings Modal ── */
.inv-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: inv-modal-fade 0.15s ease-out;
}

@keyframes inv-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.inv-settings-modal {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: inv-modal-scale 0.15s ease-out;
}

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

.inv-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.inv-settings-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
}

.inv-settings-title-wrap h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.inv-modal-close-btn {
  background: transparent;
  border: none;
  font-size: 15px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.1s ease;
}

.inv-modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.inv-settings-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inv-settings-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inv-settings-group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 4px;
}

.inv-setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.inv-setting-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inv-setting-info strong {
  font-size: 13.5px;
  color: #0f172a;
}

.inv-setting-info p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

/* ── ASYNC CHANNEL COLUMN & CELL LOADING STATES ── */
.inv-th-header-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-col-loader {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #6366f1;
  background: #eef2ff;
  border: 1px solid #e0e7ff;
  padding: 1px 6px;
  border-radius: 10px;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.3;
}

.inv-col-spinner {
  width: 10px;
  height: 10px;
  animation: inv-spin 0.9s linear infinite;
}

.inv-cell-skeleton-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  user-select: none;
}

.inv-skeleton-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
  animation: inv-dot-pulse 1.2s ease-in-out infinite;
}

@keyframes inv-dot-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.2); background: #6366f1; }
}

.inv-stat-loading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8 !important;
}

.inv-stat-loading-text {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  animation: inv-pulse 1.4s ease-in-out infinite;
}

.inv-channel-pill.loading,
.inv-badge-stock.loading {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ── Buffer Column Highlighting ── */
.inv-count-num.highlight-buf {
  color: #b45309;
  background: #fef3c7;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  border: 1px solid #fde68a;
  display: inline-block;
}

/* ── Available Column Cell & Numbers ── */
.inv-avail-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 5px;
  transition: background 0.15s ease;
}

.inv-avail-cell:hover {
  background: #f1f5f9;
}

.inv-avail-num {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.inv-avail-num.pos {
  color: #047857;
}

.inv-avail-num.zero {
  color: #94a3b8;
}

.inv-avail-num.neg {
  color: #dc2626;
}

.inv-avail-num.dim {
  color: #94a3b8;
}

.inv-oversold-tag {
  font-size: 9.5px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
  animation: inv-pulse 2s ease-in-out infinite;
}

/* ── Available Formula Popover Breakdown ── */
.inv-avail-popover {
  max-width: 440px;
}

.inv-avail-eq-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
}

.inv-eq-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

.inv-eq-token {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  font-size: 10px;
  color: #64748b;
}

.inv-eq-token strong {
  font-size: 12.5px;
  color: #0f172a;
}

.inv-eq-token.warn strong { color: #ea580c; }
.inv-eq-token.buf strong { color: #ca8a04; }
.inv-eq-token.qbo strong { color: #dc2626; }
.inv-eq-token.avail strong { color: #047857; }
.inv-eq-token.avail.neg strong { color: #dc2626; }

.inv-eq-sign {
  font-size: 13px;
  font-weight: 800;
  color: #94a3b8;
}

.inv-avail-alloc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.inv-avail-alloc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #475569;
  padding: 3px 6px;
  border-radius: 4px;
}

.inv-avail-alloc-row.total {
  border-top: 1px dashed #e2e8f0;
  margin-top: 2px;
  padding-top: 5px;
  font-weight: 700;
  color: #1e293b;
}

.inv-avail-alloc-row.status {
  margin-top: 4px;
  padding: 5px 8px;
  border-radius: 5px;
  font-weight: 700;
}

.inv-avail-alloc-row.status.ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.inv-avail-alloc-row.status.oversold {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ── Module 4: Discrepancy & Audit Reconciliation Styles ── */
.inv-stat-card.inv-stat-warn {
  border-color: #fecaca;
  background: #fff5f5;
}

.bl-btn-reconcile-warn {
  background: #fff7ed !important;
  color: #ea580c !important;
  border: 1px solid #fdba74 !important;
  font-weight: 700 !important;
}

.bl-btn-reconcile-warn:hover {
  background: #ffedd5 !important;
  border-color: #fb923c !important;
}

.inv-chip.inv-chip-discrepancy {
  border-color: #fde68a;
  color: #b45309;
  background: #fffbeb;
}

.inv-chip.inv-chip-discrepancy.active {
  background: #d97706;
  color: #ffffff;
  border-color: #b45309;
}

.inv-mismatch-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: #ea580c;
  background: #fff7ed;
  border: 1px solid #fdba74;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-block;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.inv-mismatch-badge:hover {
  background: #ffedd5;
  border-color: #fb923c;
  transform: translateY(-0.5px);
}

.inv-audited-tag {
  font-size: 10px;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-block;
}

/* Modal Backdrop & Dialog for Inventory Hub */
.bl-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.bl-modal-backdrop.active {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
}

.bl-modal-dialog {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  animation: inv-modal-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes inv-modal-pop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ── Audit Session Actions & Banners ── */
.inv-btn-audit-push {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: 1px solid #10b981;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
  transition: all 0.15s ease;
}

.inv-btn-audit-push:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.45);
}

.inv-btn-audit-cancel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #ffffff;
  color: #64748b;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inv-btn-audit-cancel:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.inv-audit-session-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 12.5px;
  font-weight: 600;
}

.inv-staged-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 1px 5px;
  border-radius: 4px;
  margin-top: 3px;
}

.inv-row-staged {
  background: #fffdf5 !important;
}

.inv-audit-step-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
}
.inv-audit-step-status.ready { color: #64748b; }
.inv-audit-step-status.pending { color: #d97706; }
.inv-audit-step-status.success { color: #059669; }
.inv-audit-step-status.error { color: #dc2626; }

/* ── Multi-Channel Stacked Cell Displays (WooCommerce, QuickBooks, Beergang) ── */
.inv-channel-label-small {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.02em;
}

.inv-channel-audit-lbl {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #059669;
  letter-spacing: 0.02em;
}

.inv-channel-audit-sub {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
}

/* Stacked WooCommerce Cell */
.inv-woo-badge-stacked {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 8px;
  border-radius: 6px;
  min-width: 95px;
}

.inv-woo-num-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.inv-woo-val-stock {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.inv-woo-val-stock.in {
  color: #059669;
}
.inv-woo-val-stock.out {
  color: #dc2626;
}

.inv-woo-val-sold {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
}
.inv-woo-val-sold.active {
  color: #7e22ce;
  font-weight: 800;
}

.inv-woo-audit-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Stacked QuickBooks Cell */
.inv-qbo-badge-stacked {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 8px;
  border-radius: 6px;
  min-width: 95px;
}

.inv-qbo-num-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.inv-qbo-val-total {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.inv-qbo-val-today {
  font-size: 11.5px;
  font-weight: 700;
  color: #059669;
}

.inv-qbo-audit-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.inv-qbo-audit-lbl {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #059669;
}

.inv-qbo-audit-sub {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
}

/* Stacked Beergang Cell */
.inv-bg-badge-stacked {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 8px;
  border-radius: 6px;
  min-width: 95px;
}

.inv-bg-sku-row {
  display: flex;
  align-items: center;
  margin-bottom: 1px;
}

.inv-bg-num-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.inv-bg-val-stock {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.inv-bg-val-stock.in {
  color: #d97706;
}
.inv-bg-val-stock.out {
  color: #dc2626;
}

/* ── Syndicate Channel Cell & Badges ── */
.inv-syn-cell {
  display: flex;
  align-items: center;
}

.inv-syn-badge-stacked {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  padding: 5px 8px;
  border-radius: 6px;
  min-width: 125px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inv-syn-badge-stacked:hover {
  background: #f3e8ff;
  border-color: #d8b4fe;
  box-shadow: 0 1px 4px rgba(126, 34, 206, 0.1);
}

.inv-syn-num-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.inv-syn-val-owed {
  font-size: 12.5px;
  font-weight: 800;
}
.inv-syn-val-owed.owed {
  color: #7e22ce;
}
.inv-syn-val-owed.fulfilled {
  color: #059669;
}

.inv-syn-val-total {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.inv-syn-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 6px;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  color: #6b21a8;
  background: #ffffff;
  border: 1px solid #d8b4fe;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inv-syn-link-btn:hover {
  background: #7e22ce;
  color: #ffffff;
  border-color: #7e22ce;
}

.inv-syn-link-btn svg {
  flex-shrink: 0;
}

/* B&W Mode overrides for Syndicate */
.inv-bw-mode .inv-syn-badge-stacked {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.inv-bw-mode .inv-syn-val-owed.owed {
  color: #0f172a;
}
.inv-bw-mode .inv-syn-link-btn {
  border-color: #cbd5e1;
  color: #475569;
}
.inv-bw-mode .inv-syn-link-btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.inv-bw-mode .inv-chip[data-filter="syndicate"] {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}
.inv-bw-mode .inv-chip[data-filter="syndicate"].active {
  background: #1e293b !important;
  color: #ffffff !important;
  border-color: #1e293b !important;
}

/* ── Interactive WooCommerce Cells & Sold Triggers ── */
.inv-woo-clickable {
  cursor: pointer !important;
  user-select: none;
  transition: all 0.15s ease;
}

.inv-woo-clickable:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
  transform: translateY(-0.5px);
}

.inv-woo-clickable .inv-woo-val-sold.active {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.inv-th-clickable {
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.inv-th-clickable:hover {
  color: #2563eb;
}

.inv-th-ext-icon {
  margin-left: 4px;
  opacity: 0.6;
}

.inv-th-clickable:hover .inv-th-ext-icon {
  opacity: 1;
}

/* ── WooCommerce Sold Orders Modal ── */
.inv-woo-modal-dialog {
  max-width: 980px;
  width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.inv-woo-modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.inv-woo-modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inv-woo-modal-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inv-woo-modal-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-woo-modal-subtitle {
  margin: 3px 0 0;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.inv-woo-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 22px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.inv-woo-modal-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 12px;
  min-width: 280px;
  flex: 1;
  max-width: 400px;
}

.inv-woo-modal-search-wrap input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12.5px;
  color: #0f172a;
  width: 100%;
}

.inv-woo-modal-status-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.inv-woo-filter-pill {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s ease;
}

.inv-woo-filter-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.inv-woo-filter-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.inv-woo-modal-body {
  padding: 0;
  overflow-y: auto;
  flex: 1;
  max-height: 55vh;
}

.inv-woo-orders-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.inv-woo-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.inv-woo-orders-table thead tr {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
  z-index: 10;
}

.inv-woo-orders-table th {
  padding: 10px 14px;
}

.inv-woo-orders-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.inv-woo-order-row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.inv-woo-order-row:hover {
  background: #f1f5f9;
}

.inv-woo-order-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.inv-woo-order-link:hover {
  text-decoration: underline;
}

.inv-woo-cust-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.inv-woo-cust-name {
  font-size: 12.5px;
  color: #0f172a;
}

.inv-woo-cust-email {
  font-size: 11px;
  color: #64748b;
}

.inv-woo-status-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

.inv-woo-method-tag {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
}

.inv-woo-qty-badge {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
}

.inv-woo-total-text {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.inv-woo-row-inspect-icon {
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.12s ease;
}

.inv-woo-order-row:hover .inv-woo-row-inspect-icon {
  color: #2563eb;
}

.inv-woo-empty-orders {
  text-align: center;
  padding: 48px 20px;
  color: #64748b;
}

.inv-woo-empty-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.inv-woo-empty-sub {
  font-size: 12px;
}

.inv-woo-modal-footer {
  padding: 12px 22px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inv-woo-modal-footer-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #475569;
}

.inv-woo-footer-hint {
  margin-left: 12px;
  font-size: 11px;
  color: #64748b;
}

/* ── WooCommerce Order Status Badges ── */
.inv-badge-wc-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.inv-badge-wc-status.member-hold {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.inv-badge-wc-status.hold-pickup {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.inv-badge-wc-status.partial {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.inv-badge-wc-status.processing {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.inv-badge-wc-status.prep-ship,
.inv-badge-wc-status.ready {
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}

.inv-badge-wc-status.on-hold {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.inv-badge-wc-status.completed {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.inv-badge-wc-status.cancelled,
.inv-badge-wc-status.refunded {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.inv-badge-wc-status.default {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* ── WooCommerce Order Hover Popover Card ── */
.inv-woo-order-popover-card {
  width: 420px;
  max-width: 92vw;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.22), 0 8px 16px -4px rgba(15, 23, 42, 0.12);
  z-index: 100005 !important;
  position: fixed !important;
  pointer-events: auto !important;
}

.inv-woo-order-popover-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inv-woo-popover-order-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-woo-order-num {
  font-size: 13.5px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #0f172a;
}

.inv-woo-popover-date {
  font-size: 11px;
  color: #64748b;
}

.inv-woo-order-popover-body {
  padding: 12px 14px;
}

.inv-woo-popover-customer-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inv-woo-popover-cust-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
}

.inv-woo-popover-cust-meta {
  font-size: 11px;
  color: #475569;
}

.inv-woo-popover-method {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.inv-woo-popover-items-sec {
  margin-bottom: 10px;
}

.inv-woo-popover-items-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-bottom: 5px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 3px;
}

.inv-woo-popover-items-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
}

.inv-woo-popover-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  font-size: 11.5px;
}

.inv-woo-popover-item.highlight {
  background: #f0fdf4;
  border-color: #86efac;
}

.inv-woo-popover-item-name {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #0f172a;
  font-weight: 600;
}

.inv-woo-popover-item-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  background: #dcfce7;
  color: #15803d;
  padding: 1px 4px;
  border-radius: 3px;
}

.inv-woo-popover-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #334155;
}

.inv-woo-popover-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 5px;
  padding: 6px 8px;
  margin-bottom: 10px;
  font-size: 11px;
}

.inv-woo-popover-note-title {
  font-weight: 700;
  color: #92400e;
  display: block;
  margin-bottom: 2px;
}

.inv-woo-popover-note p {
  margin: 0;
  color: #78350f;
}

.inv-woo-popover-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.inv-woo-popover-total {
  font-size: 12px;
  color: #475569;
}

.inv-woo-popover-total strong {
  color: #0f172a;
  margin-left: 4px;
}

.inv-woo-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.12s ease;
}

.inv-woo-admin-link:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* ── Specific Multi-Tier KPI Cards ── */
.inv-stat-card.kpi-released {
  border-left: 3px solid #059669;
  background: #f0fdf4;
}
.inv-stat-card.kpi-conditioning {
  border-left: 3px solid #d97706;
  background: #fffbeb;
}
.inv-stat-card.kpi-shelf {
  border-left: 3px solid #0284c7;
  background: #f0f9ff;
}
.inv-stat-card.kpi-total-valuation {
  border-left: 3px solid #7c3aed;
  background: #faf5ff;
}

.inv-stat-subval {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  display: block;
  margin-top: 1px;
}

/* ── On Retail Shelf Styles ── */
.highlight-shelf {
  color: #0284c7 !important;
  font-weight: 800;
}
.inv-badge-shelf {
  display: inline-block;
  padding: 2px 7px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

/* ── Yearly Ledger Modal Styles ── */
.inv-ledger-modal {
  max-width: 980px;
  width: 95%;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.inv-ledger-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 16px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.inv-ledger-table th {
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.04em;
  padding: 10px 14px;
}

.inv-ledger-table td {
  padding: 10px 14px;
  font-size: 12.5px;
  border-bottom: 1px solid #f1f5f9;
}

.inv-ledger-table tfoot td {
  background: #f8fafc;
  font-weight: 800;
  border-top: 2px solid #cbd5e1;
}

/* ── HTML Snapshot Report Modal ── */
.inv-snapshot-modal {
  max-width: 900px;
  width: 95%;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.inv-snapshot-report-preview {
  background: #ffffff;
  padding: 32px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
  line-height: 1.5;
}

.inv-snapshot-report-preview h2 {
  margin: 0 0 4px 0;
  color: #0f172a;
}

.inv-snapshot-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 12px;
}

.inv-snapshot-table th {
  background: #f1f5f9;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 2px solid #cbd5e1;
  font-weight: 700;
  color: #334155;
}

.inv-snapshot-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
}



