:root {
  --bg: #f6f4ef; --panel: #ffffff; --panel-2: #faf8f3; --line: #e6e1d6; --line-2: #efebe3;
  --ink: #211d16; --ink-2: #5d564a; --ink-3: #8f877a;
  --gold: #b8860b; --gold-2: #d9a520; --gold-bg: #fbf3dc; --gold-ink: #7a5a06;
  --red: #c0392b; --red-bg: #fdecea; --orange: #c46a0a; --orange-bg: #fff2e0;
  --green: #1e8a5a; --green-bg: #e6f5ed; --blue: #2b5fb3; --blue-bg: #e9f0fb; --gray-bg: #f0eee9;
  --side: #1c1710; --side-ink: #d9d2c3; --side-ink-2: #8d8473; --side-hi: #2a2318;
  --shadow: 0 1px 2px rgba(30, 25, 15, .06), 0 4px 16px rgba(30, 25, 15, .06);
  --r: 10px; --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #15120d; --panel: #1e1a14; --panel-2: #241f17; --line: #352e23; --line-2: #2b251c;
  --ink: #f1ece2; --ink-2: #bdb4a3; --ink-3: #8a8171;
  --gold: #e0b03a; --gold-2: #f0c453; --gold-bg: #3a2e12; --gold-ink: #f3d27d;
  --red: #ff7b6e; --red-bg: #3c1d19; --orange: #ffa94d; --orange-bg: #3a2810; --green: #5fd39a; --green-bg: #15301f;
  --blue: #84aef5; --blue-bg: #18263c; --gray-bg: #2a251d;
  --side: #110e0a; --side-hi: #221c13; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* ---------- Gate (đăng nhập) ---------- */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, #3b2f17 0%, #15110b 55%, #0e0b07 100%); }
.gate-card { width: 100%; max-width: 420px; background: #1e1910; color: #f1ece2; border: 1px solid #3a3020; border-radius: 16px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.gate-card h1 { font-size: 21px; margin: 12px 0 4px; text-align: center; }
.gate-card .sub { text-align: center; color: #a99f8b; margin: 0 0 22px; font-size: 13px; }
.gate-card .org { text-align: center; color: var(--gold-2); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.gate-card .logo-big { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto; display: grid; place-items: center; background: linear-gradient(135deg, #f0c453, #b8860b); color: #2a1f05; }
.gate-card label { display: block; font-size: 12.5px; font-weight: 600; color: #cfc6b4; margin: 14px 0 6px; }
.gate-card input { width: 100%; padding: 11px 12px; border-radius: 9px; border: 1px solid #3d3424; background: #15110b; color: #f1ece2; outline: none; }
.gate-card input:focus { border-color: var(--gold-2); }
.gate-card .btn.primary { width: 100%; margin-top: 20px; padding: 12px; }
.gate-card .msg { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: #2a2416; font-size: 13px; color: #e9dcb8; }
.gate-card .msg.err { background: #3c1d19; color: #ffb3a9; }
.gate-card .links { text-align: center; margin-top: 16px; font-size: 13px; color: #a99f8b; }
.gate-card .linkbtn { background: none; border: 0; color: var(--gold-2); cursor: pointer; padding: 0; text-decoration: underline; }
.gate-card .foot { text-align: center; font-size: 11.5px; color: #6f6656; margin-top: 22px; }
.demo-pick { display: grid; gap: 8px; margin-top: 16px; }
.demo-pick button { text-align: left; padding: 11px 14px; border-radius: 10px; border: 1px solid #3d3424; background: #15110b; cursor: pointer; }
.demo-pick button:hover { border-color: var(--gold-2); }
.demo-pick b { display: block; } .demo-pick span { font-size: 12px; color: #a99f8b; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 10px 30px; scrollbar-width: thin; scrollbar-color: #3a3020 transparent; }
.brand { display: flex; gap: 10px; align-items: center; padding: 6px 8px 16px; border-bottom: 1px solid #2c2519; margin-bottom: 10px; }
.logo { width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, #f0c453, #b8860b); color: #2a1f05; }
.brand-t { font-weight: 700; font-size: 13.5px; color: #f6efe0; line-height: 1.25; }
.brand-s { font-size: 11.5px; color: var(--side-ink-2); }
.nav-g { margin-top: 14px; }
.nav-h { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--side-ink-2); padding: 0 10px 5px; text-transform: uppercase; }
.nav-a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; color: var(--side-ink); text-decoration: none; font-size: 13.5px; }
.nav-a:hover { background: var(--side-hi); color: #fff; }
.nav-a.on { background: #3a2e12; color: #f6d27a; font-weight: 600; }
.nav-a.sub { padding-left: 34px; font-size: 13px; color: #b3aa98; }
.nav-a.sub.on { color: #f6d27a; }
.nav-a svg { flex: none; opacity: .85; }
.nav-a .cnt { margin-left: auto; font-size: 11px; font-weight: 600; padding: 0 7px; border-radius: 10px; background: #2c2519; color: #cfc6b4; line-height: 18px; }
.nav-a .cnt.red { background: #5a1f17; color: #ffb3a9; } .nav-a .cnt.org { background: #4d3410; color: #ffcf8a; }

.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 22px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; color: var(--ink-3); }
.search input { flex: 1; border: 0; outline: 0; background: none; padding: 9px 0; color: var(--ink); }
.search:focus-within { border-color: var(--gold); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 36px; height: 36px; border-radius: 9px; border: 0; background: none; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--gray-bg); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; }
.menu-btn { display: none; }
.user-btn { display: flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 20px; }
.user-btn:hover { background: var(--gray-bg); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gold-bg); color: var(--gold-ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.user-n { font-weight: 600; font-size: 13px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; background: var(--orange-bg); color: var(--orange); }

.view { padding: 22px 22px 60px; max-width: 1500px; width: 100%; }
.page-h { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-h h1 { font-size: 21px; margin: 0; letter-spacing: -.01em; }
.page-h .desc { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.page-h .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons / inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: var(--gold); color: #241a03; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--red); } .btn.danger:hover { border-color: var(--red); }
.btn.ghost { border-color: transparent; background: none; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: default; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { padding: 5px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { font-size: 11px; opacity: .7; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.filters input, .filters select { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); min-width: 0; }
.filters input[type=search] { flex: 1; min-width: 200px; }
.filters select { max-width: 200px; }

/* ---------- Cards / table ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); font-weight: 700; }
.card-h .acts { margin-left: auto; }
.card-b { padding: 14px 16px; }
.tbl-wrap { overflow: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); position: sticky; top: 0; white-space: nowrap; cursor: pointer; user-select: none; }
.tbl th.sorted::after { content: " ↓"; } .tbl th.sorted.asc::after { content: " ↑"; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr.row { cursor: pointer; } .tbl tr.row:hover td { background: var(--panel-2); }
.tbl td.sum { min-width: 260px; max-width: 460px; }
.tbl .strong { font-weight: 600; }
.tbl-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--ink-3); font-size: 12.5px; }
.tbl-foot .pg { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--gray-bg); color: var(--ink-2); }
.badge.red { background: var(--red-bg); color: var(--red); } .badge.orange { background: var(--orange-bg); color: var(--orange); }
.badge.green { background: var(--green-bg); color: var(--green); } .badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.gold { background: var(--gold-bg); color: var(--gold-ink); }
.lock { color: var(--red); font-size: 11px; font-weight: 700; }

/* ---------- Dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 14px 16px; text-decoration: none; color: inherit; display: block; }
.kpi:hover { border-color: var(--gold); }
.kpi .l { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 2px; letter-spacing: -.02em; }
.kpi .h { font-size: 12px; color: var(--ink-3); }
.kpi.red .v { color: var(--red); } .kpi.orange .v { color: var(--orange); } .kpi.gold .v { color: var(--gold); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.list-item { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; align-items: flex-start; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--panel-2); }
.list-item .t { font-weight: 600; } .list-item .s { font-size: 12.5px; color: var(--ink-3); }
.list-item .r { margin-left: auto; text-align: right; flex: none; }

/* ---------- Modal / drawer ---------- */
.modal, .drawer { position: fixed; inset: 0; z-index: 50; background: rgba(15, 12, 8, .5); }
.modal { display: grid; place-items: start center; padding: 5vh 16px; overflow-y: auto; }
.modal-box { width: 100%; max-width: 760px; background: var(--panel); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-box.narrow { max-width: 460px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal-h h3 { margin: 0; font-size: 16.5px; }
.modal-h .x { margin-left: auto; }
.modal-b { padding: 18px 20px; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--panel-2); border-radius: 0 0 14px 14px; }
.drawer { display: flex; justify-content: flex-end; }
.drawer-box { width: min(620px, 100%); height: 100%; background: var(--panel); overflow-y: auto; box-shadow: -10px 0 40px rgba(0,0,0,.2); animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: .5; } }
.dr-h { position: sticky; top: 0; background: var(--panel); z-index: 2; padding: 16px 20px 12px; border-bottom: 1px solid var(--line-2); }
.dr-h .kicker { font-size: 11.5px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.dr-h h2 { margin: 4px 0 8px; font-size: 17px; line-height: 1.35; }
.dr-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.dr-b { padding: 16px 20px 40px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; word-break: break-word; }
.sec-t { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 22px 0 8px; display: flex; align-items: center; gap: 8px; }
.files { display: grid; gap: 6px; }
.file { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; }
.file .ext { width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; background: var(--ink-3); flex: none; }
.file .nm { font-weight: 600; font-size: 13px; word-break: break-all; } .file .meta { font-size: 11.5px; color: var(--ink-3); }
.file .a { margin-left: auto; display: flex; gap: 4px; flex: none; }
.file .nm.link { cursor: pointer; } .file .nm.link:hover { color: var(--gold); text-decoration: underline; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- Trình xem file ---------- */
.viewer { position: fixed; inset: 0; z-index: 65; background: #15120ee8; display: flex; flex-direction: column; backdrop-filter: blur(3px); }
.vw-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #1e1a14; color: #f1ece2; border-bottom: 1px solid #352e23; }
.vw-bar .ext { width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; flex: none; }
.vw-t { min-width: 0; flex: 1; } .vw-t .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .vw-t .meta { font-size: 12px; color: #a99f8b; }
.vw-acts { display: flex; gap: 6px; align-items: center; flex: none; }
.vw-acts .icon-btn { color: #e8e0cf; font-size: 22px; } .vw-acts .icon-btn:hover:not(:disabled) { background: #2e271d; color: #fff; }
.vw-acts .btn { background: #2a241b; border-color: #3d3424; color: #f1ece2; }
.vw-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 16px; }
.vw-frame { width: 100%; max-width: 1100px; flex: 1; min-height: 70vh; border: 0; border-radius: 8px; background: #fff; }
.vw-img { max-width: 100%; max-height: calc(100vh - 110px); margin: auto; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.4); background: #fff; }
.vw-doc { width: 100%; max-width: 1000px; }
.vw-doc .docx-wrapper { background: transparent !important; padding: 0 !important; }
.vw-doc .docx-wrapper > section.docx { margin: 0 auto 16px !important; box-shadow: 0 6px 30px rgba(0,0,0,.35); }
.vw-sheet { width: 100%; max-width: 1400px; overflow: auto; background: #fff; color: #222; border-radius: 8px; }
.vw-sheet table { border-collapse: collapse; font-size: 12.5px; }
.vw-sheet td { border: 1px solid #ddd; padding: 4px 8px; white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
.vw-sheet tr:first-child td { background: #f4f1ea; font-weight: 600; position: sticky; top: 0; }
.vw-tabs .chip { background: #2a241b; color: #e8e0cf; border-color: #3d3424; }
.vw-tabs .chip.on { background: var(--gold-2); color: #241a03; border-color: var(--gold-2); }
.vw-tabs { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; max-width: 1400px; margin-bottom: 10px; }
.vw-text { width: 100%; max-width: 1000px; margin: 0; padding: 18px; background: #fff; color: #222; border-radius: 8px; white-space: pre-wrap; word-break: break-word; font: 13px/1.55 Consolas, "Courier New", monospace; }
.vw-msg { margin: auto; text-align: center; color: #e8e0cf; max-width: 520px; }
.vw-msg .muted { color: #a99f8b; }
.vw-msg .ext.big { width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; margin: 0 auto 12px; }
@media (max-width: 860px) { .vw-body { padding: 8px; } .vw-frame { min-height: 80vh; } }

.drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 16px; text-align: center; color: var(--ink-3); cursor: pointer; font-size: 13px; }
.drop.over, .drop:hover { border-color: var(--gold); color: var(--gold-ink); background: var(--gold-bg); }
.timeline { display: grid; gap: 10px; font-size: 13px; }
.timeline .it { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }

/* ---------- Form ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.form label.chk { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.form input:not([type=checkbox]), .form select, .form textarea { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); font-weight: 400; font-size: 13.5px; width: 100%; }
.form textarea { min-height: 70px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid color-mix(in srgb, var(--gold) 40%, transparent); border-color: var(--gold); }
.form .req::after { content: " *"; color: var(--red); }
.form .hint { font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.form-sec { grid-column: 1 / -1; font-size: 11.5px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.numbox { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--gold-bg); color: var(--gold-ink); font-size: 13px; }
.numbox b { font-size: 17px; }

/* ---------- Pop menu / toast ---------- */
.pop { position: fixed; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; min-width: 240px; max-width: 360px; max-height: 70vh; overflow-y: auto; }
.pop .pi { display: flex; gap: 8px; align-items: flex-start; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px; border: 0; background: none; cursor: pointer; font-size: 13px; }
.pop .pi:hover { background: var(--gray-bg); }
.pop .ph { padding: 6px 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--ink-3); }
.pop hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 0; }
.toast { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 90vw; }
.toast.err { background: var(--red); color: #fff; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--gold); }
.switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12.5px; }
.diff { font-size: 12px; color: var(--ink-3); } .diff b { color: var(--ink-2); font-weight: 600; }
.search-res mark { background: var(--gold-bg); color: inherit; border-radius: 2px; }

@media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .side { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.45); display: none; }
  .app.nav-open .scrim { display: block; }
  .menu-btn { display: grid; }
  .top { padding: 8px 12px; gap: 6px; }
  .user-n { display: none; }
  .view { padding: 16px 12px 60px; }
  .form { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; }
  .modal { padding: 0; } .modal-box { border-radius: 0; min-height: 100%; }
  .hide-m { display: none; }
}
@media print {
  .side, .top, .page-h .acts, .filters, .chips, .tbl-foot { display: none !important; }
  .app { display: block; } .card { box-shadow: none; border: 0; }
}
