/* HIMAX ERP – bản demo thiết kế lại. Token dùng chung cho toàn bộ module. */
:root {
  --navy-950: #071528;
  --navy-900: #0b1f3a;
  --navy-850: #10284a;
  --navy-800: #163259;
  --navy-line: #1f3b63;
  --side-text: #c6d3e4;
  --side-muted: #8197b4;

  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e2e7ee;
  --line-strong: #cdd5df;
  --text: #0f1b2d;
  --text-2: #4d5e74;
  --text-3: #66768b;

  --primary: #1765c1;
  --primary-hover: #1257a8;
  --primary-soft: #e8f1fc;
  --primary-line: #b9d3f3;
  --sky: #5ab0ff;

  --ok: #0f7a47;
  --ok-soft: #e5f4ec;
  --warn: #9a5200;
  --warn-soft: #fff1dc;
  --bad: #c22a2a;
  --bad-soft: #fdeaea;
  --info: #1765c1;
  --info-soft: #e8f1fc;
  --neutral: #55657a;
  --neutral-soft: #eef1f5;
  --violet: #6b3fd1;
  --violet-soft: #f0eafd;

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --h-ctrl: 32px;
  --h-row: 40px;

  --shadow-pop: 0 10px 28px rgba(11, 31, 58, .16), 0 2px 6px rgba(11, 31, 58, .08);
  --shadow-float: 0 14px 40px rgba(11, 31, 58, .22), 0 3px 8px rgba(11, 31, 58, .10);

  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Mono', Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.45 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
::selection { background: #cfe2fa; color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c9d2dd; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #aab6c4; }
.num, .code, td.num { font-variant-numeric: tabular-nums; }
.code { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.01em; color: var(--text-2); }
.muted { color: var(--text-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 16px; height: 16px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.i.lg { width: 20px; height: 20px; }
svg.i.sm { width: 14px; height: 14px; }

/* ───────── Khung ───────── */
.app { display: grid; grid-template-columns: auto 1fr; min-height: 100vh; }
.side { display: flex; position: sticky; top: 0; height: 100vh; z-index: 30; }
.rail {
  width: 68px; background: var(--navy-950); display: flex; flex-direction: column; align-items: center;
  padding: 12px 0; gap: 4px; border-right: 1px solid #0d2342;
}
.rail-logo { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; margin-bottom: 10px; overflow: hidden; }
.rail-logo img { width: 36px; height: 36px; object-fit: contain; }
.rail-btn {
  width: 56px; min-height: 52px; border: 0; background: transparent; color: var(--side-muted); border-radius: var(--r-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; position: relative;
  font-size: 10.5px; line-height: 1.15; transition: background .15s, color .15s; text-align: center;
}
.rail-btn:hover { background: rgba(255, 255, 255, .06); color: #e6eef8; }
.rail-btn[aria-current="true"] { background: var(--navy-800); color: #fff; }
.rail-btn[aria-current="true"] svg { color: var(--sky); }
.rail-btn .dot { position: absolute; top: 7px; right: 12px; width: 7px; height: 7px; border-radius: 50%; background: #ff8a3d; box-shadow: 0 0 0 2px var(--navy-950); }
.rail-spacer { flex: 1; }

.panel-nav { width: 244px; background: var(--navy-900); color: var(--side-text); display: flex; flex-direction: column; transition: width .2s var(--ease); overflow: hidden; }
.app.nav-collapsed .panel-nav { width: 0; }
.pn-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--navy-line); }
.pn-title { display: flex; align-items: center; justify-content: space-between; color: #fff; font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.pn-title button { border: 0; background: transparent; color: var(--side-muted); cursor: pointer; padding: 4px; border-radius: 6px; display: grid; }
.pn-title button:hover { color: #fff; background: rgba(255,255,255,.06); }
.ctx {
  margin-top: 10px; width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md);
  background: var(--navy-850); border: 1px solid var(--navy-line); color: #fff; cursor: pointer; text-align: left;
}
.ctx:hover { border-color: #2c4c7a; }
.ctx-avatar { width: 30px; height: 30px; border-radius: 7px; background: #1d4f8f; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 11px; letter-spacing: .02em; flex: none; }
.ctx-text { min-width: 0; flex: 1; }
.ctx-text b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-text span { font-size: 11.5px; color: var(--side-muted); font-family: var(--mono); }
.pn-body { flex: 1; overflow-y: auto; padding: 8px 10px 16px; }
.pn-body::-webkit-scrollbar-thumb { background: #29466f; }
.pn-group { margin-top: 12px; }
.pn-group-h { display: flex; align-items: center; gap: 6px; padding: 4px 8px; font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--side-muted); }
.pn-link {
  display: flex; align-items: center; gap: 10px; padding: 0 10px; height: 34px; border-radius: var(--r-sm); color: var(--side-text);
  text-decoration: none !important; font-size: 13.5px; cursor: pointer; position: relative;
}
.pn-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.pn-link[aria-current="page"] { background: var(--primary); color: #fff; font-weight: 600; }
.pn-link[aria-current="page"] svg { color: #fff; }
.pn-link svg { color: #8ea6c6; }
.pn-link .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-count { font-size: 11px; font-weight: 650; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: #ff8a3d; color: #2a1400; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.pn-link[aria-current="page"] .pn-count { background: #fff; color: var(--primary); }
.pn-soon { font-size: 10.5px; color: #8197b4; border: 1px solid #2a4670; padding: 0 6px; border-radius: 9px; line-height: 16px; }
.pn-link.soon { color: #7f95b3; }
.pn-pin { padding: 8px 8px 2px; display: flex; flex-wrap: wrap; gap: 6px; }
.pn-pin a { font-size: 12px; color: var(--side-text); background: var(--navy-850); border: 1px solid var(--navy-line); padding: 3px 8px; border-radius: 12px; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.pn-pin a:hover { color: #fff; border-color: #2c4c7a; }
.pn-foot { border-top: 1px solid var(--navy-line); padding: 10px 14px; font-size: 12px; color: var(--side-muted); display: flex; align-items: center; gap: 8px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  height: 56px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px;
  padding: 0 20px; position: sticky; top: 0; z-index: 20;
}
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); min-width: 0; }
.crumbs a { color: var(--text-2); }
.crumbs b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-grow { flex: 1; }
.search-trigger {
  width: 320px; height: 34px; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r-md); display: flex; align-items: center;
  gap: 8px; padding: 0 8px 0 10px; color: var(--text-3); cursor: pointer; font-size: 13px;
}
.search-trigger:hover { border-color: var(--line-strong); background: #fff; }
.search-trigger span { flex: 1; text-align: left; }
kbd { font: 600 11px var(--mono); color: var(--text-2); background: #fff; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; line-height: 17px; }
.top-btn { position: relative; width: 34px; height: 34px; border-radius: var(--r-md); border: 0; background: transparent; display: grid; place-items: center; color: var(--text-2); cursor: pointer; }
.top-btn:hover { background: var(--neutral-soft); color: var(--text); }
.top-btn .badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.me { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 3px 8px 3px 3px; border-radius: 20px; cursor: pointer; }
.me:hover { background: var(--neutral-soft); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 650; color: #fff; background: var(--primary); flex: none; }
.me-text { text-align: left; line-height: 1.15; }
.me-text b { display: block; font-size: 13px; font-weight: 600; }
.me-text span { font-size: 11.5px; color: var(--text-3); }

.content { padding: 20px 24px 96px; max-width: 1680px; width: 100%; margin: 0 auto; }

/* ───────── Tiêu đề trang ───────── */
.ph { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.ph-main { flex: 1; min-width: 260px; }
.ph h1 { margin: 0; font-size: 21px; line-height: 1.25; font-weight: 680; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-sub { margin-top: 4px; color: var(--text-3); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.ph-sub span { display: inline-flex; align-items: center; gap: 5px; }
.ph-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ───────── Nút ───────── */
.btn {
  height: var(--h-ctrl); padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: #fff; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13.5px; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { border-color: #aebbcb; background: var(--surface-2); }
.btn:active { transform: translateY(.5px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(23, 101, 193, .3); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--neutral-soft); color: var(--text); }
.btn.danger { color: var(--bad); border-color: #efc4c4; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ok { color: var(--ok); border-color: #b9dcc8; }
.btn.ok:hover { background: var(--ok-soft); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 12.5px; }
.btn.icon { width: var(--h-ctrl); padding: 0; }
.btn.sm.icon { width: 28px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* ───────── Trạng thái ───────── */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neutral-soft); color: var(--neutral); }
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.plain::before { display: none; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.info { background: var(--info-soft); color: var(--info); }
.tag.violet { background: var(--violet-soft); color: var(--violet); }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12px; color: var(--text-2); background: #fff; white-space: nowrap; }

/* ───────── Khối ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.card-h h2, .card-h h3 { margin: 0; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; flex: 1; display: flex; align-items: center; gap: 8px; }
.card-b { padding: 14px 16px; }
.grid-2.full { grid-template-columns: 1fr; }
.grid-2.full > aside { display: none; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; }

/* Dải số liệu: một khối chia ô, bấm để lọc */
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 16px; overflow: hidden; }
.stat { border: 0; background: transparent; text-align: left; padding: 12px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; position: relative; border-right: 1px solid var(--line); transition: background .15s; }
.stat:last-child { border-right: 0; }
.stat:hover { background: var(--surface-2); }
.stat[aria-pressed="true"] { background: var(--primary-soft); }
.stat[aria-pressed="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--primary); }
.stat-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--neutral-soft); color: var(--neutral); flex: none; }
.stat.ok .stat-ic { background: var(--ok-soft); color: var(--ok); }
.stat.warn .stat-ic { background: var(--warn-soft); color: var(--warn); }
.stat.bad .stat-ic { background: var(--bad-soft); color: var(--bad); }
.stat.info .stat-ic { background: var(--info-soft); color: var(--info); }
.stat b { display: block; font-size: 21px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat span { font-size: 12.5px; color: var(--text-2); }
.stat small { display: block; font-size: 11.5px; color: var(--text-3); }

/* ───────── Khung danh sách ───────── */
.views { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; }
.view { border: 0; background: transparent; height: 42px; padding: 0 12px; font-weight: 550; color: var(--text-2); cursor: pointer; position: relative; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 13.5px; }
.view:hover { color: var(--text); }
.view[aria-selected="true"] { color: var(--primary); }
.view[aria-selected="true"]::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }
.view .n { font-size: 11.5px; font-weight: 650; padding: 0 6px; border-radius: 9px; background: var(--neutral-soft); color: var(--text-2); line-height: 18px; font-variant-numeric: tabular-nums; }
.view[aria-selected="true"] .n { background: var(--primary-soft); color: var(--primary); }
.view-add { color: var(--text-3); }

.toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.input { height: var(--h-ctrl); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--text-3); min-width: 0; }
.input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(23, 101, 193, .14); }
.input input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--text); height: 100%; }
.input input::placeholder { color: #7d8b9c; }
.fchip { height: 30px; border: 1px dashed var(--line-strong); background: #fff; border-radius: 15px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.fchip:hover { border-color: #93a3b7; color: var(--text); }
.fchip.on { border-style: solid; border-color: var(--primary-line); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.fchip.on .x { display: inline-grid; }
.fchip .x { display: none; place-items: center; width: 16px; height: 16px; border-radius: 50%; }
.fchip .x:hover { background: rgba(23, 101, 193, .15); }
.tb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }

table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table-wrap { overflow-x: auto; }
table.grid th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-size: 12px; font-weight: 650; color: var(--text-2);
  padding: 0 12px; height: 36px; border-bottom: 1px solid var(--line); white-space: nowrap; letter-spacing: .01em;
}
table.grid th.sort { cursor: pointer; }
table.grid th.sort:hover { color: var(--text); }
table.grid td { padding: 0 12px; height: var(--h-row); border-bottom: 1px solid #edf0f4; white-space: nowrap; }
table.grid tbody tr { transition: background .12s; }
table.grid tbody tr:hover { background: #f6f9fd; }
table.grid tbody tr.sel { background: #eef5fe; }
table.grid tbody tr.click { cursor: pointer; }
table.grid td.chk, table.grid th.chk { width: 40px; padding-right: 0; }
table.grid .row-act { opacity: 0; transition: opacity .12s; display: inline-flex; gap: 2px; }
table.grid tr:hover .row-act, table.grid tr:focus-within .row-act { opacity: 1; }
.app.dense-comfy table.grid td { height: 52px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person .avatar { width: 28px; height: 28px; font-size: 11px; }
.person b { font-weight: 600; display: block; }
.person a { color: var(--text); }
.person a:hover { color: var(--primary); }
.person small { color: var(--text-3); font-size: 12px; }
.cb { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.t-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; color: var(--text-3); font-size: 12.5px; gap: 12px; flex-wrap: wrap; }
.pager { display: flex; gap: 4px; align-items: center; }
.pager button { min-width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm); cursor: pointer; font-variant-numeric: tabular-nums; }
.pager button[aria-current="true"] { border-color: var(--primary); color: var(--primary); font-weight: 650; }
.expiry { display: inline-flex; flex-direction: column; line-height: 1.2; }
.expiry small { font-size: 11.5px; font-weight: 600; }
.expiry.bad small { color: var(--bad); }
.expiry.warn small { color: var(--warn); }
.expiry.ok small { color: var(--text-3); font-weight: 500; }
.files { display: flex; gap: 4px; }
.thumb { width: 30px; height: 30px; border-radius: 5px; border: 1px solid var(--line); background: linear-gradient(135deg, #dfe8f4, #f4f7fb); display: grid; place-items: center; color: #6d84a3; cursor: zoom-in; }
.thumb.pdf { color: #c22a2a; background: #fdf1f1; font: 700 8.5px var(--mono); }
.thumb:hover { border-color: var(--primary); }
.sub-row td { background: #fafbfd; color: var(--text-3); height: 34px; font-size: 12.5px; }
.sub-row td:first-child { box-shadow: inset 3px 0 0 #d5dde7; }
.toggle-old { border: 0; background: transparent; color: var(--text-3); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px; border-radius: 4px; }
.toggle-old:hover { color: var(--primary); background: var(--primary-soft); }

/* Thanh thao tác hàng loạt */
.bulk {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, calc(100% + 48px)); background: var(--navy-900); color: #fff; border-radius: 12px; box-shadow: var(--shadow-float);
  display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 16px; z-index: 40; transition: transform .25s var(--ease); white-space: nowrap;
}
.bulk:not(.show), .toast:not(.show) { visibility: hidden; }
.bulk.show { transform: translate(-50%, 0); }
.bulk b { font-variant-numeric: tabular-nums; margin-right: 8px; }
.bulk .btn { background: transparent; border-color: #2c4a74; color: #e6eef8; }
.bulk .btn:hover { background: var(--navy-800); }
.bulk .btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Xem nhanh */
.peek { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; background: #fff; border-left: 1px solid var(--line); box-shadow: var(--shadow-float); z-index: 50; transform: translateX(105%); transition: transform .25s var(--ease); display: flex; flex-direction: column; }
.peek.show { transform: translateX(0); }
.peek-h { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.peek-b { padding: 16px; overflow-y: auto; flex: 1; }
.peek-f { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

/* ───────── Hồ sơ (chi tiết) ───────── */
.entity { display: flex; gap: 16px; padding: 16px; align-items: center; flex-wrap: wrap; }
.entity-photo { width: 64px; height: 64px; border-radius: 14px; background: linear-gradient(160deg, #2d6fc0, #123d73); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; letter-spacing: -.02em; flex: none; }
.entity-main { flex: 1; min-width: 240px; }
.entity-main h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.copy { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r-sm); height: 24px; padding: 0 6px 0 8px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.copy:hover { border-color: var(--primary-line); color: var(--primary); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 13px; color: var(--text-2); }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.facts svg { color: var(--text-3); }
.entity-kpis { display: grid; grid-auto-flow: column; border-top: 1px solid var(--line); }
.ek { padding: 10px 16px; border-right: 1px solid var(--line); }
.ek:last-child { border-right: 0; }
.ek span { font-size: 12px; color: var(--text-3); display: block; }
.ek b { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ek b.bad { color: var(--bad); } .ek b.warn { color: var(--warn); } .ek b.ok { color: var(--ok); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 8px; background: #fff; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow-x: auto; }
.tabs + .tab-body { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); background: #fff; }
.tab-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden; }
.tab-card .tabs { border-radius: 0; }

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #edf0f4; align-items: flex-start; }
.check-list li:last-child { border-bottom: 0; }
.ck { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.ck.ok { background: var(--ok-soft); color: var(--ok); } .ck.bad { background: var(--bad-soft); color: var(--bad); } .ck.warn { background: var(--warn-soft); color: var(--warn); } .ck.none { background: var(--neutral-soft); color: var(--neutral); }
.check-list b { font-weight: 600; font-size: 13.5px; display: block; }
.check-list small { color: var(--text-3); font-size: 12px; }
.check-list .act { margin-left: auto; }
.meter { height: 6px; background: var(--neutral-soft); border-radius: 3px; overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; }

.dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dl div { padding: 12px 16px; border-bottom: 1px solid #edf0f4; border-right: 1px solid #edf0f4; min-width: 0; }
.dl div:nth-child(3n) { border-right: 0; }
.dl dt { font-size: 12px; color: var(--text-3); margin-bottom: 3px; }
.dl dd { margin: 0; font-weight: 550; display: flex; align-items: center; gap: 8px; min-height: 22px; overflow-wrap: anywhere; }
.dl dd.empty { color: var(--text-3); font-weight: 400; }
.section-h { padding: 14px 16px 8px; font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }

/* ───────── Lịch sử ───────── */
.hist { display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.hist-main { border-right: 1px solid var(--line); min-width: 0; }
.hist-summary { display: flex; gap: 18px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: 13px; color: var(--text-2); align-items: center; }
.hist-summary b { color: var(--text); font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; background: var(--neutral-soft); border-radius: var(--r-md); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; height: 26px; padding: 0 10px; border-radius: 6px; font-size: 12.5px; font-weight: 550; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(11, 31, 58, .12); }
.seg .n { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.day { position: sticky; top: 56px; z-index: 1; background: rgba(248, 250, 252, .96); backdrop-filter: blur(6px); padding: 8px 16px; font-size: 12px; font-weight: 650; color: var(--text-2); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.ev { display: grid; grid-template-columns: 52px 28px minmax(0, 1fr) auto; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #edf0f4; align-items: start; position: relative; }
.ev:hover { background: #fafcfe; }
.ev-time { font: 500 12px var(--mono); color: var(--text-3); padding-top: 4px; }
.ev-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--neutral-soft); color: var(--neutral); position: relative; z-index: 1; }
.ev-ic.create { background: var(--ok-soft); color: var(--ok); }
.ev-ic.update { background: var(--info-soft); color: var(--info); }
.ev-ic.verify { background: var(--ok-soft); color: var(--ok); }
.ev-ic.return { background: var(--bad-soft); color: var(--bad); }
.ev-ic.file { background: var(--violet-soft); color: var(--violet); }
.ev-ic.assign { background: #e3f4f6; color: #0b6b78; }
.ev-ic.access { background: var(--warn-soft); color: var(--warn); }
.ev-text { min-width: 0; padding-top: 3px; }
.ev-text p { margin: 0; line-height: 1.45; }
.ev-text .who { font-weight: 650; }
.ev-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ev-more { border: 0; background: transparent; color: var(--primary); font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; padding: 2px 4px; border-radius: 4px; }
.ev-more:hover { background: var(--primary-soft); }
.ev-more svg { transition: transform .2s var(--ease); }
.ev.open .ev-more svg { transform: rotate(180deg); }
.diff { display: none; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; font-size: 13px; }
.ev.open .diff { display: block; }
.diff table { width: 100%; border-collapse: collapse; }
.diff th { background: var(--surface-2); font-size: 11.5px; font-weight: 650; color: var(--text-3); text-align: left; padding: 6px 10px; text-transform: uppercase; letter-spacing: .04em; }
.diff td { padding: 7px 10px; border-top: 1px solid #edf0f4; vertical-align: top; }
.diff td:first-child { color: var(--text-2); width: 26%; }
.diff .old { color: var(--bad); text-decoration: line-through; text-decoration-color: rgba(194, 42, 42, .45); background: #fff6f6; border-radius: 3px; padding: 0 4px; }
.diff .new { color: var(--ok); background: #f0faf4; border-radius: 3px; padding: 0 4px; font-weight: 600; }
.diff .none { color: var(--text-3); font-style: italic; }
.diff-foot { display: flex; gap: 8px; padding: 8px 10px; border-top: 1px solid #edf0f4; background: var(--surface-2); flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--text-3); }
.reason { margin-top: 8px; padding: 8px 10px; background: var(--bad-soft); border-radius: var(--r-sm); color: #7d1d1d; font-size: 13px; }
.collapsed-ev { margin: 0; padding: 6px 16px 6px 78px; border-bottom: 1px solid #edf0f4; font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 8px; background: repeating-linear-gradient(0deg, transparent, transparent); }
.collapsed-ev button { border: 0; background: transparent; color: var(--primary); cursor: pointer; font-weight: 600; font-size: 12.5px; }
.hist-side { padding: 14px 16px; display: grid; gap: 18px; align-content: start; }
.hist-side h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.actor { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.actor .avatar { width: 24px; height: 24px; font-size: 10px; }
.actor .grow { flex: 1; min-width: 0; }
.actor small { display: block; color: var(--text-3); font-size: 11.5px; }
.actor .n { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 600; }
.switch { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.switch input { appearance: none; width: 30px; height: 18px; border-radius: 9px; background: #c3ccd8; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(12px); }
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 44px; }
.mini-bars i { flex: 1; background: #c9daf1; border-radius: 2px 2px 0 0; min-height: 3px; }
.mini-bars i.hi { background: var(--primary); }

/* ───────── Lớp phủ ───────── */
.scrim { position: fixed; inset: 0; background: rgba(7, 21, 40, .42); z-index: 60; display: none; align-items: flex-start; justify-content: center; padding-top: 10vh; animation: fade .15s ease-out; }
.scrim.show { display: flex; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.palette { width: min(640px, 94vw); background: #fff; border-radius: 14px; box-shadow: var(--shadow-float); overflow: hidden; animation: rise .18s var(--ease); }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 54px; border-bottom: 1px solid var(--line); }
.palette-in input { border: 0; outline: 0; flex: 1; font-size: 16px; }
.palette-list { max-height: 420px; overflow-y: auto; padding: 6px; }
.pg { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 10px 10px 4px; }
.pi { display: flex; align-items: center; gap: 10px; padding: 0 10px; height: 40px; border-radius: 8px; cursor: pointer; }
.pi[aria-selected="true"] { background: var(--primary-soft); }
.pi[aria-selected="true"] .pi-ic { color: var(--primary); }
.pi-ic { color: var(--text-3); display: grid; }
.pi .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi small { color: var(--text-3); font-size: 12px; }
.palette-f { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); background: var(--surface-2); }

.modal { width: min(760px, 96vw); max-height: 86vh; background: #fff; border-radius: 12px; box-shadow: var(--shadow-float); display: flex; flex-direction: column; animation: rise .18s var(--ease); margin-top: -4vh; }
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal-h h2 { margin: 0; font-size: 16px; font-weight: 680; flex: 1; }
.modal-b { padding: 18px 20px; overflow-y: auto; }
.modal-f { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.modal-f .left { margin-right: auto; font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.drop { border: 1.5px dashed var(--primary-line); background: #f6faff; border-radius: var(--r-lg); padding: 14px; display: flex; gap: 12px; align-items: center; }
.drop-files { display: flex; gap: 10px; flex-wrap: wrap; }
.dfile { width: 112px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; overflow: hidden; font-size: 11.5px; }
.dfile .pv { height: 70px; background: linear-gradient(135deg, #dbe6f3, #eef3f9); display: grid; place-items: center; color: #6d84a3; position: relative; }
.dfile .pv .scan { position: absolute; left: 0; right: 0; height: 2px; background: var(--sky); box-shadow: 0 0 10px var(--sky); animation: scan 1.6s ease-in-out infinite; }
@keyframes scan { 0% { top: 6px; } 50% { top: 62px; } 100% { top: 6px; } }
.dfile div:last-child { padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.drop-add { width: 112px; height: 96px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); display: grid; place-items: center; text-align: center; color: var(--text-3); font-size: 12px; background: #fff; cursor: pointer; }
.ai { margin: 14px 0 4px; padding: 10px 12px; border-radius: var(--r-md); background: var(--violet-soft); color: #3f2391; display: flex; gap: 10px; align-items: center; font-size: 13px; }
.ai svg { color: var(--violet); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.field label i { color: var(--bad); font-style: normal; }
.field .input { width: 100%; }
.field .input.ai-filled { border-color: #c9b6f3; background: #fbf9ff; }
.field .hint { font-size: 11.5px; color: var(--violet); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.field.full { grid-column: 1 / -1; }
.select { justify-content: space-between; cursor: pointer; color: var(--text); }
.dd { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 4px; z-index: 5; display: none; }
.dd.open .dd-menu { display: block; }
.dd-menu div { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.dd-menu div:hover { background: var(--surface-2); }
.dd-menu div.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.dd-menu .add { border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 6px 6px; color: var(--primary); font-weight: 600; display: flex; gap: 6px; align-items: center; }

.pop { position: absolute; top: 48px; right: 70px; width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); display: none; z-index: 45; overflow: hidden; animation: rise .15s var(--ease); }
.pop.show { display: block; }
.pop-h { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-weight: 650; }
.note { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #edf0f4; cursor: pointer; }
.note:hover { background: var(--surface-2); }
.note.unread { background: #f7fbff; }
.note p { margin: 0; font-size: 13px; }
.note small { color: var(--text-3); font-size: 12px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 160%); background: var(--navy-900); color: #fff; padding: 10px 10px 10px 16px; border-radius: 10px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-float); z-index: 80; transition: transform .25s var(--ease); font-size: 13.5px; }
.toast.show { transform: translate(-50%, 0); }
.toast button { border: 0; background: rgba(255,255,255,.1); color: #9fd0ff; font-weight: 650; padding: 5px 10px; border-radius: 6px; cursor: pointer; }

/* ───────── Dashboard ───────── */
.dash { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.queue-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #edf0f4; cursor: pointer; }
.queue-item:last-child { border-bottom: 0; }
.queue-item:hover { background: var(--surface-2); }
.queue-n { min-width: 40px; height: 32px; padding: 0 8px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.queue-n.bad { background: var(--bad-soft); color: var(--bad); }
.queue-n.warn { background: var(--warn-soft); color: var(--warn); }
.queue-n.info { background: var(--info-soft); color: var(--info); }
.queue-item .grow { flex: 1; min-width: 0; }
.queue-item b { font-weight: 600; display: block; }
.queue-item small { color: var(--text-3); font-size: 12.5px; }
.feed-row { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #edf0f4; font-size: 13px; }
.feed-row:last-child { border-bottom: 0; }
.feed-row .avatar { width: 26px; height: 26px; font-size: 10px; }
.feed-row small { display: block; color: var(--text-3); font-size: 12px; }
.proj-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 90px; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid #edf0f4; cursor: pointer; }
.proj-row:hover { background: var(--surface-2); }
.proj-row:last-child { border-bottom: 0; }

/* ───────── Thư viện thành phần ───────── */
.lib { display: grid; gap: 16px; }
.lib-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.swatch { width: 132px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; font-size: 12px; background: #fff; }
.swatch i { display: block; height: 44px; }
.swatch div { padding: 6px 8px; }
.swatch code { font: 11px var(--mono); color: var(--text-3); display: block; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.icon-grid div { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 6px; display: grid; justify-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); text-align: center; background: #fff; }
.skel { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #edf1f6 25%, #f6f8fb 50%, #edf1f6 75%); background-size: 200% 100%; animation: sh 1.3s infinite linear; }
@keyframes sh { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 36px 16px; }
.empty-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--primary-soft); color: var(--primary); }
.empty b { display: block; font-size: 15px; margin-bottom: 4px; }
.empty p { margin: 0 auto 14px; color: var(--text-3); max-width: 360px; }
.rule { display: grid; grid-template-columns: 180px 1fr; gap: 6px 16px; font-size: 13px; }
.rule dt { color: var(--text-3); }
.rule dd { margin: 0; }

/* Ghi chú thiết kế */
.notes-fab { position: fixed; right: 16px; bottom: 16px; z-index: 35; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid #d6c8f6; background: #fff; color: var(--violet); font-weight: 650; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; box-shadow: var(--shadow-pop); }
.notes-panel { position: fixed; right: 16px; bottom: 58px; width: 420px; max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-float); z-index: 35; display: none; font-size: 13px; }
.notes-panel.show { display: block; }
.notes-panel h3 { margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.notes-panel ul { margin: 0; padding: 10px 14px 14px 30px; display: grid; gap: 7px; }
.notes-panel .be { font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 4px; padding: 0 5px; margin-left: 4px; }
.notes-panel .fe { font-size: 11px; font-weight: 700; color: var(--ok); background: var(--ok-soft); border-radius: 4px; padding: 0 5px; margin-left: 4px; }

/* Dải điều kiện trong tab Giấy tờ */
.elig { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: center; background: var(--surface-2); }
.elig-h { font-weight: 650; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.elig-i { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px 0 4px; border: 1px solid var(--line); border-radius: 15px; background: #fff; font-size: 12.5px; }
.elig-i .ck { width: 22px; height: 22px; margin: 0; }
.elig-i small { color: var(--text-3); }

/* Danh sách thẻ trên điện thoại */
.mlist { display: none; }
.mcard { display: flex; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.mcard:last-child { border-bottom: 0; }
.mcard .grow { flex: 1; min-width: 0; }
.mcard .t { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.mcard .t b { font-weight: 650; }
.mcard .meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.mcard .cb { margin-top: 6px; width: 20px; height: 20px; }

/* Thanh dưới trên điện thoại */
.bnav { display: none; }

@media (max-width: 1180px) {
  .grid-2, .dash { grid-template-columns: 1fr; }
  .hist { grid-template-columns: 1fr; }
  .hist-main { border-right: 0; }
  .hist-side { display: none; }
  .dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl div:nth-child(3n) { border-right: 1px solid #edf0f4; }
  .dl div:nth-child(2n) { border-right: 0; }
}
@media (max-width: 1000px) { .panel-nav { width: 0; } .search-trigger { width: 200px; } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .top { padding: 0 12px; }
  .search-trigger span, .search-trigger kbd, .me-text, .crumbs a, .crumbs .sep { display: none; }
  .search-trigger { width: 34px; padding: 0; justify-content: center; border: 0; background: transparent; }
  .content { padding: 14px 12px 120px; }
  .stats { grid-auto-columns: minmax(148px, 1fr); overflow-x: auto; scroll-snap-type: x mandatory; }
  .stat { scroll-snap-align: start; padding: 10px 12px; }
  .stat small { display: none; }
  .table-wrap.has-m, .t-foot.has-m { display: none; }
  .mlist { display: block; }
  .views { padding: 0 4px; }
  .toolbar .input { width: 100% !important; }
  .toolbar .tb-sep, .toolbar .muted, .toolbar > [data-act="dense"], .toolbar > .dd:last-child { display: none; }
  .ph-actions .btn.primary { position: fixed; left: 12px; right: 12px; bottom: 72px; height: 44px; z-index: 25; box-shadow: var(--shadow-float); }
  .notes-fab { bottom: 124px; }
  .entity-kpis { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
  .dl { grid-template-columns: 1fr; }
  .dl div { border-right: 0 !important; }
  .form { grid-template-columns: 1fr; }
  .modal { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; margin: 0; }
  .scrim { padding-top: 0; }
  .peek { width: 100vw; }
  .ev { grid-template-columns: 40px 28px minmax(0, 1fr); }
  .ev > :last-child:not(.ev-text) { display: none; }
  .collapsed-ev { padding-left: 16px; }
  .notes-fab { right: 12px; bottom: 124px; }
  .notes-panel { left: 12px; right: 12px; width: auto; bottom: 116px; }
  .btn, .fchip, .input { min-height: 40px; }
  table.grid th { top: 56px; }
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 62px; background: #fff; border-top: 1px solid var(--line); z-index: 30; }
  .bnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--text-2); text-decoration: none; }
  .bnav a[aria-current="page"] { color: var(--primary); font-weight: 650; }
  .bulk { bottom: 74px; }
  .hide-m { display: none !important; }
}
