/* 门户样式：颜色只用这里的变量（交接文件第二节第 7 条的 8 个颜色 + 由它们调出的浅色） */
:root {
  --ink: #1A2733; --accent: #3D6A92; --bg: #F4F6F9; --line: #E3E7ED; --muted: #5E6978; --ok: #2B6E52; --warn: #8A5300; --bad: #A83A2C;
  --accent-soft: #E8EFF6; --accent-ink: #2F5677; --ok-soft: #E7F2EC; --warn-soft: #FBF1E1; --warn-line: #F1D9AE; --warn-ink: #6E4300; --bad-soft: #F8E4E0; --bad-line: #EBC3BB; --bad-ink: #7E2A1F;
  --bar: #C9D6E3; --tone1: #6D90B0; --tone2: #A9C0D6; --track: #E6EBF1; --seg-bg: #F1F4F8; --row-sub: #F8FAFC; --row-total: #F1F4F8;
  --side-text: #DCE3EC; --side-muted: #A9B6C6; --side-hover: rgba(255, 255, 255, 0.06); --side-on: rgba(255, 255, 255, 0.10); --side-card: #2C3D50;
  --sp0: #3D6A92; --sp1: #7FA3C4; --sp2: #A9C0D6; --sp3: #CBD8E5; --sp4: #D08A2E; --vat-warn: #D08A2E; --vat-over: #C0533F;
  --radius: 12px; --font: 'Inter', 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #2B5070; }
button, select, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2 { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; }
.ic.rot { transform: rotate(180deg); }
.tog .ic.rot { transform: rotate(90deg); }
.muted { color: var(--muted); }
.loading { padding: 48px; color: var(--muted); text-align: center; }
.only-m { display: none !important; }

/* ---------- 外壳 ---------- */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--ink); color: var(--side-text); padding: 28px 14px 24px; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: none; }
.brand-t { display: flex; flex-direction: column; }
.brand-t b { font-size: 15px; font-weight: 600; color: #fff; }
.brand-t small { font-size: 11px; color: var(--side-muted); letter-spacing: 0.04em; }
.grp { display: flex; flex-direction: column; gap: 2px; }
.grp-t { font-size: 11px; color: var(--side-muted); padding: 0 12px 4px; letter-spacing: 0.02em; }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--side-text); min-height: 22px; }
.nav:hover { background: var(--side-hover); color: #fff; }
.nav.on { background: var(--side-on); color: #fff; font-weight: 600; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.acc { background: var(--side-hover); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.acc .small { font-size: 11px; color: var(--side-muted); }
.acc-p { display: flex; align-items: center; gap: 10px; }
.acc-p span:last-child { display: flex; flex-direction: column; }
.acc-p b { font-size: 13px; color: #fff; }
.acc-p small { font-size: 11px; color: var(--side-muted); }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--side-card); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 16px clamp(16px, 3vw, 40px); background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.top-l, .top-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.co-wrap { position: relative; }
.co { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; }
.co-logo { width: 26px; height: 26px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.co-t { display: flex; flex-direction: column; }
.co-t b { font-size: 14px; font-weight: 600; }
.co-t small { font-size: 11px; color: var(--muted); }
.menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(26, 39, 51, 0.12); }
.menu button { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 0; border-radius: 8px; background: none; text-align: left; font-weight: 500; }
.menu button small { color: var(--muted); font-size: 11px; font-weight: 400; }
.menu button:hover, .menu button[aria-current='true'] { background: var(--seg-bg); }
.seg { display: inline-flex; gap: 4px; background: var(--seg-bg); border-radius: 10px; padding: 4px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.seg button[aria-pressed='true'] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(26, 39, 51, 0.12); }
.seg.dark { background: var(--side-hover); display: flex; }
.seg.dark button { flex: 1; color: var(--side-text); justify-content: center; font-size: 12px; min-height: 32px; }
.seg.dark button[aria-pressed='true'] { background: #fff; color: var(--ink); }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.period select { min-height: 44px; padding: 0 36px 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235E6978' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; font-size: 14px; font-weight: 500; }
.user { display: flex; align-items: center; gap: 8px; padding-left: 6px; font-size: 13px; font-weight: 500; }
.user .av { width: 36px; height: 36px; background: var(--ink); font-size: 14px; }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); }

.content { width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 40px) 48px; display: flex; flex-direction: column; gap: 24px; }
.shell.busy .content { opacity: 0.6; transition: opacity 0.2s; }
.bottom { display: none; }

/* ---------- 通用件 ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.page-head .sub, .sub { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.card h2 { font-size: 17px; font-weight: 600; }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-head .sub { margin-top: 2px; }
.link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; }
.empty { color: var(--muted); margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.p-published, .pill.p-accepted, .pill.p-paid { background: var(--ok-soft); color: var(--ok); }
.pill.p-preview, .pill.p-to_file, .pill.p-vat_warn { background: var(--warn-soft); color: var(--warn); }
.pill.p-to_pay, .pill.p-vat_ok { background: var(--accent-soft); color: var(--accent-ink); }
.pill.p-auto_zero, .pill.p-vat_over { background: var(--bad-soft); color: var(--bad); }
.top .pill { font-weight: 500; padding: 6px 12px; }
.top .pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.banner { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-radius: 12px; background: var(--warn-soft); color: #7A4800; border: 1px solid var(--warn-line); }
.banner b { font-weight: 600; }
.banner p { margin: 2px 0 0; font-size: 13px; }
.grid { display: grid; gap: 20px; }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-1-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
.foot-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); padding-top: 4px; }
.error-card p { margin: 0; color: var(--bad); }

/* 指标卡 */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kpi .label { font-size: 13px; color: var(--muted); }
.kpi .value { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.kpis.minor .kpi { padding: 18px 18px 16px; gap: 6px; }
.kpis.minor .value { font-size: 21px; }
.kpis.minor .foot { flex-direction: column; align-items: stretch; gap: 8px; }
.kpi.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.kpi.dark .label, .kpi.dark .foot { color: var(--side-muted); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; }
.delta.good { color: var(--ok); }
.delta.bad { color: var(--bad); }
.delta.neutral { color: var(--muted); }

/* 图表 */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; }
.chart .bar { fill: var(--bar); }
.chart .bar-on { fill: var(--accent); }
.chart .val { fill: var(--muted); font-size: 11px; font-weight: 500; }
.chart .val-on { fill: var(--ink); font-size: 11px; font-weight: 700; }
.chart .lab { fill: var(--muted); font-size: 12px; }
.meter { width: 100%; height: 8px; display: block; }
.meter .track { fill: var(--track); }
.meter .fill { fill: var(--accent); }
.meter.tone1 .fill { fill: var(--tone1); }
.meter.tone2 .fill { fill: var(--tone2); }
.meter .marker { fill: var(--ink); }
.meter.vat-ok .fill { fill: var(--accent); }
.meter.vat-warn .fill { fill: var(--vat-warn); }
.meter.vat-over .fill { fill: var(--vat-over); }
.stacked { width: 100%; height: 28px; display: block; border-radius: 6px; }
.seg0 { fill: var(--sp0); background: var(--sp0); }
.seg1 { fill: var(--sp1); background: var(--sp1); }
.seg2 { fill: var(--sp2); background: var(--sp2); }
.seg3 { fill: var(--sp3); background: var(--sp3); }
.seg4 { fill: var(--sp4); background: var(--sp4); }

/* 经营总览 */
.tax-list, .meter-list, .check-list, .split-list, .cost-list, .month-list, .dev-users { list-style: none; margin: 0; padding: 0; }
.tax-list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.datebox { width: 46px; flex: none; border-radius: 10px; background: var(--seg-bg); display: flex; flex-direction: column; align-items: center; padding: 6px 0; }
.datebox span { font-size: 11px; color: var(--muted); }
.datebox b { font-size: 18px; line-height: 1.1; }
.grow { flex: 1; min-width: 0; }
.tax-list .t { font-weight: 600; font-size: 13px; }
.tax-list .s { font-size: 12px; color: var(--muted); }
.due-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 10px; background: var(--seg-bg); font-size: 13px; color: var(--muted); }
.due-total b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter-list { display: flex; flex-direction: column; gap: 16px; }
.meter-list li { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; }
.row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.note { font-size: 12px; color: var(--muted); }
.foot { margin-top: auto; }
.row.foot { padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }
.row.foot b { color: var(--ink); }
.ok-tag { font-size: 12px; font-weight: 600; color: var(--ok); }
.check-list { display: flex; flex-direction: column; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li.ok .ic { color: var(--ok); }
.check-list li.warn .ic { color: var(--warn); }
.check-list .t { font-weight: 600; font-size: 13px; }
.check-list .s { font-size: 12px; color: var(--muted); }
.check-list.compact { gap: 6px; }

/* 增值税登记门槛 */
.vat { border-width: 1px; }
.vat-card-warn { border-color: var(--warn-line); }
.vat-card-over { border-color: var(--bad-line); }
.vat-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.vat-big b { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; }
.vat-big span { font-size: 13px; color: var(--muted); }
.vat-big.vat-warn b { color: var(--warn); }
.vat-big.vat-over b { color: var(--bad); }
.vat-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.msg { display: flex; gap: 10px; padding: 14px 16px; border-radius: 10px; background: var(--seg-bg); color: #3B4754; }
.msg b { font-weight: 600; }
.msg p { margin: 2px 0 0; font-size: 13px; }
.msg.vat-warn { background: var(--warn-soft); color: var(--warn-ink); }
.msg.vat-over { background: var(--bad-soft); color: var(--bad-ink); }
.disclose { display: flex; align-items: center; justify-content: space-between; border: 0; border-top: 1px solid var(--line); background: none; padding: 12px 0 0; color: var(--accent); font-size: 13px; font-weight: 500; }
.vat-calc { margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.vat-calc div { display: flex; justify-content: space-between; gap: 12px; }
.vat-calc dt { color: var(--muted); }
.vat-calc dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vat-calc .sum { padding-top: 8px; border-top: 1px solid var(--line); font-weight: 600; }
.vat-calc .sum dt { color: var(--ink); }

/* 工资与成本 */
.split-list li { display: grid; grid-template-columns: 12px minmax(0, 1fr) 56px auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.sw { width: 12px; height: 12px; border-radius: 3px; }
.split-list b, .cost-list b { font-size: 13px; font-weight: 600; }
.split-list .s, .cost-list .s { display: block; font-size: 12px; color: var(--muted); }
.pct { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cost-list li { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr) 56px 130px; align-items: center; gap: 16px; padding: 8px 0; }
.privacy { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; color: var(--muted); }

/* 财务月报 */
.hl { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
.hl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hl-head .sub { margin: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex: none; }
.hl ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.ratios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
.ratio { background: var(--seg-bg); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.ratio span, .ratio small { font-size: 12px; color: var(--muted); }
.ratio b { font-size: 20px; font-weight: 600; }
.table-wrap { overflow-x: auto; }
.rep { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rep thead th { font-size: 12px; font-weight: 500; color: var(--muted); text-align: right; padding: 8px 10px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.rep thead th:first-child { text-align: left; }
.rep td { text-align: right; padding: 9px 10px; white-space: nowrap; border-bottom: 1px solid #EEF1F5; }
.rep th[scope='row'] { text-align: left; font-weight: 400; padding: 9px 10px 9px 28px; border-bottom: 1px solid #EEF1F5; }
.rep .n1 { display: block; }
.rep .n2 { display: block; font-size: 11px; color: var(--muted); }
.rep td.muted { color: var(--muted); }
.rep td.good { color: var(--ok); font-weight: 600; }
.rep td.bad { color: var(--bad); font-weight: 600; }
.rep tr.exp th[scope='row'] { padding-left: 6px; }
.tog { display: flex; align-items: flex-start; gap: 8px; border: 0; background: none; padding: 0; text-align: left; }
.tog .ic { margin-top: 3px; color: var(--muted); }
.rep tr.r-subtotal th, .rep tr.r-subtotal td { font-weight: 600; border-bottom-color: #C9D1DB; }
.rep tr.r-subtotal th[scope='row'] { padding-left: 10px; }
.rep tr.r-total th, .rep tr.r-total td { font-weight: 700; background: var(--row-total); border-top: 2px solid var(--ink); border-bottom: 0; }
.rep tr.r-total th[scope='row'] { padding-left: 10px; }
.rep tr.r-sub th, .rep tr.r-sub td { background: var(--row-sub); font-size: 13px; color: #3B4754; padding-top: 7px; padding-bottom: 7px; }
.rep tr.r-sub th[scope='row'] { padding-left: 48px; }
.checks-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; padding: 16px 20px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ok); font-size: 13px; }
.checks-strip span { display: inline-flex; align-items: center; gap: 6px; color: #2B4A3C; }
.checks-strip span.bad { color: var(--bad); }
.fineprint { margin: 0; font-size: 12px; color: var(--muted); }

/* 员工发布页 */
.month-list { display: flex; flex-direction: column; gap: 4px; }
.month-list button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: none; text-align: left; }
.month-list button[aria-pressed='true'] { border-color: var(--line); background: var(--seg-bg); font-weight: 600; }
.month-list .ml-p { white-space: nowrap; }
.month-list .ml-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.pub-form { display: flex; flex-direction: column; gap: 12px; }
.pub-form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pub-form legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.pub-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.pub-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; resize: vertical; color: var(--ink); font-size: 13px; }
.pub-form .confirm { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.pub-form .btn { align-self: flex-start; }
.error { color: var(--bad); margin: 0; }
.hl-view { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.placeholder { align-items: flex-start; color: var(--muted); }
.placeholder h2 { color: var(--ink); }
.placeholder p { margin: 0; }

/* 员工：费用项目归类 */
.costmap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.costmap li { border-top: 1px solid var(--line-soft, #EEF1F5); }
.costmap form { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(150px, 1fr) minmax(150px, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; }
.costmap .cm-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.costmap .cm-name b { font-size: 13px; font-weight: 600; }
.costmap .cm-name .s { font-size: 12px; color: var(--muted); }
.cfmap form { grid-template-columns: minmax(0, 1.3fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(120px, 0.7fr) auto; align-items: end; }
.cfmap label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cfmap .cm-l { font-size: 11px; color: var(--muted); }
.cfmap .cm-name { align-self: center; }
.costmap select, .costmap input { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff; color: var(--ink); font-size: 13px; }
.ok-note { color: var(--ok); margin: 0; }

/* 登录 */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-box { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.login-box .brand { padding: 0 0 6px; }
.login-box .brand-t b { color: var(--ink); }
.login-box .brand-t small { color: var(--muted); }
.login-box h1 { font-size: 20px; }
.dev-users { display: flex; flex-direction: column; gap: 8px; }
.login-ru { display: block; font-size: 15px; font-weight: 500; color: var(--muted); }
.login-btns { display: flex; flex-direction: column; gap: 10px; }
.login-sso { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 14px; border-radius: 10px; background: var(--accent); color: #fff; text-decoration: none; text-align: center; }
.login-sso span { font-size: 13px; opacity: .9; }
.login-sso:hover { filter: brightness(1.08); }
.login-sso:focus-visible { outline: 3px solid var(--accent-soft, #cfe0ff); outline-offset: 2px; }
.login-sso.off { background: var(--seg-bg); color: var(--muted); cursor: not-allowed; }
.login-msg { padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn-ink); font-size: 13px; }
.login-msg.ok { background: var(--ok-soft, #e8f5ec); color: var(--ok, #1d7a45); }
.login-msg p { margin: 0; }
.login-msg p + p { margin-top: 2px; }
.login-dev-t { font-size: 15px; margin-top: 8px; }
.dev-users button { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; }
.dev-users button:hover { border-color: var(--accent); }
.dev-users small { color: var(--muted); font-size: 12px; }

/* ---------- 1200 以下：左侧菜单收成图标 ---------- */
@media (max-width: 1199px) {
  .shell { grid-template-columns: 72px minmax(0, 1fr); }
  .side { padding: 22px 10px; align-items: center; }
  .side .brand-t, .side .grp-t, .nav span, .side-foot .acc { display: none; }
  .side .brand { padding: 0; }
  .nav { justify-content: center; padding: 11px; }
  .seg.dark { flex-direction: column; }
  .seg.dark button { padding: 0 6px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .hl { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .g-1-1, .g-1-2 { grid-template-columns: minmax(0, 1fr); }
  .cost-list li { grid-template-columns: minmax(0, 1fr) 56px 120px; }
  .cost-list li .meter { display: none; }
}

/* ---------- 768 以下：手机（07）——底部导航、顶部深色 ---------- */
@media (max-width: 767px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .hide-m { display: none !important; }
  .only-m { display: revert !important; }
  .kpis.only-m { display: grid !important; }
  .co-t small.only-m { display: block !important; }
  .top { background: var(--ink); border-bottom: 0; color: #fff; padding: 14px 16px 16px; }
  .top-l, .top-r { width: 100%; }
  .top-r { justify-content: space-between; }
  .co { border: 0; background: transparent; color: #fff; padding: 0; min-height: 40px; }
  .co-logo { background: var(--accent); color: #fff; width: 32px; height: 32px; border-radius: 8px; }
  .co-t b { font-size: 16px; }
  .co-t small { color: var(--side-muted); }
  .top .pill { background: rgba(255, 255, 255, 0.08); color: #9FD3B5; }
  .top .pill.p-preview { color: #F2C37A; }
  .period select { min-height: 32px; border: 0; background-color: transparent; color: #fff; padding-left: 0; font-size: 14px; background-image: none; padding-right: 0; }
  .period select option { color: var(--ink); }
  .content { padding: 16px 16px 92px; gap: 16px; }
  .page-head { display: none; }
  .card { padding: 18px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpi { padding: 14px; gap: 4px; }
  .kpi .value { font-size: 20px; }
  .kpi .label { font-size: 12px; }
  .vat-big b { font-size: 36px; }
  .bottom { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; border-top: 1px solid var(--line); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); }
  .bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
  .bottom a.on { color: var(--ink); font-weight: 600; }
  .split-list li { grid-template-columns: 12px minmax(0, 1fr) auto; }
  .split-list .pct { display: none; }
  .rep th[scope='row'] { padding-left: 14px; }
  .rep tr.r-sub th[scope='row'] { padding-left: 24px; }
  .foot-note { flex-direction: column; }
  .pub-form fieldset { grid-template-columns: 1fr; }
  .costmap form { grid-template-columns: 1fr 1fr; }
  .costmap .cm-name { grid-column: 1 / -1; }
  .cfmap form { grid-template-columns: 1fr 1fr; }
}

/* ================= M4b：02 税务日历、03 缴税记录、05 我的文件、访问记录、员工录入页 ================= */
:root { --cit: #4F8A6E; --pg-other: #A9C0D6; --chip-file: #F2D9AC; --chip-pay: #C6D7E8; --chip-done: #BFDCCC; --cell-off: #FAFBFC; --cell-out: #F8F9FB; --cell-line: #EEF1F5; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.busy { opacity: 0.6; pointer-events: none; }
label.btn { cursor: pointer; }
.icon-btn.sm { width: 32px; height: 32px; }
.kpi .value.good { color: var(--ok); }
.kpi .value.bad { color: var(--bad); }
.banner.slim { padding: 10px 14px; align-items: center; font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; max-width: min(560px, calc(100% - 32px)); padding: 12px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13px; box-shadow: 0 8px 24px rgba(26, 39, 51, 0.25); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend li::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--bar); }
.legend .lg-to_file::before { background: var(--chip-file); }
.legend .lg-to_pay::before { background: var(--chip-pay); }
.legend .lg-done::before { background: var(--chip-done); }
.legend .lg-payroll::before, .sw.pg-payroll { background: var(--accent); }
.legend .lg-vat::before, .sw.pg-vat { background: var(--vat-warn); }
.legend .lg-cit::before, .sw.pg-cit { background: var(--cit); }
.legend .lg-other::before, .sw.pg-other { background: var(--pg-other); }
.sw.pg-all { background: var(--ink); }
.sw.pg-ok { background: var(--ok); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 1px; }
.chart .pg-payroll { fill: var(--accent); }
.chart .pg-vat { fill: var(--vat-warn); }
.chart .pg-cit { fill: var(--cit); }
.chart .pg-other { fill: var(--pg-other); }
.chart .hatch-bg { fill: #fff; }
.chart .pend-line { fill: none; stroke-width: 1; stroke-dasharray: 3 2; }
.chart .pg-payroll-line { stroke: var(--accent); }
.chart .pg-vat-line { stroke: var(--vat-warn); }
.chart .pg-cit-line { stroke: var(--cit); }
.chart .pg-other-line { stroke: var(--pg-other); }

/* 02 月历 */
.cal-head { align-items: center; }
.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-nav h2 { min-width: 120px; text-align: center; }
.icon-btn[disabled] { opacity: 0.4; cursor: default; }
.cal { display: flex; flex-direction: column; gap: 6px; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wd span { text-align: center; font-size: 12px; color: var(--muted); padding: 2px 0; }
.cell { min-height: 92px; border: 1px solid var(--cell-line); border-radius: 8px; background: #fff; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cell.off { background: var(--cell-off); }
.cell.out { background: var(--cell-out); }
.cell.out .dnum { color: #9AA3AE; }
.cell.today { border-color: var(--accent); }
.dnum { font-size: 12px; font-weight: 500; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cell.today .dnum { background: var(--ink); color: #fff; font-weight: 700; }
.cell.hol .dnum { color: var(--bad); }
.hname { font-size: 10px; color: var(--bad); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ghost { font-size: 10px; color: var(--muted); border: 1px dashed #C9D1DB; border-radius: 5px; padding: 1px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { display: block; width: 100%; border: 0; border-radius: 5px; padding: 2px 6px; font-size: 11px; font-weight: 600; text-align: left; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--chip-pay); }
.chip.c-to_file, .chip.c-auto_zero { background: var(--chip-file); }
.chip.c-done { background: var(--chip-done); }
.chip.on { box-shadow: 0 0 0 2px var(--ink); }

/* 02 详情侧栏 */
.tax-detail .card-head { align-items: center; }
.left { font-size: 13px; font-weight: 600; }
.left.good { color: var(--ok); }
.left.warn { color: var(--warn); }
.left.bad { color: var(--bad); }
.left.muted { color: var(--muted); }
.dt-title { font-size: 19px !important; line-height: 1.35; }
.dt-boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dt-boxes div { background: var(--seg-bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dt-boxes span { font-size: 12px; color: var(--muted); }
.dt-boxes b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dt-line { display: flex; gap: 8px; margin: 0; font-size: 13px; color: #3B4754; }
.dt-line .ic { color: var(--accent); margin-top: 2px; }
.dt-note { margin: 0; font-size: 13px; color: var(--muted); }
.dt-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 6px; }
.steps li { flex: 1; min-width: 0; font-size: 11px; color: var(--muted); }
.steps li::before { content: ''; display: block; height: 4px; border-radius: 2px; background: var(--line); margin-bottom: 6px; }
.steps li.past::before { background: var(--ok); }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now::before { background: var(--accent); }
.steps li.now.s-to_file::before { background: var(--warn); }
.dt-dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; font-size: 13px; }
.dt-dl div { display: contents; }
.dt-dl dt { color: var(--muted); }
.dt-dl dd { margin: 0; }
.acc-note { display: flex; gap: 12px; padding: 14px; border-radius: 10px; background: var(--seg-bg); font-size: 13px; }
.acc-note b { font-weight: 600; }
.acc-note p { margin: 2px 0 0; color: #3B4754; }
.dt-receipt { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }

/* 02 未来六个月 */
.ev-list { list-style: none; margin: 0; padding: 0; }
.ev { width: 100%; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto 96px; align-items: center; gap: 16px; padding: 12px 12px; border: 0; border-top: 1px solid var(--line); background: #fff; text-align: left; }
.ev.on, .ev:hover { background: #F1F5F9; }
.ev-date, .ev-t { display: flex; flex-direction: column; min-width: 0; }
.ev-date small, .ev-t small { font-size: 12px; color: var(--muted); }
.ev-t b { font-size: 13px; font-weight: 600; }
.ev-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.ev .pill { justify-self: end; }

/* 03 缴税记录 */
.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi.pick { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.kpi.pick.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.kpis.five .value { font-size: 22px; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.up-list { list-style: none; margin: 0; padding: 0; }
.up-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.up-list b { font-size: 13px; font-weight: 600; }
.up-list small { display: block; font-size: 12px; color: var(--muted); }
.ic-title { display: inline-flex; align-items: center; gap: 8px; }
.ic-title .ic { color: var(--ok); }
.recon { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.recon div { background: var(--seg-bg); border-radius: 10px; padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.recon span { font-size: 12px; color: var(--muted); }
.recon b { font-variant-numeric: tabular-nums; }
.recon .good { color: var(--ok); }
.recon .bad { color: var(--bad); }
.recon .warn { color: var(--warn); }
table.pay, table.files { width: 100%; border-collapse: collapse; font-size: 13px; }
table.pay th, table.files th { font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.pay td, table.files td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.pay td small, table.files td small { display: block; font-size: 11px; color: var(--muted); }
table.pay .r, table.files .r { text-align: right; }
table.pay td.amt { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.pay tfoot th, table.pay tfoot td { font-weight: 700; border-bottom: 0; padding-top: 14px; }
table.pay td .pill { font-size: 11px; padding: 3px 8px; }
td.num, .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 05 我的文件 */
.search { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); min-width: 290px; }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--ink); }
.req-card { border-color: var(--warn-line); }
.req-sum { font-size: 13px; font-weight: 600; }
.req-sum.warn { color: var(--warn); }
.req-sum.good { color: var(--ok); }
.req-list, .exp-list, .user-list, .sf-list, .sf-rows { list-style: none; margin: 0; padding: 0; }
.req-list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.req-list b { font-size: 14px; font-weight: 600; }
.req-list small { display: block; font-size: 12px; color: var(--muted); }
.ring { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2px solid #D7B57A; display: inline-flex; align-items: center; justify-content: center; color: var(--ok); }
.req-list li.up .ring { border: 0; }
.req-due { font-size: 13px; font-weight: 600; color: var(--warn); white-space: nowrap; }
.req-due.good { color: var(--ok); }
.exp-list li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.exp-list li:first-child { border-top: 0; padding-top: 0; }
.exp-list b { font-size: 13px; font-weight: 600; }
.exp-list p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.exp-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.exp-list li.warn .exp-ic { background: var(--warn-soft); color: var(--warn); }
.exp-list li.bad .exp-ic { background: var(--bad-soft); color: var(--bad); }
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cats button { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; }
.cats button span { font-size: 11px; color: var(--muted); background: var(--seg-bg); border-radius: 999px; padding: 1px 7px; }
.cats button[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.cats button[aria-pressed='true'] span { background: rgba(255, 255, 255, 0.18); color: #fff; }
.fname { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fname b { font-weight: 600; }
.fname small { display: block; font-size: 12px; color: var(--muted); }
.fname > div { min-width: 0; }
.ext { width: 36px; height: 40px; flex: none; border-radius: 6px; display: inline-flex; align-items: flex-end; justify-content: center; padding-bottom: 5px; font-size: 9px; font-weight: 700; background: var(--bad-soft); color: var(--bad); }
.ext-xlsx { background: var(--ok-soft); color: var(--ok); }
.ext-docx { background: var(--accent-soft); color: var(--accent-ink); }
.ext-jpg, .ext-png { background: var(--warn-soft); color: var(--warn); }
.warn { color: var(--warn); }
.up-msg { margin: 0; }

/* 访问记录 */
.user-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }

/* 员工录入页 */
.sf-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; align-items: end; padding: 12px 0; }
.sf-form h3 { grid-column: 1 / -1; margin: 0; font-size: 14px; }
.sf-form.inline { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; padding: 6px 0; }
.sf-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.sf-form input:not([type=file]):not([type=checkbox]), .sf-form select, .sf-form textarea { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fff; color: var(--ink); font-size: 13px; width: 100%; }
.sf-form .btn { justify-self: start; }
.sf-list > li { padding: 14px 0; border-top: 1px solid var(--line); }
.sf-list .fname { margin-bottom: 4px; }
.sf-rows li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sf-rows b { font-size: 13px; font-weight: 600; }
.sf-rows small { display: block; font-size: 12px; color: var(--muted); }
.card h3 { margin: 8px 0 0; font-size: 14px; }
.sf-items { display: flex; flex-direction: column; }
.sf-item { border-top: 1px solid var(--line); }
.sf-item summary { display: flex; align-items: center; gap: 12px; padding: 12px 4px; cursor: pointer; list-style: none; font-size: 13px; }
.sf-item summary::-webkit-details-marker { display: none; }
.sf-item[open] summary { background: var(--seg-bg); border-radius: 8px; }
.sf-body { padding: 4px 4px 12px; }
.sf-amounts { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }

/* 联系会计、手机「我的」（PR #10 验收意见） */
.acc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; margin-top: 4px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 500; }
.btn.ask { justify-content: center; width: 100%; }
.modal-bg { position: fixed; inset: 0; z-index: 40; background: rgba(26, 39, 51, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 16px 48px rgba(26, 39, 51, 0.3); }
.modal h2 { font-size: 17px; font-weight: 600; }
.contact { display: flex; flex-direction: column; gap: 14px; }
.contact + .contact { border-top: 1px solid var(--line); padding-top: 14px; }
.ct-head { display: flex; align-items: center; gap: 12px; }
.ct-head b { font-size: 15px; }
.ct-head small { display: block; font-size: 12px; color: var(--muted); }
.ct-qr { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: 12px; background: var(--seg-bg); }
.ct-qr img { width: 168px; height: 168px; object-fit: contain; background: #fff; border-radius: 8px; }
.ct-qr figcaption { font-size: 12px; color: var(--muted); }
.ct-dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; font-size: 14px; }
.ct-dl div { display: contents; }
.ct-dl dt { color: var(--muted); }
.ct-dl dd { margin: 0; overflow-wrap: anywhere; }
.me-user { display: flex; align-items: center; gap: 12px; }
.me-user small { display: block; font-size: 12px; color: var(--muted); }
.seg.wide { display: flex; }
.seg.wide button { flex: 1; justify-content: center; min-height: 40px; }
.me-links { list-style: none; margin: 0; padding: 0; }
.me-links a { display: flex; align-items: center; justify-content: space-between; padding: 14px 2px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.me-links li:first-child a { border-top: 0; }
.me-logout { justify-content: center; }
.sc-qr { display: flex; align-items: center; gap: 12px; }
.sc-qr img { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ext-ics { background: var(--accent-soft); color: var(--accent-ink); }

@media (max-width: 1199px) {
  .kpis.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .kpis.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-row { gap: 3px; }
  .cell { min-height: 58px; padding: 3px; gap: 2px; }
  .chip { font-size: 0; padding: 0; height: 6px; border-radius: 3px; }
  .hname, .ghost { display: none; }
  .dt-boxes { grid-template-columns: 1fr; }
  .ev { grid-template-columns: 80px minmax(0, 1fr); gap: 4px 12px; }
  .ev-amt { grid-column: 2; text-align: left; }
  .ev .pill { grid-column: 2; justify-self: start; }
  .search { min-width: 0; width: 100%; }
  .req-list li { flex-wrap: wrap; gap: 8px 12px; }
  .req-list li .grow { flex: 1 1 calc(100% - 40px); }
  .req-list li .req-due { margin-left: 38px; margin-right: auto; }
  .recon { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toast { bottom: 84px; }
  .page-head.keep-m { display: flex; align-items: center; }
  .page-head.keep-m h1 { font-size: 20px; }
  .page-head.keep-m .sub { display: none; }
}

/* ---------- 08 财务总览（M4c） ---------- */
.fin-top { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: stretch; }
.fin-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fin-steps li { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #FBFCFD; min-width: 0; }
.fin-steps li.st-now { background: var(--warn-soft); border-color: var(--warn-line); }
.fin-steps li.st-later { background: #fff; border-style: dashed; }
.fin-steps p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.st-h { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.st-b { width: 22px; height: 22px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--ok); }
.st-now .st-b { background: var(--vat-warn); }
.st-todo .st-b, .st-later .st-b { background: var(--track); color: var(--muted); }
.st-s { margin-top: auto; font-size: 12px; font-weight: 600; }
.tone-ok { color: var(--ok); }
.tone-warn { color: var(--warn); }
.tone-muted { color: var(--muted); font-weight: 500; }
.fx-big { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.fx-big b { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.fx-rows { margin: 0; display: flex; flex-direction: column; }
.fx-rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.fx-rows div:last-child { border-bottom: 0; }
.fx-rows dt small { display: block; font-size: 11px; color: var(--muted); }
.fx-rows dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-rows.compact div { padding: 6px 0; }
.fx-rows.calc .sum { border-top: 2px solid var(--ink); font-weight: 700; }
.fx-method { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #3B4754; }
.fin-kpis .foot span { line-height: 1.5; }
.kpi .value.bad { color: var(--bad); }
.pack { list-style: none; margin: 0; padding: 0; }
.pack li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.pack li small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pack li.pk-ready .ic { color: var(--ok); }
.pack li.pk-later { color: var(--muted); }
.pack li.pk-missing .ic { color: var(--warn); }
.pack .grow, .rel-list .grow { flex: 1; min-width: 0; }
.tag { font-size: 11px; color: var(--muted); background: var(--seg-bg); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.tag.warn { color: var(--warn); background: var(--warn-soft); }
.rel-list { list-style: none; margin: 0; padding: 0; }
.rel-list li { display: grid; grid-template-columns: 110px auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13px; }
.rel-list .pill { justify-self: start; }
.pill.p-v1 { background: var(--ok-soft); color: var(--ok); }
.pill.p-v2 { background: var(--accent-soft); color: var(--accent-ink); }
.fin-warn { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn-ink); padding: 14px 18px; flex-direction: row; }
.fin-warn ul { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.modal.wide { max-width: 980px; }
.modal.wide > * { flex: none; }   /* 表长了整框滚动，不要把表格挤成小框里滚 */
.modal h3 { margin: 10px 0 0; font-size: 14px; font-weight: 600; }
.modal .card-head .actions { display: flex; align-items: center; gap: 8px; }
.banner-s { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn-ink); font-size: 13px; }
.rep.cn th[scope='row'] { padding-left: 12px; white-space: normal; min-width: 220px; }
.rep.cn td.no, .rep.cn th.no { color: var(--muted); text-align: center; width: 48px; }
.rep.cn tr.r-head th { font-weight: 600; padding-top: 14px; }
.rep.cn tr.r-item th[scope='row'] { padding-left: 26px; }
.rep.cn sup { font-size: 10px; color: var(--accent); margin-left: 2px; }
.rep.cn .muted { font-size: 11px; }
.cn-notes { margin: 0; padding-left: 20px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.fx-sum { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted); }
.fx-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.fx-sum .bad { color: var(--bad); font-weight: 600; }
table.fx-days td { padding: 6px 10px; }
table.fx-days tr.warn td { background: var(--warn-soft); }
.inline-l { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.inline-l input { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; }
.self-start { align-self: flex-start; }
.sf-rows li.voided { opacity: 0.55; }
.sf-rows li.voided b { text-decoration: line-through; }
@media (max-width: 1199px) {
  .fin-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .fin-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .fin-steps { grid-template-columns: minmax(0, 1fr); }
  .fin-steps li { padding: 12px; }
  /* 手机上先看数：数卡挪到数据进度前面 */
  .content > .fin-kpis { order: 1; }
  .content > .fin-top { order: 2; }
  .content > .fin-top ~ .grid, .content > .fin-top ~ .foot-note { order: 3; }
  .page-head.keep-m .actions { margin-left: auto; }
  .rel-list li { grid-template-columns: 1fr auto; }
  .rel-list li .grow { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
  .pack li small { display: none; }
  .fx-big b { font-size: 22px; }
  .modal.wide { padding: 18px 14px; }
  .rep.cn th[scope='row'] { min-width: 120px; padding-left: 4px; }
  .rep.cn tr.r-item th[scope='row'] { padding-left: 12px; }
  .rep.cn td, .rep.cn thead th { padding-left: 6px; padding-right: 6px; }
  .rep.cn .no { display: none; }
}

/* ---------- 09 报表中心（M4d；设计稿 09 / 09b） ---------- */
.rc-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.rc-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 13.5px; }
.rc-chip:hover { color: var(--ink); border-color: #C9D1DB; }
.rc-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.rc-chip.on .tag { background: rgba(255, 255, 255, 0.16); color: #fff; }
.rc-matrix { padding: 12px 24px 8px; }
table.mx { width: 100%; border-collapse: collapse; font-size: 13px; }
.mx thead th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 12px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mx thead th:first-child { width: 34%; }
.mx tbody th { text-align: left; font-weight: 400; padding: 12px 8px; vertical-align: middle; }
.mx tbody th b { display: block; font-weight: 600; }
.mx tbody th small { display: block; color: var(--muted); font-size: 12px; }
.mx tbody th small.tone-ok { color: var(--ok); }
.mx tbody th small.tone-warn { color: var(--warn); }
.mx tbody td { padding: 10px 8px; vertical-align: middle; }
.mx tbody tr { border-bottom: 1px solid var(--line); }
.mx tbody tr:last-child { border-bottom: 0; }
.mx tbody tr.cur { background: var(--row-total); }
.mx tr.mx-g th { padding: 18px 8px 8px; color: var(--accent); font-size: 12px; font-weight: 600; }
.mx tr.mx-g { border-bottom: 1px solid var(--line); }
.mx-c { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mx-b, .mx-eye { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 600; }
.mx-b:hover, .mx-eye:hover { border-color: #C9D1DB; color: var(--ink); }
.mx-eye { width: 30px; padding: 0; color: var(--accent); }
.mx-eye.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.mx-na { color: var(--muted); font-size: 12px; }
.mx-wait { color: var(--warn); font-size: 12px; font-weight: 600; }
.mx-later { color: var(--muted); font-size: 12px; background: var(--seg-bg); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.rc-pv { background: #E9EDF2; border-radius: var(--radius); padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.rc-pv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.rc-pv-head h2 { font-size: 18px; font-weight: 600; }
.rc-pv-tools { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.rc-pv-tools .seg { background: #fff; }
.rc-pv-tools .seg button[aria-pressed='true'] { background: var(--ink); color: #fff; box-shadow: none; }
.rc-pv-tools .seg button:disabled { opacity: 0.4; cursor: not-allowed; }
.rc-paper { background: #fff; border-radius: 4px; box-shadow: 0 1px 3px rgba(26, 39, 51, 0.12); max-width: 880px; width: 100%; margin: 0 auto; }
.rc-frame { display: block; width: 100%; height: 1100px; border: 0; }
.rc-pv-dl { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 767px) {
  .rc-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .rc-chip { flex: none; min-height: 36px; padding: 0 12px; font-size: 13px; }
  .rc-matrix { padding: 4px 14px; }
  .mx thead { display: none; }
  .mx, .mx tbody, .mx tr, .mx th, .mx td { display: block; width: 100%; }
  .mx tbody tr { padding: 10px 0; }
  .mx tbody th { padding: 2px 0 6px; }
  .mx tbody td { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; }
  .mx tbody td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  .mx tbody td.mx-span { justify-content: flex-start; }
  .mx tbody td.mx-span::before { content: none; }
  .mx tr.mx-g { padding: 14px 0 4px; }
  .mx tr.mx-g th { padding: 0; }
  .mx-b { min-height: 34px; }
  .mx-eye { width: 34px; min-height: 34px; }
  .rc-pv { padding: 14px 10px 18px; margin: 0 -4px; }
  .rc-pv-tools { justify-content: flex-start; width: 100%; }
  .rc-vers { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .rc-frame { height: 900px; }
}

/* ---------- M4e：通知铃铛、发布版本与更正、关联往来对账 ---------- */
.notif-wrap { position: relative; }
.icon-btn.bell { position: relative; }
.icon-btn.bell .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px #fff; }
.notif-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: min(380px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(26, 39, 51, 0.12); padding: 6px; }
.notif-menu .nm-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: 13px; }
.notif-menu ul { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; }
.notif-menu li button { width: 100%; display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 0; border-radius: 8px; background: none; font-size: 13px; color: var(--ink); }
.notif-menu li button:hover { background: var(--seg-bg); }
.notif-menu li.unread button { background: var(--accent-soft); }
.notif-menu li.unread .nm-t { font-weight: 600; }
.notif-menu .nm-k { font-size: 11px; color: var(--accent); }
.notif-menu small { color: var(--muted); font-size: 11px; }
.notif-menu .nm-foot { margin: 4px 0 0; padding: 8px 10px 4px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); line-height: 1.5; }
.notif-menu .empty { padding: 14px 10px; }
button.link { border: 0; background: none; color: var(--accent); font-size: 12px; padding: 0; }
.notify-prefs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.notify-prefs .np-ch { margin-left: auto; font-size: 12px; }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); }
.rel-list li { grid-template-columns: 110px auto minmax(0, 1fr) auto; }
.rel-diff { font-size: 13px; font-weight: 500; white-space: nowrap; }
.btn.warn { color: var(--bad); border-color: var(--bad-line); }
.fin-ic .ic-sum { font-size: 13px; font-weight: 600; white-space: nowrap; }
.tone-bad { color: var(--bad); }
table.ic { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ic thead th { font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.ic th.num, table.ic td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.ic tbody th, table.ic tbody td { padding: 12px 10px; border-bottom: 1px solid #EEF1F5; vertical-align: top; }
table.ic tbody th { font-weight: 400; text-align: left; }
table.ic tbody th b { display: block; font-weight: 600; }
table.ic tbody th small { color: var(--muted); font-size: 12px; }
table.ic .ic-st .pill { font-size: 11.5px; padding: 3px 9px; }
table.ic .ic-note { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); line-height: 1.5; max-width: 340px; }
table.ic td.ops { text-align: right; white-space: nowrap; }
table.ic td.ops .btn + .btn { margin-left: 6px; }
.ic-form { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.ic-form input { min-height: 34px; min-width: 240px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: 13px; }
.rc-version { gap: 12px; }
.rc-vbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.rc-vbar .seg a { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 14px; border-radius: 8px; color: var(--ink); font-weight: 500; }
.rc-vbar .seg a small { color: var(--muted); font-weight: 400; font-size: 11px; }
.rc-vbar .seg a.on { background: var(--ink); color: #fff; }
.rc-vbar .seg a.on small { color: #C9D3DE; }
.rc-chg h3, .corr h3 { margin: 4px 0 0; font-size: 14px; font-weight: 600; }
.rep.chg caption { text-align: left; font-size: 12px; color: var(--muted); padding: 10px 0 4px; }
.rep.chg th[scope='row'] { padding-left: 10px; }
.rep.chg td.num { text-align: right; }
.rep.chg td.neg { color: var(--bad); }
.corr { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.corr .btn { align-self: flex-start; }
.corr-same { display: flex; align-items: center; gap: 6px; color: var(--ok); }
.corr-rel h4 { margin: 0 0 4px; font-size: 13px; }
.corr-rel ul { margin: 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.kpi-stored { color: var(--warn-ink); font-weight: 600; }
.pub-form input { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: inherit; }
.rel-parties, .rel-todo { list-style: none; margin: 0; padding: 0; }
.rel-parties li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.rel-parties li small { display: block; color: var(--muted); font-size: 12px; }
.rel-add { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 14px; }
.rel-add label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.rel-add select, .rel-add input { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: inherit; color: var(--ink); background: #fff; }
.rel-todo li { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.rel-todo .rt-h small { display: block; color: var(--muted); font-size: 12px; }
.rel-todo p { margin: 0; }
.rel-todo .rt-a { color: var(--ok); }
.rt-form { display: flex; gap: 8px; }
.rt-form input { flex: 1; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: inherit; }
@media (max-width: 767px) {
  .rel-list li { grid-template-columns: 1fr auto; }
  .rel-list li .rel-diff { grid-column: 1 / -1; }
  .notify-prefs .np-ch { margin-left: 0; width: 100%; }
  table.ic thead { display: none; }
  table.ic, table.ic tbody, table.ic tr, table.ic th, table.ic td { display: block; width: 100%; }
  table.ic tbody tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.ic tbody th, table.ic tbody td { border: 0; padding: 3px 0; }
  table.ic tbody td { display: flex; justify-content: space-between; gap: 10px; }
  table.ic tbody td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  table.ic td.ops { justify-content: flex-start; padding-top: 8px; }
  table.ic td.ops::before { content: none; }
  table.ic .ic-st { flex-direction: column; align-items: flex-start; }
  table.ic .ic-st::before { margin-bottom: 2px; }
  .ic-form input { min-width: 0; width: 100%; }
  .rel-add { grid-template-columns: minmax(0, 1fr); }
}
