/* 账桥 V4 · 设计令牌 */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --accent-text: #ffffff;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --bad: #b91c1c;
  --bad-soft: #fef2f2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e13;
    --surface: #14171e;
    --surface-2: #191d26;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --faint: #6b7280;
    --line: #262b35;
    --line-strong: #353b47;
    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --accent-soft: #1e1b4b;
    --accent-text: #0c0e13;
    --ok: #4ade80;
    --ok-soft: #0f2a1a;
    --warn: #fbbf24;
    --warn-soft: #2a1f08;
    --bad: #f87171;
    --bad-soft: #2c1212;
    --shadow: none;
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num, .big, .amount { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.ic { width: 18px; height: 18px; flex: none; }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1120px; margin: 0 auto; height: 56px; padding: 0 20px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 0; font-weight: 700; font-size: 16px; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-size: 14px; }
.tabs { display: flex; gap: 2px; align-self: stretch; }
.tabs button { display: flex; align-items: center; gap: 7px; border: 0; background: none; padding: 0 12px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs [aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.tabs .ic { width: 16px; height: 16px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-right select { height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); padding: 0 8px; }
.user { display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.user-name { font-weight: 500; line-height: 1.2; }
.user-name small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }

/* 页面 */
.page { max-width: 1120px; margin: 0 auto; padding: 28px 20px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.page-head p { color: var(--muted); margin-top: 4px; }
.crumb { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; color: var(--muted); margin-bottom: 8px; font-size: 13px; }
.crumb:hover { color: var(--text); }
.crumb .ic { width: 15px; height: 15px; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-head h2 { font-size: 15px; font-weight: 600; }
.section-head .count { color: var(--muted); font-weight: 400; margin-left: 6px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 18px 20px; }

/* 汇总 */
.summary { padding: 22px 24px; }
.summary-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.label { color: var(--muted); font-size: 13px; }
.big { font-size: 34px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; margin-top: 2px; }
.pct { color: var(--muted); font-size: 13px; }
.pct b { color: var(--text); font-weight: 600; }
progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 14px; }
progress::-webkit-progress-bar { background: var(--line); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
progress.small { height: 6px; margin-top: 10px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.stats div { padding: 0 16px; border-left: 1px solid var(--line); min-width: 0; }
.stats div:first-child { padding-left: 0; border-left: 0; }
.stats dt { color: var(--muted); font-size: 12.5px; }
.stats dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 公司卡片 */
.firms { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.firm { text-align: left; width: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .15s; }
.firm:hover { border-color: var(--accent); }
.firm-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.firm-top .ic { color: var(--faint); }
.firm .amount { font-size: 22px; font-weight: 650; margin-top: 8px; }
.firm .amount small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.firm .meta { color: var(--muted); font-size: 13px; margin-top: 10px; }

/* 待办 */
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.todo li:first-child { border-top: 0; }
.todo .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.todo .dot.warn { background: var(--warn); }
.todo .dot.bad { background: var(--bad); }
.todo .dot.info { background: var(--accent); }
.todo .dot.ok { background: var(--ok); }
.todo span.text { flex: 1; min-width: 0; }
.todo .btn { flex: none; }

/* 列表（桌面为表格，手机为两行） */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row { display: grid; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: center; min-width: 0; }
.row:first-child { border-top: 0; }
.row.head { background: var(--surface-2); color: var(--muted); font-size: 12.5px; padding-top: 9px; padding-bottom: 9px; }
.row > * { min-width: 0; }
.cols-clients { grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(0, 1fr)) 96px 84px; }
.cols-firm { grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 0.75fr)) 84px minmax(150px, 1.3fr) 160px; }
.pay-link { margin-right: 10px; }
dialog.viewer { width: min(900px, calc(100vw - 32px)); max-width: none; padding: 0; overflow: hidden; }
.viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.viewer-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-body { background: var(--surface-2); display: flex; justify-content: center; align-items: center; max-height: calc(100vh - 140px); overflow: auto; }
.viewer-body img { display: block; max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.wa-cell { display: flex; justify-content: flex-end; }
@media (max-width: 720px) { .row > .wa-cell { grid-column: 1 / -1; justify-content: flex-start; } }
.btn.wa-btn { flex: none; display: inline-flex; align-items: center; gap: 4px; background: #16a34a; border-color: #16a34a; color: #fff; text-decoration: none; }
.btn.wa-btn:hover { background: #15803d; border-color: #15803d; color: #fff; }
.btn.wa-btn .ic { width: 14px; height: 14px; }
.btn.wa-btn[disabled] { background: transparent; color: var(--muted); border-color: var(--line); }
.btn.wa-btn.wa-icon { width: 30px; height: 30px; padding: 0; justify-content: center; border-radius: 8px; }
.btn.wa-btn.wa-icon .ic { width: 17px; height: 17px; }
.link-btn { all: unset; cursor: pointer; color: var(--brand, #4f46e5); font-size: inherit; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--brand, #4f46e5); outline-offset: 2px; border-radius: 3px; }
.warn-text { color: #b45309; }
.link-btn.danger-text { color: var(--bad); }
.link-btn.danger-text:focus-visible { outline-color: var(--bad); }

/* 访问统计 */
.seg { display: inline-flex; gap: 6px; }
.chart { display: block; width: 100%; height: 160px; margin-top: 16px; overflow: visible; }
.chart .col { fill: var(--accent); opacity: .85; }
.chart g:hover .col { opacity: 1; }
.chart .lead { fill: #16a34a; }
.chart-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-axis .sub { color: #16a34a; }
.cols-stat { grid-template-columns: minmax(0, 1fr) 80px 90px; }
.bar { display: block; width: 100%; max-width: 320px; height: 4px; margin-top: 6px; }
.bar rect { fill: var(--accent); opacity: .7; }
.narrow { max-width: 480px; }
.sort-h { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; border-radius: 4px; }
.sort-h:hover { color: var(--text, #111827); }
.sort-h:focus-visible { outline: 2px solid var(--brand, #4f46e5); outline-offset: 2px; }
.sort-h .arrow { font-size: 10px; opacity: .45; }
.sort-h.on { color: var(--text, #111827); font-weight: 600; }
.sort-h.on .arrow { opacity: 1; }
.r .sort-h { justify-content: flex-end; }
.file-row { display: flex; align-items: center; gap: 8px; }
.file-row input { flex: 1; min-width: 0; }
.paste-box { margin-top: 8px; min-height: 64px; padding: 12px; border: 2px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; outline: none; }
.paste-box:focus { border-color: var(--brand, #4f46e5); }
.paste-box:empty::before { content: attr(data-hint); }
.viewer-body object { display: block; width: 100%; height: calc(100vh - 140px); border: 0; }
.viewer-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; min-height: 240px; padding: 24px; text-align: center; color: var(--muted); }
.viewer-fallback svg { width: 40px; height: 40px; }
.no-receipt { display: inline-block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.acts.acts-2 { display: grid; grid-template-columns: 88px 56px; gap: 8px; justify-content: end; align-items: center; }
.acts.acts-2 .btn { width: 100%; justify-content: center; }
@media (max-width: 720px) {
  .acts.acts-2 { display: flex; justify-content: flex-start; }
  .acts.acts-2 > span:empty { display: none; }
  .acts.acts-2 .btn { width: auto; }
}
.cols-ledger { grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)) minmax(0, 1.3fr) 104px 24px; }
.cols-ledger-m { grid-template-columns: minmax(0, 1fr) repeat(4, minmax(0, 1fr)) minmax(0, 1.3fr); }
.ledger details { border-top: 1px solid var(--line); }
.ledger details > summary { list-style: none; cursor: pointer; border-top: 0; }
.ledger details > summary::-webkit-details-marker { display: none; }
.ledger details > summary:hover { background: var(--surface-2); }
.ledger .chev { display: flex; justify-content: flex-end; color: var(--muted); }
.ledger .chev .ic { transition: transform .15s; }
.ledger details[open] .chev .ic { transform: rotate(90deg); }
.ledger-detail { background: var(--surface-2); padding: 4px 0 8px; }
.ledger-detail .hint { margin: 8px 16px; }
.ledger-detail .row { background: transparent; font-size: 13.5px; }
.credit { color: var(--info, #2563eb); }
@media (max-width: 720px) { .ledger .chev { display: none; } }
.fee-cell { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
.fee-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cols-clients-admin { grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(0, 1fr)) 96px; }
.cols-receipts { grid-template-columns: minmax(0, 2.2fr) 100px minmax(0, 1fr) 110px minmax(0, 1.4fr); }
.cols-receipts-admin { grid-template-columns: minmax(0, 2.2fr) 100px minmax(0, 1fr) 110px minmax(0, 1.4fr) 150px; }
.cols-leads { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 90px 110px; }
.acts.acts-wa { display: grid; grid-template-columns: 64px 30px; gap: 8px; justify-content: end; align-items: center; }
.acts.acts-wa .btn:not(.wa-icon) { width: 100%; justify-content: center; }
.cols-bank { grid-template-columns: minmax(0, 1.4fr) 110px minmax(0, 1.4fr) 110px; }
.cols-audit { grid-template-columns: 150px 90px 100px minmax(0, 1fr) minmax(0, 2fr); }
.r { text-align: right; }
.name { font-weight: 500; overflow-wrap: anywhere; }
.sub { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; overflow-wrap: anywhere; }
.owe { color: var(--bad); font-weight: 600; }
.zero { color: var(--faint); }
.acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.m { display: none; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.note-line { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent; background: var(--accent); color: var(--accent-text); font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: none; color: var(--accent); padding: 0 6px; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { background: var(--surface); border-color: var(--line-strong); color: var(--bad); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; height: 42px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 表单 */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; align-content: start; font-size: 13px; font-weight: 500; }
.field input, .field select, .field textarea, .select {
  width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-weight: 400; font-size: 14px;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .select:focus, .top-right select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.hint { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.controls { display: flex; gap: 8px; flex-wrap: wrap; }
/* 客户页每月明细：月份 + e-invoice */
.month-cell { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inv { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.inv .proof-link { margin: 0; }
.inv-re { font-size: 12px; color: var(--muted); }
.inv-up { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent); padding: 2px 8px; border: 1px dashed var(--accent); border-radius: 6px; }
.inv-up:hover { background: var(--accent-soft); }
.inv-up:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.inv-up .ic { width: 13px; height: 13px; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0 2px; }
.svc-tag { font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
/* 咨询页：服务多选（勾选卡片） */
.svc { border: 0; padding: 0; margin: 0; min-width: 0; }
.svc legend { padding: 0; margin-bottom: 6px; }
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.svc-opt { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; }
.svc-opt input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.svc-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.svc-opt:focus-within { outline: 2px solid var(--accent-soft); }
@media (max-width: 380px) { .svc-grid { grid-template-columns: 1fr; } }
/* 两栏表单：顶部对齐，输入框同高；有提示字的那栏只是下面多一行 */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.csv { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.inline-filter { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.inline-filter .select { width: auto; min-height: 34px; padding: 4px 8px; }

/* 结算页 */
.settle { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.sticky { position: sticky; top: 76px; }
.check-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.check-row:first-child { border-top: 0; }
.check-row:hover { background: var(--surface-2); }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.check-row.off { cursor: default; }
.check-row.off:hover { background: transparent; }
.check-row.off .name, .check-row.off .num { color: var(--muted); }
.check-row .block { display: block; margin-top: 2px; }
.check-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.list-note { margin: 0 0 8px; }
.proof-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 13px; color: var(--accent); text-decoration: none; }
.proof-link:hover { text-decoration: underline; }
.proof-link .ic { width: 14px; height: 14px; }
.total-line { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.total-line b { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }

details.card > summary { list-style: none; cursor: pointer; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary .ic { color: var(--faint); transition: transform .15s; }
details[open].card > summary .ic { transform: rotate(90deg); }
details.card > .card-body { border-top: 1px solid var(--line); }

/* 登录 / 咨询 */
.auth { min-height: calc(100vh - 160px); display: grid; place-items: center; }
.auth-card { width: min(400px, 100%); }
.auth-card h1 { font-size: 22px; font-weight: 650; }
.auth-card > p { color: var(--muted); margin: 6px 0 22px; }
.auth-card .card { padding: 22px; }
.auth-foot { text-align: center; margin-top: 16px; color: var(--muted); font-size: 13px; }

.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--text); font-size: 13px; }
.banner .ic { color: var(--accent); margin-top: 1px; }

/* 对话框与提示 */
dialog { width: min(440px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(17, 24, 39, .45); }
dialog h2 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
dialog .lead { color: var(--muted); margin-bottom: 16px; font-size: 13px; }
dialog .controls { justify-content: flex-end; margin-top: 4px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 50; max-width: calc(100% - 32px); font-size: 13.5px; }
#toast:empty { display: none; }

/* 平板 */
@media (max-width: 960px) {
  .settle { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .user-name { display: none; }
}

/* 手机：底部标签栏、列表变两行 */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .topbar-inner { padding: 0 14px; gap: 12px; height: 54px; }
  .logo-text { display: none; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); justify-content: space-around; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tabs button { flex: 1; flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 11px; border-bottom: 0; margin: 0; border-radius: 8px; }
  .tabs [aria-current] { color: var(--accent); background: var(--accent-soft); }
  .tabs .ic { width: 20px; height: 20px; }
  .page { padding: 20px 14px calc(96px + env(safe-area-inset-bottom)); }
  .page-head h1 { font-size: 20px; }
  .summary { padding: 18px; }
  .big { font-size: 30px; }
  .stats { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .firms { grid-template-columns: 1fr; }
  .row, .row[class*="cols-"] { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; }
  .row.head { display: none; }
  .row > .d { display: none; }
  .m { display: block; }
  .row > .end { text-align: right; display: grid; justify-items: end; gap: 4px; }
  .row > .acts { grid-column: 1 / -1; justify-content: flex-start; margin-top: 6px; }
  .two { grid-template-columns: 1fr; }
  #toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .auth { min-height: auto; padding-top: 12px; }
  .field input, .field select, .field textarea, .select { font-size: 16px; }
}
@media (min-width: 721px) {
  .row > .end-m { display: none; }
}
