/* audit.css — ระบบออดิทสต๊อก, the same look as the staff app (public/index.html): navy sidebar
 * with badge rows and the user card, a page header per section, white cards.
 * ≥ 900 px: fixed sidebar on the left; below: a slide-in drawer opened by ☰.
 * Also the printable round report (audit-report.html, A4). */
:root {
  --navy: #0b1220; --navy-2: #111c30; --navy-3: #1a2941;
  --primary: #2563eb; --primary-dark: #1d4ed8; --primary-soft: #eff6ff;
  --bg: #f4f7fb; --card: #ffffff; --text: #172033; --muted: #6b7890; --border: #e4e9f1;
  --green: #159565; --red: #dc3f4f; --amber: #d98b12; --indigo: #635bdb;
  --shadow: 0 8px 28px rgba(20, 35, 60, .07); --shadow-sm: 0 5px 18px rgba(25, 39, 65, .045);
  --radius: 18px; --sidebar: 268px;
  /* names the renderers use */
  --ink: var(--text); --line: var(--border);
  --ok: #047857; --ok-bg: #ecfdf5; --bad: #b91c1c; --bad-bg: #fef2f2; --warn: #b45309; --warn-bg: #fffbeb; --over: #1d4ed8; --over-bg: #eff6ff;
  --bar-short: #dc3c3d; --bar-over: #2370cd; --bar-acc: #2370cd; --bar-track: #efefef;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: "Leelawadee UI", "Noto Sans Thai", Tahoma, sans-serif; font-size: 14px; }
.hidden { display: none !important; }
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ─── Login needed / not allowed ─── */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--navy); position: relative; overflow: hidden; }
.gate::before { content: ""; position: absolute; width: 720px; height: 720px; border-radius: 50%; left: -290px; top: -370px; background: radial-gradient(circle, rgba(37, 99, 235, .34), transparent 68%); }
.gate::after { content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%; right: -300px; bottom: -350px; background: radial-gradient(circle, rgba(99, 91, 219, .26), transparent 68%); }
.center-card { position: relative; z-index: 1; width: min(100%, 400px); margin: 0 auto; text-align: center; background: #fff; border-radius: 24px; padding: 32px 26px; box-shadow: 0 32px 90px rgba(0, 0, 0, .38); }
.center-card h1 { margin: 16px 0 6px; font-size: 22px; }
.center-card p { margin: 0 0 22px; color: var(--muted); }
.gate-mark { display: block; width: 54px; height: 54px; border-radius: 16px; margin: 0 auto; box-shadow: 0 10px 24px rgba(37, 99, 235, .28); }

/* ─── Sidebar (as the staff app) ─── */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--navy); color: #fff; z-index: 80; display: flex; flex-direction: column; box-shadow: 10px 0 35px rgba(11, 18, 32, .08); }
.side-brand { height: 82px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 18px 0 22px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.brand-mark { display: block; width: 40px; height: 40px; border-radius: 12px; object-fit: cover; box-shadow: 0 8px 22px rgba(37, 99, 235, .25); flex: none; }
.brand-copy { min-width: 0; }
.brand-copy b { display: block; font-size: 15px; letter-spacing: .1px; }
.brand-copy span { display: block; color: #7f91ac; font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-close { display: none; margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .07); color: #cbd5e1; font-size: 20px; cursor: pointer; place-items: center; flex: none; }
.side-scroll { flex: 1; padding: 18px 14px; overflow-y: auto; }
.side-cta { display: flex; align-items: center; gap: 11px; padding: 11px 12px; margin-bottom: 20px; border-radius: 13px; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8); box-shadow: 0 10px 24px rgba(37, 99, 235, .32); transition: .18s; }
.side-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(37, 99, 235, .42); }
.side-cta .cta-icon { width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.side-cta b { display: block; font-size: 13.5px; }
.side-cta small { display: block; font-size: 11px; color: #dbeafe; margin-top: 1px; }
.nav-label { padding: 0 11px; margin: 4px 0 8px; color: #6f819d; font-size: 10.5px; font-weight: 800; letter-spacing: 1.1px; }
.nav-list { display: grid; gap: 4px; }
.nav-item { width: 100%; min-height: 43px; border: 0; border-radius: 11px; padding: 9px 11px; background: transparent; color: #aab7ca; display: flex; align-items: center; gap: 11px; text-align: left; cursor: pointer; transition: .18s; font-size: 13px; font-weight: 600; }
.nav-item:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.nav-item:focus-visible, .side-cta:focus-visible, .logout-btn:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
.nav-item.active { background: linear-gradient(90deg, rgba(37, 99, 235, .30), rgba(37, 99, 235, .12)); color: #fff; box-shadow: inset 3px 0 #60a5fa; }
.nav-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .065); font-size: 11.5px; font-weight: 800; color: #9fb2cf; flex: none; }
.nav-item.active .nav-icon { background: #2563eb; color: #fff; }
.nav-text { flex: 1; min-width: 0; }
.nav-count { min-width: 24px; padding: 2px 7px; border-radius: 12px; text-align: center; background: rgba(255, 255, 255, .08); font-size: 10.5px; font-weight: 800; color: #b9c5d6; }
.nav-count.alert, .nav-item.active .nav-count.alert { background: var(--red); color: #fff; }
.nav-separator { height: 1px; background: rgba(255, 255, 255, .065); margin: 18px 10px; }
.side-profile { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .07); flex: none; }
.profile-box { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .045); }
.profile-info { display: flex; gap: 10px; align-items: center; min-width: 0; }
.avatar { width: 36px; height: 36px; border-radius: 11px; background: #243654; color: #dbeafe; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
.profile-copy { min-width: 0; flex: 1; }
.profile-copy b, .profile-copy span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.profile-copy b { font-size: 12.5px; }
.profile-copy span { color: #7f91ac; font-size: 10.5px; margin-top: 3px; }
.logout-btn { display: block; width: 100%; border: 0; background: transparent; color: #8fa0ba; text-align: left; cursor: pointer; margin-top: 10px; padding: 7px 5px 2px; font-size: 12px; text-decoration: none; }
.logout-btn:hover { color: #fff; }
.sidebar-overlay { display: none; position: fixed; inset: 0; z-index: 70; background: rgba(8, 14, 25, .48); }

/* ─── Main area: page header + content ─── */
.main-shell { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 45; min-height: 82px; padding: 14px 30px; display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap;
  background: rgba(244, 247, 251, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(220, 227, 238, .8); }
.mobile-menu { display: none; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 11px; background: #fff; cursor: pointer; font-size: 20px; color: var(--text); flex: none; }
.page-heading { min-width: 0; flex: 1 1 240px; }
.page-heading h1 { margin: 0; font-size: 21px; line-height: 1.3; letter-spacing: -.3px; }
.page-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.btn.count-top { display: none; }
.topbar-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-left: auto; min-width: 0; }
.branch-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.branch-tabs button { min-height: 36px; padding: 7px 13px; border: 1px solid #e2e3fb; background: #f5f7ff; color: #5651b8; border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 700; white-space: nowrap; transition: .18s; }
.branch-tabs button:hover { border-color: #b9b6f3; }
.branch-tabs button.active { background: var(--indigo); color: #fff; border-color: var(--indigo); box-shadow: 0 5px 12px rgba(99, 91, 219, .22); }
.branch-tabs button small { font-weight: 600; opacity: .85; margin-left: 5px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.refresh-time { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.content { max-width: 1800px; margin: 0 auto; padding: 24px 30px 48px; }
#panel > * { animation: fadeUp .2s ease-out; }

/* ─── Buttons ─── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 15px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--text); font-size: 12.5px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; transition: .18s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 13px rgba(20, 35, 60, .10); }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn.small { min-height: 34px; padding: 6px 12px; }
.btn.big { min-height: 46px; padding: 12px 20px; font-size: 15px; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }

/* ─── Cards, tiles ─── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card h2 { margin: 0 0 12px; font-size: 16px; letter-spacing: -.1px; }
.card h3 { margin: 16px 0 8px; font-size: 14.5px; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(100deg, #eff6ff, #fff 70%); border-color: #dbe7fb; }
.cta h2 { margin: 0; }
.cta p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tile { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-sm); min-width: 0; }
.tile .label { font-size: 12px; color: var(--muted); }
.tile .value { font-size: 22px; font-weight: 800; margin-top: 3px; font-variant-numeric: tabular-nums; word-break: break-word; }
.tile .sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.tile.bad .value { color: var(--bad); }
.tile.ok .value { color: var(--ok); }
.tile.over .value { color: var(--over); }
.branch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.branch-grid .card { margin-bottom: 0; }
.branch-card h2 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.dc-link { font-weight: 700; text-decoration: none; border-bottom: 1px dashed currentColor; }
.dc-link:hover { border-bottom-style: solid; }
.section-label { font-size: 12px; font-weight: 800; color: var(--muted); margin: 14px 0 6px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 2px 0; }
.muted { color: var(--muted); }
.banner { border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; border: 1px solid; }
.banner.warn { background: var(--warn-bg); border-color: #fcd34d; color: #78350f; }
.banner.info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.banner.bad { background: var(--bad-bg); border-color: #fca5a5; color: #7f1d1d; }
.empty { color: var(--muted); text-align: center; padding: 24px 8px; }
.loading { color: var(--muted); padding: 28px 8px; text-align: center; }

.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #e2e8f0; color: #334155; white-space: nowrap; }
.badge.open { background: #dbeafe; color: #1e40af; }
.badge.closed { background: #e2e8f0; color: #334155; }
.badge.approved, .badge.sold { background: var(--ok-bg); color: var(--ok); }
.badge.submitted { background: var(--warn-bg); color: var(--warn); }
.badge.rejected { background: var(--bad-bg); color: var(--bad); }
.badge.blind { background: #f5f3ff; color: #5b21b6; }
.badge.stale { background: #f1f5f9; color: #64748b; }
.badge.web-off { background: #f8fafc; color: #94a3b8; }

.progress { height: 10px; background: var(--bar-track); border-radius: 999px; overflow: hidden; margin: 6px 0 2px; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* ─── Tables ─── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 11px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: #f8fafc; color: #45526a; font-size: 12px; font-weight: 700; white-space: nowrap; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:hover td { background: #fbfcfe; }
tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 800; background: #f8fafc; }
td small { color: var(--muted); display: block; margin-top: 2px; }
.neg { color: var(--bad); }
.pos { color: var(--over); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters label { font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.filters .seg-label { font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.filters select { min-height: 38px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.seg button { border: 0; background: #fff; padding: 8px 13px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--muted); white-space: nowrap; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.active { background: var(--primary); color: #fff; }
.seg button small { font-weight: 600; opacity: .85; margin-left: 4px; }
.round-row { display: grid; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.round-row .top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.round-row .top b { font-size: 15px; }
.round-row .meta { font-size: 12.5px; color: var(--muted); }
.round-row .nums { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; font-variant-numeric: tabular-nums; }
.round-row .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.more { display: flex; justify-content: center; margin: 14px 0; }
details summary { cursor: pointer; font-weight: 700; padding: 4px 0; }

/* ─── ควรตรวจใน ProMaxx ─── */
.dc-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.dc-kind { position: relative; display: grid; gap: 2px; text-align: left; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-sm); cursor: pointer; color: var(--text); transition: .18s; min-width: 0; }
.dc-kind:hover { border-color: #9eb9e9; }
.dc-kind.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14), var(--shadow-sm); }
.dc-kind .k-label { font-size: 12.5px; font-weight: 700; color: var(--muted); padding-right: 40px; }
.dc-kind b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dc-kind small { font-size: 11.5px; color: var(--muted); }
.dc-kind .k-icon { position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.k-negative .k-icon { background: #fef2f2; color: var(--red); }
.k-suspect .k-icon { background: #fff7e6; color: var(--amber); }
.k-no_cost .k-icon { background: #f1f0ff; color: var(--indigo); }
.k-dead_stock .k-icon { background: #eef2f7; color: #475569; }
.dc-help { margin: 0 0 14px; padding: 11px 14px; background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 12px; font-size: 13px; color: #334155; }
.dc-help.stale { border-left-color: #94a3b8; }
.dc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.dc-search { display: flex; gap: 8px; flex: 1 1 300px; max-width: 560px; margin: 0 0 0 auto; }
.dc-search input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1.5px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); }
.dc-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .09); }
.dc-count-line { font-size: 12.5px; color: var(--muted); margin: 0 2px 8px; }
.dc-table td { vertical-align: middle; }
.dc-table tr.dc-group td { background: #f5f8fd; color: #334155; font-size: 12.5px; padding: 9px 12px; }
.dc-table tr.dc-group.stale td { background: #f6f7f9; color: var(--muted); }
.dc-table tr.is-stale td { color: #5b6577; }
.dc-table td.dc-product { min-width: 220px; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #eef2ff; color: #4338ca; margin: 4px 4px 0 0; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 14px 0 4px; font-size: 13px; color: var(--muted); }

/* ─── Trend bars: accuracy (one hue) + shortage/overage diverging around a centre line ─── */
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
.trend-row td { vertical-align: middle; }
.acc { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.acc .track { flex: 1; height: 12px; background: var(--bar-track); border-radius: 4px; overflow: hidden; }
.acc .fill { height: 100%; background: var(--bar-acc); border-radius: 0 4px 4px 0; }
.acc b { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.div { display: grid; grid-template-columns: 1fr 2px 1fr; align-items: center; min-width: 220px; height: 16px; }
.div .left { display: flex; justify-content: flex-end; }
.div .mid { height: 16px; background: #94a3b8; }
.div .short { height: 12px; background: var(--bar-short); border-radius: 4px 0 0 4px; margin-right: 2px; }
.div .over { height: 12px; background: var(--bar-over); border-radius: 0 4px 4px 0; margin-left: 2px; }

/* ─── Tablet: narrower data-check cards ─── */
@media (max-width: 1200px) {
  .dc-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ─── Mobile / tablet: the sidebar is a drawer ─── */
@media (max-width: 899.98px) {
  .sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: none; width: min(86vw, var(--sidebar)); }
  .sidebar.open { transform: none; box-shadow: 20px 0 50px rgba(0, 0, 0, .28); }
  .sidebar-overlay.open { display: block; }
  body.drawer-open { overflow: hidden; }
  .side-close { display: grid; }
  .main-shell { margin-left: 0; }
  .mobile-menu { display: grid; place-items: center; }
  .topbar { min-height: 60px; padding: 9px 14px; gap: 8px 10px; }
  .page-heading { flex: 1 1 0; }
  .page-heading h1 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-heading p { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .btn.count-top { display: inline-flex; }
  .topbar-tools { width: 100%; margin-left: 0; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 8px; }
  .topbar-tools::-webkit-scrollbar { display: none; }
  .branch-tabs { flex-wrap: nowrap; }
  .branch-tabs button { min-height: 32px; padding: 5px 11px; }
  .page-actions { flex-wrap: nowrap; }
  .page-actions .btn { min-height: 32px; padding: 5px 11px; }
  .refresh-time { display: none; }
  .content { padding: 14px 12px 40px; }
  .card { padding: 14px; border-radius: 16px; }
  .branch-grid { grid-template-columns: 1fr; gap: 12px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 11px 12px; }
  .tile .value { font-size: 18px; }
  .dc-kinds { gap: 10px; }
  .dc-kind { padding: 12px; }
  .dc-kind b { font-size: 20px; }
  .dc-search { max-width: none; flex-basis: 100%; }
  /* The data-check list becomes one card per row. */
  .dc-table thead { display: none; }
  .dc-table, .dc-table tbody, .dc-table tr, .dc-table td { display: block; width: 100%; }
  .dc-table tr { padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .dc-table td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .dc-table td.num { white-space: normal; }
  .dc-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex: none; }
  .dc-table td.dc-product { display: block; text-align: left; font-weight: 700; padding-bottom: 6px; }
  .dc-table td.dc-product small { font-weight: 400; }
  .dc-table td.dc-product::before, .dc-table tr.dc-group td::before { content: none; }
  .dc-table tr.dc-group { padding: 0; }
  .dc-table tr.dc-group td { display: block; text-align: left; }
  .dc-table td small { display: inline; margin: 0 0 0 4px; }
  .dc-table td.dc-product small { display: block; margin: 2px 0 0; }
}
@media (max-width: 480px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .cta .btn.big { width: 100%; }
}

/* ─── Printable round report (A4) ─── */
body[data-page="report"] { background: #e9eef5; }
.report-page { max-width: 210mm; margin: 0 auto 24px; background: #fff; padding: 14mm 12mm; border-radius: 6px; box-shadow: var(--shadow); }
.report-page h1 { font-size: 20px; margin: 0 0 4px; }
.report-page .card { box-shadow: none; }
.report-page .tiles { grid-template-columns: repeat(4, 1fr); }
.report-page .tile { box-shadow: none; }
.report-page .tile .value { font-size: 16px; }
.report-toolbar { display: flex; gap: 10px; justify-content: space-between; align-items: center; max-width: 210mm; margin: 14px auto; padding: 0 12px; flex-wrap: wrap; }
.signoff { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; page-break-inside: avoid; break-inside: avoid; }
.signoff div { text-align: center; font-size: 14px; }
.signoff .line { border-bottom: 1px dotted #334155; height: 44px; margin-bottom: 6px; }
.report-foot { margin-top: 18px; font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@page { size: A4; margin: 12mm 10mm; }
@media print {
  html, body, body[data-page="report"] { background: #fff; font-size: 11.5px; }
  .no-print, .sidebar, .sidebar-overlay, .topbar, .report-toolbar { display: none !important; }
  .main-shell { margin-left: 0; }
  .report-page { padding: 0; max-width: none; box-shadow: none; border-radius: 0; }
  .card { border: 0; padding: 0; margin-bottom: 10px; box-shadow: none; }
  .table-wrap { overflow: visible; border: 0; border-radius: 0; }
  table { font-size: 10.5px; }
  th, td { padding: 3px 5px; }
  th { position: static; }
  tr, .tile { page-break-inside: avoid; break-inside: avoid; }
  thead { display: table-header-group; }
  .tile { padding: 6px 8px; box-shadow: none; }
  .tile .value { font-size: 13px; }
  a { color: inherit; text-decoration: none; }
  #panel > * { animation: none; }
}
