/* ============================================================
   课程管理系统 · 设计系统
   现代专业 SaaS 运营控制台
   ============================================================
   ⚠️ 色值与尺寸令牌已全部移到同目录的 tokens.css（唯一真源）。
   本文件只写选择器规则，一律用 var(--x)，不要再写字面色值。

   ⚠️ 字体不再用 CSS @import 引入。@import 会串行化下载（浏览器要先下完本文件、
   解析到 @import、再去下 400KB 的 harmonyos-sans-sc.css），期间首屏被阻塞。
   现改为在模板 <head> 里与本文件并行 <link>，见 base_redesign.html /
   login.html / change_password.html。新增独立页面记得一起带上这几个 link。
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { min-height: 100vh; }

/* ⚠️ 设计稿的 helmet CSS 全文只声明 6 处 line-height（.ms 图标 1、正文段落 1.6/1.65/1.45），
   body 本身没有，所以稿子里绝大多数文本的行盒是 normal(≈1.2)。本项目旧基线是 1.5，
   会把每个文本行盒撑高约 20%——实测运营成本页：KPI 数值 29px→36px、KPI 卡整体 109px→118.25px、
   卡头 58px→59.75px。单看一个元素肉眼无感，整页叠起来密度就松了一档。
   复刻期逐页灰度，所以只在已复刻的 .dc-page / .dc-modal 里回到稿子的 normal，
   未复刻的老页面继续吃 1.5。等全站转完，直接把 html,body 那条 1.5 删掉即可。 */
.dc-page, .dc-modal { line-height: normal; }

/* 数字等宽:主字体已是 Inter(自带 tnum),不再需要换字体,只开特性即可。
   设计稿要求"所有金额、表格数字必须等宽",故除 .tnum 外,金额/数字单元格与 KPI 数值统一开 tnum。 */
.tnum, .money, .tbl td.num, .tbl th.num, .tbl tfoot td, .stat-val {
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-full); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }
::-webkit-scrollbar-track { background: transparent; }

a { color: inherit; text-decoration: none; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  border-right: 1px solid var(--border);
}
.sb-brand {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 11px;
  padding: 0 20px;
  flex-shrink: 0;
}
.sb-logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(145deg, #5a97f8 0%, var(--primary-hover) 100%); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15.5px; letter-spacing: -.02em;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(60,131,246,.38), inset 0 1px 0 rgba(255,255,255,.28);
}
.sb-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.sb-brand-text b { color: var(--text); font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.sb-brand-text span { color: var(--text-3); font-size: 11px; font-weight: 500; }

.sb-nav { flex: 1; overflow-y: auto; padding: 8px 12px 20px; }
.sb-nav::-webkit-scrollbar { width: 6px; }
.sb-nav::-webkit-scrollbar-thumb { background: var(--border-strong); border: none; border-radius: 999px; }
.sb-group { margin-top: 16px; }
.sb-group:first-child { margin-top: 6px; }
.sb-group-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0;
  color: var(--text-3);
  padding: 6px 12px 7px;
}
.sb-link {
  display: flex; align-items: center; gap: 10px;   /* 设计稿实测 gap 10px / 内距 8px 12px */
  padding: 8px 12px; border-radius: 8px;
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  cursor: pointer; position: relative;
  transition: background .14s, color .14s;
  margin-bottom: 2px;
}
.sb-link svg { width: 18px; height: 18px; stroke-width: 1.9; flex-shrink: 0; color: var(--text-3); }
.sb-link:hover { background: var(--surface-3); color: var(--text); }
.sb-link:hover svg { color: var(--text-2); }
/* 选中态：设计稿 v2 是浅蓝底 + 蓝字蓝图标，不是实心蓝胶囊白字 */
.sb-link.active { background: var(--nav-active-bg); color: var(--primary); font-weight: 600; }
.sb-link.active svg { color: var(--primary); }
.sb-badge {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: var(--primary); color: #fff;
  padding: 1px 7px; border-radius: 999px; min-width: 20px; text-align: center;
}
.sb-badge.amber { background: var(--amber); }
/* 选中态已改浅蓝底，徽章保持原样即可（白底徽章在浅蓝上会糊掉） */

.sb-foot { padding: 12px; border-top: 1px solid var(--border); }
.sb-user {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  cursor: pointer; transition: background .14s;
}
.sb-user:hover { background: var(--surface-3); }
.sb-user .avatar { width: 32px; height: 32px; font-size: 12px; }
.sb-user-info { line-height: 1.2; flex: 1; min-width: 0; }
.sb-user-info b { color: var(--text); font-size: 13px; font-weight: 600; display: block; }
.sb-user-info span { color: var(--text-3); font-size: 11px; }
.sb-user .ico-out { width: 16px; height: 16px; color: var(--text-3); }

/* ---- Main ---- */
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h); background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 18px;
  padding: 0 28px; position: sticky; top: 0; z-index: 30;
}
.tb-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.tb-sub { color: var(--text-3); font-size: 12.5px; font-weight: 500; }
.tb-spacer { flex: 1; }
.tb-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-3); border: 1px solid transparent;
  border-radius: var(--r); padding: 0 12px; height: 38px; width: 240px;
  transition: border .14s, background .14s;
}
.tb-search:focus-within { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.tb-search svg { width: 16px; height: 16px; color: var(--text-3); }
.tb-search input { border: none; background: none; outline: none; flex: 1; font-family: inherit; font-size: 13.5px; color: var(--text); }
.tb-icon-btn {
  width: 38px; height: 38px; border-radius: var(--r); border: 1px solid var(--border);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text-2);
  position: relative; transition: background .14s, border .14s;
}
.tb-icon-btn:hover { background: var(--surface-3); }
.tb-icon-btn svg { width: 18px; height: 18px; }
.tb-icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 1.5px solid #fff; }

/* 注意:.content 是各页 fixed 弹窗的祖先,入场动画只能动 opacity——
   带 transform 的动画会让 fixed 定位以 .content 为基准,弹窗偏出半个侧栏宽 */
.content { padding: 28px; max-width: 1480px; width: 100%; margin: 0 auto; animation: fadeIn .2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============================================================
   PRIMITIVES
   ============================================================ */
.avatar {
  border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; flex-shrink: 0;
  background: #dbeafe; color: #1d4ed8;
}
/* 首字母色块的一组柔和底色（设计稿：姓名首字生成，背景取一组柔和色） */
.avatar.a-green { background: var(--green-soft); color: var(--green-strong); }
.avatar.a-amber { background: var(--amber-soft); color: var(--amber-strong); }
.avatar.a-violet { background: var(--violet-soft); color: #6d28d9; }
.avatar.a-teal { background: var(--teal-soft); color: var(--teal); }
.avatar.a-rose { background: #ffe4e6; color: #be123c; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: var(--r-sm);
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .14s, border .14s, box-shadow .14s, transform .08s cubic-bezier(.34,1.56,.64,1);
  user-select: none;
}
.btn:active { transform: scale(.975); }
.btn svg { width: 16px; height: 16px; stroke-width: 2; }
/* 按钮里的 Material Symbols 要跟 svg 一个档位。缺这条时字体图标按默认 24px 渲染，
   比同排的 svg 图标明显大一圈，各页只能各自内联 style="font-size:18px" 兜底。 */
.btn .material-symbols-outlined { font-size: 16px; line-height: 1; }

/* ---- flash 提示条 ----
   ⚠️ `.alert` / `.alert-danger` 此前在 live CSS 里**零定义**，而 config.html、
   admin/users.html、admin/operation_logs.html 五处都在用它渲染 flash（含错误提示）——
   也就是说这些提示一直是无样式的裸文字，红色的报错看上去和正文没区别。 */
.alert {
  padding: 10px 14px; border-radius: var(--r-sm); font-size: 13px; line-height: 1.6;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2);
}
.alert-danger { background: var(--red-soft); border-color: var(--red-soft); color: var(--red-strong); }
.alert-error { background: var(--red-soft); border-color: var(--red-soft); color: var(--red-strong); }
.alert-success { background: var(--green-soft); border-color: var(--green-soft); color: var(--green-strong); }
.alert-warning { background: var(--amber-soft); border-color: var(--amber-soft); color: var(--amber-strong); }
.alert-info { background: var(--primary-soft); border-color: var(--primary-soft-2); color: var(--primary-strong); }
/* 主操作统一用主色蓝:全系统"蓝=最高优先级动作"单一语义(黑色退出按钮体系) */
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(60,131,246,.25); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(60,131,246,.25); }
.btn-accent:hover { background: var(--primary-hover); }
.btn-default { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-default:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-strong); }
.btn-danger-soft { background: var(--red-soft); color: var(--red); }
.btn-danger-soft:hover { background: #fecaca; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: var(--green-strong); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: var(--r-xs); }
.btn-sm svg { width: 14px; height: 14px; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-block { width: 100%; }

/* ---- Inputs ---- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
/* 必填星号:放宽到任意 .req(原 .lbl .req 仅命中 .lbl 祖先,导致裸 <label> 下的红星失效) */
.req { color: var(--red); margin-left: 2px; }
/* ⚠️ 选择器里那两条带 [type] 的**不是冗余**，删了会全站回退：
   vendor/tw-compat.css 的表单重置用 `[type="number"], [type="date"], [type="password"], …`
   这类属性选择器（权重 0-1-0），与 `.input` **同权重**，而它在本文件**之后**加载
   （tokens → styles → mobile → tw-compat），后来者胜 —— 于是凡是写了 type 的输入框
   全被重置成方角 + `rgb(107,114,128)` 这个不在令牌里的灰边框。
   实测受害面：系统配置 57 个、在线算账 20 个 type="number"，各页还有一批 type="date"。
   `.input[type]` 权重 0-2-0，压得过；同时**不影响** `<div class="input">` 这种
   借用输入框外观的非表单元素（它没有 type 属性），所以不能简单改成 `input.input`。 */
.input, .select, textarea.input, .input[type], .select[type] {
  height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-family: inherit; font-size: 13.5px; color: var(--text); outline: none; width: 100%;
  transition: border .14s, box-shadow .14s;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 72px; line-height: 1.55; }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.input::placeholder { color: var(--text-4); }
.select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px;
}
.input-affix { position: relative; }
.input-affix .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; pointer-events: none; }
.input-affix .prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; pointer-events: none; }
.input-affix .input { }
.input-affix.has-prefix .input { padding-left: 28px; }

/* segmented control */
.segmented { display: inline-flex; background: var(--surface-3); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.segmented button {
  border: none; background: none; font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--text-2); padding: 6px 14px; border-radius: var(--r-xs); cursor: pointer;
  transition: background .14s, color .14s, box-shadow .14s;
}
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.segmented button:hover:not(.active) { color: var(--text); }

/* toggle */
.toggle { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .track { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; transition: background .16s; cursor: pointer; }
.toggle .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .16s; box-shadow: var(--shadow-xs); }
.toggle input:checked + .track { background: var(--primary); }
.toggle input:checked + .track::after { transform: translateX(16px); }

/* checkbox */
.cbx { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-strong); background: #fff; cursor: pointer; display: inline-grid; place-items: center; flex-shrink: 0; transition: background .12s, border .12s; appearance: none; position: relative; }
.cbx:checked { background: var(--primary); border-color: var(--primary); }
.cbx:checked::after { content: ''; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-1px); }
.cbx:indeterminate { background: var(--primary); border-color: var(--primary); }
.cbx:indeterminate::after { content: ''; width: 8px; height: 2px; background: #fff; }

/* ============================================================
   CARDS
   ============================================================ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.card-head .sub { color: var(--text-3); font-size: 12px; font-weight: 500; }
.card-head .spacer { flex: 1; }
.card-body { padding: 20px; }

/* ---- Stat cards ---- */
.stat-grid { display: grid; gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 18px 18px 16px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease-out, transform .18s ease-out, border-color .18s ease-out;
}
.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.stat-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.stat-ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.stat-ico svg { width: 19px; height: 19px; stroke-width: 2; }
.stat-ico.i-blue { background: var(--primary-soft); color: var(--primary); }
.stat-ico.i-green { background: var(--green-soft); color: var(--green); }
.stat-ico.i-amber { background: var(--amber-soft); color: var(--amber); }
.stat-ico.i-red { background: var(--red-soft); color: var(--red); }
.stat-ico.i-teal { background: var(--teal-soft); color: var(--teal); }
.stat-ico.i-violet { background: var(--violet-soft); color: var(--violet); }
.stat-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.stat-val { font-size: 27px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.stat-val .unit { font-size: 15px; font-weight: 700; color: var(--text-3); margin-left: 2px; }
.stat-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 12px; color: var(--text-3); }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 12px; padding: 1px 6px; border-radius: 999px; }
.trend svg { width: 12px; height: 12px; stroke-width: 2.6; }
.trend.up { color: var(--green); background: var(--green-soft); }
.trend.down { color: var(--red); background: var(--red-soft); }

/* ============================================================
   BADGES / PILLS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 9px;
  border-radius: var(--r-full); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.b-green { background: var(--green-soft); color: var(--green-strong); }
.badge.b-blue { background: var(--primary-soft); color: var(--primary); }
.badge.b-amber { background: var(--amber-soft); color: var(--amber); }
.badge.b-red { background: var(--red-soft); color: var(--red); }
.badge.b-teal { background: var(--teal-soft); color: var(--teal); }
.badge.b-violet { background: var(--violet-soft); color: var(--violet); }
.badge.b-gray { background: var(--surface-3); color: var(--text-2); }

.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-xs); font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th {
  text-align: left; font-size: 11.5px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .04em; padding: 11px 16px;
  border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2);
}
.tbl thead th.num, .tbl tbody td.num { text-align: right; }
.tbl td.num, .tbl tfoot td.num, .tbl .money { white-space: nowrap; }
.tbl tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
.tbl tbody tr { transition: background .1s; }
/* 斑马纹辅助跟行;悬停用浅主色与斑马纹区分 */
.tbl tbody tr:nth-child(even) { background: var(--surface-2); }
.tbl tbody tr:hover { background: var(--primary-soft); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tfoot td { padding: 13px 16px; border-top: 2px solid var(--border-strong); font-size: 13.5px; }
.tbl tfoot td.num { text-align: right; }
.tbl .cell-main { font-weight: 600; color: var(--text); }
.tbl .cell-sub { font-size: 12px; color: var(--text-3); font-weight: 500; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .avatar { width: 34px; height: 34px; font-size: 12.5px; }
.cell-user .info { line-height: 1.25; }
.money { font-weight: 700; }
.money.pos { color: var(--green); }
.money.neg { color: var(--red); }
.row-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.act-btn { width: 30px; height: 30px; border-radius: var(--r-xs); border: 1px solid transparent; background: none; display: grid; place-items: center; cursor: pointer; color: var(--text-3); transition: background .12s, color .12s; }
.act-btn:hover { background: var(--surface-3); color: var(--text); }
.act-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.act-btn svg { width: 16px; height: 16px; }
.link-btn { background: none; border: none; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--primary); cursor: pointer; padding: 4px 8px; border-radius: var(--r-xs); }
.link-btn:hover { background: var(--primary-soft); }

/* inline select in table */
.inline-select {
  height: 30px; border-radius: var(--r-xs); border: 1px solid var(--border);
  background: var(--surface-2); font-family: inherit; font-size: 12.5px; font-weight: 600;
  padding: 0 26px 0 9px; cursor: pointer; color: var(--text); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center;
}
.inline-select:hover { border-color: var(--border-strong); }

/* ---- Toolbar ---- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.toolbar .spacer { flex: 1; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 0 11px; height: 38px; min-width: 220px; transition: border .14s, box-shadow .14s; }
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); background: #fff; }
.search-box svg { width: 16px; height: 16px; color: var(--text-3); }
.search-box input { border: none; background: none; outline: none; flex: 1; font-family: inherit; font-size: 13.5px; }

/* ---- Pagination ---- */
.pagination { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.pagination .spacer { flex: 1; }
.page-btns { display: flex; gap: 4px; }
.page-btn { min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--r-xs); border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); display: grid; place-items: center; }
.page-btn:hover { background: var(--surface-3); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tab { padding: 11px 14px; font-size: 13.5px; font-weight: 600; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .14s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---- Filter chips ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: var(--r-full); border: 1px solid var(--border-strong); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: all .12s; }
.chip:hover { border-color: var(--text-3); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
/* 警示类筛选(如"逾期跟进"):未激活红色轮廓,激活红底,语义保持一致 */
.chip.danger { border-color: var(--red); color: var(--red); }
.chip.danger.active { background: var(--red); border-color: var(--red); color: #fff; }
.chip .ct { font-weight: 700; opacity: .7; }

/* ---- Progress ---- */
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--primary); }

/* (原"浏览器式标签条"已移除:导航统一走侧栏,垂直空间还给数据) */

/* ============================================================
   MODAL / DRAWER
   ============================================================ */
/* 遮罩先到位(.18s),弹窗稍后以弹性曲线落下;关闭更利落(.16s ease-in) */
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(2px); z-index: 100; opacity: 0; visibility: hidden; transition: opacity .18s ease-out, visibility .18s; display: grid; place-items: center; padding: 24px; }
.overlay.open { opacity: 1; visibility: visible; }
.modal { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-xl); width: 100%; max-width: 560px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; transform: translateY(16px) scale(.98); transition: transform .16s ease-in; overflow: hidden; }
.overlay.open .modal { transform: none; transition: transform .24s cubic-bezier(.32,.72,0,1); }
.modal.lg { max-width: 760px; }
.modal.xl { max-width: 960px; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-head .mh-text h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.modal-head .mh-text p { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.modal-head .mh-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.modal-head .mh-ico svg { width: 21px; height: 21px; }
.modal-x { margin-left: auto; width: 32px; height: 32px; border-radius: var(--r-sm); border: none; background: var(--surface-3); color: var(--text-2); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.modal-x:hover { background: var(--border); }
.modal-x svg { width: 17px; height: 17px; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0; }
.modal-foot .spacer { flex: 1; }
/* 弹窗用 <form> 包住 body+foot 时(如刷单添加/编辑):form 是 .modal 的 flex 子项,默认
   display:block 且 min-height:auto,会撑到内容全高,modal 的 max-height+overflow:hidden
   随即把底部(备注/保存按钮)裁掉且无法滚动。让 form 自身成为可收缩的 flex 列,body 当滚动区。 */
.modal > form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; overflow: hidden; }
.modal > form > .modal-body { flex: 1 1 auto; min-height: 0; }
/* 员工编辑等表单本身就是正文时，也必须在固定头尾之间独立滚动。 */
.modal > .modal-body,
.modal > form.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* form grid */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .col-2 { grid-column: span 2; }
.form-section-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); grid-column: span 2; margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.form-section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* collapsible */
.collapse-head { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.collapse-head .chev { transition: transform .18s; color: var(--text-3); }
.collapse-head.open .chev { transform: rotate(90deg); }
/* 折叠面板展开时的渐入(由 toggleCollapse 添加) */
.collapse-anim { animation: collapseIn .22s cubic-bezier(.4,0,.2,1); }
@keyframes collapseIn { from { opacity: 0; transform: translateY(-4px); } }

/* ============================================================
   PAGE HEADER (in-content)
   ============================================================ */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .ph-text h1 { font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.page-head .ph-text p { color: var(--text-2); font-size: 13.5px; margin-top: 3px; }
.page-head .ph-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); font-weight: 500; margin-bottom: 12px; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb svg { width: 13px; height: 13px; }

.divider { height: 1px; background: var(--border); border: none; margin: 0; }

/* KV 信息行(标签—值两端分布);桌面用 .info-row,手机端用 mobile.css 的 .m-kv */
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; padding: 6px 0; }
.info-row .k { color: var(--text-3); font-weight: 500; }
.info-row .v { font-weight: 600; color: var(--text); }

/* hero / welcome */
.hero {
  background: var(--ink); border: 1px solid var(--ink-3);
  border-radius: var(--r-lg); padding: 22px 24px; color: #fff; position: relative;
}
.hero-inner { position: relative; z-index: 1; }

/* misc */
/* .hidden 自行定义,不依赖 Tailwind CDN 生成(config 页表单分组切换在用);
   注意:绝不能用在 .overlay 弹窗容器上——openModal 只切 .open 解不开 display:none */
.hidden { display: none; }
.muted { color: var(--text-3); }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }

/* ---- 顶部待办中心 ---- */
.todo-center { position: relative; flex-shrink: 0; }
.todo-toggle { position: relative; }
.todo-toggle svg { width: 18px; height: 18px; }
.todo-count { position:absolute; top:-5px; right:-6px; min-width:16px; height:16px; padding:0 4px; border-radius:9px; background:var(--red); color:#fff; font-size:10px; font-weight:700; line-height:16px; text-align:center; }
.todo-panel { position:absolute; z-index:120; top:calc(100% + 8px); right:0; width:250px; padding:10px; border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:var(--shadow-lg); }
.todo-title { padding:4px 7px 9px; font-size:13px; font-weight:750; color:var(--text); }
.todo-list { display:flex; flex-direction:column; gap:3px; }
.todo-item { display:flex; align-items:center; justify-content:space-between; padding:9px 8px; border-radius:8px; color:var(--text-2); font-size:13px; font-weight:600; }
.todo-item:hover { background:var(--surface-2); color:var(--primary); }
.todo-item.danger, .todo-item.danger b { color:var(--red); }
.todo-item b { color:var(--primary); font-variant-numeric:tabular-nums; }
.todo-empty { padding:13px 8px; color:var(--text-3); font-size:13px; text-align:center; }

@media (max-width: 1100px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-xl); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .content { padding: 20px; }
}

/* ---- Toast 轻提示 ---- */
#toastHost { position: fixed; right: 24px; bottom: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 380px;
  padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff;
  font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(8px);
  transition: opacity .22s ease-out, transform .22s cubic-bezier(.32,.72,0,1);
  pointer-events: auto;
}
.toast.show { opacity: 1; transform: none; }
.toast .t-ico { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0; color: #fff; }
.toast.t-success .t-ico { background: var(--green); }
.toast.t-error .t-ico { background: var(--red); }
.toast.t-warning .t-ico { background: var(--amber); }
.toast.t-info .t-ico { background: var(--primary); }
@media (max-width: 820px) {
  #toastHost { left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); align-items: stretch; }
  .toast { max-width: none; }
}

/* ---- Loading 原语 ---- */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex-shrink: 0; }
.spinner.dark { border-color: var(--border-strong); border-top-color: var(--primary); }

/* ---- 图表空状态 ---- */
.chart-empty { height: 100%; min-height: 120px; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 13px; background: var(--surface-2); border-radius: 12px; }

/* ---- 列表空状态(带引导动作) ---- */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 24px; color: var(--text-3); text-align: center; }
.empty-state svg { width: 36px; height: 36px; opacity: .35; stroke-width: 1.6; }
.empty-state p { font-size: 13.5px; margin: 0; }
.empty-state .btn { margin-top: 4px; }

/* ---- 净利焦点卡(深色 hero,呼应手机端) ---- */
.stat.stat-hero { background: var(--ink); border-color: var(--ink-3); }
.stat.stat-hero .stat-label { color: var(--ink-text); }
.stat.stat-hero .stat-foot { color: var(--ink-text); }
.stat.stat-hero .stat-ico { background: rgba(255,255,255,.08); }
/* 深色卡片上语义色需提亮，否则 emerald-600/red-600 在 slate-900 上对比不足 */
.stat.stat-hero .money.pos { color: #6ee7b7; }
.stat.stat-hero .money.neg { color: #fca5a5; }

/* ---- 无障碍:跟随系统"减弱动态效果"设置 ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   设计稿复刻组件（dc-*）
   ============================================================
   1:1 对应 design_handoff_edu_crm/教务管理系统 v2.dc.html 的渲染结果。
   所有尺寸/颜色均为从跑起来的原型上实测的计算样式，改动前先去原型上量，
   不要凭感觉调。原型里是 inline style，这里收成类，语义与命名一一对应。
   ============================================================ */

/* ---- 周期条 / 筛选条 ---- */
.dc-bar {
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--r-lg);
  padding: 14px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.dc-bar-label { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.dc-bar-spacer { flex: 1; }
.dc-bar-note { font-size: 12.5px; color: var(--text-4); }
.dc-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.dc-seg-btn {
  padding: 7px 16px; border-radius: var(--r-sm); font-size: 13px; cursor: pointer;
  background: var(--surface); color: var(--text-3); border: 1px solid var(--border);
  font-weight: 500; font-family: inherit; transition: background .14s, color .14s, border-color .14s;
}
.dc-seg-btn:hover { color: var(--text); border-color: var(--border-strong); }
.dc-seg-btn.active {
  background: var(--primary-soft); color: var(--primary);
  border-color: var(--primary-soft-2); font-weight: 700;
}
.dc-date {
  height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 13px; font-family: inherit; color: var(--text); background: var(--surface);
}

/* ---- KPI 卡 ---- */
.dc-kpis { display: grid; gap: 14px; grid-template-columns: repeat(var(--dc-kpi-n, 5), minmax(0, 1fr)); }
.dc-kpi {
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.dc-kpi.accent { border-color: var(--kpi-accent-border); }
.dc-kpi-label { font-size: 12px; color: var(--text-3); margin: 0 0 6px; }
.dc-kpi-val { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0; color: var(--text); }
.dc-kpi.accent .dc-kpi-val { color: var(--primary); }
/* 设计稿里 accent 只管描边、color 单独指定数值色，两者可并存（如「待结算」是 accent + amber）。
   所以显式色号必须压过 accent，选择器权重要够——别把这几条挪到 accent 规则上面去。 */
.dc-kpi .dc-kpi-val.pos { color: var(--green); }
.dc-kpi .dc-kpi-val.neg { color: var(--red); }
.dc-kpi .dc-kpi-val.amber { color: var(--amber); }
.dc-kpi-note { font-size: 11.5px; margin: 7px 0 0; color: var(--text-4); }
.dc-kpi-note.green { color: var(--green); }
.dc-kpi-note.amber { color: var(--amber); }
.dc-kpi-note.red { color: var(--red); }

/* ---- 通用白卡 ---- */
.dc-card {
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: var(--r-lg); padding: 20px;
}
.dc-card-title { font-size: 15px; font-weight: 700; margin: 0; }
.dc-card-title .sub { font-size: 12px; font-weight: 500; color: var(--text-4); margin-left: 6px; }

/* ---- 纯 CSS 柱状图（设计稿不用图表库） ---- */
.dc-bars { height: 226px; display: flex; align-items: flex-end; gap: 14px; }
.dc-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dc-bar-val { font-size: 11px; color: var(--text-3); }
.dc-bar-fill { width: 100%; border-radius: 4px 4px 0 0; background: var(--primary-soft); min-height: 2px; }
.dc-bar-col.last .dc-bar-fill { background: var(--primary); }
.dc-bar-x { font-size: 12px; color: var(--text-3); }

/* ---- 获客渠道横条 ---- */
.dc-chan { display: flex; flex-direction: column; gap: 13px; }
.dc-chan-head { display: flex; justify-content: space-between; margin-bottom: 5px; }
.dc-chan-name { font-size: 13px; color: #334155; }
.dc-chan-val { font-size: 13px; font-weight: 600; }
.dc-chan-track { height: 6px; background: var(--surface-3); border-radius: var(--r-full); overflow: hidden; }
.dc-chan-fill { height: 100%; background: var(--primary); }

/* ---- 待办与红点 ---- */
.dc-todos { display: flex; flex-direction: column; gap: 10px; }
.dc-todo {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border: 1px solid var(--card-border); border-radius: 10px;
  background: var(--surface); cursor: pointer; font-family: inherit; width: 100%;
  transition: border-color .14s;
}
.dc-todo:hover { border-color: var(--border-strong); }
.dc-todo-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #334155; }
.dc-todo-label .material-symbols-outlined { font-size: 18px; flex-shrink: 0; }
.dc-todo-count { font-size: 15px; font-weight: 700; }
.dc-todo.tone-amber { background: var(--amber-soft); }
.dc-todo.tone-amber .material-symbols-outlined, .dc-todo.tone-amber .dc-todo-count { color: var(--amber); }
.dc-todo.tone-red { background: var(--red-soft); }
.dc-todo.tone-red .material-symbols-outlined, .dc-todo.tone-red .dc-todo-count { color: var(--red); }
.dc-todo.tone-blue .material-symbols-outlined, .dc-todo.tone-blue .dc-todo-count { color: var(--primary); }
.dc-todo.tone-green .material-symbols-outlined, .dc-todo.tone-green .dc-todo-count { color: var(--green); }

/* ---- 总览页两栏骨架（左图表 1.5fr / 右侧栏 1fr） ---- */
.dc-dash-split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.dc-dash-side { display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 1180px) {
  .dc-kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .dc-dash-split { grid-template-columns: 1fr; }
}

/* ============================================================
   设计稿复刻组件（dc-*）· 第二批：全站共享骨架
   ============================================================
   下列尺寸全部来自 7-30 前端页面/untitled/project/教务管理系统 v2.dc.html 的内联字面量，
   逐条对照源码抄写，不是估算。改之前先回源码核对。
   ============================================================ */

/* ---- 页面内容容器（设计稿：padding 22px 28px 44px，块间 gap 18px，不用 margin） ---- */
.dc-page { display: flex; flex-direction: column; gap: 18px; padding: 22px 28px 44px; }

/* ---- 区块卡（列表页的主力容器：头部 + 表格 + 空状态） ---- */
.dc-section {
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.dc-section-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--card-border);
}
.dc-section-head h3 { font-size: 15px; font-weight: 700; margin: 0; }
.dc-section-head .sub { font-size: 12px; color: var(--text-4); }
.dc-section-head .spacer { flex: 1; }
/* 表单类区块的正文容器。列表页在 .dc-section-head 之后直接接 .dc-table（表格自带内边距），
   表单页则需要这一层 —— 缺它每个表单页都会各写一遍 style="padding:20px"。 */
.dc-section-body { padding: 20px; }

/* ---- 区块头部的胶囊按钮（与周期条的 dc-seg-btn 不同：更小、圆角 7px） ---- */
.dc-chip {
  padding: 5px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  background: var(--surface); color: var(--text-3); border: 1px solid var(--border);
  transition: background .14s, color .14s, border-color .14s;
}
.dc-chip:hover { color: var(--text); border-color: var(--border-strong); }
.dc-chip.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-soft-2); }

/* ---- 表格（设计稿：表头底 #f8fafc、行分隔 #f1f5f9、单元格 11px 16px / 13px） ---- */
.dc-table { width: 100%; border-collapse: collapse; }
.dc-table thead tr { background: var(--surface-2); }
.dc-table th {
  font-size: 11.5px; font-weight: 600; color: var(--text-3);
  padding: 9px 16px; text-align: left; white-space: nowrap;
}
.dc-table th.num, .dc-table td.num { text-align: right; }
.dc-table tbody tr { border-top: 1px solid var(--card-border); }
.dc-table td { padding: 11px 16px; font-size: 13px; white-space: nowrap; }
.dc-table td.wrap { white-space: normal; }
.dc-table .cell-link { color: var(--primary); font-weight: 600; cursor: pointer; }
.dc-table .cell-strong { font-weight: 600; color: var(--text); }
.dc-table .cell-muted { color: var(--text-4); }
.dc-table .money-pos { color: var(--green); font-weight: 600; }
.dc-table .money-neg { color: var(--red); font-weight: 600; }
/* 行内操作：无边框纯文字按钮，左侧 12px 间距 */
.dc-table td.actions { text-align: right; white-space: nowrap; }
/* 高密度业务表在 1440px 视口仍要能直接操作。仅由指定的滚动容器启用，
   避免把粘性列扩散到全站的简短表格。 */
.dc-pinned-actions { position: relative; }
.dc-pinned-actions > .dc-table { min-width: max-content; }
.dc-pinned-actions > .dc-table th:last-child,
.dc-pinned-actions > .dc-table td.actions {
  position: sticky; right: 0; border-left: 1px solid var(--card-border);
}
.dc-pinned-actions > .dc-table th:last-child {
  z-index: 3; background: var(--surface-2);
}
.dc-pinned-actions > .dc-table td.actions {
  z-index: 2; min-width: 92px; background: var(--surface);
}
.dc-pinned-actions > .dc-table tbody tr:hover td.actions { background: var(--surface-2); }
.dc-pinned-actions > .dc-table tbody tr.pd-row-checked td.actions { background: var(--primary-soft); }
.dc-act-link {
  background: none; border: none; padding: 0 0 0 12px;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--primary); cursor: pointer;
}
.dc-act-link.danger { color: var(--red); }
.dc-act-link:disabled { color: var(--text-4); cursor: not-allowed; }

.dc-empty { padding: 34px; text-align: center; color: var(--text-4); font-size: 13px; }

/* ---- 页内 Tab 条（设计稿：gap 22px、下划线 2px、无内边距只有下 10px） ---- */
.dc-tabs {
  display: flex; gap: 22px; border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.dc-tabs::-webkit-scrollbar { display: none; }
.dc-tab {
  padding: 0 0 10px; background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-3); font-family: inherit; font-size: 13.5px; font-weight: 500;
  white-space: nowrap; cursor: pointer; transition: color .14s;
}
.dc-tab:hover { color: var(--text); }
.dc-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

/* ---- 页头：返回按钮 / 面包屑 / 全局搜索 / 铃铛 / 主操作 ---- */
.dc-crumbs { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-4); margin-bottom: 6px; }
.dc-crumb { background: none; border: none; padding: 0; font-family: inherit; font-size: 12px; color: var(--text-4); }
.dc-crumb.link { color: var(--primary); font-weight: 600; cursor: pointer; }
.dc-crumb.current { color: var(--text-2); font-weight: 600; }

.dc-back {
  align-self: center; display: flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 12px 0 8px; margin-right: 2px;
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-sm);
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.dc-back:hover { background: var(--surface-3); }

.dc-page-title { font-size: 21px; font-weight: 700; margin: 0; letter-spacing: -.015em; white-space: nowrap; }
.dc-page-sub { font-size: 13px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dc-search { position: relative; }
.dc-search .material-symbols-outlined {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 18px; color: var(--text-4); pointer-events: none;
}
.dc-search input {
  width: 240px; height: 36px; padding: 0 12px 0 34px;
  border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface-2); font-family: inherit; font-size: 13px; color: var(--text);
}
.dc-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); background: #fff; }

.dc-bell {
  position: relative; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-sm); color: var(--text-2); cursor: pointer;
}
.dc-bell.open { border-color: var(--primary-soft-2); background: var(--primary-soft); }
.dc-bell .material-symbols-outlined { font-size: 20px; }
/* 角标用 red-500 #ef4444，比语义红 --red(#dc2626) 亮一档——设计稿如此 */
.dc-bell-dot {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: var(--r-full); background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

.dc-action {
  height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 14px;
  border-radius: var(--r-sm); font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; background: var(--surface); color: var(--text-2); border: 1px solid var(--border);
}
.dc-action:hover { background: var(--surface-3); }
.dc-action.primary { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(60,131,246,.25); }
.dc-action.primary:hover { background: var(--primary-hover); }
.dc-action .material-symbols-outlined { font-size: 18px; }

/* ---- 通知面板 ---- */
.dc-bell-panel {
  position: absolute; right: 28px; top: 74px; width: 420px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(15,23,42,.18); z-index: 60; overflow: hidden;
}
.dc-bell-panel-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--card-border); }
.dc-bell-panel-head h3 { font-size: 14px; font-weight: 700; margin: 0; }
.dc-bell-item {
  width: 100%; display: flex; align-items: flex-start; gap: 11px; padding: 13px 16px;
  border: none; border-bottom: 1px solid var(--surface-2); background: var(--surface);
  text-align: left; cursor: pointer; font-family: inherit;
}
.dc-bell-item:hover { background: var(--surface-2); }

/* ---- 弹窗（设计稿：宽 540px、圆角 16px、遮罩 rgba(15,23,42,.45)、正文最高 62vh） ---- */
.dc-modal {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15,23,42,.45);
}
.dc-modal[hidden] { display: none; }
.dc-modal-card {
  width: 540px; max-width: calc(100vw - 32px);
  background: var(--surface); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15,23,42,.28); overflow: hidden;
}
.dc-modal-card.wide { width: 720px; }
.remote-modal-card { max-height:calc(100vh - 48px); }
.remote-modal-body { padding:0 22px 22px;overflow-y:auto; }
.remote-modal-body .breadcrumb { display:none; }
.remote-modal-body .dc-page { padding:0 !important; }
.remote-modal-error { margin:0 0 14px;padding:10px 12px;border:1px solid var(--red);border-radius:var(--r-md);background:var(--red-soft);color:var(--red-strong);font-size:13px; }
.remote-field-error { margin-top:4px;color:var(--red-strong);font-size:12px;line-height:1.45; }
.remote-modal [aria-invalid="true"] { border-color:var(--red); }
.dc-modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--card-border); }
.dc-modal-ico {
  width: 36px; height: 36px; border-radius: 10px; background: var(--nav-active-bg);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dc-modal-ico .material-symbols-outlined { font-size: 20px; color: var(--primary); }
.dc-modal-head h3 { font-size: 16px; font-weight: 700; margin: 0; }
.dc-modal-head p { font-size: 12px; color: var(--text-4); margin: 3px 0 0; }
.dc-modal-close {
  width: 32px; height: 32px; border: none; background: var(--surface-2);
  border-radius: var(--r-sm); color: var(--text-2); cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.dc-modal-close:hover { background: var(--surface-3); }
.dc-modal-body { padding: 22px; display: flex; flex-direction: column; gap: 16px; max-height: 62vh; overflow-y: auto; }
.dc-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--card-border); }
.dc-modal-foot .cancel {
  padding: 9px 18px; border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-sm); font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.dc-modal-foot .save {
  padding: 9px 22px; background: var(--primary); color: #fff; border: none;
  border-radius: var(--r-sm); font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; box-shadow: 0 2px 8px rgba(60,131,246,.25);
}
.dc-modal-foot .save:hover { background: var(--primary-hover); }
/* 破坏性动作（退费 / 作废 / 删除）的确认按钮。稿子的弹窗里没有这一档，
   但线上有三个退费弹窗——不给档位，三个页面就会各兜各的底（实测已经变成
   纯蓝 .save、.save 外加内联红、老的 .btn.btn-danger 三种长相），
   同一类高危动作在三页长得不一样比不好看更糟：员工会以为是三件不同的事。 */
.dc-modal-foot .save.danger { background: var(--red); box-shadow: 0 2px 8px rgba(220,38,38,.25); }
.dc-modal-foot .save.danger:hover { background: var(--red-strong); }

.dc-more-filter { position: relative; }
.dc-more-filter > summary {
  list-style: none; cursor: pointer; color: var(--primary); font-size: 12.5px; font-weight: 700;
  white-space: nowrap;
}
.dc-more-filter > summary::-webkit-details-marker { display: none; }
.dc-more-filter-panel {
  position: absolute; z-index: 40; right: 0; top: calc(100% + 10px); width: 560px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  padding: 16px; background: var(--surface); border: 1px solid var(--card-border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.dc-more-filter-panel label { display: flex; flex-direction: column; gap: 6px; }
.dc-more-filter-panel label > span { color: var(--text-3); font-size: 11.5px; font-weight: 600; }
.dc-more-filter-panel input,
.dc-more-filter-panel select {
  width: 100%; min-height: 36px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); padding: 6px 10px;
}

/* ---- 弹窗表单（设计稿：两列栅格 gap 14px，控件高 40px、圆角 9px） ---- */
.dc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dc-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.dc-field.full { grid-column: 1 / -1; }
/* 标签既认 <span class="lb">（新写的），也认裸 <label>（共享宏 components/*_fields.html 吐的是
   <label>，那份宏同时服务手机抽屉，不能为了桌面外壳去改它）。 */
.dc-field > .lb, .dc-field > label { font-size: 12.5px; font-weight: 600; color: #334155; }
.dc-field .req { color: #ef4444; margin-left: 2px; }
/* ⚠️ 带 [type] 的那两条**不是冗余**：vendor/tw-compat.css 的表单重置用 `[type="number"]`
   这类属性选择器（权重 0-1-0），本文件的 `.input[type]`（0-2-0）为压过它而存在。
   而 `.dc-field input`（0-1-1）压不过 `.input[type]` —— 共享宏吐出来的控件正好既有
   class="input" 又有 type="text"，不补这一条就会拿到 8px 圆角而不是稿子的 9px。
   `.dc-field input[type]` 权重 0-2-1，稳压。 */
.dc-field input, .dc-field select,
.dc-field input[type], .dc-field select[type] {
  width: 100%; height: 40px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 9px;
  font-family: inherit; font-size: 13px; color: var(--text); background: var(--surface);
}
.dc-field textarea {
  width: 100%; min-height: 110px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 13px; resize: none; color: var(--text);
}
.dc-field input:focus, .dc-field select:focus, .dc-field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring);
}
/* 无权限降级：只读 + 灰底（设计稿「按系统配置带出」） */
.dc-field input[readonly], .dc-field select[disabled] { background: var(--surface-2); color: var(--text-2); cursor: default; }
.dc-field .hint { font-size: 11.5px; color: var(--text-4); }

/* ---- 智能粘贴框（录入学员/试听：粘一段文本自动识别姓名/电话/年级） ----
   内部元素也在这里定义，避免每个用到它的模板各写一遍内联样式后慢慢分岔。 */
.dc-smart {
  border: 1px dashed var(--primary-soft-2); background: rgba(60,131,246,.06);
  border-radius: 10px; padding: 12px 14px;
}
.dc-smart-head { display: flex; align-items: center; gap: 8px; }
.dc-smart-head .material-symbols-outlined { font-size: 18px; color: var(--primary); }
.dc-smart-head .t { font-size: 13px; font-weight: 700; color: var(--primary-strong); }
.dc-smart-body { margin-top: 11px; display: flex; flex-direction: column; gap: 9px; }
.dc-smart textarea {
  width: 100%; min-height: 84px; padding: 10px;
  border: 1px solid var(--border); border-radius: 9px;
  font-family: inherit; font-size: 13px; resize: vertical;
  color: var(--text); background: var(--surface);
}
.dc-smart-run { display: flex; align-items: center; gap: 10px; }
.dc-smart-run button {
  padding: 8px 16px; border-radius: var(--r-sm); border: none;
  background: var(--primary); color: #fff;
  font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.dc-smart-run .fb { font-size: 11.5px; color: var(--text-3); }

/* 弹窗底部那句整体说明（设计稿 conf.hintText）：正文最后一段，12px 极弱色 */
.dc-modal-note { font-size: 12px; color: var(--text-4); margin: 0; }

/* ---- 分段按钮组（如「跟进方式」四选一） ---- */
.dc-seg-row { display: flex; gap: 8px; }
.dc-seg-row button {
  flex: 1; height: 40px; border-radius: 9px; font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
}
.dc-seg-row button.active { background: var(--primary-soft); border-color: var(--primary-soft-2); color: var(--primary); }

/* ---- 徽章 / 标签 ---- */
.dc-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px;
  border-radius: var(--r-full); font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.dc-badge.green { background: var(--green-soft); color: var(--green-strong); }
.dc-badge.blue { background: var(--primary-soft); color: var(--primary); }
.dc-badge.amber { background: var(--amber-soft); color: var(--amber); }
.dc-badge.red { background: var(--red-soft); color: var(--red); }
.dc-badge.violet { background: var(--violet-soft); color: #6d28d9; }

@media (max-width: 900px) {
  .dc-fields { grid-template-columns: minmax(0, 1fr); }
  .dc-modal-card, .dc-modal-card.wide { width: 100%; }
  .dc-search input { width: 160px; }
}

/* ---- 审计修正（124 代理逐页核查后回写，勿凭感觉改回去） ---- */

/* 1) 筛选条与周期条不是同一个东西：周期条 padding 14px 18px / gap 14px（见上面的 .dc-bar），
      筛选条是 padding 12px 16px / gap 10px。约 12 个页面用筛选条变体。 */
.dc-bar.filter { padding: 12px 16px; gap: 10px; }
.dc-bar.filter .material-symbols-outlined { font-size: 18px; color: var(--text-4); }
.dc-filter-item { display: flex; align-items: center; gap: 6px; }
.dc-filter-item > span { font-size: 12.5px; color: var(--text-3); }
.dc-filter-item select, .dc-bar.filter input[type="date"] {
  height: 34px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--r-sm);
  font-family: inherit; font-size: 13px; background: var(--surface); color: #334155;
}
.dc-reset {
  height: 34px; padding: 0 12px; border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-sm); font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); cursor: pointer;
}

/* 2) 表格行 hover（设计稿 helmet 里的全局基线规则，别漏） */
.dc-table tbody tr:hover { background: var(--surface-2); }

/* 3) 表格里的「徽章」——设计稿的表格单元格只消费 align/color/weight/cursor，从不读 bg，
      所以稿子里表格内的状态标记实际渲染成【700 粗体彩色文字】，不是药丸。
      .dc-badge（药丸）只用于卡头 chips、正课详情、学员档案等非表格位置。
      表格内一律用 .dc-cellmark，别混用，否则整站表格会比设计稿"重"。 */
.dc-cellmark { font-weight: 700; }
.dc-cellmark.green { color: var(--green); }
.dc-cellmark.blue { color: var(--primary); }
.dc-cellmark.amber { color: var(--amber); }
.dc-cellmark.red { color: var(--red); }
.dc-cellmark.muted { color: var(--text-3); }

/* 4) 空状态的位置：渲染在 </table> 之后、表头保留，不是塞进 tbody 的 colspan 行。
      文案全站统一「暂无数据」，不要逐页自定义。 */

/* ---- 第2波施工中被代理上报的缺失变体（补齐后回收各页的内联样式） ---- */
.dc-cellmark.violet { color: #7c3aed; }
.dc-act-link.muted { color: var(--text-3); }
.dc-act-link.success { color: var(--green); }
/* 筛选条里的文本/搜索输入框：与同条内的 select 同一组尺寸 */
.dc-bar.filter input[type="text"],
.dc-bar.filter input[type="search"] {
  height: 34px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--r-sm);
  font-family: inherit; font-size: 13px; background: var(--surface); color: var(--text);
}
.dc-bar.filter input[type="text"]:focus,
.dc-bar.filter input[type="search"]:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring);
}

/* ============================================================
   学员档案（profile）专用组件 · 按设计稿 v2 第 349-470 行实测
   ============================================================
   两栏 320px + 1fr；左栏身份卡 + 学费概览，右栏 6 Tab 卡（时间轴 / 可展开明细卡）。
   正课详情（formalDetail）的明细卡复用同一套 .dc-exp-*。
   ============================================================ */

.dc-profile { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.dc-profile-col { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1100px) { .dc-profile { grid-template-columns: minmax(0, 1fr); } }

/* ---- 左栏：身份卡 ---- */
.dc-idcard {
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: var(--r-lg); padding: 22px; text-align: center;
}
.dc-idcard-avatar {
  width: 64px; height: 64px; border-radius: var(--r-full);
  background: var(--violet-soft); color: #7c3aed;
  font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
}
.dc-idcard-name { font-size: 18px; font-weight: 700; margin: 0; }
.dc-idcard-sub { font-size: 12.5px; color: var(--text-4); margin: 4px 0 0; }
.dc-idcard-stage {
  display: inline-block; margin-top: 12px; padding: 3px 10px; border-radius: var(--r-full);
  font-size: 11.5px; font-weight: 700; background: var(--nav-active-bg); color: var(--primary);
}
.dc-idcard-hr { height: 1px; background: var(--card-border); margin: 18px 0; }
/* 可复制字段行：点值即复制 */
.dc-kv-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 0; font-size: 12.5px;
}
.dc-kv-row > .k { color: var(--text-3); }
.dc-kv-row > .v {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none; padding: 0;
  font-family: inherit; font-size: 12.5px; font-weight: 600; text-align: right; color: var(--text);
}
.dc-kv-row > .v.copyable { cursor: pointer; }
.dc-kv-row > .v .material-symbols-outlined { font-size: 14px; color: var(--border-strong); }

/* ---- 左栏：学费概览 6 格 + 盈亏账 ---- */
.dc-tuition {
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: var(--r-lg); padding: 18px;
}
.dc-tuition > h3 { font-size: 14px; font-weight: 700; margin: 0 0 14px; }
.dc-tuition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dc-tuition-cell { background: var(--surface-2); border-radius: 10px; padding: 11px 13px; }
.dc-tuition-cell .k { font-size: 11.5px; color: var(--text-3); font-weight: 600; margin: 0; }
.dc-tuition-cell .v { font-size: 17px; font-weight: 800; margin: 3px 0 0; }
.dc-tuition-cell .v.pos { color: var(--green); }
.dc-tuition-cell .v.neg { color: var(--red); }
/* 盈亏账小块：实收 − 成本 − 手续费 = 最终盈亏 */
.dc-pl { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; margin-top: 10px; }
.dc-pl-title { font-size: 11.5px; font-weight: 700; color: var(--text-2); margin: 0 0 6px; }
.dc-pl-title .hint { font-weight: 500; color: var(--text-4); font-size: 10.5px; margin-left: 4px; }
.dc-pl-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 4px 0; font-size: 12.5px; border-top: 1px solid transparent;
}
.dc-pl-row.sep { border-top-color: var(--border); }
.dc-pl-row .k { color: var(--text-3); }
.dc-pl-row.total .k { color: var(--text-2); font-weight: 700; }
.dc-pl-row .v { font-weight: 700; }
.dc-pl-row.total .v { font-size: 14px; }
.dc-pl-row .v.pos { color: var(--green); }
.dc-pl-row .v.neg { color: var(--red); }

/* ---- 右栏：Tab 卡 ---- */
.dc-tabcard {
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: var(--r-lg); overflow: hidden;
}
.dc-tabcard-nav {
  display: flex; gap: 20px; padding: 0 18px;
  border-bottom: 1px solid var(--card-border); overflow-x: auto; scrollbar-width: none;
}
.dc-tabcard-nav::-webkit-scrollbar { display: none; }
.dc-tabcard-nav a, .dc-tabcard-nav button {
  padding: 13px 0 11px; background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-3); font-family: inherit; font-size: 13.5px; font-weight: 500;
  white-space: nowrap; cursor: pointer;
}
.dc-tabcard-nav .active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.dc-tabcard-body { padding: 18px; }

/* ---- 学情时间轴 ---- */
.dc-timeline { position: relative; padding-left: 26px; }
.dc-tl-item {
  position: relative; padding-bottom: 18px; padding-left: 22px;
  border-left: 2px solid var(--card-border);
}
.dc-tl-item:last-child { border-left-color: transparent; }
.dc-tl-dot {
  position: absolute; left: -8px; top: 3px; width: 14px; height: 14px;
  border-radius: var(--r-full); border: 3px solid #fff; background: var(--text-4);
}
/* 节点类型色：正课蓝 / 试听绿 / 退费红 / 跟进黄 / 线索灰 */
.dc-tl-dot.formal { background: var(--primary); }
.dc-tl-dot.trial { background: var(--green); }
.dc-tl-dot.refund { background: var(--red); }
.dc-tl-dot.follow { background: var(--amber); }
.dc-tl-dot.lead { background: var(--text-4); }
.dc-tl-body {
  background: var(--surface-2); border: 1px solid var(--card-border);
  border-radius: 11px; padding: 13px 15px;
}
.dc-tl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.dc-tl-head .title { font-size: 13.5px; font-weight: 700; }
.dc-tl-head .spacer { flex: 1; }
.dc-tl-head .amt { font-size: 13px; font-weight: 700; }
.dc-tl-time { font-size: 12px; color: var(--text-4); margin: 0 0 6px; }
.dc-tl-text { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 0; }
.dc-tl-acts { display: flex; gap: 8px; margin-top: 10px; }

/* ---- 可展开明细卡（正课/续课/退费/试听 明细 Tab，正课详情页复用） ---- */
.dc-exp { border: 1px solid var(--card-border); border-radius: 10px; padding: 14px 16px; }
.dc-exp + .dc-exp { margin-top: 10px; }
.dc-exp-head {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  background: none; border: none; padding: 0; margin-bottom: 10px; text-align: left;
  cursor: pointer; font-family: inherit;
}
.dc-exp-head .title {
  font-size: 13.5px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 6px;
}
.dc-exp-head .title .material-symbols-outlined { font-size: 17px; color: var(--text-4); }
.dc-exp-head .sub { font-size: 12px; color: var(--text-3); margin: 4px 0 0; }
.dc-exp-head .date { font-size: 11px; color: var(--text-4); margin: 6px 0 0; }
/* 折叠时也可见的 4 格摘要 */
.dc-exp-kv {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
  padding-top: 10px; border-top: 1px solid var(--surface-2);
}
.dc-exp-kv .k { font-size: 10.5px; color: var(--text-4); margin: 0 0 2px; }
.dc-exp-kv .v { font-size: 13px; font-weight: 600; margin: 0; }
.dc-exp-kv .v.pos { color: var(--green); }
.dc-exp-kv .v.neg { color: var(--red); }
.dc-exp-note { font-size: 12.5px; color: var(--text-3); line-height: 1.65; margin: 10px 0 0; }
/* 展开区：收款与优惠 / 成本与利润 / 员工提成分账 三块 */
.dc-exp-body {
  margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 12px;
  display: flex; flex-direction: column; gap: 14px;
}
.dc-exp-block > .bt {
  font-size: 12px; font-weight: 700; color: var(--text-2); margin: 0 0 8px;
  display: flex; align-items: center; gap: 6px;
}
.dc-exp-block > .bt .hint { font-weight: 500; color: var(--text-4); font-size: 11px; }
.dc-exp-lines { border: 1px solid var(--card-border); border-radius: 9px; overflow: hidden; }
.dc-exp-line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; border-top: 1px solid var(--surface-2);
}
.dc-exp-line:first-child { border-top: none; }
.dc-exp-line.total { background: var(--surface-2); }
.dc-exp-line .k { font-size: 12.5px; color: var(--text-2); }
.dc-exp-line.total .k { font-weight: 700; }
.dc-exp-line .hint { font-size: 11.5px; color: var(--text-4); flex: 1; text-align: right; }
.dc-exp-line .v { font-size: 13px; font-weight: 700; min-width: 92px; text-align: right; }
.dc-exp-line .v.pos { color: var(--green); }
.dc-exp-line .v.neg { color: var(--red); }
.dc-exp-acts { display: flex; gap: 8px; }
.dc-exp-acts button, .dc-exp-acts a {
  padding: 7px 14px; border-radius: var(--r-sm); font-family: inherit;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--text-2); border: 1px solid var(--border);
}
.dc-exp-acts .primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.dc-exp-acts .danger { background: var(--surface); color: var(--red); border-color: #fecaca; }

/* 表格单元格的副信息（多个代理上报过缺这个组件）。
   ⚠️ 必须 inline：设计稿表格行高是 43px，做成 display:block 会把行撑到 63px（涨 46%），
   一眼就能看出比原型松散。要同时显示两个数据点就用 · 分隔，别换行。 */
.dc-table .cell-sub {
  font-size: 11.5px; font-weight: 500; color: var(--text-4);
  margin-left: 6px; white-space: nowrap;
}
.dc-table .cell-sub::before { content: '· '; }
