/**
 * Inventory Intelligence — desktop only, body.use-new-ui.route-inventory
 * Motion: 140ms cubic-bezier(.22,.61,.36,1); hover lift -1px subtle.
 */

@media (min-width: 769px) {
  body.use-new-ui.route-inventory #contentScroll.content-scroll:has(.route-page.inventory-page:not([hidden])) {
    background: transparent;
  }

  body.dark.use-new-ui.route-inventory #contentScroll.content-scroll:has(.route-page.inventory-page:not([hidden])) {
    background: #0b1220;
    background-image: linear-gradient(180deg, #0f172a 0%, #0b1220 40%, #0b1220 100%);
  }

  /* ---- Tab bar (route pills) ---- */
  body.use-new-ui.route-inventory .inventory-page .inventory-tabs {
    gap: 6px;
    margin-bottom: 12px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  body.use-new-ui.route-inventory .inventory-page .inventory-tabs .btn {
    border-radius: 10px;
    min-height: 34px;
    padding: 0 14px;
    font-size: 12.5px;
    font-weight: 650;
    transition: transform 140ms cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 140ms cubic-bezier(0.22, 0.61, 0.36, 1), background 140ms ease, color 140ms ease;
  }

  body.use-new-ui.route-inventory .inventory-page .inventory-tabs .btn.primary {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  }

  body.use-new-ui.route-inventory .inventory-page .inventory-tabs .btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
  }

  body.dark.use-new-ui.route-inventory .inventory-page .inventory-tabs {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(51, 65, 85, 0.55);
  }

  /* ---- Overview hero (A/B tier — ops dashboard) ---- */
  body.use-new-ui.route-inventory .inv-hero-strip--tiered {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 12px 12px;
    margin-bottom: 12px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  }

  body.use-new-ui.route-inventory .inv-hero-tier {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
  }

  body.use-new-ui.route-inventory .inv-hero-tier--a {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  }

  body.use-new-ui.route-inventory .inv-hero-metric {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    border-radius: 12px;
    transition: transform 140ms cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 140ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  body.use-new-ui.route-inventory .inv-hero-metric--tier-a {
    flex: 1 1 168px;
    min-height: 96px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
  }

  body.use-new-ui.route-inventory .inv-hero-metric--tier-a:nth-child(1) {
    border-color: rgba(59, 130, 246, 0.22);
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.08);
  }

  body.use-new-ui.route-inventory .inv-hero-metric--tier-a:nth-child(2) {
    border-color: rgba(251, 191, 36, 0.28);
  }

  body.use-new-ui.route-inventory .inv-hero-metric--tier-a:nth-child(3) {
    border-color: rgba(252, 165, 165, 0.35);
  }

  body.use-new-ui.route-inventory .inv-hero-metric--tier-b {
    flex: 1 1 128px;
    min-height: 74px;
    padding: 8px 10px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.88);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  }

  body.use-new-ui.route-inventory .inv-hero-metric:hover {
    transform: translateY(-1px);
  }

  body.use-new-ui.route-inventory .inv-hero-ico {
    font-size: 18px;
    line-height: 1;
    opacity: 0.7;
    filter: saturate(0.88);
  }

  body.use-new-ui.route-inventory .inv-hero-k {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.2;
  }

  body.use-new-ui.route-inventory .inv-hero-v {
    display: block;
    font-size: 17px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    color: #0f172a;
    line-height: 1.12;
    margin-top: 3px;
  }

  body.use-new-ui.route-inventory .inv-hero-v--primary {
    font-size: clamp(22px, 1.65vw, 28px);
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  body.use-new-ui.route-inventory .inv-hero-subnote,
  body.use-new-ui.route-inventory .inv-overview-help {
    margin: 0 0 10px;
    font-size: 12.5px;
  }

  /* Health mini-cards: neutral surface + left accent (overrides tinted panels) */
  body.use-new-ui.route-inventory .inventory-health-grid .inv-health-card.inventory-risk-card {
    background: #fff;
    border-width: 1px;
    border-style: solid;
    border-color: #e8edf4;
    border-left-width: 3px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  body.use-new-ui.route-inventory .inventory-health-grid .inv-health-card.inventory-risk-card--ok {
    border-left-color: rgba(52, 211, 153, 0.75);
  }

  body.use-new-ui.route-inventory .inventory-health-grid .inv-health-card.inventory-risk-card--warn {
    border-left-color: rgba(245, 158, 11, 0.75);
  }

  body.use-new-ui.route-inventory .inventory-health-grid .inv-health-card.inventory-risk-card--bad {
    border-left-color: rgba(248, 113, 113, 0.8);
  }

  body.use-new-ui.route-inventory .inventory-health-grid .inventory-risk-v {
    font-size: clamp(18px, 1.35vw, 22px);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
  }

  /* Ops strip (Stripe-like) */
  body.use-new-ui.route-inventory .inv-ops-strip {
    margin: 0 0 12px;
  }

  body.use-new-ui.route-inventory .inv-ops-strip-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    min-height: 40px;
    padding: 6px 4px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  body.use-new-ui.route-inventory .inv-ops-strip-cell {
    flex: 1 1 118px;
    min-width: 0;
    padding: 2px 10px;
    box-sizing: border-box;
  }

  body.use-new-ui.route-inventory .inv-ops-sep {
    width: 1px;
    align-self: stretch;
    background: rgba(226, 232, 240, 0.95);
    margin: 4px 0;
    flex-shrink: 0;
  }

  body.use-new-ui.route-inventory .inv-ops-strip-k {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.use-new-ui.route-inventory .inv-ops-strip-v {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    font-weight: 760;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    color: #0f172a;
    line-height: 1.3;
    word-break: break-word;
  }

  /* Intelligence blocks (dead / fast / capital) */
  body.use-new-ui.route-inventory .inv-intel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
  }

  body.use-new-ui.route-inventory .inv-intel-card .inv-intel-head h4 {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 750;
    color: #0f172a;
  }

  body.use-new-ui.route-inventory .inv-intel-sub {
    display: block;
    font-size: 11px;
    margin-bottom: 8px;
    line-height: 1.35;
  }

  body.use-new-ui.route-inventory .inv-intel-body {
    min-height: 72px;
  }

  body.use-new-ui.route-inventory .inv-intel-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  body.use-new-ui.route-inventory .inv-intel-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(88px, auto) minmax(76px, auto);
    gap: 6px 10px;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12.5px;
  }

  body.use-new-ui.route-inventory .inv-intel-row:last-child {
    border-bottom: none;
  }

  body.use-new-ui.route-inventory .inv-intel-name {
    font-weight: 650;
    color: #0f172a;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.use-new-ui.route-inventory .inv-intel-meta {
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
  }

  body.use-new-ui.route-inventory .inv-intel-val {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    text-align: right;
    color: #0f172a;
  }

  body.dark.use-new-ui.route-inventory .inv-hero-strip--tiered {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(51, 65, 85, 0.55);
  }

  body.dark.use-new-ui.route-inventory .inv-hero-metric--tier-a,
  body.dark.use-new-ui.route-inventory .inv-hero-metric--tier-b {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(51, 65, 85, 0.55);
  }

  body.dark.use-new-ui.route-inventory .inv-hero-k {
    color: #94a3b8;
  }

  body.dark.use-new-ui.route-inventory .inv-hero-v,
  body.dark.use-new-ui.route-inventory .inv-hero-v--primary {
    color: #f1f5f9;
  }

  body.dark.use-new-ui.route-inventory .inv-ops-strip-inner {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(51, 65, 85, 0.55);
  }

  body.dark.use-new-ui.route-inventory .inv-ops-sep {
    background: rgba(51, 65, 85, 0.75);
  }

  body.dark.use-new-ui.route-inventory .inv-ops-strip-v {
    color: #e2e8f0;
  }

  body.dark.use-new-ui.route-inventory .inv-intel-name,
  body.dark.use-new-ui.route-inventory .inv-intel-val,
  body.dark.use-new-ui.route-inventory .inv-intel-card .inv-intel-head h4 {
    color: #e2e8f0;
  }

  body.dark.use-new-ui.route-inventory .inv-intel-row {
    border-bottom-color: rgba(51, 65, 85, 0.45);
  }

  @media (max-width: 1200px) {
    body.use-new-ui.route-inventory .inv-intel-grid {
      grid-template-columns: 1fr;
    }
  }

  /* ---- Soft panels ---- */
  body.use-new-ui.route-inventory .inv-panel-soft {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  body.use-new-ui.route-inventory .inv-panel-soft h3,
  body.use-new-ui.route-inventory .inv-panel-soft h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
  }

  body.use-new-ui.route-inventory .inv-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
  }

  body.use-new-ui.route-inventory .inv-panel-sub {
    font-size: 11.5px;
  }

  body.dark.use-new-ui.route-inventory .inv-panel-soft {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(51, 65, 85, 0.55);
  }

  body.dark.use-new-ui.route-inventory .inv-panel-soft h3,
  body.dark.use-new-ui.route-inventory .inv-panel-soft h4 {
    color: #e2e8f0;
  }

  /* ---- Restock (priority + ETA — V2) ---- */
  body.use-new-ui.route-inventory .inv-restock-panel {
    padding: 10px 12px;
    margin-bottom: 10px;
  }

  body.use-new-ui.route-inventory .inv-restock-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.use-new-ui.route-inventory .inv-restock-panel-empty {
    margin: 4px 0;
  }

  body.use-new-ui.route-inventory .inv-restock-card--v2 {
    display: flex;
    align-items: stretch;
    padding: 0;
    min-height: 0;
    border-radius: 12px;
    border: 1px solid #e8edf4;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    transition: transform 150ms cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 150ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  body.use-new-ui.route-inventory .inv-restock-card--v2:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 14px rgba(15, 23, 42, 0.07);
  }

  body.use-new-ui.route-inventory .inv-restock-accent {
    width: 4px;
    flex-shrink: 0;
    background: #cbd5e1;
  }

  body.use-new-ui.route-inventory .inv-restock-card--hot .inv-restock-accent {
    background: rgba(248, 113, 113, 0.88);
  }

  body.use-new-ui.route-inventory .inv-restock-card--warn .inv-restock-accent {
    background: rgba(245, 158, 11, 0.85);
  }

  body.use-new-ui.route-inventory .inv-restock-card--ok .inv-restock-accent {
    background: rgba(52, 211, 153, 0.72);
  }

  body.use-new-ui.route-inventory .inv-restock-card--hot .inv-restock-body {
    background: rgba(254, 242, 242, 0.2);
  }

  body.use-new-ui.route-inventory .inv-restock-card--warn .inv-restock-body {
    background: rgba(254, 252, 232, 0.22);
  }

  body.use-new-ui.route-inventory .inv-restock-card--ok .inv-restock-body {
    background: rgba(248, 250, 252, 0.55);
  }

  body.use-new-ui.route-inventory .inv-restock-body {
    flex: 1;
    min-width: 0;
    padding: 5px 10px 6px;
  }

  body.use-new-ui.route-inventory .inv-restock-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: min-content;
    min-height: 0;
  }

  body.use-new-ui.route-inventory .inv-restock-row .inv-restock-name {
    flex: 1 1 120px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
  }

  body.use-new-ui.route-inventory .inv-restock-meta {
    font-size: 11.5px;
    margin-top: 0;
    line-height: 1.25;
    flex-shrink: 0;
    white-space: nowrap;
  }

  body.use-new-ui.route-inventory .inv-restock-strong {
    font-weight: 700;
    color: #334155;
  }

  body.use-new-ui.route-inventory .inv-restock-eta-inline {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    flex-shrink: 0;
    white-space: nowrap;
  }

  body.use-new-ui.route-inventory .inv-restock-eta-inline .inv-restock-eta-k {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
  }

  body.use-new-ui.route-inventory .inv-restock-eta-inline .inv-restock-eta-v {
    font-size: 12.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    color: #0f172a;
  }

  body.use-new-ui.route-inventory .inv-restock-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 750;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
  }

  body.use-new-ui.route-inventory .inv-restock-badge--hot {
    background: rgba(254, 226, 226, 0.92);
    border-color: rgba(252, 165, 165, 0.55);
    color: #991b1b;
    font-weight: 800;
    box-shadow: 0 1px 2px rgba(185, 28, 28, 0.1);
  }

  body.use-new-ui.route-inventory .inv-restock-badge--warn {
    background: rgba(254, 243, 199, 0.92);
    border-color: rgba(251, 191, 36, 0.45);
    color: #92400e;
    font-weight: 780;
  }

  body.use-new-ui.route-inventory .inv-restock-badge--ok {
    background: rgba(226, 232, 240, 0.95);
    border-color: #cbd5e1;
    color: #475569;
  }

  body.use-new-ui.route-inventory .inv-restock-card--v2 .inv-restock-bar {
    margin-top: 0;
    width: 52px;
    min-width: 52px;
    flex-shrink: 0;
    height: 5px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    overflow: hidden;
    align-self: center;
  }

  body.use-new-ui.route-inventory .inv-restock-card--v2 .inv-restock-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.36);
    transition: width 160ms ease;
  }

  body.use-new-ui.route-inventory .inv-restock-card--ok .inv-restock-bar > span {
    background: rgba(45, 212, 191, 0.45);
  }

  body.use-new-ui.route-inventory .inv-restock-card--warn .inv-restock-bar > span {
    background: rgba(251, 191, 36, 0.55);
  }

  body.use-new-ui.route-inventory .inv-restock-card--hot .inv-restock-bar > span {
    background: rgba(248, 113, 113, 0.48);
  }

  body.dark.use-new-ui.route-inventory .inv-restock-card--v2 {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(51, 65, 85, 0.55);
  }

  body.dark.use-new-ui.route-inventory .inv-restock-card--hot .inv-restock-body,
  body.dark.use-new-ui.route-inventory .inv-restock-card--warn .inv-restock-body,
  body.dark.use-new-ui.route-inventory .inv-restock-card--ok .inv-restock-body {
    background: rgba(15, 23, 42, 0.35);
  }

  body.dark.use-new-ui.route-inventory .inv-restock-name,
  body.dark.use-new-ui.route-inventory .inv-restock-eta-inline .inv-restock-eta-v {
    color: #f1f5f9;
  }

  body.dark.use-new-ui.route-inventory .inv-restock-eta-inline .inv-restock-eta-k {
    color: #94a3b8;
  }

  body.use-new-ui.route-inventory .inv-restock-empty-card {
    text-align: center;
    padding: 18px 14px;
    border-radius: 11px;
    border: 1px dashed rgba(148, 163, 184, 0.55);
    background: rgba(248, 250, 252, 0.75);
  }

  body.use-new-ui.route-inventory .inv-restock-empty-title {
    font-weight: 700;
    font-size: 13px;
    margin: 6px 0 4px;
  }

  /* ---- Alert grid (near / neg) ---- */
  body.use-new-ui.route-inventory .inv-alert-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.use-new-ui.route-inventory .inv-subpanel {
    padding: 12px 14px;
  }

  body.use-new-ui.route-inventory .inv-alert-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12.5px;
  }

  body.use-new-ui.route-inventory .inv-alert-table thead {
    display: table-header-group !important;
  }

  body.use-new-ui.route-inventory .inv-alert-table tbody {
    display: table-row-group !important;
  }

  body.use-new-ui.route-inventory .inv-alert-table tr,
  body.use-new-ui.route-inventory .inv-alert-table tbody tr,
  body.use-new-ui.route-inventory .inv-alert-table tbody tr.inv-alert-table-row {
    display: table-row !important;
    width: auto !important;
    max-width: none !important;
  }

  body.use-new-ui.route-inventory .inv-alert-table th,
  body.use-new-ui.route-inventory .inv-alert-table td {
    display: table-cell !important;
    width: auto !important;
    max-width: none;
    vertical-align: middle;
  }

  body.use-new-ui.route-inventory .inv-alert-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f1f5f9;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 0 rgba(226, 232, 240, 0.95), 0 2px 6px rgba(15, 23, 42, 0.035);
  }

  body.use-new-ui.route-inventory .inv-alert-table tbody td {
    min-height: 41px;
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
  }

  body.use-new-ui.route-inventory .inv-alert-table tbody tr:nth-child(even) td {
    background: rgba(248, 250, 252, 0.55);
  }

  body.use-new-ui.route-inventory .inv-alert-table tbody tr:hover td {
    background: rgba(239, 246, 255, 0.88) !important;
  }

  body.use-new-ui.route-inventory .inv-alert-table .empty-state {
    margin: 10px auto;
    max-width: 380px;
  }

  body.use-new-ui.route-inventory .inv-td-rem {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
  }

  body.use-new-ui.route-inventory .inv-batch-sup {
    color: #64748b;
    font-size: 12px;
  }

  body.use-new-ui.route-inventory .inv-td-age {
    font-size: 11.5px;
    white-space: nowrap;
  }

  body.dark.use-new-ui.route-inventory .inv-alert-table thead th {
    background: rgba(30, 41, 59, 0.92);
    color: #94a3b8;
    border-bottom-color: rgba(51, 65, 85, 0.55);
    box-shadow: 0 1px 0 rgba(51, 65, 85, 0.55), 0 2px 6px rgba(0, 0, 0, 0.2);
  }

  body.dark.use-new-ui.route-inventory .inv-alert-table tbody tr:nth-child(even) td {
    background: rgba(15, 23, 42, 0.35);
  }

  body.dark.use-new-ui.route-inventory .inv-alert-table tbody tr:hover td {
    background: rgba(30, 58, 138, 0.28) !important;
  }

  /* ---- Product segments + toolbar ---- */
  body.use-new-ui.route-inventory .inv-prod-segments-wrap {
    margin-bottom: 10px;
  }

  body.use-new-ui.route-inventory .inv-prod-segments.segment-control {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 5px;
    border-radius: 999px;
    background: #eef2f7;
    border: 1px solid rgba(203, 213, 225, 0.95);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65);
  }

  body.use-new-ui.route-inventory .inv-prod-segments .segment-btn {
    min-height: 34px;
    padding: 0 12px;
    border: none;
    border-radius: 999px;
    background: transparent;
    font-size: 12px;
    font-weight: 650;
    color: #475569;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  body.use-new-ui.route-inventory .inv-prod-segments .segment-btn:hover {
    transform: translateY(-1px);
  }

  body.use-new-ui.route-inventory .inv-prod-segments .segment-btn.active {
    background: #0f172a;
    color: #f8fafc;
    font-weight: 750;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  }

  body.dark.use-new-ui.route-inventory .inv-prod-segments.segment-control {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(71, 85, 105, 0.55);
  }

  body.dark.use-new-ui.route-inventory .inv-prod-segments .segment-btn {
    color: #cbd5e1;
  }

  body.dark.use-new-ui.route-inventory .inv-prod-segments .segment-btn.active {
    background: #f1f5f9;
    color: #0f172a;
  }

  body.use-new-ui.route-inventory .inv-product-toolbar,
  body.use-new-ui.route-inventory .inv-overview-toolbar,
  body.use-new-ui.route-inventory .inv-batch-desk-toolbar {
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
  }

  body.use-new-ui.route-inventory .inv-product-toolbar input,
  body.use-new-ui.route-inventory .inv-product-toolbar select,
  body.use-new-ui.route-inventory .inv-product-toolbar .btn,
  body.use-new-ui.route-inventory .inv-batch-desk-toolbar input,
  body.use-new-ui.route-inventory .inv-batch-desk-toolbar .btn,
  body.use-new-ui.route-inventory .inv-batch-desk-toolbar label.stock-toggle {
    min-height: 34px !important;
    border-radius: 10px !important;
    box-sizing: border-box;
  }

  body.use-new-ui.route-inventory .inv-prod-actions-compact .btn.btn-xs,
  body.use-new-ui.route-inventory .inv-batch-actions-compact .btn.btn-xs {
    min-height: 28px !important;
    padding: 0 9px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
    line-height: 1.2 !important;
  }

  /* ---- Product table intelligence ---- */
  body.use-new-ui.route-inventory .product-center-table--inv-intel .product-stock-table--inv-desk thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #f1f5f9 !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 10px 12px !important;
    box-shadow: 0 1px 0 rgba(226, 232, 240, 0.95), 0 2px 6px rgba(15, 23, 42, 0.035);
  }

  body.use-new-ui.route-inventory .product-center-table--inv-intel .product-stock-table--inv-desk tbody td {
    min-height: 48px !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    line-height: 1.35 !important;
    font-size: 15px;
  }

  body.use-new-ui.route-inventory .product-stock-table--inv-desk tbody tr:hover td {
    background: rgba(239, 246, 255, 0.92) !important;
  }

  body.use-new-ui.route-inventory .product-stock-table--inv-desk tbody tr.selected td {
    background: rgba(219, 234, 254, 0.35) !important;
  }

  body.use-new-ui.route-inventory .product-stock-table--inv-desk .stock-cell--intel {
    text-align: right;
  }

  body.use-new-ui.route-inventory .stock-cell-intel {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    min-width: 0;
  }

  body.use-new-ui.route-inventory .stock-qty-num {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    font-size: 12px;
    color: #0f172a;
    line-height: 1;
  }

  body.use-new-ui.route-inventory .stock-qty-num.inv-prod-stock--zero {
    color: #dc2626;
  }

  body.use-new-ui.route-inventory .stock-qty-num.inv-prod-stock--low {
    color: #ea580c;
  }

  body.use-new-ui.route-inventory .stock-qty-num.inv-prod-stock--ok {
    color: #16a34a;
  }

  body.use-new-ui.route-inventory .inv-stock-microbar {
    width: 44px;
    max-width: 100%;
    height: 3px;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25);
    overflow: hidden;
  }

  body.use-new-ui.route-inventory .inv-stock-microbar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.45);
  }

  body.use-new-ui.route-inventory .inv-stock-bar--ok > span {
    background: rgba(52, 211, 153, 0.55);
  }

  body.use-new-ui.route-inventory .inv-stock-bar--low > span {
    background: rgba(251, 191, 36, 0.65);
  }

  body.use-new-ui.route-inventory .inv-stock-bar--neg > span {
    background: rgba(248, 113, 113, 0.55);
  }

  body.use-new-ui.route-inventory .inv-stock-bar--zero > span {
    background: rgba(148, 163, 184, 0.35);
  }

  body.use-new-ui.route-inventory .inv-fifo-cell {
    color: #64748b !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    font-variant-numeric: tabular-nums;
  }

  body.use-new-ui.route-inventory .inv-margin-cell {
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
  }

  body.use-new-ui.route-inventory .inv-margin-cell.profit-positive {
    color: #15803d !important;
  }

  body.use-new-ui.route-inventory .inv-margin-cell.profit-low {
    color: #b45309 !important;
  }

  body.use-new-ui.route-inventory .inv-margin-cell.profit-negative {
    color: #b91c1c !important;
  }

  body.use-new-ui.route-inventory .inv-filter-empty-card {
    margin: 12px auto;
    max-width: 400px;
    text-align: center;
    padding: 16px;
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.55);
    background: rgba(248, 250, 252, 0.9);
  }

  body.dark.use-new-ui.route-inventory .product-center-table--inv-intel .product-stock-table--inv-desk thead th {
    background: rgba(30, 41, 59, 0.92) !important;
    color: #94a3b8 !important;
    border-bottom-color: rgba(51, 65, 85, 0.55) !important;
  }

  body.dark.use-new-ui.route-inventory .product-stock-table--inv-desk tbody tr.selected td {
    background: rgba(30, 58, 138, 0.35) !important;
  }

  /* ---- Batch desktop ---- */
  body.use-new-ui.route-inventory .inv-batch-desk {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  body.use-new-ui.route-inventory .inv-batch-hero-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.9);
  }

  body.use-new-ui.route-inventory .inv-batch-hero-metric {
    flex: 1 1 120px;
    min-width: 0;
  }

  body.use-new-ui.route-inventory .inv-batch-hero-k {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
  }

  body.use-new-ui.route-inventory .inv-batch-hero-v {
    font-size: 17px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
  }

  body.use-new-ui.route-inventory .inv-batch-capital-line {
    margin: 0;
    font-size: 12px;
  }

  body.use-new-ui.route-inventory .inv-batch-table-wrap {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: auto;
  }

  body.use-new-ui.route-inventory .inventory-batch-table--desk-intel thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f1f5f9 !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 0 rgba(226, 232, 240, 0.95), 0 2px 6px rgba(15, 23, 42, 0.035);
  }

  body.use-new-ui.route-inventory .inventory-batch-table--desk-intel tbody td {
    min-height: 42px !important;
    padding: 7px 10px !important;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
  }

  body.use-new-ui.route-inventory .inventory-batch-table--desk-intel tbody tr:nth-child(even) td {
    background: rgba(248, 250, 252, 0.48);
  }

  body.use-new-ui.route-inventory .inv-batch-row:hover td {
    background: rgba(239, 246, 255, 0.92) !important;
  }

  body.use-new-ui.route-inventory .inv-fifo-val {
    font-size: 12px !important;
  }

  body.use-new-ui.route-inventory .inv-batch-note {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.dark.use-new-ui.route-inventory .inv-batch-hero-strip,
  body.dark.use-new-ui.route-inventory .inv-batch-table-wrap {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(51, 65, 85, 0.55);
  }

  body.dark.use-new-ui.route-inventory .inv-batch-hero-v {
    color: #f1f5f9;
  }

  /* ---- Movements ---- */
  body.use-new-ui.route-inventory .inv-movements-desk {
    padding: 14px 16px;
  }

  body.use-new-ui.route-inventory .inv-movements-table thead th {
    position: sticky;
    top: 0;
    background: #f1f5f9;
    z-index: 2;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
  }

  body.use-new-ui.route-inventory .inv-movements-table tbody td {
    border-bottom: 1px solid #f1f5f9;
    font-variant-numeric: tabular-nums;
  }

  body.use-new-ui.route-inventory .inv-overview-desk {
    min-width: 0;
  }

  body.use-new-ui.route-inventory .inv-inner-table {
    border-radius: 10px;
    overflow: auto;
    max-width: 100%;
  }

  /* Product desk table width — scroll inside .product-center-table--inv-intel (see inventory-product-table-density.css) */
  body.use-new-ui.route-inventory .inventory-page .product-stock-table--inv-desk {
    width: 100%;
    min-width: 1320px;
    max-width: none;
  }

  body.use-new-ui.route-inventory .inventory-page .product-stock-table--inv-desk col.product-col-fifo {
    width: 118px;
  }

  body.use-new-ui.route-inventory .inventory-page .product-stock-table--inv-desk col.product-col-stock-inv {
    width: 96px;
  }

  body.use-new-ui.route-inventory .inventory-page .product-stock-table--inv-desk col.product-col-margin {
    width: 112px;
  }

  body.use-new-ui.route-inventory .inventory-page .product-stock-table--inv-desk col.product-col-actions {
    width: 204px;
  }

  body.use-new-ui.route-inventory .inventory-page .product-stock-table--inv-desk col.product-col-status {
    width: 96px;
  }

  body.use-new-ui.route-inventory .inventory-page .product-stock-table--inv-desk col.product-col-archive {
    width: 76px;
  }

  body.use-new-ui.route-inventory .product-stock-table--inv-desk th.inv-fifo-th,
  body.use-new-ui.route-inventory .product-stock-table--inv-desk th.inv-margin-th,
  body.use-new-ui.route-inventory .product-stock-table--inv-desk th.inv-stock-th {
    text-align: right !important;
  }

  /* Table empty / filter empty — compact “ops” card */
  body.use-new-ui.route-inventory .inventory-page .empty-state {
    margin: 8px auto;
    max-width: 420px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.5);
    background: rgba(248, 250, 252, 0.92);
    text-align: center;
  }

  body.use-new-ui.route-inventory .inventory-page .empty-state-icon {
    font-size: 22px;
    opacity: 0.75;
  }

  body.use-new-ui.route-inventory .inventory-page .empty-state-title {
    font-size: 14px;
    font-weight: 750;
    margin: 6px 0 4px;
    color: #0f172a;
  }

  body.use-new-ui.route-inventory .inventory-page .empty-state-desc {
    font-size: 12.5px;
    line-height: 1.45;
  }

  /* ---- Dark: restock + empties + movements ---- */
  body.dark.use-new-ui.route-inventory .inv-restock-card {
    border-color: rgba(51, 65, 85, 0.55);
    background: rgba(15, 23, 42, 0.42);
  }

  body.dark.use-new-ui.route-inventory .inv-restock-card--hot {
    border-color: rgba(185, 28, 28, 0.35);
    background: rgba(69, 10, 10, 0.22);
  }

  body.dark.use-new-ui.route-inventory .inv-restock-card--warn {
    border-color: rgba(180, 83, 9, 0.35);
    background: rgba(69, 26, 3, 0.18);
  }

  body.dark.use-new-ui.route-inventory .inv-restock-card--ok {
    border-color: rgba(22, 101, 52, 0.28);
    background: rgba(6, 40, 27, 0.18);
  }

  body.dark.use-new-ui.route-inventory .inv-restock-name {
    color: #f1f5f9;
  }

  body.dark.use-new-ui.route-inventory .inv-restock-strong {
    color: #cbd5e1;
  }

  body.dark.use-new-ui.route-inventory .inv-restock-empty-card,
  body.dark.use-new-ui.route-inventory .inv-filter-empty-card {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(71, 85, 105, 0.55);
  }

  body.dark.use-new-ui.route-inventory .inv-restock-empty-title,
  body.dark.use-new-ui.route-inventory .inv-filter-empty-title {
    color: #e2e8f0;
  }

  body.dark.use-new-ui.route-inventory .inventory-page .empty-state {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(71, 85, 105, 0.5);
  }

  body.dark.use-new-ui.route-inventory .inventory-page .empty-state-title {
    color: #f1f5f9;
  }

  body.dark.use-new-ui.route-inventory .inv-movements-table thead th {
    background: rgba(30, 41, 59, 0.92);
    color: #94a3b8;
  }

  body.dark.use-new-ui.route-inventory .inv-movements-table tbody td {
    border-bottom-color: rgba(30, 41, 59, 0.85);
  }

  body.dark.use-new-ui.route-inventory .inventory-batch-table--desk-intel thead th {
    background: rgba(30, 41, 59, 0.92) !important;
    color: #94a3b8 !important;
    border-bottom-color: rgba(51, 65, 85, 0.55) !important;
  }

  body.dark.use-new-ui.route-inventory .inv-fifo-val {
    color: #94a3b8 !important;
  }

  body.dark.use-new-ui.route-inventory .stock-qty-num {
    color: #f1f5f9;
  }

  body.dark.use-new-ui.route-inventory .inv-alert-table tbody td {
    border-bottom-color: rgba(30, 41, 59, 0.75);
  }
}
