:root {
  --bg: #f2f4f7; --panel: #fff; --ink: #1d2433; --muted: #6b7385; --line: #e2e6ee;
  --brand: #1565c0; --brand-d: #0d47a1; --brand-l: #e8f0fc; --sell: #2e7d32;
  --neg: #c62828; --pos: #2e7d32; --warn-bg: #fff4e0; --warn: #8a5300; --err-bg: #fdecec;
  --own: #7b3fbf; --own-l: #f3ecfb;
  font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--ink); }
button, input, select { font: inherit; color: inherit; }
.boot { padding: 40px; color: var(--muted); }

/* Top bar */
.top { display: flex; align-items: center; gap: 8px; background: var(--brand); color: #fff; padding: 0 16px; height: 50px; position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 700; cursor: pointer; white-space: nowrap; margin-right: 12px; }
.top nav { display: flex; gap: 2px; overflow-x: auto; }
.top nav a { color: #dfe9fb; text-decoration: none; padding: 15px 12px; white-space: nowrap; }
.top nav a:hover { background: rgba(255,255,255,.08); }
.top nav a.on { color: #fff; background: var(--brand-d); }
.grow { flex: 1; }
.btn { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 7px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { border-color: #b9c3d6; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-d); }
.btn.danger { color: var(--neg); border-color: #f0c2c2; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn.sell { background: var(--sell); color: #fff; border-color: var(--sell); font-weight: 600; }
.icon-btn { border: 0; background: transparent; cursor: pointer; padding: 4px 6px; border-radius: 4px; color: var(--muted); }
.icon-btn:hover { background: var(--bg); }
.link { border: 0; background: none; color: var(--brand); cursor: pointer; padding: 0; text-decoration: underline; font-size: inherit; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 3px 10px; cursor: pointer; font-size: 12px; margin: 2px; }
.chip:hover { border-color: var(--brand); color: var(--brand); }

/* Pages */
.main { padding: 16px; }
.page { max-width: 1400px; margin: 0 auto; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 20px; }
.filters { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; align-items: center; }
.filters select, .fld select, .fld input, .search { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; background: #fff; }
.search { width: 100%; padding: 11px 14px; font-size: 15px; border: 2px solid var(--brand); }
.search.sm { padding: 7px 10px; font-size: 14px; border-width: 1px; border-color: var(--line); width: 320px; max-width: 100%; }
.check { display: flex; align-items: center; gap: 6px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .strong { font-weight: 600; }
.neg { color: var(--neg); } .pos { color: var(--pos); }
.empty { padding: 24px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: 8px; }
.empty.big { padding: 60px 20px; border: 0; background: transparent; font-size: 15px; }

/* Tables */
.tbl-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 600; background: #f7f9fc; color: #3b4558; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl.click tbody tr { cursor: pointer; }
.tbl.click tbody tr:hover { background: var(--brand-l); }
.tbl.compact td { padding: 6px 4px; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl .actions { white-space: nowrap; text-align: right; }
.tbl .actions .btn { margin-left: 4px; }
tr.cancelled td { color: var(--muted); text-decoration: line-through; }

.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 600; vertical-align: middle; }
.q-genuine { background: #e3f2e6; color: #1b5e20; }
.q-oem { background: #e3eefc; color: #0d47a1; }
.q-after { background: #fff1db; color: #8a5300; }
.q-used { background: #eceff3; color: #4b5565; }

/* Stats + cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 24px; font-weight: 700; margin-top: 4px; }
.stat.good .stat-value { color: var(--pos); } .stat.bad .stat-value { color: var(--neg); }
.stat-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.card h3 { margin: 0 0 10px; font-size: 15px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.bar { width: 100%; max-width: 46px; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar-val { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.bar-lbl { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* POS */
.main.pos-mode { padding: 0; }
.pos-screen { display: flex; flex-direction: column; height: calc(100vh - 50px); }
.pos-tabs { display: flex; align-items: center; gap: 4px; padding: 6px 12px 0; background: #dfe7f3; }
.pos-tab { padding: 7px 10px 7px 14px; background: #c9d6ea; border-radius: 6px 6px 0 0; cursor: pointer; display: flex; align-items: center; gap: 6px; border: 0; }
.pos-tab.on { background: #fff; font-weight: 600; }
.pos-tab.add { padding: 7px 12px; }
.pos-tab .x { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 11px; }
.pos-tabs .hint { margin-left: auto; font-size: 12px; color: var(--muted); }
.pos-main { flex: 1; display: grid; grid-template-columns: 1fr 360px; min-height: 0; background: #fff; }
.pos-left { display: flex; flex-direction: column; min-height: 0; padding: 12px; border-right: 1px solid var(--line); }
.lines { flex: 1; overflow: auto; margin-top: 10px; }
.pos-right { padding: 12px 14px; overflow: auto; display: flex; flex-direction: column; gap: 8px; background: #fbfcfe; }
.search-wrap { position: relative; }
.results { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 0 0 8px 8px; box-shadow: 0 8px 24px rgba(20,30,60,.15); z-index: 20; max-height: 60vh; overflow: auto; }
.res { display: flex; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.res.hi { background: var(--brand-l); }
.res.out .res-main strong { color: var(--muted); }
.res-main { flex: 1; min-width: 0; } .res-side { text-align: right; padding-left: 12px; }
.res-empty { padding: 12px; color: var(--muted); }
.alts { flex-basis: 100%; margin-top: 6px; font-size: 12px; color: var(--warn); background: var(--warn-bg); padding: 6px 8px; border-radius: 6px; }
.lines-tbl td { vertical-align: middle; }
.lines-tbl tr.overridden { background: var(--own-l); }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.qty button { border: 0; background: #f4f6fa; width: 26px; cursor: pointer; }
.qty input { width: 40px; border: 0; text-align: center; padding: 5px 0; }
.qty-in { width: 60px; text-align: right; border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; }
select.lvl { border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; background: #fff; max-width: 230px; }
select.lvl.lvl-own { border-color: var(--own); color: var(--own); font-weight: 600; }
.lvl-note { margin-top: 3px; }
.tag-own { color: var(--own); font-weight: 600; }
input.money { width: 110px; text-align: right; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; background: #fff; }
input.money.warn-input { border-color: var(--neg); background: var(--err-bg); }
/* Ô nhập: nhãn (kể cả dấu * và chú thích phụ) nằm trên một dòng, ô nhập xuống dòng dưới.
   Dùng block thay vì flex-column để chữ nhãn và <span> không bị tách thành nhiều dòng. */
.fld { display: block; font-size: 13px; font-weight: 500; color: #3b4558; line-height: 1.35; min-width: 0; }
.fld input, .fld select { width: 100%; }
.fld > input, .fld > select, .fld > textarea { display: block; margin-top: 5px; }
.fld > input[type="checkbox"], .fld > input[type="radio"] { display: inline-block; width: auto; margin: 0 6px 0 0; }
.fld > .cat-field, .fld > .pw-box, .fld > div:not(.fld-hint) { margin-top: 5px; }
.fld > .muted, .fld > .small { font-weight: 400; }
.fld-err { display: block; margin-top: 4px; font-weight: 400; }
.req { margin-left: 2px; font-weight: 700; }
.row2 { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }
.cust-info { background: var(--brand-l); border-radius: 6px; padding: 6px 8px; }
.sum { border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.sum.narrow { max-width: 420px; margin-left: auto; margin-top: 12px; }
.sum-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sum-row.big { font-size: 18px; font-weight: 700; color: var(--brand-d); }
.sum-row input.money { width: 140px; }
.pay-methods { display: flex; gap: 4px; }
.seg { flex: 1; border: 1px solid var(--line); background: #fff; padding: 6px 4px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.seg.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.quick { display: flex; justify-content: flex-end; }
.qr-box { border: 1px dashed var(--brand); border-radius: 8px; padding: 12px; text-align: center; color: var(--brand-d); }
.alert { padding: 7px 10px; border-radius: 6px; font-size: 13px; }
.alert.err { background: var(--err-bg); color: var(--neg); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.btn.pay { justify-content: center; padding: 14px; font-size: 16px; font-weight: 700; background: var(--sell); border-color: var(--sell); margin-top: auto; }

/* Tab con trong mục Hàng hóa */
.subnav { max-width: 1400px; margin: -4px auto 14px; display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.subnav a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a.on { color: var(--brand); border-color: var(--brand); font-weight: 600; }

/* Nhân viên & hoa hồng */
.narrow-page { max-width: 760px; }
.pbar { height: 4px; background: var(--line); border-radius: 2px; margin-top: 5px; max-width: 220px; }
.pbar div { height: 100%; background: var(--brand); border-radius: 2px; }
.tier-0 { background: #eceff3; color: #4b5565; }
.tier-1 { background: #e3eefc; color: #0d47a1; }
.tier-2 { background: #e3f2e6; color: #1b5e20; }
.tier-3 { background: #fff1db; color: #8a5300; }

/* Thiết lập giá */
.lv-head { display: inline-flex; align-items: center; gap: 2px; }
.lv-head .icon-btn { font-size: 12px; padding: 2px 4px; }
.lv-tag { font-size: 10px; font-weight: 600; color: var(--muted); display: block; }
.alert.ok { background: #e6f4ea; color: var(--pos); margin-bottom: 10px; cursor: pointer; }
.savebar { display: flex; align-items: center; gap: 8px; background: #fff8e1; border: 1px solid #f3d27a; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; position: sticky; top: 58px; z-index: 5; }
.price-wrap { max-height: calc(100vh - 230px); }
.price-tbl td { vertical-align: middle; }
.price-tbl input.money { width: 105px; }
input.money.chg { background: #fff3c4; border-color: #e0b100; font-weight: 600; }
tr.selrow { background: var(--brand-l); }

/* Modal + forms */
.modal-back { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 50; overflow: auto; }
.modal { background: #fff; border-radius: 10px; width: 520px; max-width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: 960px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: start; }
.span2 { grid-column: span 2; }
.sec { margin: 6px 0 0; font-size: 14px; }
.tabs-sm { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs-sm button { border: 0; background: none; padding: 6px 12px; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs-sm button.on { border-color: var(--brand); color: var(--brand); font-weight: 600; }

/* Print */
.print-area { font-size: 13px; max-width: 380px; margin: 0 auto; }
.pr-center { text-align: center; }
.print-area h4 { margin: 10px 0 2px; }
.pr-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.pr-table th, .pr-table td { border-bottom: 1px dashed #bbb; padding: 4px 2px; text-align: right; vertical-align: top; }
.pr-table th:first-child, .pr-table td:first-child { text-align: left; }
.pr-row { display: flex; justify-content: space-between; padding: 2px 0; }
.pr-row.strong { font-weight: 700; }
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; width: 80mm; }
}

@media (max-width: 900px) {
  .pos-screen { height: auto; }
  .pos-main { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; } .span2 { grid-column: span 1; }
  .pos-tabs .hint { display: none; }
}
.tbl tr.grp-start td { border-top: 2px solid #cfd6e2; }
.colpick { position: relative; }
.colpick-menu { position: fixed; z-index: 90; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 8px 12px; box-sizing: border-box; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.colpick-menu .check { white-space: nowrap; }
.colpick-foot { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; font-size: 13px; }
/* Popup vừa một màn hình: chỉ phần bảng cuộn */
.modal.fit { display: flex; flex-direction: column; max-height: calc(100vh - 80px); }
.modal.fit .modal-body { flex: 1; min-height: 0; overflow: hidden; }
.inv-info { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.inv-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inv-tools .search { max-width: 320px; }
.inv-lines { flex: 1; min-height: 140px; overflow: auto; }
.inv-sums { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 24px; border-top: 1px solid var(--line); padding-top: 8px; }
.inv-sums > div { display: flex; flex-direction: column; align-items: flex-end; }
.inv-sums .big strong { font-size: 18px; color: var(--brand); }
.inv-sums .neg strong { color: var(--neg); }
.print-only { display: none; }
@media print { .print-only { display: block; } }
.print-pick { display: inline-flex; gap: 6px; align-items: center; }
.print-dlg { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.paper-list { display: flex; flex-direction: column; gap: 8px; }
.paper-card { display: flex; align-items: center; gap: 10px; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; color: inherit; }
.paper-card:hover { border-color: #b9c6dc; }
.paper-card.on { border-color: var(--brand); background: #f1f6ff; }
.paper-icon { font-size: 26px; }
.paper-text { display: flex; flex-direction: column; flex: 1; }
.paper-text strong { font-size: 15px; }
.paper-preview { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.preview-box { background: #e9edf3; border: 1px solid var(--line); max-height: 58vh; overflow-x: hidden; overflow-y: auto; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.preview-box iframe { border: 0; background: #fff; display: block; }
@media (max-width: 760px) { .print-dlg { grid-template-columns: 1fr; } }
.cat-field { display: flex; gap: 4px; align-items: center; }
.cat-field select { flex: 1; min-width: 0; }
.cat-field .icon-btn { border: 1px solid var(--line); border-radius: 6px; width: 32px; height: 32px; background: #fff; }
.cat-field .icon-btn.add { color: var(--brand); font-weight: 700; }
.cat-add-row { display: flex; gap: 6px; }
.cat-add-row input { flex: 1; }
.q-x1 { background: #f1e6fb; color: #5b2a86; }
.q-x2 { background: #def5f2; color: #00695c; }
.q-x3 { background: #fde6ee; color: #9c1c4a; }
.q-x4 { background: #efe7df; color: #5d4037; }
/* Lịch sử công nợ: gọn, một màn hình */
.debt-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.debt-sum { display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: baseline; padding: 7px 12px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--muted); }
.debt-sum b { color: var(--ink); font-size: 14px; margin-left: 4px; }
.debt-sum .neg b { color: var(--neg); }
.debt-sum .pos b { color: var(--pos); }
.debt-sum .end { margin-left: auto; }
.debt-sum .end b { font-size: 16px; color: var(--brand); }
.debt-lines { flex: 1; min-height: 160px; overflow: auto; }
.tbl tr.sub-row td { background: #f7f9fc; font-weight: 600; }
.nowrap { white-space: nowrap; }
.cust-type { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.note-box { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: inherit; resize: vertical; }
.cust-note { background: #fff8e1; border: 1px solid #f3d27a; border-radius: 6px; padding: 6px 8px; color: #6b4f00; white-space: pre-wrap; }
.cust-type .pay-methods { display: inline-flex; grid-template-columns: none; width: auto; margin: 0; }
.cust-type .seg { white-space: nowrap; padding: 7px 18px; flex: none; }
.cust-type > .muted { white-space: nowrap; }
.tbl tr.inactive td { color: var(--muted); background: #fafafa; }
.stop-sell { align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px dashed #e0b4b4; border-radius: 6px; background: #fff7f7; }
/* Trạng thái đang / ngừng */
.status-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fc; flex-wrap: wrap; }
.status-row.off { background: #fff6f6; border-color: #f0caca; }
.switch { position: relative; width: 40px; height: 22px; border-radius: 11px; border: 0; background: #c8ced8; cursor: pointer; padding: 0; transition: background .15s; flex: none; }
.switch span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.switch.on { background: var(--pos); }
.switch.on span { left: 21px; }
.status-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.status-tabs button { border: 0; background: none; padding: 7px 12px; cursor: pointer; font: inherit; font-size: 13px; color: var(--muted); border-right: 1px solid var(--line); }
.status-tabs button:last-child { border-right: 0; }
.status-tabs button.on { background: var(--brand); color: #fff; }
.tbl tr.inactive td { color: var(--muted); }
.revive { margin-left: 8px; }
/* Thanh lọc bên trái */
.with-side { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: start; }
.side-filter { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; position: sticky; top: 62px; max-height: calc(100vh - 80px); overflow: auto; }
.sf-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sf-head strong { flex: 1; }
.sf-setup { background: #f7f9fc; border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; display: flex; flex-direction: column; gap: 3px; }
.sf-sec { border-top: 1px solid var(--line); padding: 6px 0; }
.sf-title { width: 100%; display: flex; justify-content: space-between; align-items: center; border: 0; background: none; padding: 4px 0; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink); }
.sf-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); vertical-align: middle; }
.sf-opts { display: flex; flex-direction: column; gap: 1px; padding-top: 2px; }
.sf-opts.scroll { max-height: 220px; overflow: auto; }
.sf-opt { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.sf-opt:hover { background: #f2f5fa; }
.sf-opt.on { background: var(--brand-l); }
.sf-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-count { color: var(--muted); font-size: 12px; }
@media (max-width: 900px) { .with-side { grid-template-columns: 1fr; } .side-filter { position: static; max-height: none; } }
/* Bộ lọc dạng ô thả xuống */
.sf-field { display: flex; flex-direction: column; gap: 3px; padding: 6px 0; border-top: 1px solid var(--line); }
.sf-name { font-size: 12px; font-weight: 600; color: #3b4558; }
.sf-field select, .mdrop-btn { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fff; font: inherit; font-size: 13px; }
.sf-field select.on, .mdrop-btn.on { border-color: var(--brand); background: var(--brand-l); }
.mdrop { position: relative; }
.mdrop-btn { display: flex; justify-content: space-between; align-items: center; gap: 6px; cursor: pointer; text-align: left; }
.mdrop-btn span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdrop-menu { position: absolute; left: 0; top: calc(100% + 4px); z-index: 40; width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 8px; }
.mdrop-q { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; }
.mdrop-list { max-height: 240px; overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.mdrop-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }
.side-filter { overflow: visible; max-height: none; }
/* Thu gọn thanh lọc */
.with-side { grid-template-columns: auto minmax(0, 1fr); }
.side-filter { width: 220px; }
.side-filter.collapsed { width: 36px; padding: 0; overflow: hidden; }
.sf-open { width: 100%; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0; color: var(--brand); font: inherit; font-weight: 600; }
.sf-open:hover { background: var(--brand-l); }
.sf-vert { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; letter-spacing: .5px; }
.sf-badge { background: var(--brand); color: #fff; border-radius: 9px; font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 4px; }
@media (max-width: 900px) { .side-filter { width: auto; } .side-filter.collapsed { width: auto; } .side-filter.collapsed .sf-open { flex-direction: row; justify-content: center; } .side-filter.collapsed .sf-vert { writing-mode: horizontal-tb; transform: none; } }
.unit-tbl select { border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; }
.unit-tbl .qty-in { width: 64px; }
.line-unit { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.line-unit select, .line-unit-sel { border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; font-size: 12px; background: #fff; }
.uom-sel { border: 1px solid var(--line); border-radius: 6px; padding: 2px 4px; font-size: 12px; background: #fff; max-width: 110px; }
/* Thẻ kho */
.stock-card { display: flex; flex-direction: column; gap: 8px; }
.card-facts { display: flex; flex-wrap: wrap; gap: 4px 24px; color: var(--muted); }
.card-facts strong { color: var(--ink); }
.stock-lines { max-height: 46vh; overflow: auto; }
.kind-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; }
.k-PN { background: #e3f2e6; color: #1b5e20; }
.k-HD { background: #e3eefc; color: #0d47a1; }
.k-KK { background: #fff1db; color: #8a5300; }
.k-cancel { background: #fde6ee; color: #9c1c4a; }
.ret-list { background: #fff6f6; border: 1px solid #f0caca; border-radius: 8px; padding: 6px 10px; }
/* Trả / đổi hàng ở màn Bán hàng */
.ret-box { border: 1px solid #f0caca; background: #fffafa; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.ret-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ret-lines { max-height: 32vh; overflow: auto; background: #fff; border-radius: 6px; }
.ret-sub { margin: 4px 0 6px; }
.ret-tab { color: #9c1c4a; font-weight: 600; }
.btn.pay.ret { background: #b23a5a; border-color: #b23a5a; }
/* Thuộc tính & biến thể */
.variant-sec { display: flex; flex-direction: column; gap: 8px; }
.attr-rows { display: flex; flex-direction: column; gap: 6px; }
.attr-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.attr-name { min-width: 90px; font-weight: 600; font-size: 13px; }
.attr-row select, .attr-add select { border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; min-width: 150px; }
.attr-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-add { display: inline-flex; gap: 4px; align-items: center; }
.inline-add input { border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; width: 170px; }
.sib-box { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #f9fbfe; }
.sib-box tr.clickable { cursor: pointer; } .sib-box tr.clickable:hover { background: var(--brand-l); }
.attr-pick { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }
.attr-vals { border-top: 1px solid var(--line); padding: 8px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.chip-check { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px; cursor: pointer; font-size: 13px; }
.chip-check.on { border-color: var(--brand); background: var(--brand-l); }
.chip-check input { margin: 0; }
.variant-preview { margin: 0; padding-left: 18px; columns: 2; font-size: 13px; }
.attr-chip { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #f1e6fb; color: #5b2a86; margin-left: 4px; vertical-align: middle; }
.user-switch { display: inline-flex; align-items: center; gap: 4px; color: #dfe9fb; font-size: 13px; }
.user-switch select { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; padding: 4px 6px; max-width: 200px; }
.user-switch option { color: #1d2433; }
.del-box { display: flex; flex-direction: column; gap: 8px; }
.perm-box { border: 1px solid #f3d27a; background: #fff8e1; border-radius: 8px; padding: 8px 10px; }
/* Ô bắt buộc, thông báo đã lưu */
.req { color: var(--neg); font-weight: 700; }
.fld-err { color: var(--neg); font-size: 12px; }
.has-err input, .has-err select, .has-err .money { border-color: var(--neg) !important; background: #fff6f6; }
.toast-saved { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #e6f4ea; border: 1px solid #b7dfc2; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; color: #1b5e20; }
.toast-saved strong { color: #14411b; }
.tbl tr.just-saved td { background: #fff8d6; transition: background 1s; }
/* Giảm giá đ / % */
.disc-cell { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.disc-mode { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; flex: none; }
.disc-mode button { border: 0; background: #fff; padding: 4px 7px; font-size: 12px; cursor: pointer; color: var(--muted); }
.disc-mode button.on { background: var(--brand); color: #fff; }
.disc-cell .money { width: 90px; }
.pct-in { width: 56px; text-align: right; border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; }
/* Hộp đơn giá / giảm giá */
.price-cell, .inv-disc { position: relative; }
.price-btn { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 0; border: 1px dashed transparent; background: none; border-radius: 6px; padding: 4px 6px; cursor: pointer; font: inherit; color: inherit; position: relative; min-width: 90px; }
.price-btn:hover { border-color: var(--brand); background: var(--brand-l); }
.price-btn span:first-child, .price-btn > span:not(.edit-hint):not(.disc-tag) { font-weight: 600; }
.price-btn.low { border-color: #f0b3b3; }
.inv-disc .price-btn { flex-direction: row; align-items: center; gap: 6px; }
.edit-hint { position: absolute; left: 4px; top: 4px; font-size: 11px; color: var(--muted); opacity: 0; }
.price-btn:hover .edit-hint { opacity: 1; }
.disc-tag { font-size: 11px; color: #9c1c4a; background: #fde6ee; border-radius: 8px; padding: 0 6px; }
.price-pop { position: absolute; z-index: 60; top: calc(100% + 4px); right: 0; width: 290px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; text-align: left; font-weight: normal; }
.price-pop.right { right: 0; }
.pop-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.pop-row.total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; }
.pop-num { width: 120px; text-align: right; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; }
.pop-disc { display: flex; gap: 6px; align-items: center; }
.pop-disc .pop-num { width: 96px; }
.seg2 { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg2 button { border: 0; background: #fff; padding: 5px 8px; font-size: 12px; cursor: pointer; color: var(--muted); }
.seg2 button.on { background: var(--brand); color: #fff; }
.pop-quick { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.pop-foot { display: flex; justify-content: flex-end; }
/* Báo giá */
.quote-tab { color: #0d47a1; font-weight: 600; }
.quote-bar { background: #e8f0fc; border: 1px solid #c6d8f5; border-radius: 8px; padding: 7px 10px; margin-bottom: 8px; font-size: 13px; }
.quote-btn { width: 100%; justify-content: center; margin-top: 6px; }
/* Hộp giá bán gần đây */
.line-name { display: flex; align-items: center; gap: 6px; position: relative; }
.more-btn { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 0 7px; line-height: 18px; cursor: pointer; color: var(--muted); font-weight: 700; }
.more-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-l); }
.hist-pop { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; width: 440px; max-width: 80vw; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-weight: normal; }
.hist-head { display: flex; align-items: center; gap: 8px; }
.hist-head strong { flex: 1; }
.hist-list { max-height: 260px; overflow: auto; }
.price-pick { border: 1px solid transparent; background: none; border-radius: 6px; padding: 2px 6px; cursor: pointer; font: inherit; font-weight: 600; color: var(--brand); }
.price-pick:hover { border-color: var(--brand); background: var(--brand-l); }
.price-pick.cur { background: #e6f4ea; color: #1b5e20; }
/* Báo cáo */
.seg2.big button { padding: 7px 12px; font-size: 13px; }
.report-tbl .pbar { margin-top: 4px; }
.unsold { margin-top: 12px; }
.unsold summary { cursor: pointer; }
.tbl tr.ret-row td { background: #fff6f6; }
.sf-dates { display: flex; flex-direction: column; gap: 4px; }
.sf-dates input { border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; font: inherit; font-size: 13px; }
.chips-on { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.chip-on { font-size: 12px; background: var(--brand-l); color: var(--brand); border-radius: 10px; padding: 2px 8px; }
/* Báo cáo nhân viên */
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.kpi { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }
.kpi-v { font-size: 17px; font-weight: 700; }
.insights { background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.insights ul { margin: 4px 0 0 18px; padding: 0; }
.grid2.tight { gap: 12px; }
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
/* Dự kiến đặt hàng */
.reorder-tbl td { vertical-align: middle; }
.sup-sel { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; max-width: 190px; font-size: 12px; }
.reorder-tbl .qty-in { width: 64px; }
.order-box { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.order-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
/* Thiết lập */
.settings-page .set-card { margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.settings-page .set-card h3 { margin: 0; }
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { display: flex; gap: 8px; border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: #fff; }
.choice.on { border-color: var(--brand); background: #f1f6ff; }
.choice > span { display: flex; flex-direction: column; gap: 2px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.num-suffix { display: inline-flex; align-items: center; gap: 6px; }
.num-suffix input { width: 70px; text-align: right; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.pin-box { border-top: 1px solid var(--line); padding-top: 8px; }
.pin-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pin-row input { border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; width: 150px; }
@media (max-width: 760px) { .choice-cards { grid-template-columns: 1fr; } }

/* Nhóm hàng cha / con */
.sf-field { position: relative; }
.sf-name { display: flex; align-items: center; justify-content: space-between; }
.sf-add { border: 1px solid var(--line); background: #fff; color: var(--brand); border-radius: 5px; width: 22px; height: 20px; line-height: 16px; padding: 0; cursor: pointer; font-size: 13px; font-weight: 700; }
.sf-add:hover { background: var(--brand-l); border-color: var(--brand); }
.sf-pop { position: absolute; left: calc(100% + 14px); top: -6px; z-index: 60; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(20,30,50,.18); padding: 12px; }
.sf-pop::before { content: ''; position: absolute; left: -7px; top: 16px; width: 12px; height: 12px; background: #fff; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.sf-pop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sf-pop-head .x { border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--muted); line-height: 1; }
.cat-add-form { display: flex; flex-direction: column; gap: 9px; }
.cat-add-form .seg2 { align-self: flex-start; }
.cat-add-form .fld select, .cat-add-form .fld input { width: 100%; }
.cat-add-form .pop-foot { gap: 6px; }
.cat-add-card { padding: 12px; margin-bottom: 8px; }
.cat-root { font-weight: 600; }
.cat-child { color: #3b4558; }
.req { color: #d0342c; }
@media (max-width: 760px) { .sf-pop { left: 0; top: 100%; width: min(300px, calc(100vw - 32px)); } .sf-pop::before { display: none; } }

.sf-del { margin-left: 2px; border: 0; background: none; cursor: pointer; font-size: 12px; padding: 0 3px; opacity: 0; border-radius: 4px; }
.sf-opt:hover .sf-del { opacity: .55; }
.sf-opt:hover .sf-del:hover:not([disabled]) { opacity: 1; background: #fde8e7; }
.sf-del[disabled] { cursor: not-allowed; }
.sf-opt.del-ask { background: #fff4f3; gap: 5px; cursor: default; }
.cat-add-form input, .cat-add-form select { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; }
.sf-pop { width: 260px; }

.del-ask { background: #fff4f3; border: 1px solid #f3cfcc; border-radius: 6px; padding: 8px; margin: 2px 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.del-ask select { width: 100%; margin-top: 3px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; font: inherit; font-size: 13px; }
.del-btns { display: flex; justify-content: flex-end; gap: 6px; }
.btn.danger-solid { background: #d0342c; border-color: #d0342c; color: #fff; }
.btn.danger-solid[disabled] { opacity: .45; }

/* Thiết lập thuộc tính */
.attr-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.attr-block { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.attr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.attr-vals { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.attr-chip { display: inline-flex; align-items: center; gap: 4px; background: #f2f5fa; border: 1px solid var(--line); border-radius: 14px; padding: 2px 4px 2px 10px; font-size: 13px; }
.attr-v.click { cursor: pointer; }
.attr-v.click:hover { text-decoration: underline; color: var(--brand); }
.attr-n { background: #fff; color: var(--muted); border-radius: 9px; font-size: 11px; padding: 0 6px; }
.attr-x { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 4px; border-radius: 50%; }
.attr-x:hover:not([disabled]) { color: #d0342c; background: #fde8e7; }
.attr-x[disabled] { opacity: .35; cursor: not-allowed; }
.attr-add { border: 1px dashed var(--line); border-radius: 14px; padding: 3px 10px; font: inherit; font-size: 13px; width: 150px; background: #fff; }
.attr-add:focus { border-style: solid; border-color: var(--brand); outline: none; }
.attr-edit { display: inline-flex; gap: 4px; align-items: center; }
.attr-edit input { border: 1px solid var(--brand); border-radius: 6px; padding: 3px 8px; font: inherit; font-size: 13px; width: 160px; }
.attr-new { display: flex; gap: 6px; margin-bottom: 6px; }
.attr-new input { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; }

.attr-x { color: #c0392b; opacity: .75; font-weight: 700; }
.attr-x:hover { opacity: 1; }
.attr-ask { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: #fff4f3; border: 1px solid #f3cfcc; border-radius: 6px; padding: 6px 8px; margin: 0 0 6px; font-size: 13px; }
.attr-ask.warn { background: #fff8e6; border-color: #f1d48a; }

/* Thiết lập: tab + phân quyền */
.set-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.set-tabs button { border: 0; background: none; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.set-tabs button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.perm-page { max-width: 1100px; }
.perm-wrap { max-height: calc(100vh - 260px); }
.perm-tbl th, .perm-tbl td { vertical-align: middle; }
.perm-tbl td.c, .perm-tbl th.perm-role { text-align: center; }
.perm-tbl .perm-name { min-width: 230px; }
.perm-tbl .perm-role { min-width: 96px; }
.perm-tbl thead th { position: sticky; top: 0; background: #f7f9fc; z-index: 1; }
.pr-name { font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.pr-del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0 3px; border-radius: 50%; }
.pr-del:hover { color: #d0342c; background: #fde8e7; }
.perm-group td { background: #eef3fb; font-weight: 600; font-size: 13px; }
.perm-tbl input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }
.perm-tbl input[disabled] { cursor: not-allowed; }
.perm-add { display: flex; gap: 6px; margin: 10px 0; max-width: 560px; }
.perm-add input { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; font: inherit; }
.perm-note { padding: 10px 14px; margin-top: 6px; }
.perm-note ul { margin: 4px 0 0; padding-left: 18px; }
.no-access { display: flex; justify-content: center; padding-top: 60px; }
.na-box { text-align: center; max-width: 460px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.na-ico { font-size: 36px; }
.na-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }

/* Đăng nhập & tài khoản */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #1f4e9c, #2d6cd1 55%, #eef3fb 55%); padding: 16px; }
.login-card { width: 100%; max-width: 360px; background: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(15,30,60,.25); padding: 26px 26px 20px; display: flex; flex-direction: column; gap: 12px; }
.login-brand { color: var(--brand); font-weight: 700; }
.login-card h2 { margin: 0 0 4px; }
.login-card input { width: 100%; }
.login-btn { padding: 10px; font-size: 15px; }
.login-hint { text-align: center; }
.pw-box { position: relative; display: flex; }
.pw-box input { flex: 1; padding-right: 34px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; font-size: 14px; padding: 2px 4px; }
.user-menu { position: relative; }
.um-btn { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; padding: 4px 9px; font: inherit; font-size: 13px; cursor: pointer; }
.um-role { opacity: .75; font-size: 12px; }
.um-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 80; width: 230px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.um-head { padding: 4px 6px 8px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.um-item { text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px; }
.um-item:hover { background: #f2f5fa; }
.acc-box { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.acc-grid { margin-top: 2px; }
.acc-name { background: #eef3fb; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.acc-card { display: flex; gap: 12px; margin: 10px 0; }
.acc-card > div { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.acc-card code { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.form-grid.one { grid-template-columns: 1fr; }

.emp-off td { color: var(--muted); }
.emp-off td.strong { text-decoration: line-through; }

/* ---------- Thanh menu trên (gọn) ---------- */
.top { height: 54px; gap: 14px; padding: 0 14px; background: linear-gradient(180deg, #1668c7, #1259ad); box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 2px 8px rgba(13,71,161,.18); }
.brand { display: flex; align-items: center; gap: 9px; margin-right: 4px; min-width: 0; }
.brand-logo { flex: none; width: 32px; height: 32px; border-radius: 9px; background: #fff; color: var(--brand); display: grid; place-items: center; font-size: 13px; font-weight: 800; letter-spacing: .3px; }
.brand-name { font-size: 15px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.top nav { flex: 1; min-width: 0; gap: 2px; align-items: center; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { padding: 7px 11px; border-radius: 8px; font-size: 14px; color: rgba(255,255,255,.82); transition: background .12s, color .12s; }
.top nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.top nav a.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.top-sell { display: inline-flex; align-items: center; gap: 6px; background: var(--sell); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.18); white-space: nowrap; }
.top-sell:hover { filter: brightness(1.08); }
.top-sell.on { box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.top-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; color: #fff; text-decoration: none; font-size: 18px; }
.top-icon:hover { background: rgba(255,255,255,.14); }
.top-icon.on { background: rgba(255,255,255,.22); }
.um-btn { display: flex; align-items: center; gap: 8px; background: transparent; border: 0; padding: 4px 6px 4px 4px; border-radius: 10px; color: #fff; }
.um-btn:hover { background: rgba(255,255,255,.12); }
.um-ava { width: 32px; height: 32px; border-radius: 50%; background: #ffd54f; color: #5d4300; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.um-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.um-name { font-size: 13px; font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-role { font-size: 11px; opacity: .78; }
.um-caret { font-size: 10px; opacity: .8; }
.um-sep { height: 1px; background: var(--line); margin: 2px 0; }
@media (max-width: 1440px) { .brand-name { display: none; } }
@media (max-width: 1280px) { .um-text, .um-caret { display: none; } .top nav a { padding: 7px 9px; } }
@media (max-width: 1050px) { .top { gap: 8px; } .top nav a { padding: 6px 7px; font-size: 13px; } .top-sell { padding: 7px 10px; } }

/* Kiểm kho */
.stk-tools { display: flex; gap: 8px; padding: 10px; margin-bottom: 10px; align-items: flex-start; }
.stk-search { position: relative; flex: 1; }
.stk-search .search { width: 100%; }
.stk-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 4px; }
.stk-res { display: flex; justify-content: space-between; gap: 10px; padding: 7px 9px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.stk-res.hi, .stk-res:hover { background: var(--brand-l); }
.stk-sum { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.stk-sum > div { padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); }
.stk-sum > div:last-child { border-right: 0; }
.stk-sum b { font-size: 15px; }
.stk-bar { height: 4px; background: #e8edf5; border-radius: 3px; overflow: hidden; margin-top: 3px; }
.stk-bar span { display: block; height: 100%; background: var(--brand); }
.stk-wrap { max-height: max(360px, calc(100vh - 380px)); }
.stk-tbl thead th { position: sticky; top: 0; z-index: 1; background: #f7f9fc; }
.stk-actual-h { min-width: 120px; }
.stk-input { width: 72px; text-align: right; border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; font: inherit; font-weight: 600; }
.stk-input:focus { border-color: var(--brand); outline: 2px solid var(--brand-l); }
.stk-eq { margin-left: 4px; border: 1px solid var(--line); background: #fff; border-radius: 5px; width: 24px; height: 26px; cursor: pointer; color: var(--muted); }
.stk-eq:hover { color: var(--brand); border-color: var(--brand); }
.stk-ok td { background: #f3fbf4; }
.stk-diff td { background: #fff8ef; }
.stk-empty { padding: 30px !important; }
.stk-foot { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.stk-foot .search { width: 380px; max-width: 50vw; }
.stk-ask { margin: 6px 0 10px; padding-left: 18px; }
@media (max-width: 900px) { .stk-sum { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Phiếu giao hàng / ghi chú dòng hàng ---------- */
.dlv-hint { margin-top: 4px; line-height: 1.45; }
.note-btn { padding: 0 5px; font-size: 12px; }
.line-note { display: block; margin: 3px 0 2px; padding: 2px 7px; border: 1px dashed #e0b84c; background: #fff8e1; color: #6d4c00; border-radius: 6px; font-size: 12.5px; text-align: left; cursor: pointer; max-width: 100%; white-space: normal; }
.line-note:hover { border-style: solid; }
.line-note-edit { display: flex; align-items: center; gap: 5px; margin: 3px 0 2px; }
.line-note-edit input { flex: 1; min-width: 0; padding: 4px 7px; font-size: 13px; border: 1px solid #e0b84c; border-radius: 6px; background: #fffdf5; }
.line-note-view { font-size: 12px; color: #6d4c00; margin-top: 2px; }

/* ---------- Hãng xe & model ---------- */
.car-fits { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.car-grp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.car-grp strong { min-width: 80px; }
.car-chip { display: inline-flex; align-items: center; gap: 2px; background: #e8f1fc; color: #0d4d99; border: 1px solid #c5dbf5; border-radius: 14px; padding: 1px 4px 1px 10px; font-size: 13px; }
.car-chip button { border: 0; background: none; cursor: pointer; color: #5a7aa3; font-size: 15px; line-height: 1; padding: 0 4px; border-radius: 50%; }
.car-chip button:hover { color: #d0342c; background: #fde8e7; }
.car-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.car-pick select { border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; min-width: 170px; font: inherit; font-size: 13px; }
.car-set-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.car-tog { border: 0; background: none; cursor: pointer; color: var(--muted); width: 18px; padding: 0; }
.car-make { cursor: pointer; }
.car-hit { border-color: var(--brand); background: var(--brand-l); }

/* ---------- Thông báo nổi "Đã lưu" ---------- */
.toaster { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 10px; background: #1e7e34; color: #fff; padding: 10px 18px 10px 12px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.22); font-size: 14px; font-weight: 500; animation: toast-in .18s ease-out; }
.toast.warn { background: #b26a00; }
.toast-ico { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-weight: 700; flex: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Chi tiết phiếu thu / chi ---------- */
.cd-amount { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px; border-radius: 10px; background: #f6f8fb; margin-bottom: 12px; text-align: center; }
.cd-amount strong { font-size: 26px; }
.cd-amount.pos strong { color: #1e7e34; }
.cd-amount.neg strong { color: #c0392b; }
.cd-kind { font-size: 12px; font-weight: 700; letter-spacing: .6px; color: var(--muted); }
.cd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.cd-grid .span2 { grid-column: span 2; }
@media (max-width: 560px) { .cd-grid { grid-template-columns: 1fr; } .cd-grid .span2 { grid-column: auto; } }

@media (min-width: 901px) { .side-filter:not(.collapsed) { width: 244px; } } /* cột tự co theo bộ lọc (auto): thu gọn thì bảng giãn ra */
/* ---------- Bộ lọc bên trái gọn: tên mục và ô chọn cùng một dòng, cột lọc tự cuộn ---------- */
.side-filter { position: sticky; top: 62px; max-height: calc(100vh - 74px); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; overscroll-behavior: contain; padding: 8px 10px; }
.side-filter.collapsed { overflow: hidden; }
.side-filter .sf-head { position: sticky; top: -8px; background: #fff; z-index: 2; margin: -8px -10px 4px; padding: 8px 10px 6px; border-bottom: 1px solid var(--line); }
.side-filter .sf-field { flex-direction: row; align-items: center; gap: 6px; padding: 4px 0; border-top: 0; }
.side-filter .sf-field + .sf-field { border-top: 1px dashed #edf0f5; }
.side-filter .sf-name { flex: 0 0 92px; min-width: 0; font-size: 12px; font-weight: 600; color: #4a5468; gap: 2px; }
.sf-name-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-filter .sf-field > :not(.sf-name):not(.sf-pop) { flex: 1; min-width: 0; }
.side-filter .sf-field select, .side-filter .mdrop-btn { padding: 5px 7px; font-size: 12.5px; }
.side-filter .sf-add { width: 18px; height: 18px; line-height: 14px; font-size: 12px; flex: none; }
.mdrop-menu { position: fixed; top: auto; z-index: 1000; display: flex; flex-direction: column; }
.mdrop-menu .mdrop-list { flex: 1; min-height: 60px; max-height: none; }
.sf-pop { position: fixed; z-index: 1000; }
@media (max-width: 900px) {
  .side-filter { position: static; max-height: none; overflow: visible; }
  .side-filter .sf-head { position: static; margin: 0 0 4px; padding: 0 0 6px; }
}

/* Menu chọn trong cột bộ lọc: xổ xuống ngay dưới ô, chiếm cả bề ngang cột */
.side-filter .sf-field { flex-wrap: wrap; }
.side-filter .mdrop { display: contents; }
.side-filter .mdrop-btn { flex: 1; min-width: 0; width: auto; }
.side-filter .mdrop-menu { position: static; flex: 0 0 100%; width: auto; max-height: none; margin: 4px 0 2px; padding: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.10); border-color: #cfd8e6; }
.side-filter .mdrop-menu .mdrop-list { max-height: 260px; }

/* Khoảng ngày tùy chọn ở thanh lọc */
.date-range { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.date-range label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.date-range input { border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; font: inherit; font-size: 13px; color: var(--ink); }
.filters select.on { border-color: var(--brand); background: var(--brand-l); }

/* ---------- Màn Bán hàng: cuộn mượt khi nhiều hàng ---------- */
.pos-screen { height: calc(100vh - var(--top-h, 54px)); height: calc(100dvh - var(--top-h, 54px)); overflow: hidden; }
.lines { overscroll-behavior: contain; scroll-behavior: smooth; border: 1px solid var(--line); border-radius: 8px; }
.lines-tbl { margin: 0; }
.lines-tbl thead th { position: sticky; top: 0; z-index: 3; background: #f4f6fa; box-shadow: inset 0 -1px 0 var(--line); }
.lines-tbl td { padding-top: 6px; padding-bottom: 6px; }
.lines-tbl tr.flash td { animation: line-flash 1.3s ease-out; }
@keyframes line-flash { 0% { background: #fff3c4; } 100% { background: transparent; } }
.pos-right { overscroll-behavior: contain; padding-bottom: 0; }
.pay-bar { position: sticky; bottom: 0; margin: auto -14px 0; padding: 10px 14px 12px; background: #fbfcfe; border-top: 1px solid var(--line); box-shadow: 0 -6px 14px rgba(20,30,60,.06); display: flex; flex-direction: column; gap: 6px; z-index: 4; }
.pay-bar .btn.pay { margin-top: 0; }
.pay-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.pay-total strong { font-size: 20px; color: var(--sell); }
@media (max-width: 900px) {
  .pos-screen { height: auto; overflow: visible; }
  .lines { max-height: 60vh; }
  .pay-bar { margin: 0 -14px; }
}

/* ---------- Ảnh hàng hóa ---------- */
.pthumb { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 6px; overflow: hidden; background: #f1f3f7; border: 1px solid var(--line); vertical-align: middle; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pthumb.empty { background: repeating-linear-gradient(45deg, #f6f7fa 0 6px, #eef0f4 6px 12px); border-style: dashed; }
td.td-img { width: 44px; padding-top: 4px; padding-bottom: 4px; }
.res-img { margin-right: 10px; display: flex; align-items: center; }
.img-sec { margin: 4px 0 14px; }
.img-grid { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; background: #fafbfd; transition: background .15s, border-color .15s; }
.img-grid.drag { background: var(--brand-l); border-color: var(--brand); }
.img-tile, .img-add { position: relative; width: 112px; height: 112px; border-radius: 8px; flex: none; }
.img-tile { border: 1px solid var(--line); background: #fff; overflow: hidden; }
.img-tile.main { border: 2px solid var(--brand); }
.img-tile.busy { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.img-view { all: unset; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; cursor: zoom-in; }
.img-view img { width: 100%; height: 100%; object-fit: cover; }
.img-main { position: absolute; left: 4px; top: 4px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.img-local { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.92); font-size: 11px; border-radius: 50%; border: 1px solid var(--line); }
.img-acts { position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; justify-content: center; gap: 4px; opacity: 0; transition: opacity .15s; }
.img-tile:hover .img-acts, .img-tile:focus-within .img-acts { opacity: 1; }
.img-acts button { width: 24px; height: 24px; border: 0; border-radius: 5px; background: rgba(20,30,50,.72); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; padding: 0; }
.img-acts button:hover { background: rgba(20,30,50,.9); }
.img-acts button.del:hover { background: #c62828; }
.img-add { border: 1.5px dashed #b9c2d3; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; color: var(--brand); font-size: 13px; font-weight: 500; text-align: center; padding: 6px; }
.img-add:hover { border-color: var(--brand); background: var(--brand-l); }
.img-add .plus { font-size: 26px; line-height: 1; }
.img-add .small { font-weight: 400; font-size: 11px; }
.spin { width: 22px; height: 22px; border: 3px solid #dde3ee; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(10,14,22,.88); display: flex; align-items: center; justify-content: center; padding: 48px 64px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #fff; }
.lb-close, .lb-nav { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; border-radius: 50%; }
.lb-close { right: 16px; top: 14px; width: 38px; height: 38px; font-size: 18px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font-size: 28px; line-height: 1; }
.lb-nav.l { left: 12px; } .lb-nav.r { right: 12px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-cap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #cfd6e4; font-size: 13px; }
@media (max-width: 600px) {
  .img-tile, .img-add { width: 88px; height: 88px; }
  .img-acts { opacity: 1; }
  .lightbox { padding: 48px 8px; }
}

/* Công tắc hiển thị ảnh trong Thiết lập chung */
.set-switch { display: flex; align-items: center; gap: 16px; }
.set-switch > div { flex: 1; min-width: 0; }
.set-switch h3 { margin: 0 0 4px; }
.set-switch p { margin: 0; }
.set-switch .switch { flex: none; }
.set-switch .switch:disabled { opacity: .5; cursor: not-allowed; }

/* Thiết lập → tab Hàng hóa */
.cat-sec-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.cat-sec-nav button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; color: inherit; }
.cat-sec-nav button:hover { border-color: var(--brand); }
.cat-sec-nav button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cat-sec-nav .n { font-size: 11px; background: rgba(0,0,0,.07); border-radius: 999px; padding: 0 7px; min-width: 18px; text-align: center; }
.cat-sec-nav button.on .n { background: rgba(255,255,255,.25); }
.cat-panel .cat-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cat-panel .cat-add-row input.cat-search { flex: 0 1 220px; }
.cat-panel .tbl-wrap { margin: 10px 0 6px; }

/* Chi phí nhập hàng */
.pcost-box { margin: 14px 0 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfd; }
.pcost-box .sec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.pcost-box .sec-head .sec { margin: 0; }
.pcost-add { border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; background: #fff; }
.pcost-lines { margin: 4px 0 6px; background: #fff; }
.pcost-lines .money-input, .pcost-lines input[inputmode] { max-width: 140px; }
.pcost-name { width: 100%; max-width: 220px; }
.pcost-other { margin: 6px 0; padding-top: 6px; border-top: 1px dashed var(--line); }
.pcost-help { margin: 10px 0 0; padding-left: 18px; }
.pcost-help li { margin: 2px 0; }
.pcost-checks { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.pcost-tbl td { vertical-align: middle; }

/* Thu thêm khi bán */
.charge-box { margin: 2px 0; }
.charge-row .charge-name { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.charge-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.charge-x:hover { color: #c62828; }
.charge-name-in { width: 140px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; }
.charge-add-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; }
.charge-add { border: 1px dashed #b9c2d3; background: #fff; color: var(--brand); border-radius: 6px; padding: 3px 8px; font-size: 13px; cursor: pointer; }
.charge-add:hover { border-color: var(--brand); }

/* Popup thêm / sửa khoản thu thêm & chi phí nhập hàng */
.fee-form { display: flex; flex-direction: column; gap: 16px; min-width: min(460px, 80vw); }
.fee-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.fee-calc { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; margin-bottom: 4px; }
.seg-group { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg-group button { border: 0; background: #fff; padding: 8px 14px; font: inherit; font-size: 13px; cursor: pointer; color: inherit; }
.seg-group button + button { border-left: 1px solid var(--line); }
.seg-group button.on { background: var(--brand); color: #fff; }
.fee-val { display: inline-flex; align-items: center; gap: 6px; flex: 1; min-width: 150px; }
.fee-val input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; text-align: right; }
.fee-val.pct input { max-width: 90px; flex: none; }
.fee-val.has-err input { border-color: #d32f2f; }
.fee-val > span { color: var(--muted); }
.fee-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fee-choice { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.fee-choice:hover { border-color: var(--brand); }
.fee-choice.on { border-color: var(--brand); background: var(--brand-l); box-shadow: inset 0 0 0 1px var(--brand); }
.fee-opts { border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
.fee-opt { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.fee-opt + .fee-opt { border-top: 1px solid var(--line); }
.fee-opt > div { flex: 1; min-width: 0; }
.fee-ask { font-size: 13px; color: #c62828; font-weight: 500; margin-right: 4px; }
.fee-yes { color: var(--pos); font-weight: 500; }
tr.fee-off td { color: var(--muted); }
@media (max-width: 600px) { .fee-choices { grid-template-columns: 1fr; } }

/* Hộp xác nhận của ứng dụng */
.confirm-msg { white-space: pre-line; font-size: 14.5px; line-height: 1.5; min-width: min(380px, 80vw); }

/* Tab Mô tả / ghi chú đặt hàng */
.pnote-tab { display: flex; flex-direction: column; gap: 16px; padding-top: 12px; }
.pnote-box { width: 100%; resize: vertical; font: inherit; line-height: 1.5; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; box-sizing: border-box; }
.tab-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); vertical-align: middle; margin-left: 2px; }
.order-note { margin-top: 3px; font-size: 12px; color: #6a4a00; background: #fff7df; border-radius: 4px; padding: 2px 6px; white-space: pre-line; max-width: 360px; }

/* Báo cáo khách hàng */
.cr-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.cr-cats .chip { cursor: default; }

/* Chi nhánh */
.bsw { position: relative; }
.bsw-btn { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: #fff; border-radius: 10px; padding: 4px 10px 4px 4px; font: inherit; cursor: pointer; transition: background .15s; }
.bsw-btn:hover, .bsw.open .bsw-btn { background: rgba(255,255,255,.2); }
.bsw-ico { position: relative; width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.18); display: grid; place-items: center; flex: none; }
.bsw-dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: #ff7043; border: 2px solid var(--brand); }
.bsw-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.bsw-lbl { font-size: 10.5px; opacity: .75; text-transform: uppercase; letter-spacing: .04em; }
.bsw-name { font-size: 13px; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsw-caret { font-size: 10px; opacity: .8; transition: transform .15s; }
.bsw.open .bsw-caret { transform: rotate(180deg); }
.bsw.all .bsw-btn { background: #ffd54f; border-color: #ffd54f; color: #4a3600; }
.bsw.all .bsw-ico { background: rgba(0,0,0,.08); }
.bsw-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 85; width: 300px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px rgba(0,0,0,.2); overflow: hidden; animation: bswIn .12s ease-out; }
@keyframes bswIn { from { opacity: 0; transform: translateY(-4px); } }
.bsw-head { padding: 10px 14px 8px; font-size: 11.5px; font-weight: 600; color: var(--muted, #6b7385); text-transform: uppercase; letter-spacing: .04em; }
.bsw-list { display: flex; flex-direction: column; padding: 0 6px 6px; max-height: 340px; overflow-y: auto; }
.bsw-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 8px; border-radius: 8px; cursor: pointer; font: inherit; color: inherit; }
.bsw-item:hover { background: #f2f5fa; }
.bsw-item.on { background: var(--brand-l); }
.bsw-av { width: 32px; height: 32px; border-radius: 8px; background: var(--brand-l); color: var(--brand); font-weight: 700; display: grid; place-items: center; flex: none; }
.bsw-item.on .bsw-av { background: var(--brand); color: #fff; }
.bsw-av.all { background: #fff3cd; color: #8a6100; }
.bsw-item.all-item { border-top: 1px dashed var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; padding-top: 10px; }
.bsw-item.all-item.on { background: #fff8e1; }
.bsw-info { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 13px; }
.bsw-addr { flex-basis: 100%; font-size: 11.5px; color: var(--muted, #6b7385); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsw-tag { font-size: 10.5px; padding: 1px 6px; border-radius: 10px; font-weight: 600; }
.bsw-tag.in { background: #ffe9e2; color: #c2410c; }
.bsw-tag.off { background: #eceff3; color: #6b7385; }
.bsw-check { width: 16px; color: var(--brand); font-weight: 700; flex: none; }
.bsw-foot { border-top: 1px solid var(--line); padding: 6px; }
.bsw-manage { width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13px; color: var(--brand); font-weight: 600; }
.bsw-manage:hover { background: #f2f5fa; }
@media (max-width: 900px) { .bsw-text { display: none; } .bsw-btn { padding-right: 6px; } }
.br-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.need-branch { max-width: 520px; margin: 60px auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px 24px; }
.need-branch .na-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.br-stocks { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.br-stocks .chip { cursor: default; }
.br-stocks .chip.cur { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.other-br { font-size: 11.5px; color: var(--brand); }

/* Thanh menu 2 dòng khi màn hình hẹp: dòng 1 = logo + chi nhánh / bán hàng / tài khoản, dòng 2 = menu */
.top.two-row { flex-wrap: wrap; height: auto; padding-top: 6px; padding-bottom: 0; row-gap: 4px; }
.top.two-row .brand { flex: 1; min-width: 0; }
.top.two-row nav { order: 3; flex: 1 0 100%; flex-wrap: wrap; row-gap: 2px; overflow: visible; padding-bottom: 6px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 4px; }
.top.two-row .top-right { gap: 6px; }
.top.compact .brand-name, .top.compact .bsw-lbl, .top.compact .um-text, .top.compact .um-caret { display: none; }
.top.compact .bsw-name { max-width: 120px; }
.top.compact nav a { padding: 7px 8px; }

/* Bảng có chọn cột: luôn dàn đủ ngang trang, các cột chia theo tỷ lệ độ rộng tối thiểu; nhiều cột quá thì cuộn ngang */
.tbl.fit { width: 100%; table-layout: fixed; }
.tbl.fit th { white-space: normal; vertical-align: bottom; }
.tbl.fit td { overflow-wrap: anywhere; }
.tbl.fit td.num { overflow-wrap: normal; }

/* Lưu trữ hóa đơn */
.alert.info { background: var(--brand-l); color: #134a8a; margin-bottom: 10px; }
.arc-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.arc-bar select { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; }
.arc-sum { margin-bottom: 8px; }
.arc-keep { margin: 4px 0 0; padding-left: 18px; }
.arc-year-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Phân trang */
.pager { position: sticky; left: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 12px; background: #fff; border-top: 1px solid var(--line); box-sizing: border-box; max-width: 100%; }
.pg-btns { display: flex; align-items: center; gap: 3px; margin: 0 auto; }
.pg-btn { min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); }
.pg-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pg-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pg-btn:disabled { opacity: .4; cursor: default; }
.pg-gap { padding: 0 4px; color: var(--muted); }
.pg-size select { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 13px; }

/* Thiết lập: menu dọc bên trái */
.settings-page { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 24px; align-items: start; align-content: start; }
.settings-page > * { grid-column: 2; }
.settings-page > .set-side { grid-column: 1; grid-row: 1 / span 50; position: sticky; top: calc(var(--top-h, 54px) + 12px); }
.settings-page.narrow-page, .settings-page.perm-page { max-width: 1360px; }
.settings-page.narrow-page > :not(.set-side) { max-width: 820px; }
html { scrollbar-gutter: stable; }
.set-side { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; }
.ss-title { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 4px 10px 8px; }
.ss-nav { display: flex; flex-direction: column; gap: 2px; }
.ss-item, .ss-subitem { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.ss-item:hover, .ss-subitem:hover { background: #f2f5fa; }
.ss-item.on { background: var(--brand-l); color: var(--brand); font-weight: 600; }
.ss-ico { width: 22px; text-align: center; flex: none; }
.ss-text { flex: 1; min-width: 0; }
.ss-caret { font-size: 11px; opacity: .6; transition: transform .15s; }
.ss-group.open .ss-caret { transform: rotate(180deg); }
.ss-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px 21px; padding-left: 10px; border-left: 2px solid var(--line); }
.ss-subitem { padding: 7px 10px; font-size: 13.5px; color: #4a5468; }
.ss-subitem.on { color: var(--brand); font-weight: 600; background: var(--brand-l); }
.ss-n { font-size: 11px; background: #eef1f6; color: #5b6578; border-radius: 999px; padding: 0 7px; min-width: 18px; text-align: center; }
.ss-subitem.on .ss-n { background: #fff; color: var(--brand); }
.ss-select { display: none; }
@media (max-width: 1000px) { .settings-page { grid-template-columns: 190px minmax(0, 1fr); column-gap: 16px; } }
@media (max-width: 720px) {
  .settings-page { grid-template-columns: minmax(0, 1fr); }
  .settings-page > *, .settings-page > .set-side { grid-column: 1; grid-row: auto; position: static; }
  .set-side { padding: 0; border: 0; background: none; margin-bottom: 10px; }
  .ss-title, .ss-nav { display: none; }
  .ss-select { display: block; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; font-weight: 600; background: #fff; }
}

/* Cột bấm để sắp xếp */
.sort-th { cursor: pointer; user-select: none; }
.sort-th:hover { color: var(--brand); }
.sort-lbl { display: inline-flex; align-items: center; gap: 4px; }
.sort-ico { font-size: 10px; opacity: .45; }
.sort-th.on { color: var(--brand); }
.sort-th.on .sort-ico { opacity: 1; }

/* Lịch sử thao tác */
.audit-filters select, .audit-keep { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; background: #fff; }
.audit-tbl td { vertical-align: top; }
.audit-tbl tr.undone td { background: #fafafa; color: #7a8295; }
.audit-kind { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-right: 4px; }
.k-del { background: #fde2e1; color: #b42318; }
.k-cancel { background: #fff1d6; color: #9a5b00; }
.k-add { background: #e3f4e8; color: #1e7a3c; }
.k-upd { background: var(--brand-l); color: var(--brand); }
.k-undo { background: #efe7fb; color: #6b3fb3; }
.audit-detail { margin-top: 8px; padding: 8px 10px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ad-op { font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 4px; background: #e9edf3; }
.ad-op.ad-del { background: #fde2e1; color: #b42318; }
.ad-op.ad-add { background: #e3f4e8; color: #1e7a3c; }
.ad-fields { margin: 3px 0 0; padding-left: 18px; }
.ad-fields s { color: #9aa3b5; }

/* Nút thanh toán: chữ chính gọn, dòng phụ nhỏ (vd chuyển báo giá thành hóa đơn) */
.btn.pay { flex-direction: column; gap: 2px; padding: 11px 14px; font-size: 15.5px; letter-spacing: .01em; line-height: 1.2; }
.pay-main { display: inline-flex; align-items: center; gap: 8px; }
.pay-main kbd { font: 600 11px/1 inherit; font-family: inherit; padding: 3px 6px; border-radius: 5px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35); }
.pay-sub { font-size: 12px; font-weight: 500; opacity: .9; }

/* Sửa hóa đơn ở màn Bán hàng */
.edit-tab { color: #9a5b00; font-weight: 600; }
.edit-bar { background: #fff6e0; border: 1px solid #f0d58f; border-radius: 8px; padding: 7px 10px; margin-bottom: 8px; font-size: 13px; }
.doc-link { font-size: 12.5px; margin-top: 4px; }

/* Sao lưu Google Drive (Thiết lập → Dữ liệu) */
.gd-card { display: flex; flex-direction: column; gap: 10px; }
.gd-url { display: flex; gap: 8px; }
.gd-url input { flex: 1; min-width: 0; }
.gd-url input.invalid { border-color: var(--neg); }
.gd-msg.err { color: var(--neg); }
.gd-msg.ok { color: var(--pos); }
.gd-msg code { font-size: 12px; word-break: break-all; }
.gd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.gd-grid .chk { display: flex; gap: 6px; align-items: center; font-size: 13px; padding-bottom: 8px; }
.gd-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gd-actions { display: flex; gap: 8px; align-items: center; }

/* Khôi phục dữ liệu (Thiết lập → Dữ liệu) */
.rs-card { display: flex; flex-direction: column; gap: 10px; }
.rs-info { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.rs-grid { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; }
.rs-file { word-break: break-all; }
label.btn.disabled { opacity: .5; pointer-events: none; }

/* Xuất bảng giá cho khách (Thiết lập giá) */
.pl-dlg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.pl-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pl-head { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.pl-cats { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; max-height: 50vh; overflow: auto; }
.pl-cat { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 13px; cursor: pointer; }
.pl-cat span:first-of-type { flex: 1; }
.pl-opts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.pl-opts.col { flex-direction: column; }
.pl-opts .chk { display: flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { .pl-dlg { grid-template-columns: 1fr; } }

/* Đối chiếu công nợ */
.late-tag { color: var(--neg); font-weight: 600; }
.debt-due { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; padding: 8px 12px; border-radius: 8px; background: var(--bg); font-size: 13px; margin: 6px 0; }
.debt-due.late { background: var(--err-bg); color: var(--neg); }
.stmt-preview { margin: 10px auto 0; border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0,0,0,.08); background: #fff; overflow: hidden; }

/* In tem mã vạch */
.lbl-dlg { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; min-height: 380px; }
.lbl-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lbl-add { position: relative; display: flex; gap: 8px; }
.lbl-add input { flex: 1; min-width: 0; }
.lbl-found { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 260px; overflow: auto; }
.lbl-found button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; background: none; font-size: 13px; cursor: pointer; }
.lbl-found button:hover { background: var(--brand-l); }
.lbl-items { border: 1px solid var(--line); border-radius: 8px; max-height: 46vh; overflow: auto; }
.lbl-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.lbl-item:last-child { border-bottom: 0; }
.lbl-item input { width: 64px; text-align: right; }
.lbl-bulk { display: flex; gap: 10px; align-items: center; }
.lbl-opts { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; }
.lbl-opts .chk, .lbl-col > .chk { display: flex; align-items: center; gap: 6px; }
.lbl-custom { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; font-size: 12px; }
.lbl-custom label { display: flex; flex-direction: column; gap: 3px; }
.lbl-custom input { width: 100%; }
.lbl-preview { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #e9ecf1; }
.lbl-preview iframe { width: 100%; height: 300px; border: 0; display: block; }
@media (max-width: 720px) { .lbl-dlg { grid-template-columns: 1fr; } }

/* Chọn nhiều mã ở danh mục hàng hóa */
.selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--brand-l); border: 1px solid #b9d0f0; border-radius: 8px; padding: 7px 12px; margin-bottom: 8px; font-size: 13px; position: sticky; top: calc(var(--top-h, 58px) + 4px); z-index: 5; }
.tbl th.chk-col, .tbl td.chk-col { width: 38px; text-align: center; padding-left: 6px; padding-right: 6px; cursor: default; }
.tbl .chk-col input { cursor: pointer; width: 16px; height: 16px; }

/* Bảo hành */
.wty-inputs { display: flex; align-items: center; gap: 8px; margin-top: 5px; font-weight: 400; }
.wty-inputs .num-suffix input { width: 80px; }
.wty-line { color: #2f5d34; margin-top: 2px; }
.wty-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.wty-tabs button { border: 0; background: none; padding: 7px 14px; font-size: 13px; cursor: pointer; color: var(--ink); }
.wty-tabs button + button { border-left: 1px solid var(--line); }
.wty-tabs button.on { background: var(--brand); color: #fff; }
.wty-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--neg); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.wty-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--bg); display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.wty-detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
.wty-act { border: 1px solid var(--brand); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.wty-act .row-btns { display: flex; gap: 8px; justify-content: flex-end; }
.wty-hist { display: flex; flex-direction: column; gap: 3px; }
.wty-preview { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.wty-preview iframe { width: 100%; height: 470px; border: 0; display: block; }
@media (max-width: 820px) { .wty-detail { grid-template-columns: 1fr; } }

/* Chế độ máy chủ: chỉ báo đồng bộ, màn khởi tạo */
.sync-pill { border: 0; border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; background: rgba(255,255,255,.14); color: #e8f5e9; }
.sync-pill.busy { background: #fff3cd; color: #7a5a00; }
.sync-pill.err { background: #ffebee; color: var(--neg); font-weight: 600; }
.setup-card { max-width: 520px; display: flex; flex-direction: column; gap: 10px; }
.setup-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.setup-opt.on { border-color: var(--brand); background: var(--brand-l); }
.setup-opt > span { display: flex; flex-direction: column; gap: 2px; }
.setup-file { display: flex; gap: 10px; align-items: center; padding-left: 28px; }
.setup-sum { background: var(--bg); border-radius: 8px; padding: 8px 12px; }

.setup-opt input[type="radio"] { width: auto; flex: 0 0 auto; margin: 3px 0 0; }
.setup-opt > span { flex: 1; min-width: 0; text-align: left; }

/* Sao lưu Google Drive (chế độ máy chủ) */
.gd-connect { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.gd-acc { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gd-last { background: var(--bg); border-radius: 8px; padding: 8px 12px; }
.gd-last.err { background: var(--err-bg); color: var(--neg); }
.gd-list { border: 1px solid var(--line); border-radius: 8px; }
.gd-row { display: flex; gap: 12px; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.gd-row:last-child { border-bottom: 0; }
.backup-alert { display: flex; gap: 10px; align-items: center; background: var(--err-bg); color: var(--neg); border: 1px solid #f3c1c1; border-radius: 8px; padding: 8px 12px; margin: 10px 16px 0; font-size: 13px; }
.backup-alert a { font-weight: 600; }
.backup-alert .icon-btn { margin-left: auto; }

/* Thiết lập → Telegram */
.tg-wrap { display: flex; flex-direction: column; gap: 14px; }
.tg-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.tg-code { display: block; line-height: 1.6; word-break: break-all; }
.tg-code .link { margin-left: 8px; }
.tg-tbl td { vertical-align: top; }

/* Bản thử nghiệm (APP_ENV=dev trên máy chủ): nhãn cam cố định, không che thao tác */
body.env-dev::after { content: 'BẢN THỬ NGHIỆM (DEV) — không phải dữ liệu cửa hàng thật'; position: fixed; left: 0; bottom: 0; z-index: 9999; pointer-events: none;
  background: #ea580c; color: #fff; font: 600 11px/1 system-ui, sans-serif; padding: 5px 10px; border-top-right-radius: 6px; opacity: .92; }
body.env-dev header.top { box-shadow: inset 0 3px 0 #ea580c; }
