/**
 * Hydra mobile — route Kho hàng (restyle only, desktop ≥901px unchanged)
 */
@media (max-width: 900px) {
  body.use-new-ui.route-inventory #contentScroll.content-scroll,
  body.use-new-ui.route-inventory .content-scroll {
    padding-bottom: var(--hydra-mo-scroll-bottom-pad-fab, calc(var(--hydra-bottom-nav-h, 72px) + 96px + env(safe-area-inset-bottom, 0px))) !important;
  }

  body.use-new-ui.route-inventory .inventory-page,
  body.use-new-ui.route-inventory .inventory-module--mo-owner,
  body.use-new-ui.route-inventory .inventory-module--mo-owner #inventoryTabBody,
  body.use-new-ui.route-inventory .inv-mo-overview {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
    box-sizing: border-box !important;
  }

  body.use-new-ui.route-inventory #mobileOwnerFab:not([hidden]) {
    right: calc(16px + env(safe-area-inset-right, 0px)) !important;
    bottom: calc(var(--hydra-bottom-nav-h, 72px) + 18px + env(safe-area-inset-bottom, 0px)) !important;
    left: auto !important;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner {
    display: flex;
    flex-direction: column;
    gap: 10px !important;
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    padding: 0 0 12px !important;
    box-sizing: border-box !important;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner #inventoryTabBody {
    display: flex;
    flex-direction: column;
    gap: 10px !important;
    min-width: 0;
    width: 100% !important;
    max-width: none !important;
  }

  body.use-new-ui.route-inventory .inv-mo-overview {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100% !important;
    max-width: none !important;
  }

  /* Segmented tabs — cam, scroll ngang (TASK-617 / F004: Orders TASK-616 pattern) */
  body.use-new-ui.route-inventory .inventory-tabs--mo-pills {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding: 4px 0 8px;
    /* Trailing gutter so last tab fully clears + tappable */
    padding-inline-end: 16px;
    scroll-padding-inline: 14px;
    scroll-padding-inline-end: 16px;
    margin: var(--hydra-mobile-filter-gap, 12px) 0 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
    /* Fade leading edge only — do not fade trailing edge (clips last chip) */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 100%);
  }

  body.use-new-ui.route-inventory .inventory-tabs--mo-pills::-webkit-scrollbar {
    display: none;
  }

  body.use-new-ui.route-inventory .inventory-tabs--mo-pills .btn {
    flex: 0 0 auto;
    min-height: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid var(--hydra-border-soft);
    background: #fff;
    color: var(--hydra-text-secondary);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  }

  body.use-new-ui.route-inventory .inventory-tabs--mo-pills .btn:last-child {
    margin-inline-end: 4px;
  }

  body.use-new-ui.route-inventory .inventory-tabs--mo-pills .btn.primary {
    border-color: var(--hydra-border-strong);
    background: var(--hydra-accent-softer, rgba(255, 237, 213, 0.95));
    color: var(--hydra-orange-800);
    box-shadow: var(--hydra-shadow);
  }

  /* Nút chính — cam gradient */
  body.use-new-ui.route-inventory .inventory-module--mo-owner .btn.primary,
  body.use-new-ui.route-inventory .inventory-module--mo-owner #addBatch.btn.primary,
  body.use-new-ui.route-inventory .inventory-module--mo-owner #addProduct.btn.primary {
    border: none;
    background: var(--hydra-gradient, linear-gradient(155deg, #fb923c 0%, #f97316 42%, #ea580c 100%));
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.28);
    font-weight: 700;
  }

  /* Chốt tồn âm — card full width */
  body.use-new-ui.route-inventory .inv-mo-overview-toolbar {
    width: 100% !important;
    max-width: none !important;
    min-height: 64px;
    margin: 0 0 10px !important;
    padding: 10px 14px !important;
    border-radius: 18px !important;
    border: 1px solid var(--hydra-border-soft) !important;
    background: #fff !important;
    box-shadow: var(--hydra-shadow) !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    gap: 0 !important;
  }

  body.use-new-ui.route-inventory .inv-mo-overview-toolbar #reconcileNegativeStock,
  body.use-new-ui.route-inventory .inv-mo-overview-toolbar #reconcileNegativeStock.btn.primary {
    width: 100%;
    min-height: 44px;
    max-height: 48px;
    justify-content: center;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    margin: 0;
  }

  /* KPI overview — 1 card, 4 cột (thay 2×2) */
  body.use-new-ui.route-inventory .inv-mo-kpi-strip {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 12px !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    border-radius: 18px !important;
    border: 1px solid var(--hydra-border-soft) !important;
    background: #fff !important;
    box-shadow: var(--hydra-shadow) !important;
    box-sizing: border-box !important;
  }

  body.use-new-ui.route-inventory .inv-mo-kpi-strip__grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    align-items: stretch !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.use-new-ui.route-inventory .inv-mo-kpi-cell {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    min-width: 0 !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.use-new-ui.route-inventory .inv-mo-kpi-cell__head {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 3px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.use-new-ui.route-inventory .inv-mo-kpi-cell__ico.hydra-icon-tile,
  body.use-new-ui.route-inventory .inv-mo-kpi-cell .hydra-icon-tile {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  body.use-new-ui.route-inventory .inv-mo-kpi-cell .hydra-icon-svg {
    width: 16px !important;
    height: 16px !important;
  }

  body.use-new-ui.route-inventory .inv-mo-kpi-cell__label {
    display: block !important;
    width: 100% !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    color: var(--hydra-text-muted, #64748b) !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.use-new-ui.route-inventory .inv-mo-kpi-cell__value {
    font-size: clamp(22px, 5.5vw, 26px) !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: -0.03em !important;
    font-variant-numeric: tabular-nums !important;
    color: var(--hydra-text, #0f172a) !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* KPI tab Lô — giữ 2×2 */
  body.use-new-ui.route-inventory .inv-mo-kpi-row.cards,
  body.use-new-ui.route-inventory .inv-mo-kpi-row:not(.inv-mo-kpi-strip),
  body.use-new-ui.route-inventory .inv-mo-batch-kpis {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: stretch !important;
  }

  body.use-new-ui.route-inventory .inv-mo-fifo-line {
    width: 100% !important;
    max-width: none !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--hydra-text-muted) !important;
    margin: 8px 0 6px !important;
    line-height: 1.35 !important;
    text-align: left !important;
  }

  /* Card chung — compact, full width */
  body.use-new-ui.route-inventory .inv-mo-card {
    width: 100% !important;
    max-width: none !important;
    border-radius: 18px;
    border: 1px solid var(--hydra-border-soft);
    background: #fff;
    box-shadow: var(--hydra-shadow);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    max-height: none;
    text-align: left;
    box-sizing: border-box;
  }

  body.use-new-ui.route-inventory .inv-mo-card-head--split {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
  }

  body.use-new-ui.route-inventory .inventory-restock-mobile-list,
  body.use-new-ui.route-inventory .inventory-low-batch-mobile-list,
  body.use-new-ui.route-inventory .inventory-negative-mobile-list,
  body.use-new-ui.route-inventory .inventory-batch-mobile-list,
  body.use-new-ui.route-inventory .inv-mo-movements-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  body.use-new-ui.route-inventory .inv-mo-section {
    margin: 0;
    width: 100% !important;
    max-width: none !important;
  }

  body.use-new-ui.route-inventory .inv-mo-section-title {
    margin: 0 0 8px !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    font-size: clamp(17px, 4.6vw, 20px) !important;
    font-weight: 800 !important;
    text-align: left !important;
  }

  body.use-new-ui.route-inventory .inventory-restock-mobile-list,
  body.use-new-ui.route-inventory .inventory-low-batch-mobile-list,
  body.use-new-ui.route-inventory .inventory-negative-mobile-list {
    width: 100% !important;
    max-width: none !important;
  }

  /* Gợi ý nhập — compact 3 dòng */
  body.use-new-ui.route-inventory .inv-mo-restock-card--compact {
    gap: 8px;
    min-height: 0;
    max-height: none;
  }

  body.use-new-ui.route-inventory .inv-mo-restock-card--compact .inv-mo-product-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--hydra-text);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
  }

  body.use-new-ui.route-inventory .inv-mo-restock-card .inventory-metrics-grid,
  body.use-new-ui.route-inventory .inv-mo-restock-card .inventory-metric {
    display: none !important;
  }

  body.use-new-ui.route-inventory .inv-mo-restock-sold7,
  body.use-new-ui.route-inventory .inv-mo-meta-line {
    font-size: 13px;
    font-weight: 500;
    color: var(--hydra-text-muted);
    margin: 0;
    line-height: 1.35;
  }

  body.use-new-ui.route-inventory .inv-mo-restock-sold7 strong {
    font-weight: 800;
    color: var(--hydra-text);
  }

  body.use-new-ui.route-inventory .inv-mo-restock-metrics-line {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--hydra-text-secondary);
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.use-new-ui.route-inventory .inv-mo-product-name,
  body.use-new-ui.route-inventory .inv-mo-product-name--batch {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--hydra-text);
    overflow-wrap: anywhere;
  }

  /* Badge ưu tiên Cao — đỏ nhạt gọn */
  body.use-new-ui.route-inventory .inv-mo-prio--high {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid rgba(252, 165, 165, 0.45);
    flex-shrink: 0;
  }

  body.use-new-ui.route-inventory .inv-mo-prio--med {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid rgba(252, 211, 77, 0.4);
  }

  body.use-new-ui.route-inventory .inv-mo-prio--low {
    background: var(--hydra-bg-warm-soft);
    color: var(--hydra-text-muted);
    border: 1px solid var(--hydra-border-soft);
  }

  body.use-new-ui.route-inventory .inv-mo-pill-warn {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid rgba(252, 211, 77, 0.4);
  }

  body.use-new-ui.route-inventory .inv-mo-pill-bad {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid rgba(252, 165, 165, 0.45);
  }

  body.use-new-ui.route-inventory .inv-mo-low-batch-card,
  body.use-new-ui.route-inventory .inv-mo-neg-batch-card,
  body.use-new-ui.route-inventory .inv-mo-stock-batch-card {
    gap: 8px;
    padding: 16px;
  }

  body.use-new-ui.route-inventory .inv-mo-dl > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 1px solid var(--hydra-border-soft);
  }

  body.use-new-ui.route-inventory .inv-mo-dl > div:last-child {
    border-bottom: 0;
  }

  body.use-new-ui.route-inventory .inv-mo-dl .inv-mo-k {
    font-size: 12px;
    font-weight: 600;
    color: var(--hydra-text-muted);
    text-transform: none;
    letter-spacing: 0;
    flex-shrink: 0;
  }

  body.use-new-ui.route-inventory .inv-mo-dl .inv-mo-v {
    font-size: 14px;
    font-weight: 700;
    color: var(--hydra-text);
    text-align: right;
    overflow-wrap: anywhere;
  }

  body.use-new-ui.route-inventory .inv-mo-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
  }

  body.use-new-ui.route-inventory .inv-mo-card-actions {
    gap: 8px;
    margin-top: 2px;
  }

  body.use-new-ui.route-inventory .inv-mo-card-actions .btn {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
  }

  body.use-new-ui.route-inventory .inv-mo-empty-card {
    text-align: left;
    align-items: flex-start;
  }

  body.use-new-ui.route-inventory .inv-mo-empty-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--hydra-text);
    margin: 0;
  }

  /* Toolbar lô / sản phẩm */
  body.use-new-ui.route-inventory .inv-mo-stock-toolbar,
  body.use-new-ui.route-inventory .product-center-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.use-new-ui.route-inventory .inv-mo-stock-toolbar #addBatch,
  body.use-new-ui.route-inventory .product-center-toolbar #addProduct {
    flex: 1 1 100%;
    width: 100%;
    min-height: 48px;
    justify-content: center;
    border-radius: 14px;
    font-size: 16px;
  }

  body.use-new-ui.route-inventory .inv-mo-stock-search,
  body.use-new-ui.route-inventory .product-center-toolbar #productSearch {
    flex: 1 1 100%;
    max-width: none;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--hydra-border-soft);
    font-size: 16px;
  }

  body.use-new-ui.route-inventory .inv-mo-filter-toggle,
  body.use-new-ui.route-inventory .product-center-toolbar select,
  body.use-new-ui.route-inventory .product-center-toolbar .btn:not(.primary) {
    min-height: 44px;
    border-radius: 12px;
  }

  body.use-new-ui.route-inventory .inv-mo-stock-filter-panel.is-open {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--hydra-border-soft);
    background: #fff;
    box-shadow: var(--hydra-shadow);
    margin-bottom: 4px;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-focus {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--hydra-bg-warm-soft);
    border: 1px solid var(--hydra-border-soft);
    font-size: 13px;
  }

  /* Lịch sử — type badge */
  body.use-new-ui.route-inventory .inv-mo-movement-type {
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--hydra-bg-warm-soft);
    border: 1px solid var(--hydra-border-soft);
    color: var(--hydra-text-muted);
  }

  body.use-new-ui.route-inventory .inv-mo-movement-type.profit-good {
    background: #ecfdf5;
    color: #15803d;
    border-color: rgba(16, 185, 129, 0.25);
  }

  body.use-new-ui.route-inventory .inv-mo-movement-type.profit-low {
    background: #fffbeb;
    color: #b45309;
    border-color: rgba(252, 211, 77, 0.35);
  }

  body.use-new-ui.route-inventory .inv-mo-movement-type.profit-warn,
  body.use-new-ui.route-inventory .inv-mo-v.profit-warn {
    background: #fff7ed;
    color: #ea580c;
    border-color: rgba(249, 115, 22, 0.28);
  }

  /* Sản phẩm — table → card list (giữ DOM/nút) */
  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-center-table {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    table-layout: auto !important;
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table thead {
    display: none;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody tr.product-row {
    display: block;
    background: #fff;
    border: 1px solid var(--hydra-border-soft);
    border-radius: 20px;
    box-shadow: var(--hydra-shadow);
    padding: 14px 16px;
    box-sizing: border-box;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody tr.product-row.selected {
    border-color: var(--hydra-border-strong);
    box-shadow: var(--hydra-shadow-md);
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border: 0;
    width: 100% !important;
    max-width: none !important;
    text-align: left !important;
    white-space: normal !important;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td::before {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--hydra-text-muted);
    flex: 0 0 auto;
    margin-right: 8px;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td:nth-child(1)::before { content: "Tên"; }
  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td:nth-child(2)::before { content: "Danh mục"; }
  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td:nth-child(3)::before { content: "Tag"; }
  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td:nth-child(4)::before { content: "Giá nhập"; }
  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td:nth-child(5)::before { content: "Giá bán"; }
  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td:nth-child(6)::before { content: "Áp dụng"; }
  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td:nth-child(7)::before { content: "Tồn"; }
  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td:nth-child(8)::before { content: "Lưu trữ"; }
  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td:nth-child(9)::before { content: "Trạng thái"; }
  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td:nth-child(10)::before { content: ""; display: none; }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td:nth-child(1) {
    flex-direction: column;
    align-items: stretch;
    padding-top: 0;
    border-bottom: 1px solid var(--hydra-border-soft);
    padding-bottom: 10px;
    margin-bottom: 4px;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody td:nth-child(1)::before {
    display: none;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table .product-name-quick-cell .link-like {
    font-size: 16px;
    font-weight: 800;
    color: var(--hydra-text);
    text-align: left;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table .hydra-row-quick-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table .product-actions-cell {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--hydra-border-soft);
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table .product-actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table .product-actions-inline .btn {
    min-height: 42px;
    flex: 1 1 auto;
    font-size: 13px;
  }

  body.use-new-ui.route-inventory .inv-mo-movements-list .inv-mo-card {
    padding: 14px 16px;
    gap: 8px;
  }

  body.use-new-ui.route-inventory .inventory-module--mo-owner .product-history-drawer {
    border-radius: 22px;
    border: 1px solid var(--hydra-border-soft);
    box-shadow: var(--hydra-shadow);
    padding: 16px;
    margin-top: 8px;
  }

  body.use-new-ui.route-inventory .hydra-currency-unit {
    font-size: 0.58em;
    font-weight: 700;
    margin-left: 1px;
    opacity: 0.88;
    vertical-align: baseline;
  }

  body.dark.use-new-ui.route-inventory .inv-mo-card,
  body.dark.use-new-ui.route-inventory .inv-mo-kpi-strip,
  body.dark.use-new-ui.route-inventory .inv-mo-kpi-card,
  body.dark.use-new-ui.route-inventory .inventory-module--mo-owner .product-stock-table tbody tr.product-row {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(148, 163, 184, 0.18);
  }

  /* Sản phẩm — toolbar compact: tìm kiếm + sắp xếp + chức năng */
  body.use-new-ui.route-inventory .inv-prod-mo-toolbar--compact,
  body.use-new-ui.route-products .inv-prod-mo-toolbar--compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-search,
  body.use-new-ui.route-products .inv-prod-mo-search {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--hydra-border-soft);
    border-radius: 12px;
    font-size: 15px;
    box-sizing: border-box;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-tools-row,
  body.use-new-ui.route-products .inv-prod-mo-tools-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-tool-btn,
  body.use-new-ui.route-products .inv-prod-mo-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    position: relative;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-tool-btn--fn.has-active,
  body.use-new-ui.route-products .inv-prod-mo-tool-btn--fn.has-active {
    border-color: rgba(249, 115, 22, 0.35);
  }

  body.use-new-ui.route-inventory .inv-prod-mo-chev,
  body.use-new-ui.route-products .inv-prod-mo-chev {
    font-size: 10px;
    opacity: 0.65;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-fn-ico,
  body.use-new-ui.route-products .inv-prod-mo-fn-ico {
    font-size: 14px;
    line-height: 1;
  }

  /* Bottom sheet — sắp xếp & chức năng */
  body.use-new-ui .inv-prod-fn-sheet {
    position: fixed;
    inset: 0;
    z-index: 12050;
    pointer-events: none;
    visibility: hidden;
  }

  body.use-new-ui.inv-prod-fn-sheet-open .inv-prod-fn-sheet.is-open:not(.inv-prod-fn-sheet--sort),
  body.use-new-ui.inv-prod-sort-sheet-open .inv-prod-fn-sheet--sort.is-open {
    pointer-events: auto;
    visibility: visible;
  }

  body.use-new-ui .inv-prod-fn-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  body.use-new-ui.inv-prod-fn-sheet-open .inv-prod-fn-sheet.is-open:not(.inv-prod-fn-sheet--sort) .inv-prod-fn-sheet__backdrop,
  body.use-new-ui.inv-prod-sort-sheet-open .inv-prod-fn-sheet--sort.is-open .inv-prod-fn-sheet__backdrop {
    opacity: 1;
  }

  body.use-new-ui .inv-prod-fn-sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(78vh, 560px);
    padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 20px 20px 0 0;
    background: #fff;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.14);
    transform: translateY(100%);
    transition: transform 0.24s ease;
  }

  body.use-new-ui.inv-prod-fn-sheet-open .inv-prod-fn-sheet.is-open:not(.inv-prod-fn-sheet--sort) .inv-prod-fn-sheet__panel,
  body.use-new-ui.inv-prod-sort-sheet-open .inv-prod-fn-sheet--sort.is-open .inv-prod-fn-sheet__panel {
    transform: translateY(0);
  }

  body.use-new-ui .inv-prod-fn-sheet__handle {
    width: 40px;
    height: 4px;
    margin: 10px auto 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.12);
  }

  body.use-new-ui .inv-prod-fn-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  body.use-new-ui .inv-prod-fn-sheet__title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--hydra-text, #0f172a);
  }

  body.use-new-ui .inv-prod-fn-sheet__close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: var(--hydra-bg-warm-soft, #f8fafc);
    font-size: 16px;
    cursor: pointer;
  }

  body.use-new-ui .inv-prod-fn-sheet__body {
    overflow-y: auto;
    max-height: calc(78vh - 88px);
  }

  body.use-new-ui .inv-prod-fn-sheet__section + .inv-prod-fn-sheet__section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
  }

  body.use-new-ui .inv-prod-fn-sheet__section-title {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hydra-text-muted, #64748b);
  }

  body.use-new-ui .inv-prod-fn-sheet__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  body.use-new-ui .inv-prod-fn-sheet__chip {
    padding: 8px 12px;
    border: 1px solid var(--hydra-border-soft);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--hydra-text, #0f172a);
    cursor: pointer;
  }

  body.use-new-ui .inv-prod-fn-sheet__chip.is-active {
    border-color: rgba(249, 115, 22, 0.45);
    background: rgba(255, 237, 213, 0.7);
    color: #c2410c;
  }

  body.use-new-ui .inv-prod-fn-sheet__actions,
  body.use-new-ui .inv-prod-fn-sheet__opts {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  body.use-new-ui .inv-prod-fn-sheet__action,
  body.use-new-ui .inv-prod-fn-sheet__opt {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background: var(--hydra-bg-warm-soft, #f8fafc);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    color: var(--hydra-text, #0f172a);
    cursor: pointer;
  }

  body.use-new-ui .inv-prod-fn-sheet__opt.is-active {
    background: rgba(255, 237, 213, 0.85);
    color: #c2410c;
    font-weight: 800;
  }

  /* Sản phẩm — card list compact (thay table→card cũ) */
  body.use-new-ui.route-inventory .inv-prod-mo-layout,
  body.use-new-ui.route-products .inv-prod-mo-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-toolbar,
  body.use-new-ui.route-products .inv-prod-mo-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-toolbar #addProduct,
  body.use-new-ui.route-products .inv-prod-mo-toolbar #addProduct {
    flex: 1 1 100%;
    min-height: 48px;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-toolbar #productSearch,
  body.use-new-ui.route-products .inv-prod-mo-toolbar #productSearch {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    border-radius: 12px;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-filter-toggle,
  body.use-new-ui.route-products .inv-prod-mo-filter-toggle {
    flex: 0 0 auto;
    min-height: 44px;
    position: relative;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-filter-dot,
  body.use-new-ui.route-products .inv-prod-mo-filter-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f97316;
  }

  body.use-new-ui.route-inventory .inv-prod-mobile-list,
  body.use-new-ui.route-products .inv-prod-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-card.card-product,
  body.use-new-ui.route-products .inv-prod-mo-card.card-product {
    position: relative;
    min-height: auto;
    height: auto;
    max-height: none;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--hydra-border-soft);
    background: #fff;
    box-shadow: var(--hydra-shadow);
    box-sizing: border-box;
    overflow: visible;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-card__head.card-header,
  body.use-new-ui.route-products .inv-prod-mo-card__head.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-card__title-block,
  body.use-new-ui.route-products .inv-prod-mo-card__title-block {
    flex: 1 1 auto;
    min-width: 0;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-card__title,
  body.use-new-ui.route-products .inv-prod-mo-card__title {
    display: block;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--hydra-text, #0f172a);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-card__meta,
  body.use-new-ui.route-products .inv-prod-mo-card__meta {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--hydra-text-muted, #64748b);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-card__meta .inv-prod-meta-part,
  body.use-new-ui.route-products .inv-prod-mo-card__meta .inv-prod-meta-part {
    font-weight: 600;
    color: var(--hydra-text-muted, #64748b);
  }

  body.use-new-ui.route-inventory .inv-prod-mo-card__meta .inv-prod-stock-badge,
  body.use-new-ui.route-products .inv-prod-mo-card__meta .inv-prod-stock-badge {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
  }

  body.use-new-ui.route-inventory .inv-prod-mo-card__menu-wrap,
  body.use-new-ui.route-products .inv-prod-mo-card__menu-wrap {
    position: relative;
    flex-shrink: 0;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-menu-btn,
  body.use-new-ui.route-products .inv-prod-mo-menu-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--hydra-border-soft);
    border-radius: 10px;
    background: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: var(--hydra-text-muted);
    cursor: pointer;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-menu-panel,
  body.use-new-ui.route-products .inv-prod-mo-menu-panel {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 20;
    min-width: 168px;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--hydra-border-soft);
    background: #fff;
    box-shadow: var(--hydra-shadow-md, 0 8px 24px rgba(15, 23, 42, 0.12));
  }

  body.use-new-ui.route-inventory .inv-prod-mo-menu-item,
  body.use-new-ui.route-products .inv-prod-mo-menu-item {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    color: var(--hydra-text, #0f172a);
    cursor: pointer;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-menu-item:hover,
  body.use-new-ui.route-products .inv-prod-mo-menu-item:hover {
    background: var(--hydra-bg-warm-soft, #f8fafc);
  }

  body.use-new-ui.route-inventory .inv-prod-mo-menu-item--danger,
  body.use-new-ui.route-products .inv-prod-mo-menu-item--danger {
    color: #b91c1c;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-menu-item--warning,
  body.use-new-ui.route-products .inv-prod-mo-menu-item--warning {
    color: #ea580c;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-menu-item--warning:hover,
  body.use-new-ui.route-products .inv-prod-mo-menu-item--warning:hover {
    background: #fff7ed;
    color: #c2410c;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-menu-sep,
  body.use-new-ui.route-products .inv-prod-mo-menu-sep {
    display: block;
    height: 0;
    margin: 4px 8px;
    border: 0;
    border-top: 1px solid var(--hydra-border-soft, #e2e8f0);
  }

  body.use-new-ui.route-inventory .inv-prod-mo-card__metrics.card-body,
  body.use-new-ui.route-products .inv-prod-mo-card__metrics.card-body {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-metric,
  body.use-new-ui.route-products .inv-prod-mo-metric {
    min-width: 0;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-metric__label,
  body.use-new-ui.route-products .inv-prod-mo-metric__label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hydra-text-muted);
    line-height: 1.2;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-metric__val,
  body.use-new-ui.route-products .inv-prod-mo-metric__val {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--hydra-text);
    line-height: 1.2;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-empty,
  body.use-new-ui.route-products .inv-prod-mo-empty {
    padding: 24px 16px;
    text-align: center;
    border-radius: 16px;
    border: 1px dashed var(--hydra-border-soft);
    background: #fff;
  }

  body.use-new-ui.route-inventory .inv-prod-mo-drawer,
  body.use-new-ui.route-products .inv-prod-mo-drawer {
    margin-top: 4px;
    border-radius: 16px;
  }

  body.dark.use-new-ui.route-inventory .inv-prod-mo-card.card-product,
  body.dark.use-new-ui.route-products .inv-prod-mo-card.card-product {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(148, 163, 184, 0.18);
  }

}

/* Portal sheets — luôn ẩn trừ khi mở (tránh header "Chức năng" treo đáy màn hình) */
#invProductFnSheet,
#invProductSortSheet {
  display: none !important;
}

#invProductFnSheet.is-open,
#invProductSortSheet.is-open {
  display: block !important;
}

#invProductFnSheet[hidden],
#invProductSortSheet[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 900px) {
  body.use-new-ui.route-inventory #mobileOwnerFab:not([hidden]),
  body.use-new-ui.route-products #mobileOwnerFab:not([hidden]) {
    z-index: 1000 !important;
  }

  body.use-new-ui.route-inventory .mobile-owner-bottom-nav,
  body.use-new-ui.route-products .mobile-owner-bottom-nav {
    z-index: 900;
  }

  body.use-new-ui.inv-prod-fn-sheet-open #invProductFnSheet.is-open,
  body.use-new-ui.inv-prod-sort-sheet-open #invProductSortSheet.is-open {
    z-index: 12050;
  }

  /* —— Tab Lô hàng: card + KPI compact —— */
  body.use-new-ui.route-inventory .inv-mo-stock-toolbar--compact {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px !important;
    margin-bottom: 2px !important;
  }

  body.use-new-ui.route-inventory .inv-mo-stock-toolbar--compact #addBatch {
    grid-column: 1 / -1;
    min-height: 44px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
  }

  body.use-new-ui.route-inventory .inv-mo-stock-toolbar--compact .inv-mo-stock-search {
    min-width: 0 !important;
    min-height: 40px !important;
    font-size: 15px !important;
  }

  body.use-new-ui.route-inventory .inv-mo-stock-toolbar--compact .inv-mo-filter-toggle {
    min-height: 40px !important;
    padding-inline: 12px !important;
    white-space: nowrap;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-kpi-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    width: 100%;
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--hydra-border-soft);
    background: var(--hydra-bg-warm-soft, #faf8f5);
    box-sizing: border-box;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-kpi {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--hydra-text-muted);
    white-space: nowrap;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-kpi em {
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 10px;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-kpi strong {
    font-size: 13px;
    font-weight: 800;
    color: var(--hydra-text);
    font-variant-numeric: tabular-nums;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-kpi--fifo {
    flex: 1 1 100%;
    min-width: 0;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-kpi--fifo strong {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.use-new-ui.route-inventory .inventory-batch-mobile-list {
    gap: 8px !important;
  }

  body.use-new-ui.route-inventory .inv-mo-stock-batch-card--compact {
    gap: 4px !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-compact-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-compact-title {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  body.use-new-ui.route-inventory .inv-mo-stock-batch-card--compact .inv-mo-batch-id {
    font-size: 11px;
    flex-shrink: 0;
  }

  body.use-new-ui.route-inventory .inv-mo-stock-batch-card--compact .inv-mo-product-name--batch {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-compact-head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  body.use-new-ui.route-inventory .inv-mo-stock-batch-card--compact .stock-badge {
    font-size: 10px;
    padding: 2px 7px;
    line-height: 1.2;
  }

  body.use-new-ui.route-inventory .inv-mo-stock-batch-card.is-menu-open {
    position: relative;
    z-index: calc(var(--z-mobile-nav, 200) + 30);
  }

  body.use-new-ui.route-inventory .inv-mo-stock-batch-card.is-menu-open .inv-prod-mo-menu-panel {
    z-index: calc(var(--z-mobile-nav, 200) + 40);
  }

  body.use-new-ui.route-inventory .inv-mo-batch-menu-wrap {
    position: relative;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-menu-btn {
    width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-compact-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--hydra-text-secondary);
  }

  body.use-new-ui.route-inventory .inv-mo-batch-compact-meta strong {
    font-weight: 800;
    color: var(--hydra-text);
    font-variant-numeric: tabular-nums;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-meta-sep {
    color: var(--hydra-text-muted);
    opacity: 0.65;
    user-select: none;
  }

  body.use-new-ui.route-inventory .inv-mo-batch-sup-inline {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    color: var(--hydra-text-muted);
    font-weight: 600;
  }
}

/* Batch adjust-to-zero confirm dialog */
#modal .inv-batch-adjust-confirm {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

#modal .inv-batch-adjust-confirm__batch,
#modal .inv-batch-adjust-confirm__qty {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

#modal .inv-batch-adjust-confirm__note {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

#modal .inv-batch-adjust-confirm__qty-val {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--hydra-text, #0f172a);
}

#modal .inv-batch-adjust-confirm__effects {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--hydra-bg-warm-soft, #f8fafc);
  border: 1px solid var(--hydra-border-soft, #e2e8f0);
  font-size: 13px;
  line-height: 1.45;
}

#modal .inv-batch-adjust-confirm__effects p {
  margin: 0 0 6px;
  font-weight: 600;
}

#modal .inv-batch-adjust-confirm__effects ul {
  margin: 0;
  padding-left: 18px;
}

#modal .inv-batch-adjust-confirm__effects li + li {
  margin-top: 4px;
}

#modal .inv-batch-adjust-confirm__reason {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

#modal .inv-batch-adjust-confirm__reason textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--hydra-border-soft, #e2e8f0);
  font: inherit;
  resize: vertical;
  box-sizing: border-box;
}

#modal .btn.warning {
  border-color: #ea580c;
  background: #f97316;
  color: #fff;
}

#modal .btn.warning:hover:not(:disabled) {
  border-color: #c2410c;
  background: #ea580c;
  color: #fff;
}

body.use-new-ui.route-inventory .inv-batch-actions-compact .btn.warning {
  border-color: #fdba74;
  background: #fff7ed;
  color: #c2410c;
}

body.use-new-ui.route-inventory .inv-batch-actions-compact .btn.warning:hover:not(:disabled) {
  border-color: #f97316;
  background: #ffedd5;
  color: #9a3412;
}

/* Product price history modal (menu ⋮ → Xem lịch sử giá) */
#modal .inv-prod-price-history-modal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#modal .inv-prod-price-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#modal .inv-prod-price-history-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--hydra-border-soft, #e2e8f0);
  background: var(--hydra-bg-warm-soft, #f8fafc);
}

#modal .inv-prod-price-history-item__date {
  font-size: 13px;
  font-weight: 700;
  color: var(--hydra-text, #0f172a);
  margin-bottom: 6px;
}

#modal .inv-prod-price-history-item__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#modal .inv-prod-price-history-item__k {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hydra-text-muted, #64748b);
  line-height: 1.2;
}

#modal .inv-prod-price-history-item__v {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--hydra-text, #0f172a);
}

#modal .inv-prod-price-history-item__note {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

#modal .inv-prod-price-history-empty {
  padding: 20px 12px;
  text-align: center;
}

#modal .inv-prod-price-history-empty__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--hydra-text, #0f172a);
}

#modal .inv-prod-price-history-empty__hint {
  margin: 6px 0 0;
  font-size: 13px;
}

/* Product adjust stock to zero confirm */
#modal .inv-prod-adjust-stock-confirm {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

#modal .inv-prod-adjust-stock-confirm__row {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

#modal .inv-prod-adjust-stock-confirm__qty {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

#modal .inv-prod-adjust-stock-confirm__effects {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--hydra-bg-warm-soft, #f8fafc);
  border: 1px solid var(--hydra-border-soft, #e2e8f0);
  font-size: 13px;
  line-height: 1.45;
}

#modal .inv-prod-adjust-stock-confirm__effects p {
  margin: 0;
}

#modal .inv-prod-adjust-stock-confirm__effects p + p {
  margin-top: 4px;
}

#modal .inv-prod-adjust-stock-confirm__reason {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

#modal .inv-prod-adjust-stock-confirm__reason textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--hydra-border-soft, #e2e8f0);
  font: inherit;
  resize: vertical;
  box-sizing: border-box;
}
