/* 知识时代 学员服务平台 */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --line: #e2e6ec;
  --line-2: #eef1f4;
  --fg: #1b2433;
  --muted: #546072;
  --faint: #8792a3;

  --accent: #0f766e;
  --accent-hover: #0c625b;
  --accent-soft: #e6f4f2;
  --accent-line: #b9e0db;

  --good: #1d7a46; --good-soft: #e5f4ea;
  --warn: #a8570b; --warn-soft: #fdf1e1;
  --bad: #c2362b;  --bad-soft: #fbe9e7;
  --info: #2f6db5; --info-soft: #e8f0fa;

  --ink: #16202f;
  --side: #ffffff;
  --side-fg: #3d4757;
  --side-dim: #8792a3;
  --side-hi: #f2f5f7;

  --r: 10px;
  --r-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, .18);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[v-cloak] { display: none; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--font); color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon-library { display: none; }
.ui-icon { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ui-icon.big { width: 30px; height: 30px; stroke-width: 1.5; }

.hint { color: var(--faint); font-size: 12.5px; }
.faint { color: var(--faint); }
.err { color: var(--bad); font-size: 13px; }
.warn-t { color: var(--warn); }
.center { text-align: center; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.num, .r { font-variant-numeric: tabular-nums; }
.mt { margin-top: 14px; }
.pad { padding: 14px 18px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; }
.inline { display: flex; gap: 6px; align-items: center; }
.inline .in { flex: 1; min-width: 0; }
.owe { color: var(--bad) !important; }

/* ---------- 按钮 / 输入 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--fg); font-size: 13.5px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s; }
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: #cfd5de; }
.btn:disabled { opacity: .5; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover:not(:disabled) { background: #a92c22; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { background: var(--line-2); color: var(--fg); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.icon { width: 30px; padding: 0; }
.btn.block { width: 100%; height: 40px; }
.btn.is-on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.btn .ui-icon { width: 15px; height: 15px; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font-size: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }

.in { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 14px; color: var(--fg); transition: border-color .12s, box-shadow .12s; }
.in:hover:not(:disabled) { border-color: #cdd3dc; }
.in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.in:disabled { background: var(--surface-2); color: var(--faint); }
.in.sm { height: 30px; font-size: 13px; padding: 0 8px; }
.in.bad { border-color: var(--bad); }
select.in { appearance: none; padding-right: 28px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238792a3' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center; }
select.in:disabled { background-color: var(--surface-2); }
textarea.in { height: auto; min-height: 76px; padding: 8px 10px; resize: vertical; line-height: 1.6; }
input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--accent); margin: 0; cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.field .flabel { font-size: 12.5px; color: var(--muted); }
.field.req > :first-child::after, .field.req::before { content: none; }
.field.req { position: relative; }
.field.req::after { content: "*"; position: absolute; top: 0; left: -8px; color: var(--bad); }
.field.full { grid-column: 1 / -1; }
.field.end { justify-content: flex-end; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- 标签 ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 0; background: var(--line-2); color: var(--muted); vertical-align: middle; }
.p-good { background: var(--good-soft); color: var(--good); }
.p-warn { background: var(--warn-soft); color: var(--warn); }
.p-bad { background: var(--bad-soft); color: var(--bad); }
.p-info { background: var(--info-soft); color: var(--info); }
.p-acc { background: var(--accent-soft); color: var(--accent); }
.p-mute { background: var(--line-2); color: var(--muted); }
.pill.closable { cursor: pointer; }
.proj { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.proj::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--pc, var(--faint)); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex: none; }
.stage { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.s-new { background: var(--warn-soft); color: var(--warn); }
.s-mid { background: var(--accent-soft); color: var(--accent); }
.s-done { background: var(--good-soft); color: var(--good); }

.notice { padding: 10px 14px; border-radius: var(--r-sm); font-size: 13px; line-height: 1.6; }
.notice.info { background: var(--info-soft); color: #23548c; }
.notice.good { background: var(--good-soft); color: var(--good); }
.notice.warn { background: var(--warn-soft); color: var(--warn); margin-bottom: 12px; }
.empty { padding: 36px 16px; text-align: center; color: var(--faint); font-size: 13px; }
.blank { padding: 56px 24px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); }
.blank b { display: block; font-size: 15px; margin-bottom: 6px; }
.blank p { color: var(--muted); font-size: 13px; max-width: 460px; margin: 0 auto; }

/* ---------- 登录 ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 520px); background: var(--surface); }
.auth-side { background: var(--ink); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; position: relative; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(15, 118, 110, .35); }
.auth-brand { position: absolute; top: 40px; left: 56px; display: flex; align-items: center; gap: 10px; font-size: 16px; }
.auth-side h2 { font-size: 34px; font-weight: 600; letter-spacing: .02em; }
.auth-side p { color: #c3cad6; font-size: 15px; max-width: 380px; }
.auth-form { align-self: center; justify-self: center; width: min(360px, 100% - 48px); display: flex; flex-direction: column; gap: 16px; }
.auth-form h1 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff; flex: none; }
.logo .ui-icon { width: 18px; height: 18px; }

/* ---------- 框架 ---------- */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--side); border-right: 1px solid var(--line); color: var(--side-fg); display: flex; flex-direction: column; padding: 14px 10px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; margin-bottom: 8px; border: 0; border-bottom: 1px solid var(--line-2); background: none; color: var(--fg); text-align: left; }
.brand b { display: block; font-size: 15px; }
.brand small { display: block; font-size: 11.5px; color: var(--side-dim); }
.side nav { flex: 1; }
.navgroup { margin-bottom: 14px; }
.navgroup h6 { font-size: 11.5px; font-weight: 600; color: var(--side-dim); letter-spacing: .08em; padding: 6px 10px; }
.navitem { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--side-fg); font-size: 13.5px; text-align: left; }
.navitem:hover { background: var(--side-hi); color: var(--fg); }
.navitem.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.navitem .lbl { flex: 1; }
.navitem .count { min-width: 22px; height: 19px; padding: 0 6px; border-radius: 999px; background: #e0803a; color: #fff; font-size: 11px; font-weight: 600; line-height: 19px; text-align: center; font-variant-numeric: tabular-nums; }
.navitem .caret { width: 14px; height: 14px; color: var(--side-dim); transition: transform .15s; }
.navitem .caret.up { transform: rotate(180deg); }
.navitem.parent.cur { color: var(--accent); font-weight: 600; }
.navsub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 19px; }
.navitem.sub { height: 32px; padding: 0 8px; font-size: 13px; color: var(--muted); }
.navitem.sub .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navitem.sub .n { margin-left: 4px; font-size: 11.5px; color: var(--side-dim); font-variant-numeric: tabular-nums; }
.navitem.sub.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.navitem.sub.on .n { color: var(--accent); }
.me-menu { position: relative; border-top: 1px solid var(--line-2); padding-top: 10px; }
.me-menu summary { list-style: none; display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px; cursor: pointer; }
.me-menu summary::-webkit-details-marker { display: none; }
.me-menu summary:hover { background: var(--side-hi); }
.me-name { flex: 1; min-width: 0; }
.me-name b { display: block; color: var(--fg); font-size: 13px; font-weight: 500; }
.me-name small { display: block; color: var(--side-dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; flex: none; }
.me-actions { position: absolute; bottom: 52px; left: 0; right: 0; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 4px; z-index: 5; }
.me-actions button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; text-align: left; color: var(--fg); font-size: 13px; }
.me-actions button:hover { background: var(--surface-2); }

.main { min-width: 0; display: flex; flex-direction: column; }
.pagehead { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 28px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.ph-title h1 { font-size: 19px; font-weight: 600; line-height: 1.3; }
.ph-title p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ph-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ph-tools select.in { width: auto; min-width: 120px; }
.page { padding: 20px 28px 64px; display: flex; flex-direction: column; gap: 16px; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.page.grid { display: grid; }
.g4 { grid-column: span 4; } .g5 { grid-column: span 5; } .g6 { grid-column: span 6; }
.g7 { grid-column: span 7; } .g8 { grid-column: span 8; } .g12 { grid-column: span 12; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card.flush > .card-h { margin: 0; border-bottom: 1px solid var(--line-2); }
.card-h h3 { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.chart-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 10px; }
.chart-h h4 { font-size: 13px; font-weight: 600; color: var(--muted); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--line-2); border-radius: 8px; }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 13px; white-space: nowrap; }
.seg button:hover:not(:disabled) { color: var(--fg); }
.seg button.on { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.seg button em { font-style: normal; color: var(--faint); font-size: 11.5px; margin-left: 5px; font-weight: 400; }
.seg.wrap { flex-wrap: wrap; }

/* ---------- 数据总览 ---------- */
.setup-note { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-radius: var(--r); background: var(--warn-soft); border: 1px solid #f3d6ae; }
.setup-note b { display: block; color: var(--warn); font-size: 13.5px; }
.setup-note span { color: #7a4a17; font-size: 13px; }
.todo-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.todo { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-align: left; box-shadow: var(--shadow); transition: border-color .12s, transform .12s; --tc: var(--muted); --ts: var(--line-2); }
.todo:hover { border-color: #c8cfd9; transform: translateY(-1px); }
.todo.t-accent { --tc: var(--accent); --ts: var(--accent-soft); }
.todo.t-bad { --tc: var(--bad); --ts: var(--bad-soft); }
.todo.t-warn { --tc: var(--warn); --ts: var(--warn-soft); }
.todo-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--ts); color: var(--tc); flex: none; }
.todo-ic .ui-icon { width: 21px; height: 21px; }
.todo-body { display: flex; flex-direction: column; min-width: 0; }
.todo-body small { font-size: 12.5px; color: var(--muted); }
.todo-body b { font-size: 26px; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--fg); }
.todo-body em { font-style: normal; font-size: 12px; color: var(--faint); }
.todo-body em.warn { color: var(--bad); }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-2); border-radius: 8px; }
.kpi { padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi + .kpi { border-left: 1px solid var(--line-2); }
.kpi small { font-size: 12.5px; color: var(--muted); }
.kpi b { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--faint); }
.meter { display: block; height: 5px; border-radius: 3px; background: var(--line-2); margin-top: 6px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 196px; padding-top: 8px; }
.bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; cursor: pointer; border-radius: 6px; }
.bar:hover { background: var(--surface-2); }
.bar-v { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.bar-stack { display: flex; flex-direction: column-reverse; width: min(30px, 70%); gap: 1px; }
.bar-stack > span { display: block; border-radius: 2px; }
.bar-x { font-size: 11.5px; color: var(--faint); margin-top: 6px; }

.mix-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--line-2); margin-bottom: 8px; }
.mix-bar > i { display: block; height: 100%; }
.mix-row { display: grid; grid-template-columns: 12px 1fr auto 96px; align-items: center; gap: 8px; width: 100%; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line-2); background: none; text-align: left; }
.mix-row:hover { background: var(--surface-2); }
.mix-name { font-weight: 500; }
.mix-n { font-weight: 600; font-variant-numeric: tabular-nums; }
.mix-n small { font-weight: 400; color: var(--faint); margin-left: 6px; font-size: 12px; }
.mix-paid { color: var(--muted); font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
.groups { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.groups button { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface-2); font-size: 12.5px; color: var(--muted); }
.groups button:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.groups b { font-size: 15px; color: var(--fg); font-variant-numeric: tabular-nums; }
.groups button:last-child:nth-child(odd) { grid-column: span 2; }
.groups b.zero { color: var(--faint); font-weight: 500; }

.stagebars, .hbars { display: flex; flex-direction: column; gap: 2px; }
.stagebars button, .hbars button { display: grid; grid-template-columns: 112px minmax(0, 1fr) 44px; align-items: center; gap: 10px; padding: 5px 6px; border: 0; border-radius: 6px; background: none; text-align: left; font-size: 13px; }
.stagebars button:hover, .hbars button:hover { background: var(--surface-2); }
.stagebars button.zero { color: var(--faint); }
.sb-l, .hb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-l em { font-style: normal; display: inline-block; width: 18px; color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.sb-t, .hb-t { display: block; height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.sb-t > i, .hb-t > i { display: block; height: 100%; border-radius: 4px; background: var(--accent); min-width: 0; }
.hb-t > i.lv-bad { background: var(--bad); }
.hb-t > i.lv-warn { background: #d98a2b; }
.hb-t > i.lv-info { background: var(--info); }
.sb-v, .hb-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.zero .sb-v { font-weight: 400; }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 0; background: none; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-current=page] { color: var(--fg); font-weight: 600; }
.tabs button[aria-current=page]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tab-n { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--line-2); color: var(--muted); font-size: 11px; font-weight: 500; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
[aria-current=page] .tab-n { background: var(--accent-soft); color: var(--accent); }
.btn .tab-n { background: var(--accent); color: #fff; }
.tabs-select { display: none; }

/* ---------- 学员列表 ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.toolbar > select.in { width: auto; min-width: 118px; }
.search { position: relative; flex: 1 1 260px; max-width: 360px; }
.search.wide { width: 340px; flex: none; }
.search .ui-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 15px; height: 15px; }
.search .in { padding-left: 32px; }
.chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.chips button { height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13px; white-space: nowrap; }
.chips button:hover { color: var(--fg); border-color: #cdd3dc; }
.chips button[aria-pressed=true] { background: var(--fg); border-color: var(--fg); color: #fff; }
.chips.big button { height: 34px; padding: 0 14px; }
.chips.big b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.chips .c-good b { color: var(--good); } .chips .c-info b { color: var(--info); } .chips .c-bad b { color: var(--bad); } .chips .c-warn b { color: var(--warn); }
.chips button[aria-pressed=true] b { color: #fff; }
.morefilters { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px 14px; padding: 14px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.resultbar { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line-2); }
.resultbar b { color: var(--fg); font-variant-numeric: tabular-nums; }

.tablewrap { overflow-x: auto; }
.tablewrap.boxed { max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { position: sticky; top: 0; z-index: 1; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
.t tbody tr:last-child td { border-bottom: 0; }
.t td.wrap { white-space: normal; min-width: 150px; }
.t td.clip { max-width: 240px; }
.t .r { text-align: right; }
.t .w0 { width: 1%; }
.t .sub { display: block; font-size: 12px; color: var(--faint); margin-top: 1px; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: #f6f8fa; }
.t tr.sel td { background: var(--accent-soft) !important; }
.t tr.dim td { color: var(--faint); }
.t.compact td { padding: 7px 10px; }
.t th:first-child, .t td:first-child { padding-left: 16px; }
.t th:last-child, .t td:last-child { padding-right: 16px; }
.t td.date { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.nm { border: 0; background: none; padding: 0; font-weight: 600; color: var(--fg); font-size: 14px; text-align: left; }
.nm:hover { color: var(--accent); }
.roster td { padding-top: 9px; padding-bottom: 9px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.pager select.in { width: auto; }
.batchbar { position: fixed; left: calc(216px + (100vw - 216px) / 2); bottom: 22px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px 10px 18px; background: var(--ink); color: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); max-width: calc(100vw - 260px); }
.batchbar .in { width: auto; background-color: #fff; color: var(--fg); }
.batchbar .btn.ghost { color: #c3cad6; }
.batchbar .btn.ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* ---------- 招生简章 ---------- */
.catalog { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.catalog.searching { grid-template-columns: minmax(0, 1fr); }
.cat-regions { position: sticky; top: 84px; }
.cat-regions h4 { padding: 12px 14px 8px; font-size: 12px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line-2); }
.cat-regions h4 small { color: var(--faint); margin-left: 4px; }
.cat-list { max-height: calc(100vh - 210px); overflow-y: auto; padding: 6px; }
.cat-list button { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: none; font-size: 13.5px; color: var(--fg); }
.cat-list button:hover { background: var(--surface-2); }
.cat-list button[aria-pressed=true] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cat-list small { color: var(--faint); font-variant-numeric: tabular-nums; }
.cat-list button[aria-pressed=true] small { color: var(--accent); }
.cat-main { min-height: 320px; }
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.cat-head h3 { font-size: 14.5px; font-weight: 600; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.crumbs > span { color: var(--faint); }
.seg.levels { margin: 12px 16px 0; }
.rename { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.rename .field { min-width: 260px; }
.schools { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; padding: 14px 16px 16px; }
.school { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 12px 12px 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-align: left; }
.school:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.school b { font-weight: 600; font-size: 13.5px; }
.school span { font-size: 12px; color: var(--faint); white-space: nowrap; }
.school .ui-icon { color: var(--faint); width: 15px; height: 15px; }
.schools .empty { grid-column: 1 / -1; }
.catalog-table td.major { min-width: 280px; line-height: 1.6; }
.detail-row > td { background: var(--surface-2); white-space: normal; padding: 16px !important; }
.detail-row .kv { background: var(--surface); padding: 14px; border-radius: 8px; border: 1px solid var(--line-2); }
.kv .restricted dd { color: #7a4a17; }
.detail-json { max-width: 380px; word-break: break-all; }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

/* ---------- 导入 ---------- */
.steps { display: flex; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; padding-right: 22px; font-size: 13px; color: var(--faint); position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 1px; background: var(--line); }
.steps li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line-2); font-size: 12px; font-weight: 600; color: var(--muted); }
.steps li.on { color: var(--fg); font-weight: 600; }
.steps li.on span { background: var(--accent); color: #fff; }
.steps li.done span { background: var(--accent-soft); color: var(--accent); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 24px; border: 1.5px dashed #cdd5df; border-radius: var(--r); background: var(--surface-2); text-align: center; cursor: pointer; color: var(--muted); }
.drop:hover, .drop.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop b { color: var(--fg); font-size: 14.5px; }
.drop .hint { max-width: 640px; }
.filename { margin-bottom: 12px; }

/* ---------- 抽屉 / 弹窗 ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(15, 23, 42, .42); }
.overlay.top { z-index: 70; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(940px, 96vw); background: var(--bg); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
.x { position: absolute; top: 14px; right: 16px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 7px; background: none; color: var(--muted); }
.x:hover { background: var(--line-2); color: var(--fg); }
.dh { position: relative; padding: 18px 24px 14px; background: var(--surface); }
.dh-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-right: 40px; }
.dh-title h2 { font-size: 21px; font-weight: 650; }
.dh-meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.facts { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; margin-top: 14px; border: 1px solid var(--line-2); border-radius: 9px; }
.fact { padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact + .fact { border-left: 1px solid var(--line-2); }
.fact small { font-size: 12px; color: var(--faint); }
.fact b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact > span { font-size: 12px; }
.stepper { display: flex; gap: 3px; margin-top: 6px; }
.stepper i { flex: 1; height: 5px; border-radius: 3px; background: var(--line-2); }
.stepper i.done { background: var(--accent-line); }
.stepper i.cur { background: var(--accent); }
.dtabs { background: var(--surface); padding: 0 14px; }
.dbody { flex: 1; overflow-y: auto; padding: 16px 24px 40px; }
.dsec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 12px; }
.dsec.accent { border-color: var(--accent-line); background: linear-gradient(0deg, var(--surface), var(--surface)) padding-box; box-shadow: inset 3px 0 0 var(--accent); }
.dsec h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14.5px; font-weight: 600; margin-bottom: 12px; }
.dsec h3 .hint { font-weight: 400; margin-right: auto; }
.dsec .row > select.in { width: auto; min-width: 200px; }
.subhead { font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: .04em; margin: 14px 0 8px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.dsec h3 + .subhead { margin-top: 0; padding-top: 0; border-top: 0; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 20px; margin: 0; }
.kv.one { grid-template-columns: 1fr; }
.kv dt { font-size: 12px; color: var(--faint); margin-bottom: 2px; }
.kv dd { margin: 0; font-size: 14px; word-break: break-word; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kv dd.pre { white-space: pre-wrap; display: block; }

.stagepick { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.stagepick button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 13px; color: var(--muted); }
.stagepick button em { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--line-2); font-style: normal; font-size: 11px; font-variant-numeric: tabular-nums; }
.stagepick button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.stagepick button.done { color: var(--fg); border-color: var(--accent-line); background: var(--accent-soft); }
.stagepick button.done em { background: var(--accent-line); color: var(--accent); }
.stagepick button.cur { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; opacity: 1; }
.stagepick button.cur em { background: rgba(255, 255, 255, .22); color: #fff; }

.checkpoints { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 8px; }
.cp { display: grid; grid-template-columns: 22px 116px 104px minmax(0, 1fr) 140px auto; align-items: center; gap: 8px; padding: 8px 12px; }
.cp + .cp { border-top: 1px solid var(--line-2); }
.cp-no { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line-2); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cp-done .cp-no { background: var(--good-soft); color: var(--good); }
.cp-blocked .cp-no { background: var(--bad-soft); color: var(--bad); }
.cp-label { font-size: 13.5px; font-weight: 500; }
.cp-ro { grid-column: 3 / -1; font-size: 13px; color: var(--muted); }

.danger { margin-top: 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.danger summary { padding: 12px 18px; cursor: pointer; font-size: 13px; color: var(--muted); }
.danger[open] summary { border-bottom: 1px solid var(--line-2); }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; flex-wrap: wrap; }
.danger-row + .danger-row { border-top: 1px solid var(--line-2); }
.danger-row b { display: block; font-size: 13.5px; }
.danger-row span { font-size: 12.5px; color: var(--faint); }
.danger-row .inline .in { width: 200px; }

.composer { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line-2); display: flex; flex-direction: column; gap: 14px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent-line); }
.timeline li.k-note::before { border-color: var(--accent); background: var(--accent); }
.timeline li.k-flag::before { border-color: var(--bad); }
.timeline li.internal .what { background: #fffaf2; border-color: #f3e2c4; }
.timeline .when { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--faint); }
.timeline .kind { font-weight: 600; color: var(--muted); }
.timeline .what { margin-top: 4px; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; white-space: pre-wrap; word-break: break-all; font-size: 13.5px; }

.modal { position: fixed; top: 50%; left: 50%; z-index: 50; transform: translate(-50%, -50%); width: min(780px, 94vw); max-height: 92vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); }
.modal.narrow { width: min(460px, 94vw); }
.modal.top { z-index: 71; }
.modal > header { position: relative; padding: 18px 22px 0; }
.modal > header h2 { font-size: 17px; font-weight: 600; }
.modal > header .x { top: 12px; right: 12px; }
.mbody { padding: 18px 22px; overflow-y: auto; }
.mbody.confirm { padding-top: 24px; font-size: 14.5px; line-height: 1.7; }
.modal > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 18px; }
.pwbox { padding: 14px; margin: 12px 0; border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--line); font: 600 20px/1.2 ui-monospace, Menlo, monospace; letter-spacing: .06em; text-align: center; }

.tip { position: fixed; z-index: 90; padding: 7px 10px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 12px; white-space: pre; pointer-events: none; box-shadow: var(--shadow-lg); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 95; transform: translateX(-50%); padding: 10px 18px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 13.5px; box-shadow: var(--shadow-lg); }
.toast.bad { background: var(--bad); }

/* ---------- 窄屏 ---------- */
@media (max-width: 1240px) {
  .todo-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g4 { grid-column: span 6; }
  .g8 { grid-column: span 12; }
  .g4:first-of-type + .g4 { grid-column: span 6; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .cp { grid-template-columns: 22px 1fr 104px; }
  .cp > input, .cp > .btn { grid-column: 2 / -1; }
}
@media (max-width: 960px) {
  /* 窄屏仍保持左右结构，侧栏保留文字 */
  .shell { grid-template-columns: 168px minmax(0, 1fr); }
  .side { padding: 12px 8px; }
  .brand small { display: none; }
  .navitem { gap: 8px; padding: 0 8px; font-size: 13px; }
  .navsub { margin-left: 17px; }
  .navitem.sub { font-size: 12.5px; padding: 0 6px; }
  .me-name small { display: none; }
  .pagehead { padding: 12px 16px; }
  .page { padding: 16px 16px 72px; }
  .g4, .g5, .g6, .g7, .g8 { grid-column: span 12 !important; }
  .catalog { grid-template-columns: 132px minmax(0, 1fr); gap: 10px; }
  .cat-regions { top: 72px; }
  .cat-list { max-height: calc(100vh - 190px); padding: 4px; }
  .cat-list button { padding: 0 8px; font-size: 13px; }
  .search.wide { width: 100%; }
  .batchbar { left: calc(168px + (100vw - 168px) / 2); max-width: calc(100vw - 192px); }
  .auth { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .auth-side { padding: 32px 24px; }
  .auth-side h2 { font-size: 24px; }
  .auth-brand { left: 24px; top: 28px; }
}
@media (max-width: 680px) {
  .ph-tools { min-width: 0; max-width: 100%; }
  .ph-tools .seg { max-width: 100%; overflow-x: auto; }
  .seg button { padding: 0 9px; }
  .shell { grid-template-columns: 128px minmax(0, 1fr); }
  .side { padding: 10px 6px; }
  .brand { gap: 7px; padding: 4px 4px 10px; }
  .brand b { font-size: 13.5px; }
  .logo { width: 28px; height: 28px; }
  .navgroup h6 { padding: 4px 6px; }
  .navitem { height: 36px; padding: 0 6px; gap: 6px; font-size: 12.5px; }
  .navitem .ui-icon { width: 16px; height: 16px; }
  .navsub { margin-left: 12px; }
  .navitem.sub { font-size: 12px; padding: 0 4px; height: 30px; }
  .navitem .count { min-width: 18px; padding: 0 4px; font-size: 10px; }
  .me-name { display: none; }
  .me-menu summary > .ui-icon { display: none; }
  .batchbar { left: calc(128px + (100vw - 128px) / 2); max-width: calc(100vw - 140px); }
  .page { padding: 12px 12px 72px; }
  .pagehead { padding: 12px; }
  .catalog { grid-template-columns: minmax(0, 1fr); }
  .cat-regions { position: static; }
  .cat-list { display: flex; overflow-x: auto; max-height: none; gap: 4px; }
  .cat-list button { width: auto; flex: none; gap: 6px; }
  .schools { grid-template-columns: 1fr; padding: 10px; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .todo-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .todo { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .todo-ic { width: 34px; height: 34px; }
  .todo-body b { font-size: 22px; }
  .setup-note { flex-direction: column; align-items: flex-start; }
  .ph-tools .btn.primary { margin-left: auto; }
  .tabs.list-tabs { display: none; }
  .tabs-select { display: block; }
  .form-grid, .form-grid.two { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .kpi + .kpi { border-left: 0; border-top: 1px solid var(--line-2); }
  .facts { grid-template-columns: 1fr; }
  .fact + .fact { border-left: 0; border-top: 1px solid var(--line-2); }
  .dh, .dbody { padding-left: 16px; padding-right: 16px; }
  .search { max-width: none; flex-basis: 100%; }
}
