/* 衡账 · 对账系统 —— 界面样式 */
:root {
  --ink: #101b2d;
  --ink-2: #17243a;
  --ink-3: #22324c;
  --bg: #f4f6f8;
  --card: #ffffff;
  --line: #e7eaf0;
  --line-2: #f0f2f6;
  --text: #1b2431;
  --muted: #6c7887;
  --muted-2: #98a2ae;
  --jade: #0f8a6a;
  --jade-2: #12a37d;
  --jade-soft: #e8f6f1;
  --amber: #b8720f;
  --amber-soft: #fdf3e2;
  --red: #c23b3b;
  --red-soft: #fdeeee;
  --blue: #2f6fd0;
  --blue-soft: #eaf1fd;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 27, 45, .04), 0 8px 24px -16px rgba(16, 27, 45, .18);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- 布局 ---------- */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  background: var(--ink); color: #dfe6ef; padding: 22px 16px 16px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 6px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand .logo, .login-card .logo {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(145deg, #1d3a58, #0d2036); color: #6ee0bd; border: 1px solid rgba(110,224,189,.35);
  font-weight: 700; font-size: 19px; letter-spacing: 1px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 17px; letter-spacing: 2px; color: #fff; }
.brand-text small { font-size: 11px; color: #8fa0b6; letter-spacing: .5px; }
.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 12px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: #a7b5c8; font-size: 13.5px; transition: .16s; white-space: nowrap;
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #eaf1f8; }
.nav-item.active { background: linear-gradient(90deg, rgba(18,163,125,.22), rgba(18,163,125,.08)); color: #7fe6c3; box-shadow: inset 2px 0 0 #2fbf9a; }
.nav-item .dot { margin-left: auto; background: #d8574a; color: #fff; font-size: 10px; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.nav-group { margin: 13px 8px 3px; font-size: 10.5px; letter-spacing: 2px; color: #64748c; user-select: none; }

/* 账套（公司）切换 */
.co-switch { padding: 0 6px 12px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 5px; }
.co-switch label { font-size: 10.5px; letter-spacing: 2px; color: #64748c; }
.co-switch select { width: 100%; height: 32px; border-radius: 8px; background: rgba(255,255,255,.07); color: #e7eef7; border: 1px solid rgba(255,255,255,.14); padding: 0 8px; font-size: 12.5px; }
.co-switch select:focus { outline: none; border-color: #2fbf9a; }
.co-switch option { color: #101b2d; }
.co-fixed { height: 32px; display: flex; align-items: center; border-radius: 8px; background: rgba(47,191,154,.12); color: #7de3c5; border: 1px solid rgba(47,191,154,.3); padding: 0 10px; font-size: 12.5px; font-weight: 600; }

/* 分区标题 */
.sect-head { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 10px; }
.sect-head h2 { margin: 0; font-size: 15.5px; font-weight: 650; letter-spacing: .3px; }
.sect-head .hint { color: var(--muted); font-size: 12px; }
.sect-head a { margin-left: auto; color: var(--jade); font-size: 12.5px; white-space: nowrap; }
.sect-head a:hover { text-decoration: underline; }

/* 可过滤下拉 */
.select-filter { height: 31px; font-size: 12.5px; margin-bottom: 6px; background: #fbfcfe; border-style: dashed; }
.select-filter:focus { border-style: solid; }
.side-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; display: flex; align-items: center; gap: 9px; }
.avatar { width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.1); display: grid; place-items: center; color: #b9e8d8; font-size: 13px; flex: 0 0 32px; }
.side-foot .who { flex: 1; min-width: 0; line-height: 1.25; }
.side-foot .who strong { display: block; font-size: 12.5px; color: #e9eff7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who small { font-size: 10.5px; color: #8b9cb1; }
.side-logout { background: transparent; border: 0; color: #8b9cb1; cursor: pointer; padding: 6px; border-radius: 7px; }
.side-logout:hover { background: rgba(255,255,255,.07); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topline { padding: 22px 28px 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topline h1 { margin: 0; font-size: 23px; letter-spacing: .5px; font-weight: 650; }
.topline .sub { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.topline .actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.pagewrap { padding: 18px 28px 46px; }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 15px;
  border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--text);
  cursor: pointer; font-size: 13px; transition: .16s; white-space: nowrap;
}
.btn:hover { border-color: #cfd6e0; background: #fbfcfe; }
.btn.primary { background: var(--jade); border-color: var(--jade); color: #fff; }
.btn.primary:hover { background: var(--jade-2); border-color: var(--jade-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--line-2); color: var(--text); }
.btn.danger { color: var(--red); border-color: #f0cccc; background: #fffafa; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { height: 29px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.full { width: 100%; height: 42px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { background: transparent; border: 0; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 6px; }
.icon-btn:hover { color: var(--text); background: var(--line-2); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.card-head .hint { color: var(--muted); font-size: 12px; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.g-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1180px) { .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }

.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 17px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .label { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.kpi .value { margin-top: 6px; font-size: 25px; font-weight: 650; letter-spacing: .3px; line-height: 1.25; }
.kpi .value small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.kpi .foot { margin-top: 6px; font-size: 11.5px; color: var(--muted-2); }
.kpi.accent::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--jade); }
.kpi.warn::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--amber); }
.kpi.danger::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--red); }
.kpi .value.neg { color: var(--red); }
.kpi .value.pos { color: var(--jade); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; line-height: 1.7; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.badge.green { background: var(--jade-soft); color: #0a7157; }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.gray { background: #f2f4f7; color: #7c8797; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 11.5px; letter-spacing: .4px; padding: 10px 14px; background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tbody tr:hover { background: #fbfcfe; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl .r { text-align: right; }
.t-main { font-weight: 500; }
.t-sub { color: var(--muted); font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.amt-in { color: var(--jade); font-weight: 600; }
.amt-out { color: #334154; font-weight: 600; }
.amt-void { color: var(--muted-2); text-decoration: line-through; }

.empty { padding: 34px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.empty strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.input, .select, .textarea {
  height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 0 11px; outline: none; font-size: 13px;
}
.input:focus, .select:focus, .textarea:focus { border-color: #9ecfbe; box-shadow: 0 0 0 3px rgba(18,163,125,.12); }
.textarea { height: auto; min-height: 74px; padding: 9px 11px; resize: vertical; line-height: 1.55; }
.select { padding-right: 26px; }
.search { min-width: 210px; }

/* 标签页 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 6px; background: #fff; border-radius: var(--radius) var(--radius) 0 0; overflow-x: auto; }
.tab { padding: 12px 15px; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--jade); border-bottom-color: var(--jade); font-weight: 600; }

/* 列表行（往来方） */
.list-card { overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: .14s; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: #fbfcfe; }
.list-mono { width: 38px; height: 38px; border-radius: 10px; background: #f1f4f8; display: grid; place-items: center; color: var(--ink-3); font-weight: 600; font-size: 14px; flex: 0 0 38px; }
.list-mono.corp { background: #edf2fd; color: #2f6fd0; }
.list-main { flex: 1; min-width: 0; }
.list-main .name { font-weight: 600; font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.list-main .meta { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.list-figs { display: flex; gap: 22px; text-align: right; }
.list-figs .fig .k { color: var(--muted); font-size: 11px; }
.list-figs .fig .v { font-size: 14px; font-weight: 600; }
.chev { color: var(--muted-2); }

/* 进度条 */
.progress { height: 6px; border-radius: 4px; background: #eef1f5; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--jade); border-radius: 4px; }
.progress.warn > i { background: var(--amber); }
.progress.over > i { background: var(--red); }
.bar-line { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.bar-line .nm { width: 84px; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-line .progress { flex: 1; }
.bar-line .vl { width: 92px; text-align: right; font-size: 12.5px; }

/* 预警 */
.alert-card { display: flex; gap: 13px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.alert-card .stripe { width: 4px; border-radius: 4px; background: var(--muted-2); flex: 0 0 4px; }
.alert-card.high .stripe { background: var(--red); }
.alert-card.medium .stripe { background: var(--amber); }
.alert-card.low .stripe { background: var(--blue); }
.alert-card .body { flex: 1; min-width: 0; }
.alert-card .ttl { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alert-card .desc { color: #495666; font-size: 12.5px; margin-top: 4px; }
.alert-card .row-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.alert-card.resolved { opacity: .62; }
.alert-card .time { color: var(--muted-2); font-size: 11.5px; }

/* 图表 */
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 168px; padding: 8px 4px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-col .bars { display: flex; align-items: flex-end; gap: 3px; height: 100%; width: 100%; justify-content: center; }
.chart-col .bar { width: 42%; max-width: 22px; border-radius: 4px 4px 0 0; min-height: 2px; background: #cfe0f8; }
.chart-col .bar.out { background: #b9d9cc; }
.chart-col .bar.in { background: #4a9bd1; }
.chart-col .cap { font-size: 11px; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

/* 详情头部 */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-head .title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 650; flex-wrap: wrap; }
.crumb { color: var(--muted); font-size: 12px; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.crumb a:hover { color: var(--jade); }

/* 凭证 */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.ev-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.ev-thumb { height: 138px; background: #eef1f5 center/cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 30px; cursor: zoom-in; border-bottom: 1px solid var(--line-2); }
.ev-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-info { padding: 10px 12px 12px; }
.ev-info .fn { font-size: 12.5px; font-weight: 600; word-break: break-all; line-height: 1.4; }
.ev-info .meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.ev-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ev-voided { opacity: .55; }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.field > span { font-size: 12.5px; color: #4d5a6a; font-weight: 500; }
.field > span em { color: var(--red); font-style: normal; margin-left: 2px; }
.field .hint { font-size: 11px; color: var(--muted-2); }
.field input, .field select, .field textarea {
  height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; background: #fff; outline: none; width: 100%;
}
.field textarea { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #9ecfbe; box-shadow: 0 0 0 3px rgba(18,163,125,.12); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 560px) { .field-row, .field-row.three { grid-template-columns: 1fr; } }
.file-drop { border: 1px dashed #cfd8e3; border-radius: 10px; padding: 14px; text-align: center; color: var(--muted); cursor: pointer; background: #fbfcfe; font-size: 12.5px; }
.file-drop:hover { border-color: #9ecfbe; background: #f7fcfa; }
.file-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.file-chip { display: flex; align-items: center; gap: 6px; background: #f2f5f8; border-radius: 7px; padding: 4px 8px; font-size: 11.5px; max-width: 100%; }
.file-chip b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.file-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; font-size: 12px; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(13, 22, 36, .55); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; animation: fade .16s ease; }
.modal { width: 100%; max-width: 620px; max-height: 90vh; overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px -12px rgba(9,18,32,.45); animation: pop .18s ease; }
.modal.wide { max-width: 820px; }
.modal .m-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 19px 22px 13px; border-bottom: 1px solid var(--line-2); }
.modal .m-head h3 { margin: 0; font-size: 16.5px; }
.modal .m-head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.modal .m-body { padding: 18px 22px 4px; }
.modal .m-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px 19px; }
@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: .6 } }

/* 登录 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 500px at 50% -10%, #1a2c46 0%, #0d1726 55%, #0a121f 100%); padding: 20px; }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 18px; padding: 30px 28px 26px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand div { display: flex; flex-direction: column; line-height: 1.3; }
.login-brand strong { font-size: 19px; letter-spacing: 3px; }
.login-brand small { font-size: 11.5px; color: var(--muted); letter-spacing: .5px; }
.login-hint { font-size: 11.5px; color: var(--muted); margin: 14px 0 0; line-height: 1.6; }
.login-hint b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.login-card .btn { margin-top: 4px; }

/* 提示条 */
.toast { position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px); background: #16233a; color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 13px; opacity: 0; pointer-events: none; transition: .22s; z-index: 200; box-shadow: 0 10px 30px -8px rgba(0,0,0,.5); max-width: 82vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #a53434; }
.toast.ok { background: #0d6f55; }

/* 手机访问信息 */
.mobile-access { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.qr-box { flex: 0 0 auto; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.qr-box img { display: block; border-radius: 4px; }
.qr-box .qr-fail-tip { display: none; width: 150px; text-align: center; }
.qr-box.qr-fail img { display: none; }
.qr-box.qr-fail .qr-fail-tip { display: block; }
.mobile-info { flex: 1; min-width: 260px; }
.url-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.url-row b { color: var(--jade); font-size: 14px; }
.mobile-info .steps { line-height: 1.9; margin-top: 10px; }

/* 移动端 */
@media (max-width: 860px) {
  .app { display: block; }
  .sidebar { position: sticky; top: 0; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 9px 12px; overflow-x: auto; }
  .brand { padding: 0; border: 0; flex: 0 0 auto; }
  .brand .logo { width: 30px; height: 30px; font-size: 15px; border-radius: 8px; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 14px; letter-spacing: 1px; }
  .nav { flex-direction: row; margin: 0; gap: 2px; flex: 1; }
  .nav-item { padding: 8px 9px; font-size: 12px; border-radius: 8px; gap: 5px; }
  .nav-item svg { width: 15px; height: 15px; flex-basis: 15px; }
  .nav-item.active { box-shadow: inset 0 -2px 0 #2fbf9a; background: rgba(18,163,125,.12); }
  .nav-item .dot { display: none; }
  .nav-group { display: none; }
  .co-switch { padding: 0; border: 0; flex: 0 0 auto; }
  .co-switch label { display: none; }
  .co-switch select { width: 118px; height: 30px; font-size: 12px; }
  .side-foot { border: 0; padding: 0; flex: 0 0 auto; }
  .side-foot .who { display: none; }
  .side-logout { display: none; }
  .topline { padding: 16px 16px 0; }
  .topline h1 { font-size: 19px; }
  .topline .actions .btn { height: 32px; font-size: 12px; }
  .pagewrap { padding: 14px 16px 40px; }
  .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi .value { font-size: 20px; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .list-row { flex-wrap: wrap; padding: 13px 14px; }
  .list-figs { width: 100%; justify-content: space-between; gap: 8px; }
  .list-figs .fig { text-align: left; }
  .ev-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .detail-head .title { font-size: 17px; }
  table.tbl th, table.tbl td { padding: 9px 10px; }

  .sidebar { padding-top: calc(9px + env(safe-area-inset-top)); }
  .nav { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .pagewrap { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .field input, .field select, .field textarea, .input, .select, .login-card input { font-size: 16px; }
  .btn { min-height: 34px; }
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal, .modal.wide { max-width: none; max-height: 92dvh; border-radius: 18px 18px 0 0; }
  .modal .m-head { padding-top: 16px; }
  .modal .m-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }
  .qr-box { margin: 0 auto; }
  .mobile-info { min-width: 100%; }
}
