:root {
  --green: #539A03; --green-dark: #3F7A02; --green-deep: #2C5602; --green-tint: #EEF5E3; --green-line: #D5E5BE;
  --ink: #1F2A17; --ink-2: #566050; --ink-3: #868E80; --line: #E3E6DD; --bg: #FAFAF6; --paper: #fff;
  --red: #B3321F; --red-tint: #FBEDEA; --amber: #8A5A00; --amber-tint: #FBF2DC;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 'Be Vietnam Pro', system-ui, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; margin: 28px 0 8px; }
p { margin: 0 0 8px; }

.demo-banner { background: var(--amber-tint); color: var(--amber); padding: 5px 16px; font-weight: 500; font-size: 13px; text-align: center; border-bottom: 1px solid #EBDDB4; }
.shell { display: grid; grid-template-columns: 228px 1fr; height: 100vh; }
.shell.has-banner { height: calc(100vh - 30px); }
.side { background: var(--green-deep); color: #E6EFD9; overflow-y: auto; padding: 14px 0 24px; }
.brand { padding: 2px 18px 14px; font-weight: 700; font-size: 17px; color: #fff; }
.brand small { display: block; font-weight: 400; font-size: 12px; color: #B9CFA0; }
.side .group { padding: 13px 18px 3px; color: #A9C48C; font-size: 12.5px; font-weight: 600; }
.side a { display: block; padding: 4px 18px; color: #E6EFD9; font-size: 13.5px; border-left: 3px solid transparent; }
.side a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.side a.on { background: rgba(255,255,255,.13); border-left-color: #A7D862; color: #fff; font-weight: 500; }
.main { overflow-y: auto; }
.topbar { display: flex; justify-content: flex-end; gap: 14px; align-items: center; padding: 8px 28px; font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.content { padding: 22px 28px 60px; max-width: 1400px; }
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.head .grow { flex: 1; }
.sub { color: var(--ink-2); font-size: 13px; }
.note { color: var(--ink-2); font-size: 13px; max-width: 760px; }

button, .btn { font: inherit; font-weight: 500; font-size: 13.5px; padding: 6px 12px; border-radius: 5px; border: 1px solid #CBD2C2; background: var(--paper); color: var(--ink); cursor: pointer; display: inline-block; }
button:hover, .btn:hover { border-color: var(--green); text-decoration: none; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
button.primary { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
button.primary:hover { background: var(--green-deep); }
button.danger { color: var(--red); border-color: #E2B9B2; }
button.link { border: 0; background: none; padding: 0; color: var(--green-dark); }
button:disabled { opacity: .5; cursor: default; }

input, select, textarea { font: inherit; font-size: 13.5px; padding: 5px 8px; border: 1px solid #CBD2C2; border-radius: 5px; background: var(--paper); color: var(--ink); max-width: 100%; }
textarea { width: 100%; min-height: 110px; }
input.num { text-align: right; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 12px; }
.filters label, .field { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--ink-2); }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 16px; margin-bottom: 14px; }
.form .wide { grid-column: 1 / -1; }
.form input, .form select { width: 100%; }
.check { flex-direction: row !important; align-items: center; gap: 6px !important; }

.tbl-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: #F4F6EF; }
td { padding: 5px 10px; border-bottom: 1px solid #EFF1EA; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #F8FAF3; }
tbody tr.click { cursor: pointer; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 600; background: #F4F6EF; border-top: 1px solid var(--line); border-bottom: 0; }
.neg { color: var(--red); }
.muted { color: var(--ink-3); }
.empty { padding: 28px; text-align: center; color: var(--ink-3); }
.wide-name { min-width: 260px; }
.cols > div { margin-bottom: 22px; }
.side { scrollbar-width: thin; scrollbar-color: #4C7A20 transparent; }
.code { font-size: 12px; color: var(--ink-2); }
.st { font-size: 12px; font-weight: 500; padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
.st.draft { background: var(--amber-tint); color: var(--amber); }
.st.posted { background: var(--green-tint); color: var(--green-dark); }
.st.void { background: var(--red-tint); color: var(--red); }
.badge-low { color: var(--red); font-weight: 500; }

.figures { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); margin-bottom: 22px; }
.figure { flex: 1 1 170px; padding: 11px 16px; border-right: 1px solid var(--line); }
.figure:last-child { border-right: 0; }
.figure .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.figure .l { font-size: 12.5px; color: var(--ink-2); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 0 28px; }
.cols h2:first-child { margin-top: 0; }
.bars { display: grid; gap: 4px; }
.bar { display: grid; grid-template-columns: 62px 1fr 110px; gap: 10px; align-items: center; font-size: 13px; }
.bar i { display: block; height: 15px; background: var(--green); border-radius: 0 3px 3px 0; min-width: 1px; }
.bar b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

.login { display: grid; place-items: center; height: 100vh; background: var(--green-deep); }
.login form { background: var(--paper); padding: 28px; border-radius: 8px; width: 320px; display: grid; gap: 12px; }
.login h1 { color: var(--green-dark); }
.login input { width: 100%; padding: 8px 10px; }
.err { background: var(--red-tint); color: var(--red); padding: 7px 11px; border-radius: 5px; margin-bottom: 12px; font-size: 13px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--green-deep); color: #fff; padding: 9px 15px; border-radius: 6px; z-index: 50; max-width: 420px; }
.toast.bad { background: var(--red); }
.modal-bg { position: fixed; inset: 0; background: rgba(30,40,20,.45); display: grid; place-items: center; z-index: 40; padding: 20px; }
.modal { background: var(--paper); border-radius: 8px; padding: 20px 22px; width: min(720px, 100%); max-height: 88vh; overflow-y: auto; }
.modal h1 { font-size: 18px; margin-bottom: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.totals { margin: 12px 0 0 auto; width: 320px; font-size: 13.5px; }
.totals div { display: flex; justify-content: space-between; padding: 2px 0; font-variant-numeric: tabular-nums; }
.totals .big { font-weight: 700; font-size: 16px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 5px; }
.lines td { padding: 3px 5px; vertical-align: middle; }
.lines input { width: 100%; }
.lines .pname { font-size: 12px; color: var(--ink-2); max-width: 380px; }
.meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 3px 22px; margin-bottom: 14px; font-size: 13.5px; }
.meta span { color: var(--ink-2); }
.print-head { display: none; }

/* O chon khach co tim kiem */
.pick { position: relative; }
.pick input { width: 100%; }
.pick-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: 2px; background: var(--paper); border: 1px solid #CBD2C2; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.14); max-height: 300px; overflow-y: auto; min-width: 260px; }
.pick-item { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid #EFF1EA; }
.pick-item:hover, .pick-item.active { background: var(--green-tint); }
.pick-item b { color: var(--ink); font-weight: 600; }
.pick-item .code { white-space: normal; }
.pick-empty { padding: 10px; color: var(--ink-3); }

/* Responsive */
.burger, .side-bg { display: none; }
.topbar .who { margin-right: auto; }
.q-preview, .quote-sheet { overflow-x: auto; }
@media (max-width: 1024px) {
  .shell, .shell.has-banner { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .main { overflow: visible; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; width: min(280px, 82vw); z-index: 60; transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
  .side.open { transform: none; box-shadow: 4px 0 18px rgba(0,0,0,.3); }
  .side a { padding: 9px 18px; font-size: 14.5px; }
  .side-bg { display: block; position: fixed; inset: 0; background: rgba(20,30,10,.45); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .side-bg.open { opacity: 1; pointer-events: auto; }
  .burger { display: inline-block; font-size: 20px; line-height: 1; padding: 6px 11px; }
  .topbar { padding: 8px 14px; gap: 10px; }
  .content { padding: 16px 16px 60px; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  h1 { font-size: 19px; }
  .topbar { flex-wrap: wrap; }
  .topbar .who { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar button.link { flex: none; }
  .content { padding: 12px 12px 60px; }
  button, .btn { padding: 9px 13px; }
  button.link { padding: 6px 2px; }
  input, select, textarea { font-size: 16px; padding: 8px 9px; }
  .head { gap: 8px; }
  .head .grow { flex-basis: 100%; }
  .actions { gap: 6px; }
  .filters { align-items: stretch; }
  .filters label, .filters > * { flex: 1 1 130px; min-width: 0; }
  .filters input, .filters select { width: 100%; min-width: 0; }
  .content { min-width: 0; } .main { min-width: 0; }
  .form { grid-template-columns: 1fr; }
  .meta { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr; }
  .figure { flex-basis: 45%; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .figure .v { font-size: 17px; }
  .bar { grid-template-columns: 54px 1fr 92px; gap: 6px; }
  .totals, .q-sum { width: 100%; }
  .wide-name { min-width: 180px; }
  .lines .pname { max-width: 220px; }
  .lines input { min-width: 70px; }
  .modal-bg { padding: 0; place-items: end stretch; }
  .modal { width: 100%; max-height: 92vh; border-radius: 12px 12px 0 0; padding: 16px; }
  .steps span { padding: 5px 9px; font-size: 12px; }
  .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .login form { width: min(320px, calc(100vw - 32px)); }
  .q-top { flex-wrap: wrap; }
  .q-title h1 { font-size: 20px; }
  .q-preview { padding: 12px; }
}
@media print {
  .side, .side-bg, .topbar, .demo-banner, .no-print, .toast { display: none !important; }
  .shell { display: block; height: auto; }
  body { background: #fff; font-size: 12.5px; }
  .main { overflow: visible; }
  .content { padding: 0; max-width: none; }
  .tbl-wrap { border: 0; overflow: visible; }
  th { position: static; background: none; border-bottom: 1px solid #333; }
  td { border-bottom: 1px solid #ccc; }
  .print-head { display: block; margin-bottom: 14px; border-bottom: 2px solid var(--green-dark); padding-bottom: 8px; }
  .print-sign { display: grid !important; }
}
.print-sign { display: none; grid-template-columns: repeat(3, 1fr); text-align: center; margin-top: 34px; font-weight: 500; }

/* Don ban hang: buoc trang thai, nut loc */
.steps { display: flex; gap: 0; margin: 10px 0 14px; flex-wrap: wrap; }
.steps span { padding: 5px 14px; border: 1px solid var(--line); margin-left: -1px; color: var(--ink-3); background: var(--paper); font-size: 13px; }
.steps span:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.steps span:last-child { border-radius: 0 6px 6px 0; }
.steps span.done { background: var(--green-tint); color: var(--green-dark); }
.steps span.now { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.chips button { border-radius: 999px; padding: 4px 12px; }
.chips button.on { background: var(--green); border-color: var(--green); color: #fff; }
.chips button.on .sub { color: #e6f2d8; }

/* Bao gia theo mau Google Sheets */
.thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 8px; float: left; }
label.inline { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.q-print-only { display: none; }
.q-preview { margin: 18px 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 22px; max-width: 820px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.quote-sheet { color: #1d2a12; font-size: 12.5px; background: #fff; }
.q-top { display: flex; gap: 16px; align-items: center; border-bottom: 2px solid #3F7A02; padding-bottom: 10px; }
.q-logo { width: 120px; max-height: 70px; object-fit: contain; }
.q-co { line-height: 1.5; }
.q-co b { font-size: 16px; color: #3F7A02; }
.q-title { display: flex; align-items: flex-start; justify-content: space-between; margin: 12px 0 8px; gap: 12px; }
.q-title h1 { margin: 0; font-size: 26px; color: #3F7A02; letter-spacing: .5px; }
.q-no div, .q-info div { display: flex; gap: 8px; padding: 2px 0; }
.q-no span, .q-info span { color: #5c6b52; min-width: 92px; }
.q-info { margin-bottom: 10px; display: grid; grid-template-columns: 1fr; }
.q-vat { justify-self: end; }
.q-table { width: 100%; border-collapse: collapse; }
.q-table th { background: #539A03; color: #fff; padding: 6px; font-weight: 600; text-align: left; position: static; }
.q-table th.n, .q-table td.n { text-align: right; }
.q-table td { border-bottom: 1px solid #d9dfd2; padding: 5px 6px; vertical-align: middle; }
.q-table td.c { text-align: center; }
.q-table img { width: 46px; height: 46px; object-fit: cover; border-radius: 3px; display: block; margin: auto; }
.q-sum { margin: 10px 0 0 auto; width: 320px; }
.q-sum div { display: flex; justify-content: space-between; padding: 3px 0; }
.q-sum .q-pay { border-top: 2px solid #3F7A02; margin-top: 4px; padding-top: 6px; font-size: 15px; color: #3F7A02; }
.q-words { font-style: italic; margin: 8px 0 2px; }
.q-thanks { margin: 6px 0 0; }
.q-sign { display: grid; grid-template-columns: 1fr 1fr; text-align: center; margin-top: 24px; min-height: 110px; }
.q-sign span { display: block; color: #5c6b52; font-size: 11.5px; }
.q-signer { margin-top: 62px; font-weight: 600; }
@media print {
  .has-quote .doc-screen { display: none !important; }
  .has-quote .q-print-only, .has-quote .q-preview { display: block !important; border: 0; padding: 0; box-shadow: none; margin: 0; max-width: none; }
  .q-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4; margin: 10mm; }
}
.totals.profit { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; background: #f6faf2; }
.totals.profit .sub { font-size: 12px; color: #666; }
@media print { .totals.profit { display: none; } }
.login .check { font-size: 13px; color: var(--ink-2); } .login .check input { width: auto; }

/* Tong quan tai chinh */
.fx { transition: opacity .2s; }
.fx-src { align-self: center; }
.fx-tiles { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.fx-tiles.small { grid-template-columns: repeat(4, 1fr); }
.fx-tile { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; min-width: 0; }
.fx-tile .l { font-size: 12.5px; color: var(--ink-2); }
.fx-tile .v { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 2px 0; }
.fx-tile.hero .v { font-size: 44px; line-height: 1.1; }
.fx-tile .s { font-size: 12.5px; color: var(--ink-2); }
.fx-d { display: block; font-size: 12.5px; margin-top: 4px; color: var(--ink-2); }
.fx-d.good { color: #2F6B00; } .fx-d.bad { color: var(--red); }
.fx-d-n { color: var(--ink-3); }
.fx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.fx-card { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; min-width: 0; }
.fx-card.wide { grid-column: 1 / -1; }
.fx-card-h { display: flex; justify-content: space-between; gap: 10px; align-items: start; margin-bottom: 8px; }
.fx-card h3 { font-size: 14.5px; font-weight: 600; margin: 0; }
.fx-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.fx-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.fx-legend i.ln { height: 2px; width: 14px; vertical-align: 3px; border-radius: 1px; }
.fx-plot { position: relative; width: 100%; }
.fx-plot svg { display: block; overflow: visible; }
.fx-plot svg :focus { outline: none; }
.fx-plot svg rect:focus-visible, .fx-plot svg g:focus-visible { outline: 2px solid var(--green); }
.fx-ax { font-size: 11px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.fx-ax.on { fill: var(--ink); font-weight: 600; }
.fx-val { font-size: 11.5px; fill: var(--ink); font-weight: 600; }
.fx-in { font-size: 12px; font-weight: 600; }
.fx-tip { position: absolute; transform: translate(-50%, calc(-100% - 10px)); background: var(--paper); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(31,42,23,.12); border-radius: 6px; padding: 7px 10px; font-size: 12.5px; pointer-events: none; white-space: nowrap; z-index: 3; }
.fx-tip-t { color: var(--ink-2); margin-bottom: 3px; }
.fx-tip-r { display: flex; align-items: center; gap: 6px; }
.fx-tip-r i { width: 12px; height: 2px; border-radius: 1px; }
.fx-tip-r span { color: var(--ink-2); }
.fx-hbars { display: grid; gap: 7px; }
.fx-hb { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.fx-hb .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-hb .t { height: 12px; }
.fx-hb .t i { display: block; height: 12px; border-radius: 0 4px 4px 0; min-width: 2px; }
.fx-hb b { font-weight: 600; white-space: nowrap; }
.fx-hb small { font-weight: 400; color: var(--ink-2); }
@media (max-width: 900px) {
  .fx-tiles, .fx-tiles.small { grid-template-columns: 1fr 1fr; }
  .fx-tile.hero { grid-column: 1 / -1; }
  .fx-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .fx-tile.hero .v { font-size: 36px; } .fx-tile .v { font-size: 20px; } }

/* Cham cong */
.ts-wrap { max-height: 72vh; }
table.ts { border-collapse: separate; border-spacing: 0; }
table.ts th, table.ts td { padding: 2px 3px; text-align: center; white-space: nowrap; }
table.ts th.ts-name, table.ts td.ts-name { position: sticky; left: 0; z-index: 1; background: var(--paper); text-align: left; min-width: 150px; padding: 4px 8px; }
table.ts thead th { position: sticky; top: 0; z-index: 2; background: var(--paper); }
table.ts thead th.ts-name { z-index: 3; }
table.ts .ts-c input { width: 38px; padding: 3px 2px; text-align: center; font-variant-numeric: tabular-nums; }
table.ts .ts-c input.bad { outline: 2px solid var(--red); background: var(--red-tint); }
table.ts .sun { background: var(--green-tint); }
table.ts tr.ts-tc td { border-bottom: 1px solid var(--line); }
table.ts tr.ts-tc input { opacity: .85; }
@media (max-width: 700px) { table.ts th.ts-name, table.ts td.ts-name { min-width: 96px; max-width: 110px; white-space: normal; padding: 3px 4px; } }

/* Bang gia NCC */
table.sp tr.sp-item td { background: var(--bg); padding-top: 10px; border-top: 1px solid var(--line); }
table.sp tr.sp-best td { background: var(--green-tint); }
.filters label.check { flex-direction: row; align-items: center; gap: 6px; align-self: flex-end; min-height: 38px; }
.filters label.check input { width: auto; min-width: 0; flex: none; }
.fx-warn { align-self: center; background: var(--amber-tint); color: var(--amber); border-radius: 5px; padding: 4px 10px; font-size: 12.5px; font-weight: 500; }
.fx-card-h .link { white-space: nowrap; }

/* Phieu luong (A5, moi nguoi 1 trang) */
@page slip { size: A5; margin: 9mm; }
.slips { background: var(--paper); }
.slip { page: slip; break-after: page; max-width: 560px; margin: 0 auto 24px; color: #1a1a1a; font-size: 12.5px; }
.slip:last-child { break-after: auto; }
.slip-top { display: flex; gap: 10px; align-items: center; border-bottom: 2px solid var(--green-dark); padding-bottom: 6px; }
.slip-top img { height: 34px; }
.slip h1 { text-align: center; font-size: 17px; margin: 10px 0 8px; color: var(--green-dark); }
.slip h2 { font-size: 13px; margin: 10px 0 3px; border-bottom: 1px solid #bbb; padding-bottom: 2px; }
.slip-info { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.slip-info .wide { grid-column: 1 / -1; }
.slip-info span, .slip .sub { color: #555; }
.slip-info span { display: inline-block; min-width: 64px; }
.slip-t { width: 100%; border-collapse: collapse; }
.slip-t td { padding: 2px 0; border: 0; vertical-align: top; }
.slip-t td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 10px; }
.slip-t tr.tot td { border-top: 1px solid #333; font-weight: 700; }
.slip-t .sub { font-size: 11px; }
.slip-net { display: flex; justify-content: space-between; margin-top: 10px; padding: 6px 8px; background: var(--green-tint); border: 1px solid var(--green-line); font-size: 14px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.slip-sign { display: grid; grid-template-columns: 1fr 1fr; text-align: center; margin-top: 18px; height: 70px; }
.slip-sign span { display: block; font-size: 11px; color: #555; }

/* Tien Shopee ve */
.ok { background: var(--green-tint); color: var(--green-deep); padding: 7px 11px; border-radius: 5px; margin-bottom: 12px; font-size: 13px; }
.si-pv h3 { font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
tr.si-strong td { font-weight: 700; background: #F4F6EF; }

/* Thue GTGT */
.vat-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.vat-tabs button[aria-pressed="true"] { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.vat-miss { color: var(--amber); background: var(--amber-tint); border-radius: 4px; padding: 0 6px; font-size: 12px; }

/* Chon nhieu (vd sale cung xem khach) */
.multi { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: 4px; }
.multi .check { font-size: 13.5px; color: var(--ink); }
.multi .sub { flex-basis: 100%; }

/* Tai file Shopee */
.sh-card { display: grid; grid-template-columns: 40px 1fr; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; margin-bottom: 14px; max-width: 1100px; }
.sh-n { width: 32px; height: 32px; border-radius: 50%; background: var(--green-tint); color: var(--green-deep); font-weight: 700; display: grid; place-items: center; }
.sh-card h2 { margin: 2px 0 6px; font-size: 16px; }
.sh-card h3 { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 10px 0 4px; }
.sh-meta { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 13px; color: var(--ink-2); }
.sh-meta b { color: var(--ink); font-weight: 600; }
.sh-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; font-size: 13px; }
.sh-cols ol, .sh-cols ul { margin: 0; padding-left: 18px; }
.sh-cols li { margin-bottom: 3px; }
.sh-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; }
.sh-act > .si-pv, .sh-act > .err, .sh-act > .ok { flex-basis: 100%; }
.sh-btn { display: inline-block; background: var(--green-dark); border: 1px solid var(--green-dark); color: #fff; font-weight: 600; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.sh-btn:hover { background: var(--green-deep); text-decoration: none; }
@media (max-width: 760px) { .sh-cols { grid-template-columns: 1fr; } .sh-card { grid-template-columns: 1fr; } .sh-n { display: none; } }
.form .check input[type="checkbox"], .multi input[type="checkbox"] { width: auto; flex: none; margin: 0; }
.form label.check { align-self: end; padding-bottom: 6px; }
.multi .check { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; }

/* Thiet lap gia ban + bang gia in dang cot */
.sp-tabs { display: flex; gap: 6px; margin: 10px 0 14px; flex-wrap: wrap; }
.sp-tabs button[aria-pressed="true"] { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.sp-in { width: 82px; padding: 3px 5px; }
.sp-grp { width: 90px; padding: 3px 5px; }
table.sp-tbl td, table.pp td { vertical-align: top; }
table.sp-tbl tr.sp-dirty td, table.pp tr.sp-dirty td { background: var(--amber-tint); }
.sp-check { color: var(--amber); font-size: 12px; max-width: 280px; }
table.pp th.n, table.pp td.n { min-width: 74px; }
.sp-img img { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: #fff; display: block; }
.sp-up { font-size: 12px; cursor: pointer; display: inline-block; margin-top: 2px; }

/* In phieu xuat kho giao khach: an tien */
.noprice .money, .noprice .profit { display: none !important; }
.noprice .print-sign { grid-template-columns: repeat(4, 1fr); }

/* Logo cong ty tren ban in phieu */
@media print { .print-head:has(.print-logo) { display: flex !important; align-items: center; gap: 14px; } }
.print-logo { height: 46px; width: auto; }

/* Ban in: bo tieu de trinh duyet (ngay gio, ten trang, duong dan) bang cach de le trang = 0, le dat vao noi dung */
@media print {
  @page { size: A4; margin: 0; }
  html, body, .shell, .shell.has-banner, .main { height: auto !important; min-height: 0 !important; overflow: visible !important; }
  .content { padding: 12mm 13mm !important; }
}
.fx-stack { display: flex; gap: 2px; }
.fx-stack i { border-radius: 0; }
.fx-stack i:last-child { border-radius: 0 4px 4px 0; }
