/* 邮件总台：浅色工作区、清晰的数据层次，以及统一的蓝色操作入口。 */
:root {
  color-scheme: light;
  --plane: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --ink: #1c283c;
  --ink-2: #526078;
  --muted: #6e7b90;
  --grid: #edf0f5;
  --axis: #d7dfea;
  --border: #e5eaf2;
  --accent: #2e6de9;
  --accent-ink: #245cca;
  --accent-wash: #edf3ff;
  --banner: #eaf1ff;
  --track: #cde2fb;
  --good: #0ca30c;
  --good-ink: #006300;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --shadow: 0 2px 6px rgba(35, 55, 86, 0.025);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --plane: #101722;
    --surface: #182230;
    --surface-2: #1d2a3b;
    --ink: #e7edf6;
    --ink-2: #b6c3d5;
    --muted: #94a4ba;
    --grid: #29384c;
    --axis: #3e5068;
    --border: rgba(255, 255, 255, 0.10);
    --accent: #3987e5;
    --accent-ink: #86b6ef;
    --accent-wash: rgba(57, 135, 229, 0.16);
    --banner: #1d3253;
    --track: #184f95;
    --good-ink: #0ca30c;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--plane);
  color: var(--ink);
  font: 14px/1.55 system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: 0; }
h1 { font-size: 22px; line-height: 1.3; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.secondary { color: var(--ink-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 16px; border-radius: 6px; background: var(--surface); }
.skip-link:focus { top: 8px; }
.icon { width: 14px; height: 14px; flex: none; vertical-align: -2px; fill: currentColor; }

/* ---------- 总台导航 ---------- */
.admin-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.admin-main { min-width: 0; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 32px; padding: 22px 14px 16px;
  background: var(--surface); border-right: 1px solid var(--border);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; color: var(--ink); }
.sidebar-brand:hover { text-decoration: none; }
.sidebar-mark {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px;
  border-radius: 11px; color: #fff; background: var(--accent);
}
.sidebar-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.sidebar-brand-text strong { font-size: 21px; letter-spacing: -0.6px; }
.sidebar-brand-text small { margin-top: 2px; color: var(--ink-2); }
.sidebar-icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.sidebar-mark .sidebar-icon { width: 22px; height: 22px; }
.sidebar-nav { display: flex; flex: 1; flex-direction: column; gap: 24px; }
.sidebar-group { display: flex; flex-direction: column; gap: 5px; }
.sidebar-label { padding: 0 12px 4px; color: var(--muted); font-size: 11px; letter-spacing: 0.7px; }
.sidebar-link {
  display: flex; align-items: center; gap: 11px; min-height: 42px;
  padding: 8px 12px; border-radius: 8px; color: var(--ink-2); white-space: nowrap;
}
.sidebar-link:hover { background: var(--surface-2); text-decoration: none; }
.sidebar-link[aria-current="page"] {
  background: var(--accent-wash); color: var(--accent-ink); font-weight: 600;
  box-shadow: inset 3px 0 var(--accent);
}
.sidebar-account { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.sidebar-caption { margin: 12px 12px 0; color: var(--muted); font-size: 11px; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1440px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px;
}
.topbar-location { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.topbar-location strong { color: var(--ink); font-weight: 500; }
.me { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.me-name { display: flex; align-items: center; gap: 9px; color: var(--ink-2); max-width: 180px; }
.me-name:hover { color: var(--ink); text-decoration: none; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-ink); font-size: 13px; flex: none; }
.me-text { overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.me-name small { display: block; color: var(--muted); font-size: 10px; }
.me form { margin: 0; }
.tag {
  font-size: 12px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--ink-2);
}
.mode-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); }
.mode-tag .dot { width: 6px; height: 6px; }
.me .link-btn { font-size: 12px; }

/* ---------- 布局 ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 28px 28px 72px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .meta { color: var(--muted); font-size: 13px; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.section { margin-top: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--muted); font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.template-card { display: flex; flex-direction: column; min-width: 0; }
.template-card-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.template-card h2 { overflow-wrap: anywhere; margin: 20px 0 8px; }
.template-card .form-actions { margin-top: auto; padding-top: 16px; }
.template-empty { padding: 48px 24px; text-align: center; }
.template-empty .mailbox-mark { margin: 0 auto 20px; }
.template-empty p { max-width: 540px; margin: 12px auto 24px; color: var(--muted); line-height: 1.8; }
.template-starters { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:28px; }
.starter-card { padding:22px;display:flex;gap:16px;color:var(--ink);text-decoration:none;transition:transform .15s; }
.starter-card:hover { transform:translateY(-3px);border-color:#a7c6f7;text-decoration:none; }
.starter-symbol { display:grid;place-items:center;width:44px;height:50px;flex:none;border-radius:10px;background:#eaf2ff;color:#2563eb;font-size:26px; }
.starter-card h2 { margin:0;font-size:16px; }.starter-card p { color:var(--muted);font-size:13px;margin:8px 0 16px; }.starter-card div>span { color:#2563eb;font-size:12px; }
.template-toolbar { display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px;flex-wrap:wrap; }
.template-tabs { display:flex;gap:6px; }.template-tabs a { padding:9px 13px;border-radius:8px;color:var(--muted); }.template-tabs a[aria-current] { background:#eaf2ff;color:#1d4ed8;font-weight:600; }
.template-search { display:flex;gap:8px; }.template-search input { width:220px; }
@media(max-width:850px){.template-starters{grid-template-columns:1fr}.starter-card{padding:16px}.starter-card p{margin:4px 0}.template-search{width:100%}.template-search input{width:100%}}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.desk-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.desk-card p { margin: 0 0 4px; }
.desk-card .actions { margin-top: auto; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.stack > * + * { margin-top: 10px; }

/* ---------- 总台首页与企业邮箱 ---------- */
.eyebrow { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.workspace-banner { padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(115deg, var(--accent-wash), var(--banner)); }
.workspace-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.workspace-intro h2 { font-size: 21px; overflow-wrap: anywhere; }
.workspace-intro p { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; }
.workspace-intro .eyebrow { color: var(--accent-ink); }
.workspace-emblem { display: grid; place-items: center; width: 62px; height: 62px; flex: none; border-radius: 18px; background: var(--surface); color: var(--accent); transform: rotate(-8deg); box-shadow: 0 4px 12px rgba(46,109,233,.07); }
.workspace-emblem .sidebar-icon { width: 32px; height: 32px; stroke-width: 1.4; }
.workspace-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick-link { display: flex; align-items: center; gap: 12px; padding: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.quick-link:hover { text-decoration: none; border-color: var(--accent); }
.quick-link > span:nth-child(2) { flex: 1; min-width: 0; }
.quick-link strong { display: block; font-size: 13px; font-weight: 600; }
.quick-link small { display: block; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; font-size: 11px; }
.quick-link > .sidebar-icon { width: 15px; height: 15px; color: var(--muted); }
.quick-icon { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-wash); color: var(--accent-ink); }
.kpis.overview-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.overview-kpis .kpi { padding: 20px; }
.overview-kpis .kpi-value { font-size: 30px; margin: 10px 0 8px; letter-spacing: -0.5px; }
.overview-kpis .kpi:first-child { border-top: 3px solid var(--accent); padding-top: 18px; }
.kpis.overview-health { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-health .kpi-value { font-size: 23px; margin: 6px 0; }
.overview-trends > .section-head { padding-bottom: 8px; }
.featured-trend > .chart { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.featured-trend > .chart .plot { height: 230px; margin-top: 14px; }
.featured-trend > .chart .chart-head { justify-content: flex-start; gap: 16px; }
.featured-trend > .chart .chart-readout { display: flex; align-items: baseline; gap: 8px; }
.trend-more { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.trend-more summary { color: var(--accent-ink); cursor: pointer; font-size: 13px; padding: 4px 0; }
.trend-more summary span { color: var(--muted); font-size: 12px; margin-left: 12px; }
.trend-more .multiples { margin-top: 14px; }
.calm-state { display: flex; align-items: center; gap: 12px; padding: 18px 20px; }
.calm-state .icon { width: 20px; height: 20px; color: var(--accent); }
.calm-state strong { font-size: 13px; font-weight: 500; }
.calm-state p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.mailbox-home { overflow: hidden; }
.mailbox-heading { display: flex; align-items: center; gap: 14px; padding: 26px 28px; border-bottom: 1px solid var(--border); }
.mailbox-heading > .tag { margin-left: auto; }
.mailbox-heading h2 { font-size: 18px; }
.mailbox-mark { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; color: var(--accent-ink); background: var(--accent-wash); }
.mailbox-mark .sidebar-icon { width: 26px; height: 26px; }
.mailbox-address { padding: 30px 28px; background: linear-gradient(110deg, var(--surface), var(--accent-wash)); }
.mailbox-address > span { display: block; color: var(--muted); font-size: 12px; }
.mailbox-address strong { display: block; font-size: clamp(18px, 2.5vw, 28px); font-weight: 600; margin-top: 8px; overflow-wrap: anywhere; }
.mailbox-address p { margin: 12px 0 0; color: var(--ink-2); font-size: 13px; }
.mailbox-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 20px 28px; border-top: 1px solid var(--border); }
.mailbox-footer > span { font-size: 12px; color: var(--muted); }
.mailbox-footer .btn { height: 40px; }
.mailbox-notes h2 { margin-top: 16px; font-size: 15px; }
.mailbox-notes p { color: var(--ink-2); font-size: 13px; max-width: 48em; }
.mailbox-notes a { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.mailbox-notes a .sidebar-icon { width: 15px; height: 15px; }
.mailbox-empty { padding: 40px 24px; text-align: center; }
.mailbox-empty h2 { margin-top: 18px; }
.mailbox-empty p { color: var(--muted); }
.mailbox-empty .btn { margin-top: 8px; }

/* ---------- 提示 ---------- */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px; margin-top: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--ink-2);
}
.notice .icon { margin-top: 3px; }
.notice-info .icon { fill: var(--accent); }
.notice-good .icon { fill: var(--good); }
.notice-warning .icon { fill: var(--warning); }
.notice-critical .icon { fill: var(--critical); }
.notice b { color: var(--ink); font-weight: 600; }

/* ---------- 状态 ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.dot-info { background: var(--accent); }
.dot-good { background: var(--good); }
.dot-warning { background: var(--warning); }
.dot-serious { background: var(--serious); }
.dot-critical { background: var(--critical); }
.health { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.health-good .icon { fill: var(--good); }
.health-warning .icon { fill: var(--warning); }
.health-critical .icon { fill: var(--critical); }

/* ---------- 指标卡 ---------- */
.kpi-group { margin-top: 20px; }
.kpi-group > h2 { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px 12px; }
.kpi-label { color: var(--ink-2); font-size: 13px; }
.kpi-value { font-size: 26px; font-weight: 600; line-height: 1.25; margin-top: 2px; }
.kpi-value a { color: var(--ink); }
.kpi-sub { color: var(--muted); font-size: 12px; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; }

/* ---------- 条形 ---------- */
.bar { display: block; height: 8px; background: var(--track); border-radius: 0 4px 4px 0; overflow: hidden; min-width: 48px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 0 4px 4px 0; }
.progress { display: flex; align-items: center; gap: 12px; }
.progress .bar { flex: 1; height: 10px; border-radius: 0 5px 5px 0; }
.progress .bar > i { border-radius: 0 5px 5px 0; }
.bar-cell { width: 22%; min-width: 90px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; }
th { color: var(--muted); background: var(--surface-2); font-weight: 500; font-size: 12px; white-space: nowrap; border-bottom: 1px solid var(--grid); }
td { border-bottom: 1px solid var(--grid); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td.wrap { max-width: 420px; overflow-wrap: anywhere; }
td.note-cell { min-width: 220px; max-width: 360px; overflow-wrap: anywhere; }
td .sub { color: var(--muted); font-size: 12px; }
.truncate { display: inline-block; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ---------- 筛选 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--ink-2); background: var(--surface); font-size: 13px; white-space: nowrap;
}
.pill:hover { text-decoration: none; background: var(--surface-2); }
.pill small { color: var(--muted); font-variant-numeric: tabular-nums; }
.pill.active { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-ink); }
.pill.active small { color: var(--accent-ink); }
form.inline, .row-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }

input[type=text], input[type=search], input[type=password], input[type=email], input[type=datetime-local],
select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px; padding: 0 10px; height: 32px;
}
textarea { height: auto; padding: 8px 10px; width: 100%; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  font: inherit; font-size: 13px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent); filter: brightness(0.92); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.link-btn { font: inherit; color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer; }
.link-btn:hover { color: var(--ink); text-decoration: underline; }
.pager { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 0 0; }

/* ---------- 表单 ---------- */
.form-section { margin-top: 16px; }
.form-section > h2 { margin-bottom: 4px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; min-width: 0; }
.field > span { color: var(--ink-2); font-size: 13px; }
.field > small, .check small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.field input:not([type=radio]):not([type=checkbox]), .field select, .field textarea { width: 100%; }
.field input[type=file] { padding: 4px 0; }
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 240px; }
.static { min-height: 32px; display: flex; align-items: center; color: var(--ink-2); }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.segmented { display: flex; gap: 20px; flex-wrap: wrap; }
.segmented label, .check { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); cursor: pointer; }
.check { margin-top: 14px; }
.check input { margin-top: 4px; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
ul.plain { margin: 6px 0 0; padding-left: 18px; }
ul.warnings { list-style: none; padding: 0; }
ul.warnings li { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
ul.warnings .icon { fill: var(--warning); }
.stack > form, .stack > input, .stack > select { margin: 0; }
.secret { margin: 6px 0 4px; }
code.secret-value {
  font: 600 16px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 2px 8px; margin-left: 6px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; user-select: all;
}

/* ---------- 写营销邮件 ---------- */
.compose-steps {
  display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 2px 0 0; padding: 0;
  color: var(--ink-2); font-size: 12px;
}
.compose-steps li { display: flex; align-items: center; gap: 5px; padding: 4px 8px; white-space: nowrap; }
.compose-steps li[aria-current="step"] { color: var(--accent-ink); background: var(--accent-wash); border-radius: 6px; font-weight: 600; }
.compose-steps li span { font-variant-numeric: tabular-nums; }
.compose-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); gap: 16px; align-items: start; }
.compose-side { position: sticky; top: 80px; min-width: 0; }
.compose-workspace .card-pad { padding: 18px; }
.compose-workspace .field > span, .compose-editor-heading > label { color: var(--ink); font-weight: 600; }
.compose-workspace .field > span small { color: var(--ink-2); font-weight: 400; }
.compose-workspace .field input[type=text], .compose-workspace .field input[type=email] { min-height: 40px; }
.compose-workspace input[readonly], .compose-address { background: var(--surface-2); }
.compose-address { border-radius: 6px; min-height: 40px; padding: 6px 10px; overflow-wrap: anywhere; }
.compose-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 16px 0 6px; }
.compose-editor-heading > label { font-size: 13px; }
.compose-editor-heading .segmented { gap: 12px; font-size: 13px; }
.compose-hint, .compose-details { color: var(--ink-2); font-size: 12px; }
.compose-hint { margin: 6px 0 0; }
.compose-details { margin-top: 8px; }
.compose-details summary { width: fit-content; max-width: 100%; color: var(--accent-ink); cursor: pointer; }
.compose-details p { margin: 6px 0 0; overflow-wrap: anywhere; }
.compose-recipients { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.compose-consent { margin-top: 16px; padding-top: 2px; border-top: 1px solid var(--border); }
.compose-consent .check small { display: block; margin-top: 3px; }
.compose-side .btn { height: auto; min-height: 40px; }

/* ---------- 预览与发送 ---------- */
.review { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; margin-top: 16px; align-items: start; }
.review-side { display: flex; flex-direction: column; gap: 16px; }
.review-side h2 { margin-bottom: 8px; }
.mail-head { padding: 10px 16px; }
.mail-row { display: flex; gap: 12px; padding: 4px 0; overflow-wrap: anywhere; }
.mail-row > span:first-child { color: var(--muted); width: 64px; flex: none; }
.mail-frame { display: block; width: 100%; height: 760px; margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; background: #f4f5f7; }
.big-number { font-size: 30px; font-weight: 600; line-height: 1.2; margin-bottom: 10px; }
.big-number small { font-size: 13px; font-weight: 400; color: var(--muted); }
dl.facts.compact { grid-template-columns: 96px 1fr; gap: 6px 10px; font-size: 13px; }
.test-log { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--grid); }
.test-log .icon { width: 12px; height: 12px; }
.test-log div .icon { fill: var(--good); }

/* ---------- 图表 ---------- */
.multiples { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.chart { margin: 0; padding: 12px 14px 6px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.chart-title { color: var(--ink-2); font-size: 13px; }
.chart-readout { text-align: right; white-space: nowrap; }
.chart-value { font-size: 17px; font-weight: 600; }
.chart-sub { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; }
.plot { position: relative; height: 132px; margin-top: 4px; border-radius: 4px; }
.plot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.plot svg { display: block; overflow: visible; }
.c-grid { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.c-axis { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.c-tick { fill: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.c-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-area { fill: var(--accent); fill-opacity: 0.10; stroke: none; }
.c-cross { stroke: var(--ink-2); stroke-width: 1; shape-rendering: crispEdges; }
.c-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.c-threshold { stroke: var(--critical); stroke-width: 1; shape-rendering: crispEdges; }
.c-threshold-label { fill: var(--ink-2); font-size: 10px; }
.c-empty { fill: var(--muted); font-size: 12px; }
.data-table { margin-top: 10px; }
.data-table > summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.data-table .table-wrap { margin-top: 8px; max-height: 320px; overflow: auto; }

/* ---------- 时间线 ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--grid); }
.timeline li:last-child { border-bottom: 0; }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .note { color: var(--ink-2); font-size: 12px; overflow-wrap: anywhere; }
dl.facts { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- 登录 ---------- */
.login { max-width: 360px; margin: 12vh auto 0; }
.login h1 { font-size: 20px; margin-bottom: 4px; }
.login p { color: var(--muted); margin: 0 0 20px; }
.login label { display: block; color: var(--ink-2); font-size: 13px; margin: 14px 0 6px; }
.login input { width: 100%; height: 38px; }
.login .btn { width: 100%; justify-content: center; height: 38px; margin-top: 20px; font-size: 14px; }

@media (max-width: 1000px) {
  .compose-workspace { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .compose-side { position: static; }
  .workspace-shortcuts { grid-template-columns: minmax(0, 1fr); }
  .quick-link { padding: 12px 14px; }
  .topbar-location > span { display: none; }
}
@media (max-width: 960px) {
  .review { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .admin-shell { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; gap: 10px; padding: 12px 16px; border-right: 0; }
  .sidebar-brand { align-self: flex-start; padding: 0; }
  .sidebar-nav { flex: initial; flex-flow: row wrap; align-items: center; gap: 4px; }
  .sidebar-group, .sidebar-account { display: contents; }
  .sidebar-label { display: none; }
  .sidebar-caption { display: none; }
  .sidebar-link { gap: 6px; min-height: 40px; padding-inline: 8px; font-size: 13px; }
  .sidebar-link[aria-current="page"] { box-shadow: none; }
  .workspace-shortcuts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-link { flex-wrap: wrap; gap: 8px; }
  .quick-link > .sidebar-icon { display: none; }
}
@media (max-width: 640px) {
  .topbar-inner { padding: 8px 16px; min-height: 52px; justify-content: flex-end; }
  .topbar-location, .me-text { display: none; }
  .me { width: 100%; justify-content: flex-end; gap: 12px; }
  .me .mode-tag { margin-right: auto; }
  .me .btn { min-height: 36px; }
  .page { padding: 16px 16px 56px; }
  .kpis, .kpis.overview-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-value { font-size: 22px; }
  .overview-kpis .kpi { padding: 14px; }
  .overview-kpis .kpi:first-child { padding-top: 12px; }
  .overview-kpis .kpi-value { font-size: 26px; }
  .kpis.overview-health { grid-template-columns: minmax(0, 1fr); }
  .workspace-banner { padding: 16px; }
  .workspace-shortcuts { grid-template-columns: minmax(0, 1fr); }
  .workspace-intro h2 { font-size: 19px; }
  .workspace-emblem { width: 44px; height: 44px; border-radius: 12px; }
  .workspace-emblem .sidebar-icon { width: 26px; height: 26px; }
  .quick-link { flex-wrap: nowrap; gap: 12px; }
  .quick-link > .sidebar-icon { display: block; }
  .overview-trends { padding: 16px; }
  .trend-more summary span { display: block; margin: 4px 0 0; }
  .mailbox-heading, .mailbox-address, .mailbox-footer { padding: 20px; }
  .mailbox-heading { flex-wrap: wrap; }
  .mailbox-heading > .tag { margin-left: 0; }
  .mailbox-footer .btn { width: 100%; justify-content: center; min-height: 44px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  dl.facts { grid-template-columns: 90px 1fr; }
  .compose-recipients { grid-template-columns: minmax(0, 1fr); }
  .compose-workspace .field input[type=text], .compose-workspace .field input[type=email], .compose-workspace textarea { font-size: 16px; }
  .compose-side .btn-primary { flex: 1; justify-content: center; min-height: 44px; }
}
