:root {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --inset: #f8fafd;
  --hover: #fbfdff;
  --sel-bg: #f3f8ff;

  --ink: #132e54;
  --ink-2: #2a4c78;
  --muted: #73849c;
  --muted-2: #93a3b8;

  --line: #e0e8f4;
  --line-2: #eef2f8;

  --blue: #2563eb;
  --blue-d: #1d4ed8;
  --blue-l: #eef4fd;

  --ok: #0a704d;
  --ok-bg: #e6f5ee;
  --warn: #8c6420;
  --warn-bg: #fdf3e2;
  --bad: #a9542f;
  --bad-bg: #fbeae4;

  --r: 14px;
  --r-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
.hidden { display: none !important; }

/* ── 身份入口页（Gate） ── */
.gate-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 52px 28px 64px;
}
.gate-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 32px; flex-wrap: wrap;
}
.gate-brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(155deg, #132e54, #1e4b85);
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: .5px;
}
.gate-brand h1 { font-size: 24px; font-weight: 700; letter-spacing: -.3px; color: var(--ink); line-height: 1.25; }
.gate-brand p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.gate-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.gate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.gate-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 22px 18px;
  text-align: left;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.gate-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--role-color, var(--blue)); opacity: 0; transition: opacity .18s;
}
.gate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(19, 46, 84, .10);
  border-color: #cddbf0;
}
.gate-card:hover::before { opacity: 1; }
.gate-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.gate-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--role-bg, var(--blue-l)); color: var(--role-color, var(--blue));
  font-weight: 700; font-size: 14px;
}
.gate-role-tag { font-size: 11.5px; color: var(--muted); }
.gate-card h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.gate-card p { font-size: 12.5px; color: var(--muted); line-height: 1.6; flex: 1; }
.gate-card-foot {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--ink-2); font-weight: 600;
}
.gate-card-foot span:last-child { color: var(--role-color, var(--blue)); }

.gate-foot-strip {
  margin-top: 24px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.gate-foot-strip .gfs-items { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.gate-foot-strip b { color: var(--ink); font-weight: 600; }

/* ── 主应用工作区框架（.app） ── */
.app {
  display: flex;
  min-height: 100vh;
}
.side {
  width: 232px; flex: 0 0 232px;
  background: linear-gradient(180deg, #0e2748, #102f56 60%, #0c2243);
  color: #dbe6f6;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 0 14px;
  user-select: none;
}
.side-brand {
  padding: 0 18px 16px;
  display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.side-logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: rgba(255, 255, 255, .13); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex: 0 0 32px;
}
.side-brand-t { font-size: 14.5px; font-weight: 700; color: #fff; line-height: 1.2; }
.side-brand-s { font-size: 11px; color: #8fadd0; margin-top: 2px; }

.side-role-box {
  margin: 14px 14px 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
}
.side-role-top { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #fff; }
.role-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.side-role-sub { font-size: 11px; color: #93b4dc; margin-top: 2px; padding-left: 15px; }

.nav {
  flex: 1; overflow-y: auto; padding: 6px 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.nav-cap {
  font-size: 10.5px; color: #7796bd; padding: 10px 10px 4px;
  letter-spacing: .5px; font-weight: 600;
}
.nav button {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px;
  color: #c8d8ee; font-size: 13px; font-weight: 500;
  text-align: left; transition: background .14s, color .14s;
}
.nav button svg { width: 16px; height: 16px; opacity: .55; flex: 0 0 16px; }
.nav button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav button.on {
  background: #2563eb; color: #fff; font-weight: 600;
}
.nav button.on svg { opacity: 1; }
.nav-cnt {
  margin-left: auto; font-size: 10.5px; font-weight: 600;
  padding: 1px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: #e2ecf8;
}
.nav button.on .nav-cnt { background: rgba(255, 255, 255, .24); color: #fff; }

.side-foot {
  padding: 10px 12px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: 4px;
}
.side-util {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 8px;
  font-size: 12.5px; color: #9ab5d6; text-align: left;
}
.side-util svg { width: 15px; height: 15px; opacity: .65; }
.side-util:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.side-user {
  margin-top: 8px; padding: 10px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex; align-items: center; gap: 9px;
}
.u-ava {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
  background: rgba(255, 255, 255, .15); color: #fff;
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.u-name { font-size: 12.5px; font-weight: 600; color: #fff; line-height: 1.25; }
.u-meta { font-size: 10.5px; color: #8fadd0; }
.switch-btn {
  margin-top: 8px; width: 100%; padding: 7px 10px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04);
  color: #dbe6f6; font-size: 12px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: background .14s;
}
.switch-btn svg { width: 14px; height: 14px; opacity: .8; }
.switch-btn:hover { background: rgba(255, 255, 255, .11); }

/* ── 右侧主体 ── */
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.crumb b { color: var(--ink); font-weight: 600; }
.topbar-r { display: flex; align-items: center; gap: 12px; }
.date-pill {
  font-size: 11.5px; color: var(--muted); background: var(--inset);
  border: 1px solid var(--line-2); padding: 4px 11px; border-radius: 999px;
}
.top-user { display: flex; align-items: center; gap: 8px; }
.top-ava {
  width: 28px; height: 28px; border-radius: 50%; background: var(--line-2);
  color: var(--ink-2); font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.top-user-t { font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.top-user-s { font-size: 10.5px; color: var(--muted); }

.content {
  padding: 22px 26px 44px;
  max-width: 1360px;
  width: 100%;
}

/* ── 页头 ── */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.2px; color: var(--ink); line-height: 1.3; }
.page-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── 筛选胶囊与工具栏 ── */
.mini { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.mini button {
  padding: 5px 13px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  transition: all .14s;
}
.mini button:hover { border-color: #c5d4ea; background: var(--hover); }
.mini button.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }

.toolbar {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.toolbar-l, .toolbar-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-count { font-size: 12px; color: var(--muted); }

/* ── 卡片与栅格 ── */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px;
}
.stat-lbl { font-size: 12px; color: var(--muted); }
.stat b {
  display: block; font-size: 32px; font-weight: 700; color: var(--ink);
  line-height: 1.15; letter-spacing: -.6px; margin: 6px 0 6px;
}
.stat b small { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.stat-sub { font-size: 11.5px; color: var(--muted-2); }

.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 16px; align-items: start; }
.mb-16 { margin-bottom: 16px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 20px;
}
.card-h {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.card-h h3 { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.card-h p { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── 嵌套 KV 小块 ── */
.kv-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kv-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kv {
  background: var(--inset); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 10px 12px;
}
.kv span { display: block; font-size: 11px; color: var(--muted); }
.kv b { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-top: 2px; }

/* ── 按钮与输入 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  transition: all .14s; white-space: nowrap;
}
.btn:hover { background: var(--inset); border-color: #c8d7ec; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-d); border-color: var(--blue-d); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #0c2243; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: var(--surface); border-color: #e8c4b8; color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.sm { padding: 4px 10px; font-size: 11.5px; border-radius: 7px; }
.btn.link { border: none; background: none; padding: 4px 6px; color: var(--muted); font-weight: 500; }
.btn.link:hover { color: var(--ink); background: var(--inset); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.inp, .sel, .txta {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 11px; font-size: 12.5px; color: var(--ink); outline: none;
}
.inp:focus, .sel:focus, .txta:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }

.seg {
  display: inline-flex; background: var(--inset); border: 1px solid var(--line);
  border-radius: 9px; padding: 2px; gap: 2px;
}
.seg button {
  padding: 4px 12px; border-radius: 7px; font-size: 12px; font-weight: 500; color: var(--muted);
}
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(19, 46, 84, .08); }

/* ── 状态标签 ── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--inset); color: var(--muted); white-space: nowrap;
}
.tag.blue { background: var(--blue-l); color: var(--blue); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }

/* ── 提示横幅（克制版） ── */
.note-bar {
  background: #fdf8f1; border: 1px solid #efe0c2; border-radius: 12px;
  padding: 10px 14px; font-size: 12.5px; color: #745318;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.note-bar.blue { background: #f3f7fe; border-color: #d7e4fb; color: #1e3e72; }
.note-bar.ok { background: #f1fbf6; border-color: #cdecd9; color: #0a5c40; }

/* ── 表格 ── */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl th {
  background: var(--inset); color: var(--muted); font-size: 11px; font-weight: 600;
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl td {
  padding: 11px 12px; border-bottom: 1px solid var(--line-2); color: var(--ink);
  vertical-align: middle;
}
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: var(--hover); }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl tbody tr.on { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--blue); }
table.tbl small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 400; margin-top: 1px; }

/* ── 列表行 & 待办序号 ── */
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px; border-bottom: 1px solid var(--line-2);
  border-radius: 8px; transition: background .12s;
}
.list-row:last-child { border-bottom: none; }
.list-row.clickable { cursor: pointer; }
.list-row.clickable:hover { background: var(--hover); }
.list-row.on { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--blue); }
.num-dot {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 24px;
  background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.num-dot.soft { background: var(--line-2); color: var(--ink-2); }
.num-dot.ok { background: var(--ok-bg); color: var(--ok); }
.lr-body { flex: 1; min-width: 0; }
.lr-t { font-size: 13px; font-weight: 600; color: var(--ink); }
.lr-s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ── 进度条 & 漏斗 & 柱图 ── */
.bar { height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), #60a5fa); transition: width .35s; }
.bar.ok > i { background: var(--ok); }
.bar.warn > i { background: #c58a2b; }
.bar.bad > i { background: var(--bad); }

.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 84px 1fr 112px; align-items: center; gap: 12px; }
.funnel-lbl { font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: right; }
.funnel-track { height: 34px; background: #f1f5fb; border-radius: 9px; overflow: hidden; }
.funnel-fill {
  height: 100%; min-width: 68px; border-radius: 9px;
  background: linear-gradient(90deg, #2563eb, #6ea6f5);
  color: #fff; font-size: 12.5px; font-weight: 600;
  display: flex; align-items: center; padding: 0 12px; white-space: nowrap;
  transition: width .35s ease;
}
.funnel-fill.warn { background: linear-gradient(90deg, #b45309, #e59a4a); }
.funnel-fill.ok { background: linear-gradient(90deg, #0a704d, #34a77f); }
.funnel-meta { font-size: 11.5px; color: var(--muted); }

.spark-row {
  display: flex; align-items: flex-end; gap: 12px; height: 136px;
  padding: 18px 8px 6px; border-bottom: 1px solid #e3eaf4;
}
.spark-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 5px; }
.spark-val { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.spark-bar {
  width: 56%; max-width: 34px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #60a5fa, #2563eb); transition: height .35s;
}
.spark-lbls { display: flex; gap: 12px; padding: 6px 8px 0; }
.spark-lbls span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }

/* ── 学员端：今日横幅 & 练习 & 手机模拟器 ── */
.today-hero {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 58%, #3b82f6 100%);
  color: #fff; border-radius: 16px; padding: 22px 24px;
  box-shadow: 0 12px 28px rgba(30, 64, 175, .20);
  display: grid; grid-template-columns: 1fr 240px; gap: 20px; align-items: center;
  margin-bottom: 16px;
}
.today-hero h2 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 5px; }
.today-hero p { font-size: 13px; color: #dbeafe; }
.hero-side {
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px; padding: 14px 16px;
}
.hero-side span { font-size: 11.5px; color: #dbeafe; display: block; }
.hero-side b { font-size: 26px; font-weight: 700; display: block; margin: 2px 0 6px; }

.quote-box {
  border-left: 3px solid var(--blue); background: var(--inset);
  padding: 11px 14px; border-radius: 0 10px 10px 0; font-size: 12.5px; color: var(--ink-2);
}
.quote-box small { display: block; color: var(--muted); margin-top: 4px; font-size: 11px; }

.qnav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.qnav button {
  height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.qnav button.cur { background: var(--blue); border-color: var(--blue); color: #fff; }
.qnav button.ok { background: var(--ok-bg); border-color: #b7e2ce; color: var(--ok); }
.qnav button.bad { background: var(--bad-bg); border-color: #eabfb0; color: var(--bad); }

.opt {
  width: 100%; text-align: left; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); margin-bottom: 8px;
  font-size: 13px; color: var(--ink); display: flex; align-items: center; justify-content: space-between;
  transition: all .14s;
}
.opt:hover:not(:disabled) { border-color: #b8cde8; background: var(--hover); }
.opt.sel { border-color: var(--blue); background: var(--sel-bg); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); font-weight: 600; }
.opt.ok { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.opt.bad { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); font-weight: 600; }

.reason-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.reason-btn {
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 500;
  border: 1px solid #e4bdb0; background: #fff; color: var(--bad);
}
.reason-btn:hover { background: var(--bad-bg); }
.reason-btn.on { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 600; }

/* 手机模拟器 */
.phone-stage { display: flex; justify-content: center; gap: 28px; align-items: flex-start; padding: 10px 0; flex-wrap: wrap; }
.phone {
  width: 374px; background: #0e1e36; border-radius: 36px; padding: 10px;
  box-shadow: 0 18px 40px rgba(18, 38, 70, .22);
}
.phone-in {
  background: var(--bg); border-radius: 28px; overflow: hidden; height: 680px;
  display: flex; flex-direction: column;
}
.phone-bar {
  height: 30px; background: var(--ink); color: #fff; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 600;
}
.phone-body { flex: 1; overflow-y: auto; padding: 12px; }
.phone-tabs {
  display: flex; background: var(--surface); border-top: 1px solid var(--line);
}
.phone-tabs button { flex: 1; padding: 10px 0; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.phone-tabs button.on { color: var(--blue); font-weight: 700; }

/* ── 阅读纸面、违规标注与对照 ── */
.paper {
  background: var(--inset); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 15px 16px; font-size: 13px; line-height: 1.85; color: var(--ink);
}
.risk-mark {
  background: #fdecea; color: #a12c1e; border-bottom: 2px solid #e8a598;
  padding: 0 3px; border-radius: 3px; font-weight: 600;
}
.safe-mark {
  background: var(--ok-bg); color: var(--ok); border-bottom: 2px solid #96d6b8;
  padding: 0 3px; border-radius: 3px; font-weight: 600;
}
.diff { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.diff-box {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; font-size: 12.5px;
}
.diff-box.before { background: #fffafa; border-color: #f0d6d2; }
.diff-box.after { background: #f6fcf9; border-color: #c8e6d7; }
.diff-box span { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }

/* ── 对话气泡与时间线 ── */
.chat-feed { display: flex; flex-direction: column; gap: 9px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.msg { padding: 10px 13px; border-radius: 10px; font-size: 12.5px; line-height: 1.65; }
.msg.u { background: var(--sel-bg); border: 1px solid #d5e5fb; color: var(--ink); align-self: flex-end; max-width: 90%; }
.msg.a { background: var(--inset); border: 1px solid var(--line-2); color: var(--ink-2); align-self: flex-start; max-width: 96%; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1.5px; background: var(--line); }
.tl { position: relative; padding: 5px 0 11px; font-size: 12.5px; }
.tl::before {
  content: ''; position: absolute; left: -17px; top: 10px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--blue); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--blue);
}
.tl.fresh::before { background: var(--ok); box-shadow: 0 0 0 2px var(--ok-bg); }
.tl small { display: block; font-size: 11px; color: var(--muted); }

/* ── 排期月历 ── */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-h { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding-bottom: 4px; }
.cal-c {
  border: 1px solid var(--line-2); border-radius: 9px; padding: 7px 8px; min-height: 62px; background: var(--surface);
}
.cal-c.empty { background: transparent; border-style: dashed; }
.cal-c.gap { background: #fff9f7; border-color: #ecc6b8; }
.cal-c.filled { background: #f3fbf7; border-color: #bfe4d1; }
.cal-c .d { font-size: 10.5px; color: var(--muted); }
.cal-c .n { font-size: 13.5px; font-weight: 700; color: var(--ink); margin: 2px 0; }
.cal-c.gap .n { color: var(--bad); }
.cal-c .t { font-size: 10px; color: var(--muted); }

/* ── 弹窗与提示 ── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(14, 39, 72, .45);
  z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-dialog {
  background: var(--surface); border-radius: 16px; border: 1px solid var(--line);
  max-width: 680px; width: 100%; max-height: 88vh; overflow-y: auto;
  padding: 22px 24px; box-shadow: 0 24px 50px rgba(14, 39, 72, .22);
}
.toast-stack {
  position: fixed; right: 20px; bottom: 20px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px; max-width: 360px;
}
.toast {
  background: var(--ink); color: #fff; border-radius: 11px; padding: 11px 14px;
  font-size: 12.5px; box-shadow: 0 12px 28px rgba(14, 39, 72, .24);
  display: flex; flex-direction: column; gap: 4px;
}
.toast button { align-self: flex-start; font-size: 11.5px; color: #93c5fd; font-weight: 600; text-decoration: underline; margin-top: 2px; }

/* ── 响应式 ── */
@media (max-width: 1180px) {
  .stats, .g3, .gate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1040px) {
  .split, .today-hero { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .side { display: none; }
  .stats, .g2, .g3, .gate-grid, .diff { grid-template-columns: 1fr; }
  .content { padding: 16px; }
}
