/* Sales OS › Theo dõi › Tồn kho — cùng bố cục / bảng màu tab Tồn theo kho của Kho vận (css/wh/warehouse.css).
   Mọi luật khoá trong #tab-ton-kho; nạp lười qua <link disabled data-tab="ton-kho"> (js/lazy-load.js). */
#tab-ton-kho {
  --tk-ink: #0a2540; --tk-muted: #697386; --tk-soft: #94a4b6; --tk-line: #e3e8ee; --tk-line-2: #f1f5f9;
  --tk-head: #f6f9fb; --tk-hover: #f6f9fb; --tk-cobalt: #2563EB; --tk-ring: rgba(37, 99, 235, .18); --tk-neg: #dc2626;
  --tk-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  color: var(--tk-ink);
}
#tab-ton-kho .stk-card { background: #fff; border: 1px solid var(--tk-line); border-radius: 10px; padding: 20px; box-shadow: 0 1px 2px rgba(10, 37, 64, .04); }

#tab-ton-kho .stk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
#tab-ton-kho .stk-title { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--tk-mono); font-size: 15px; font-weight: 700; color: var(--tk-ink); }
#tab-ton-kho .ic { flex: none; width: 16px; height: 16px; }
#tab-ton-kho .stk-title .ic { width: 18px; height: 18px; color: var(--tk-cobalt); }
#tab-ton-kho .stk-meta { font-size: 12px; font-weight: 400; color: var(--tk-soft); }
#tab-ton-kho .stk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

#tab-ton-kho .stk-q { display: inline-flex; align-items: center; gap: 6px; height: 34px; box-sizing: border-box; min-width: 200px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; cursor: text; }
#tab-ton-kho .stk-q .ic { color: var(--tk-muted); }
#tab-ton-kho .stk-q input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: inherit; font-size: 13px; }
#tab-ton-kho .stk-q:focus-within { border-color: var(--tk-cobalt); box-shadow: 0 0 0 3px var(--tk-ring); }
#tab-ton-kho .stk-ck { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; cursor: pointer; user-select: none; }
#tab-ton-kho .stk-ck input { width: 15px; height: 15px; margin: 0; accent-color: var(--tk-cobalt); cursor: pointer; }
#tab-ton-kho .stk-ck-exp { color: #b91c1c; }
#tab-ton-kho .stk-dot { width: 9px; height: 9px; border-radius: 50%; background: #dc2626; }
#tab-ton-kho .stk-reload,
#tab-ton-kho .stk-retry { display: inline-flex; align-items: center; justify-content: center; height: 34px; min-width: 34px; padding: 0 10px; border: 1px solid var(--tk-line); border-radius: 6px; background: #fff; color: var(--tk-ink); font-size: 13px; font-weight: 600; cursor: pointer; }
#tab-ton-kho .stk-reload:hover,
#tab-ton-kho .stk-retry:hover { background: var(--tk-hover); }
#tab-ton-kho .stk-reload:focus-visible,
#tab-ton-kho .stk-retry:focus-visible,
#tab-ton-kho .stk-chip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tk-ring); }

#tab-ton-kho .stk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
#tab-ton-kho .stk-chip { height: 32px; padding: 0 12px; border: 1px solid var(--tk-line); border-radius: 6px; background: #fff; color: var(--tk-ink); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
#tab-ton-kho .stk-chip small { opacity: .7; }
#tab-ton-kho .stk-chip:hover { background: var(--tk-hover); }
#tab-ton-kho .stk-chip.is-on { background: var(--tk-cobalt); border-color: var(--tk-cobalt); color: #fff; font-weight: 600; }

#tab-ton-kho .stk-scroll { overflow: auto; max-height: calc(100vh - 280px); }
#tab-ton-kho .stk-sec { margin: 6px 0 8px; padding: 6px 10px; border-left: 4px solid #6366f1; border-radius: 4px; background: var(--tk-line-2); color: #334155; font-size: 14px; font-weight: 700; }
#tab-ton-kho .stk-sec small { color: #64748b; font-weight: 400; }
#tab-ton-kho .stk-tbl { width: 100%; margin-bottom: 18px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
#tab-ton-kho .stk-tbl th { position: sticky; top: 0; z-index: 5; height: 44px; box-sizing: border-box; padding: 10px 12px; background: var(--tk-head); border-bottom: 1px solid var(--tk-line); color: var(--tk-muted); font-family: var(--tk-mono); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
#tab-ton-kho .stk-tbl td { padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--tk-line-2); vertical-align: middle; }
#tab-ton-kho .stk-tbl tbody tr:not(.stk-grp):hover td:not([class*="stk-c-"]) { background: var(--tk-hover); }
#tab-ton-kho .stk-tbl .num { font-family: var(--tk-mono); text-align: right; white-space: nowrap; }
#tab-ton-kho .stk-tbl .num.zero { color: var(--tk-soft); }
#tab-ton-kho .stk-tbl .neg,
#tab-ton-kho .stk-tbl .neg b { color: var(--tk-neg); }
#tab-ton-kho .stk-tbl td small { display: block; color: #94a3b8; font-size: 10.5px; font-weight: 400; }
#tab-ton-kho .stk-tbl .stk-sku { position: sticky; left: 0; z-index: 1; white-space: nowrap; }
#tab-ton-kho .stk-tbl th.stk-sku { z-index: 6; }
#tab-ton-kho .stk-tbl .stk-name { min-width: 180px; }
#tab-ton-kho .stk-nil { color: #cbd5e1; }

#tab-ton-kho .stk-tbl th.stk-c-tot { background: #eef2ff; }
#tab-ton-kho .stk-tbl td.stk-c-tot { background: #f5f7ff; }
#tab-ton-kho .stk-tbl .stk-c-pack { background: #fefce8; }
#tab-ton-kho .stk-tbl .stk-c-cho { background: #fff7ed; }
#tab-ton-kho .stk-tbl .stk-c-cho b { color: #c2410c; }
#tab-ton-kho .stk-tbl .stk-c-mau { background: #f5f3ff; }
#tab-ton-kho .stk-tbl .stk-c-mau b { color: #7c3aed; }
#tab-ton-kho .stk-tbl .stk-c-ban { background: #ecfdf5; }
#tab-ton-kho .stk-tbl th.stk-c-hsd { background: #fef2f2; }
#tab-ton-kho .stk-tbl td.stk-c-hsd { text-align: center; white-space: nowrap; font-family: var(--tk-mono); }
#tab-ton-kho .stk-tbl td.stk-c-hsd.is-soon { background: #fef2f2; color: #dc2626; font-weight: 700; }
#tab-ton-kho .stk-tbl td.stk-c-hsd.is-expired { background: #fee2e2; color: #b91c1c; font-weight: 700; }

#tab-ton-kho .stk-tbl .stk-grp td { background: #eef2ff; font-weight: 600; }
#tab-ton-kho .stk-tbl .stk-grp td.stk-c-tot { background: #e0e7ff; }
#tab-ton-kho .stk-tbl .stk-grp td.stk-c-pack { background: #fefce8; }
#tab-ton-kho .stk-tbl .stk-grp td.stk-c-cho { background: #fff7ed; }
#tab-ton-kho .stk-tbl .stk-grp td.stk-c-mau { background: #f5f3ff; }
#tab-ton-kho .stk-tbl .stk-grp td.stk-c-ban,
#tab-ton-kho .stk-tbl .stk-sum td.stk-c-ban { background: #d1fae5; }
#tab-ton-kho .stk-tbl .stk-grp .stk-sku small { display: inline; color: var(--tk-muted); font-size: 12px; font-weight: 400; }
#tab-ton-kho .stk-tbl .stk-sum td { background: var(--tk-line-2); font-weight: 700; border-bottom: 0; }
#tab-ton-kho .stk-tbl .stk-sum td.stk-c-tot { background: #e0e7ff; }
#tab-ton-kho .stk-tbl .stk-sum td.stk-c-cho { background: #fff7ed; }
#tab-ton-kho .stk-tbl .stk-sum td.stk-c-mau { background: #f5f3ff; }

#tab-ton-kho .stk-msg { padding: 32px 16px; color: var(--tk-muted); font-size: 14px; text-align: center; }
#tab-ton-kho .stk-err { color: #b91c1c; }
#tab-ton-kho .stk-retry { margin-left: 8px; color: var(--tk-cobalt); }

@media (max-width: 640px) {
  #tab-ton-kho .stk-card { padding: 14px; }
  #tab-ton-kho .stk-tools { width: 100%; }
  #tab-ton-kho .stk-q { flex: 1 1 100%; min-width: 0; }
  #tab-ton-kho .stk-tbl { font-size: 12px; }
  #tab-ton-kho .stk-tbl th,
  #tab-ton-kho .stk-tbl td { padding: 8px; }
  #tab-ton-kho .stk-tbl .stk-name { min-width: 130px; }
}
