/* 依米教学云 · UI 组件层（ui.css）
   ═════════════════════════════════════════════════════════════
   全站唯一的组件样式来源。四个布局都在最后引入本文件，页面里不再写
   组件样式；要改外观，只改这里 + 看一眼 /UiKit。

   形态参考 Ant Design 5 的组件与排版规范（圆角 6、行高 1.5714、字号阶梯
   38/30/24/20/16、填充 2%/4%/6%、间距取 4 的倍数），配色仍跟随本项目的
   中性色与品牌色，不照搬 Ant 的蓝。

   约定
   1. 只定义组件与令牌，不写业务布局（课表网格、组织树、章节树在各自文件）。
   2. 选择器一律不带 body.chrome / !important：前台后台同一套。
   3. 颜色、圆角、间距全部走令牌，不写字面色值（语义色除外，见 §1.3）。
   4. 表格列宽写在 <th> 上，不写 <colgroup>（DataTables 2 会自己插一个空
      colgroup，两套会互相吃掉宽度）。

   目录
     §1 令牌      §2 基础      §3 外壳与页头   §4 卡片     §5 表格
     §6 按钮      §7 表单      §8 筛选        §9 标签     §10 统计卡
     §11 提示与空态  §12 分页  §13 页签       §14 下拉菜单 §15 弹窗
     §16 DataTables
    §17 排版         §18 间距与分隔   §19 描述/时间轴/步骤
    §20 进度/骨架/结果  §21 折叠/气泡/头像  §22 兼容别名与工具类
   ═════════════════════════════════════════════════════════════ */

/* ─────────────── §1 令牌 ─────────────── */

/* 1.1 中性色：取自云盘（Vue3 + Element Plus）的实测值 */
:root {
    --ink: #1f2329;
    --ink-soft: #4b5563;
    --muted: #8a919f;
    --weak: #a0a6b1;
    --disabled: #c0c4cc;

    --line: #ebeef5;      /* 表格分隔线 */
    --edge: #eef0f4;      /* 卡片描边 */
    --border: #dcdfe6;    /* 输入框、按钮描边 */
    --line-strong: #dcdfe6;   /* 旧名，业务 CSS 还在用 */
    --tag-line: #e9ebf0;
    --th-bg: #fbfcfd;     /* 表头底色（项目原值，勿改成 Ant 的 #f5f5f5） */

    /* 填充梯度：对齐 Ant 的 colorFillAlter / Secondary / Tertiary（黑 2% / 4% / 6%） */
    --fill-alter: #fafafa;     /* 表头、描述列表 label */
    --fill-2: #f5f5f5;
    --fill-3: #f0f0f0;

    --bg: #f5f6f8;
    --panel: #ffffff;
    --zebra: #fafafa;
    --hover: #f5f7fa;
    --fill: #f5f6f8;
    --sel: #f2f4f8;

    /* 1.2 形状与字号 */
    --radius: 12px;
    --r-xs: 2px;      /* 标签内角、进度条 */
    --r-sm: 4px;      /* 小号按钮、翻页、标签 */
    --r-ctl: 6px;     /* 按钮与输入框 */
    --r-md: 8px;      /* 提示条、菜单、弹窗内块 */
    --r-lg: 12px;     /* 卡片以外的浮层 */
    --shadow: none;
    /* 两级阴影取自 Ant：一级给可悬停卡片，二级给浮层（菜单 / 气泡 / 下拉） */
    --shadow-1: 0 1px 2px 0 rgba(0, 0, 0, .05), 0 1px 6px -1px rgba(0, 0, 0, .03), 0 2px 4px 0 rgba(0, 0, 0, .03);
    --shadow-2: 0 6px 16px 0 rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12), 0 9px 28px 8px rgba(0, 0, 0, .05);
    --ease: cubic-bezier(.4, 0, .2, 1);
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
            "Microsoft YaHei", sans-serif;

    /* 兼容旧页面：这些名字还在 front.css / 业务 CSS 里用着，值统一收到中性白 */
    --surface: #fff;
    --surface-soft: #fff;
    --surface-tint: #fff;
    --ring: 0 0 0 2px color-mix(in srgb, var(--brand) 14%, transparent);

    /* 1.3 语义色（浅底 + 同族描边 + 同族文字） */
    --ok: #529b2e;
    --ok-soft: #f0f9eb;
    --ok-line: #e1f3d8;
    --warn: #d48806;
    --warn-soft: #fff8e6;
    --warn-line: #ffe4a3;
    --danger: #f56c6c;
    --danger-soft: #fef0f0;
    --danger-line: #fbc4c4;
    --info: #909399;
    --info-soft: #f4f4f5;
    --info-line: #e9e9eb;
    /* 蓝色：Ant 的 colorInfo 是蓝，但本项目的 --info 早被用成「灰色信息位」，故另起一组 */
    --blue: #1668dc;
    --blue-soft: #e6f4ff;
    --blue-line: #adc6ff;
}

/* 1.4 品牌色：三个色点仍然可切，只换品牌与侧栏，不动中性色 */
:root,
html[data-theme="forest"] {
    --brand: #1d6b46;
    --brand-ink: #14563a;
    --brand-soft: #e9f4ee;
    --brand-line: #cfe3d7;
    --side-bg: #123120;
    --side-bg-deep: #0d2718;
    --side-title: #6f8b79;
    --side-ink: #c4d5c9;
    --side-ink-strong: #ffffff;
    --side-hover: rgba(255, 255, 255, .05);
    --side-active: #24422f;
    --side-line: rgba(255, 255, 255, .08);
    --accent: #e3a33c;
    --accent-ink: #f4cd8b;
}

html[data-theme="navy"] {
    --brand: #1b4f8a;
    --brand-ink: #143c69;
    --brand-soft: #e9f1fa;
    --brand-line: #cfe0f0;
    --side-bg: #17233b;
    --side-bg-deep: #101a2e;
    --side-title: #7f90ab;
    --side-ink: #c9d4e4;
    --side-hover: rgba(255, 255, 255, .06);
    --side-active: #22304d;
    --side-line: rgba(255, 255, 255, .09);
    --accent: #4fd1b0;
    --accent-ink: #d8fff2;
}

html[data-theme="graphite"] {
    --brand: #3c5a78;
    --brand-ink: #2d4660;
    --brand-soft: #eef2f6;
    --brand-line: #d8e1ea;
    --side-bg: #23272e;
    --side-bg-deep: #1a1d22;
    --side-title: #8b929d;
    --side-ink: #ced3da;
    --side-hover: rgba(255, 255, 255, .07);
    --side-active: #31363f;
    --side-line: rgba(255, 255, 255, .08);
    --accent: #f0b429;
    --accent-ink: #ffe3a3;
}

/* ─────────────── §2 基础 ─────────────── */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font: 14px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0;
}

body.chrome { background: var(--bg); }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font-size: 22px; }
h2, h3 { font-size: 15px; }

code, .mono {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12.5px;
    background: var(--fill);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 1px 5px;
    color: var(--ink-soft);
}

.muted { color: var(--muted); font-size: 12.5px; }
.hint, .cell-note { color: var(--weak); }
/* 浏览器默认 [hidden] 会被 display:flex 之类压掉，这里显式声明一次 */
[hidden] { display: none !important; }

.right { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d0d3d9; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b8bcc4; }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: rgba(29, 107, 70, .14); }

/* ─────────────── §3 外壳与页头 ─────────────── */

body.chrome .fmain { padding: 20px 24px 48px; max-width: 1480px; }
.amain { padding: 20px 24px 40px; }

/* 统一扁平：这些外壳与容器在 chrome.css / 业务 CSS 里各带一份投影，这里一次清掉 */
.topbar,
.topbar__ai,
.brand-logo,
.avatar,
.card,
.kpi,
.stat,
.hero,
.todo,
.entry,
.question,
.lesson,
.week__col,
.btn,
.flash,
.notice,
.tmenu__drop { box-shadow: none; }

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 0;
    border-bottom: 0;
}

.page-head__title {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    color: var(--ink);
}

.page-head__title::before { display: none; }

.page-head__sub {
    margin-top: 6px;
    padding-left: 0;
    font-size: 12px;
    color: var(--weak);
}

.page-head__actions { display: flex; align-items: center; gap: 8px; }

/* ─────────────── §4 卡片 ─────────────── */

.card {
    padding: 16px 18px;
    margin-bottom: 16px;
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: none;
}

.card--flush { padding: 0; overflow: hidden; }
.card--note { background: #fbfcfe; }
.card--scroll { overflow-x: auto; }
.card--soft { background: color-mix(in srgb, var(--brand) 3%, #fff); }

/* 可点卡片：静默，悬停才浮起一层（Ant Card hoverable） */
.card--hoverable {
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card--hoverable:hover { border-color: var(--border); box-shadow: var(--shadow-1); }

.card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.card__head h2 {
    display: flex;
    align-items: center;
    gap: 0;
    padding-left: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--ink);
}

.card__head h2::before { display: none; }
.card__head .muted { font-size: 12px; }

/* 带卡头的普通卡片：卡头铺满上沿并压一条分隔线 */
.card:not(.card--flush) > .card__head {
    margin: -16px -18px 14px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--edge);
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--panel);
}

.card--flush > .card__head {
    margin-bottom: 0;
    padding: 13px 18px;
    border-bottom: 1px solid var(--edge);
    background: var(--panel);
}

.sub-block__head h3 { font-size: 13px; font-weight: 600; color: var(--ink); }

/* ─────────────── §5 表格 ─────────────── */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: var(--ink-soft);
}

.table th,
.table td {
    padding: 10px 14px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--line);
}

/* 表头保持项目原有观感：12px 灰字 + #fafbfd 底（不跟 Ant 的 14px 深字 + #f5f5f5） */
.table th {
    height: 40px;
    padding-top: 0;
    padding-bottom: 0;
    background: var(--th-bg);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
}

.table td { color: var(--ink-soft); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--hover); }
.table td .muted { display: block; color: var(--weak); font-size: 12px; }

.table th.num, .table td.num { text-align: right; }
.table th.right, .table td.right { text-align: right; white-space: nowrap; }

/* 密度三档：--default 取 Ant 默认（14/16），常规（10/14），--compact 紧凑（8/12） */
.table--default th,
.table--default td { padding: 14px 16px; }
.table--default th { height: 44px; padding-top: 0; padding-bottom: 0; }

/* 紧凑表：弹窗、侧栏里的小表格 */
.table--compact th { padding: 8px 12px; height: 36px; }
.table--compact td { padding: 8px 12px; }

/* 行内主链接：常态深色，悬停才透出品牌色 */
.link-strong {
    display: block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--ink);
}
.link-strong:hover { color: var(--brand); text-decoration: none; }

/* 等宽单元格（教务编号、时间）不套底色与描边 */
.table td.mono,
.table th.mono {
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    font-size: 12px;
    color: var(--ink-soft);
}

/* DataTables 会给自己接管后的表格加 table.dataTable 类，插件 CSS 里
   `table.dataTable thead > tr > th` 的内边距比 .table th 更具体，必须同权重压回来 */
.table.dataTable > thead > tr > th,
.table.dataTable > tbody > tr > td { padding: 10px 14px; }

.table.dataTable > thead > tr > th {
    height: 40px;
    padding-top: 0;
    padding-bottom: 0;
}

/* 列表表格：隔行浅底 + 悬停，仅在 DataTables 容器内启用（见 §16） */
.dt-container .table tbody tr:nth-child(even) { background: var(--zebra); }
.dt-container .table tbody tr:hover { background: var(--hover); }
.dt-container .table tbody tr.is-on { background: var(--brand-soft); }

/* ─────────────── §6 按钮 ─────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-ctl);
    background: var(--panel);
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}

.btn:hover {
    background: var(--hover);
    border-color: #c6cbd4;
    color: var(--ink);
    text-decoration: none;
}

.btn:focus-visible {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--ring);
}

.btn:disabled,
.btn.is-disabled {
    background: var(--fill);
    border-color: var(--edge);
    color: var(--disabled);
    cursor: not-allowed;
    pointer-events: none;
}

.btn--primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 500;
}
.btn--primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.btn--primary:active { background: var(--brand-ink); border-color: var(--brand-ink); filter: brightness(.96); }

/* 6.1 尺寸：大 40 / 默认 32 / 小 24 / 表内 26（--mini 兼容旧页面） */
.btn--lg { height: 40px; padding: 0 16px; font-size: 14px; }
.btn--sm { height: 24px; padding: 0 7px; border-radius: var(--r-sm); font-size: 13px; }
.btn--mini { height: 26px; padding: 0 10px; border-radius: var(--r-sm); font-size: 12px; }
.btn--block { width: 100%; }
.btn--round { border-radius: 999px; }

/* 6.2 形态：虚线 / 文本 / 链接（Ant Button 的 dashed、text、link） */
.btn--dashed {
    border-style: dashed;
    border-color: var(--border);
    background: var(--panel);
    color: var(--ink-soft);
}
.btn--dashed:hover { border-color: var(--brand); color: var(--brand); background: var(--panel); }

.btn--text { border-color: transparent; background: transparent; color: var(--ink-soft); }
.btn--text:hover { border-color: transparent; background: var(--sel); color: var(--ink); }

.btn--link {
    height: auto;
    padding: 0;
    border-color: transparent;
    background: transparent;
    color: var(--brand);
}
.btn--link:hover { border-color: transparent; background: transparent; color: var(--brand-ink); text-decoration: underline; }

.btn--ghost { border-color: transparent; background: transparent; color: var(--ink-soft); }
.btn--ghost:hover { background: var(--sel); border-color: transparent; color: var(--ink); }

/* 6.3 颜色：实心档（写成 --red 之类，等价 Ant 的 danger 主按钮）。
   hover 只把当前色压暗一档，不再单独配令牌 */
.btn--blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--blue:hover { color: #fff; filter: brightness(.92); }

.btn--red,
.btn--green,
.btn--orange,
.btn--purple { color: #fff; font-weight: 500; }
.btn--red { background: var(--danger); border-color: var(--danger); }
.btn--green { background: var(--ok); border-color: var(--ok); }
.btn--orange { background: var(--warn); border-color: var(--warn); }
.btn--purple { background: #7a5af5; border-color: #7a5af5; }
.btn--red:hover,
.btn--green:hover,
.btn--orange:hover,
.btn--purple:hover { color: #fff; filter: brightness(.92); }

/* 6.4 颜色：浅色档（白底同族描边，悬停浅底加深——表格与卡头里不刺眼） */
.btn--danger { border-color: var(--danger-line); background: var(--panel); color: var(--danger); }
.btn--danger:hover { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }

.btn--success { border-color: var(--ok-line); background: var(--panel); color: var(--ok); }
.btn--success:hover { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }

.btn--warning { border-color: var(--warn-line); background: var(--panel); color: var(--warn); }
.btn--warning:hover { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }

.btn--info { border-color: var(--info-line); background: var(--panel); color: var(--info); }
.btn--info:hover { border-color: var(--info); background: var(--info-soft); color: var(--info); }

/* 浅蓝描边：与 .btn--success / .btn--danger 同一档观感，只是换成蓝。
   蓝色没有可用的 --info 令牌（那个是灰），所以单开一类 */
.btn--blue-line { border-color: var(--blue-line); background: var(--panel); color: var(--blue); }
.btn--blue-line:hover { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }

/* 6.5 加载态：文字照旧，左侧转一个细圈，点击失效 */
.btn.is-loading { pointer-events: none; opacity: .75; }
.btn.is-loading::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    opacity: .7;
    animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* 6.6 卡头与表内的「默认描边按钮」：保持白底，不让业务 CSS 的浅绿填充带回来。
   用 :where() 把权重压到 0,1,0，并显式排除全部形态与颜色类，颜色永远压过这层 */
.card__head :where(.btn:not(.btn--primary):not(.btn--blue):not(.btn--red):not(.btn--green):not(.btn--orange):not(.btn--purple):not(.btn--danger):not(.btn--success):not(.btn--warning):not(.btn--info):not(.btn--blue-line):not(.btn--ghost):not(.btn--text):not(.btn--link):not(.btn--dashed)) {
    border-color: var(--border);
    background: var(--panel);
    color: var(--ink-soft);
}
.card__head :where(.btn:not(.btn--primary):not(.btn--blue):not(.btn--red):not(.btn--green):not(.btn--orange):not(.btn--purple):not(.btn--danger):not(.btn--success):not(.btn--warning):not(.btn--info):not(.btn--blue-line):not(.btn--ghost):not(.btn--text):not(.btn--link):not(.btn--dashed)):hover {
    border-color: #c6cbd4;
    background: var(--hover);
    color: var(--ink);
}

/* 表内操作：白底细描边，悬停染品牌色 */
.table :where(.btn--mini:not(.btn--primary):not(.btn--blue):not(.btn--red):not(.btn--green):not(.btn--orange):not(.btn--purple):not(.btn--danger):not(.btn--success):not(.btn--warning):not(.btn--info):not(.btn--blue-line):not(.btn--ghost):not(.btn--text):not(.btn--link):not(.btn--dashed)) {
    border-color: var(--border);
    background: var(--panel);
    color: var(--ink-soft);
}
.table :where(.btn--mini:not(.btn--primary):not(.btn--blue):not(.btn--red):not(.btn--green):not(.btn--orange):not(.btn--purple):not(.btn--danger):not(.btn--success):not(.btn--warning):not(.btn--info):not(.btn--blue-line):not(.btn--ghost):not(.btn--text):not(.btn--link):not(.btn--dashed)):hover {
    border-color: var(--brand);
    background: var(--panel);
    color: var(--brand);
}

/* 表内的主按钮当状态位用（「已加入」）：实色会压花整张表，压成浅色标记 */
.table .btn--primary.btn--mini {
    border-color: var(--brand-line);
    background: var(--brand-soft);
    color: var(--brand-ink);
    font-weight: 500;
}
.table .btn--primary.btn--mini:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-ink);
}

/* ─────────────── §7 表单 ─────────────── */

/* 7.1 骨架：新的 .form / .form-item 走 Ant Form 的纵向节奏（标签在上、项距 20），
   旧页面的 .form-grid + .field 一行不动，两套共用下面的控件外观 */
.form { display: flex; flex-direction: column; gap: 20px; }
.form--tight { gap: 12px; }

.form-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.form-item__label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 400;
    line-height: 20px;
    color: var(--ink);
}
.form-item__control { min-width: 0; }
.form-item__extra { font-size: 12px; line-height: 1.6; color: var(--muted); }
.form-item--error .form-item__extra { color: var(--danger); }

/* 必填星号：红字在标签前，Ant 的位置 */
.form-item--required > .form-item__label::before {
    content: "*";
    margin-right: 2px;
    color: var(--danger);
    font-family: SimSun, sans-serif;
}

/* 水平布局：标签右对齐定宽，控件占其余宽度（.form--h） */
.form--h .form-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 6px 12px;
    align-items: start;
}
.form--h .form-item__label { justify-content: flex-end; padding-top: 6px; text-align: right; }
.form--h .form-item__extra { grid-column: 2; margin-top: -2px; }
.form--h .form-item__control { grid-column: 2; }

/* 行内布局：标签与控件同一行，适合筛选条与设置项 */
.form--inline { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 12px 16px; }
.form--inline .form-item { flex: 0 1 auto; }
.form--inline .form-item__label { line-height: 32px; }

/* 7.2 控件基线：高度 32 · 圆角 6 · 内边距 0 11（Ant Input 默认），
   新 .form / .ctrl 与旧 .field / .filters / .hero 共用同一份声明 */
:is(.field, .form, .filters, .hero) :where(
    input:not([type="checkbox"], [type="radio"], [type="file"], [type="submit"], [type="button"]),
    select,
    textarea
),
.ctrl {
    width: 100%;
    height: 32px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: var(--r-ctl);
    background-color: var(--panel);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    line-height: 1.5;
    outline: none;
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s var(--ease);
}

.ctrl--sm { height: 24px; padding: 0 7px; border-radius: var(--r-sm); font-size: 12px; }
.ctrl--lg { height: 40px; padding: 0 15px; font-size: 14px; }
.ctrl--block { width: 100%; }

/* 下拉框：去掉系统箭头，自绘一个 10×6 的浅灰三角（Ant 用同一个位置与颜色） */
:is(.field, .form, .filters, .hero) select:not([multiple]),
select.ctrl:not([multiple]),
.select--mini {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 28px;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23bfbfbf' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 6px;
}
:is(.field, .form, .filters, .hero) select:not([multiple]):hover,
select.ctrl:not([multiple]):hover { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a919f' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
/* 迷你下拉（章节体系在用）留出箭头位 */
.select--mini { padding-right: 22px; background-position: right 6px center; }

/* 多行文本：高度交给 rows，纵向内边距 4（Ant textarea 的内边距） */
:is(.field, .form) textarea,
textarea.ctrl {
    height: auto;
    min-height: 64px;
    padding: 5px 11px;
    line-height: 1.6;
    resize: vertical;
}

/* 悬停与聚焦：描边先加深，聚焦再染品牌 + 2px 光晕（Ant 的 controlOutline） */
:is(.field, .form, .filters, .hero) :where(input, select, textarea):hover,
.ctrl:hover { border-color: #c6cbd4; }
:is(.field, .form, .filters, .hero) :where(input, select, textarea):focus,
.ctrl:focus {
    border-color: var(--brand);
    box-shadow: var(--ring);
    outline: none;
}
:is(.field, .form, .filters, .hero) :where(input, select, textarea):disabled,
.ctrl:disabled {
    background-color: var(--fill);
    border-color: var(--border);
    color: var(--muted);
    cursor: not-allowed;
    box-shadow: none;
}
.ctrl::placeholder,
:is(.field, .form) :where(input, textarea)::placeholder { color: var(--weak); }

/* 7.3 前后缀：图标或单位贴在框内两侧（Ant Input 的 prefix / suffix） */
.ctrl-wrap { position: relative; display: flex; align-items: center; min-width: 0; }
.ctrl-wrap .ctrl { width: 100%; }
.ctrl-wrap__prefix,
.ctrl-wrap__suffix {
    position: absolute;
    top: 50%;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 12px;
    pointer-events: none;
}
.ctrl-wrap__prefix { left: 11px; }
.ctrl-wrap__suffix { right: 11px; }
.ctrl-wrap--prefix .ctrl { padding-left: 30px; }
.ctrl-wrap--suffix .ctrl { padding-right: 30px; }

/* 7.4 单选与复选：16px，选中直接染品牌（Ant 的 Checkbox / Radio） */
input[type="checkbox"],
input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    border: 1px solid #bfbfbf;
    border-radius: 3px;
    background-color: var(--panel);
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: -3px;
    cursor: pointer;
    transition: background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input[type="checkbox"]:hover,
input[type="radio"]:hover { border-color: var(--brand); }

input[type="checkbox"]:checked {
    border-color: var(--brand);
    background-color: var(--brand);
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath d='M3.4 8.4l3 3 6.2-6.6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 12px 12px;
}
input[type="checkbox"]:indeterminate {
    border-color: var(--brand);
    background-color: var(--brand);
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 12px 12px;
}

input[type="radio"] { border-radius: 50%; }
input[type="radio"]:checked {
    border-color: var(--brand);
    background-color: var(--panel);
    background-image: radial-gradient(circle, var(--brand) 0 4px, transparent 4.5px);
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
    border-color: #d9d9d9;
    background-color: var(--fill-2);
    cursor: not-allowed;
}
input[type="checkbox"]:checked:disabled,
input[type="checkbox"]:indeterminate:disabled,
input[type="radio"]:checked:disabled {
    border-color: #d9d9d9;
    background-color: #d9d9d9;
    opacity: .7;
}

/* 7.5 开关：44×22 轨道 + 18px 白滑块。
   input 不生成伪元素，滑块用 background-image 的圆点 + 位置平移（纯 CSS，无需额外标签） */
input.switch,
.switch {
    width: 44px;
    height: 22px;
    border: 0;
    border-radius: 11px;
    background-color: #bfbfbf;
    background-image: radial-gradient(circle, #fff 0 8px, transparent 8.4px);
    background-size: 18px 18px;
    background-position: 2px 50%;
    background-repeat: no-repeat;
    transition: background-color .2s var(--ease), background-position .2s var(--ease);
}
input.switch:checked,
.switch:checked {
    background-color: var(--brand);
    background-image: radial-gradient(circle, #fff 0 8px, transparent 8.4px);
    background-size: 18px 18px;
    background-position: 24px 50%;
}
input.switch:disabled { background-color: #d9d9d9; opacity: .7; }

/* 小号开关：28×16，滑块 12px，行程 2 → 14 */
.switch--sm,
input.switch--sm {
    width: 28px;
    height: 16px;
    border-radius: 8px;
    background-size: 12px 12px;
    background-image: radial-gradient(circle, #fff 0 5px, transparent 5.4px);
    background-position: 2px 50%;
}
.switch--sm:checked,
input.switch--sm:checked {
    background-size: 12px 12px;
    background-image: radial-gradient(circle, #fff 0 5px, transparent 5.4px);
    background-position: 14px 50%;
}

/* 7.6 选项组：横向默认、纵向加 --v，标签与控件同一基线 */
.radio-group,
.check-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.radio-group--v,
.check-group--v { flex-direction: column; align-items: flex-start; gap: 8px; }

.radio,
.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 22px;
    font-size: 13px;
    color: var(--ink);
    cursor: pointer;
}
.radio input,
.check input { margin: 0; }
.radio.is-disabled,
.check.is-disabled { color: var(--disabled); cursor: not-allowed; }
/* 单独一条：旧浏览器不认识 :has 时只会丢这一条，不影响上面的手工类 */
.radio:has(input:disabled),
.check:has(input:disabled) { color: var(--disabled); cursor: not-allowed; }

/* 7.7 旧页面的表单结构（.form-grid + .field）继续可用 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    grid-column: span 2;
}
.field--wide { grid-column: 1 / -1; }
.field--short { grid-column: span 1; }
.field > span { font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.field small { color: var(--weak); font-size: 12px; }

/* 必填星号：红色紧跟标签文字，不占额外格 */
.field--required > span::before {
    content: "*";
    margin-right: 3px;
    color: var(--danger);
}

/* 错误态：边框与提示文字同色，聚焦光晕也换成危险色 */
.field--error input,
.field--error select,
.field--error textarea,
.form-item--error input,
.form-item--error select,
.form-item--error textarea { border-color: var(--danger); }
.field--error input:focus,
.field--error select:focus,
.field--error textarea:focus,
.form-item--error input:focus,
.form-item--error select:focus,
.form-item--error textarea:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 14%, transparent);
}
.field--error small { color: var(--danger); }

/* 筛选条里的控件按内容宽度排，不铺满整行 */
.filters input[type="search"] { width: auto; flex: 1 1 240px; min-width: 200px; }
.filters select { width: auto; min-width: 120px; }

/* 复选类字段：标签与输入同一行 */
.field--check {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding-bottom: 8px;
}
.field--check input[type="checkbox"] { margin: 0; }

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    padding-top: 2px;
}
.form-actions--end {
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .field, .field--short { grid-column: 1 / -1; }
    .form--h .form-item { grid-template-columns: minmax(0, 1fr); }
    .form--h .form-item__label { justify-content: flex-start; padding-top: 0; text-align: left; }
    .form--h .form-item__control,
    .form--h .form-item__extra { grid-column: 1; }
}

/* ─────────────── §8 筛选 ─────────────── */

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.filters__search { flex: 1 1 240px; min-width: 200px; }

.filters__check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-ctl);
    background: var(--panel);
    font-size: 12px;
    color: var(--ink-soft);
    cursor: pointer;
    white-space: nowrap;
}
.filters__check:hover { border-color: var(--brand); color: var(--ink); }
.filters__check input[type="checkbox"] { width: auto; margin: 0; }

/* 筛选条：白底细描边 */
.hero {
    padding: 12px 16px;
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: none;
}
.hero__label { font-size: 12px; color: var(--muted); letter-spacing: 0; }

/* 筛选胶囊：方角小标签，选中才染品牌绿 */
.fchip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border: 1px solid var(--tag-line);
    border-radius: var(--r-sm);
    background: var(--panel);
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    cursor: pointer;
}
.fchip:hover { border-color: #c6cbd4; background: var(--hover); color: var(--ink); }
.fchip.is-on {
    border-color: var(--brand-line);
    background: var(--brand-soft);
    color: var(--brand-ink);
    font-weight: 500;
}
.fchip.is-disabled { color: var(--disabled); background: var(--fill); pointer-events: none; }

/* 分段控件：radio-button 观感 */
.seg {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: var(--r-ctl);
    background: var(--panel);
}
.seg a,
.seg button {
    padding: 5px 12px;
    border: 0;
    border-radius: var(--r-sm);
    background: none;
    color: var(--ink-soft);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.seg a:hover,
.seg button:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.seg a.is-active,
.seg a.is-on,
.seg button.is-active,
.seg button.is-on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 500; }

/* 实心变体：灰槽 + 白色滑块，选中用白块加投影而不是染品牌色 */
.seg--fill { border-color: transparent; background: var(--fill-3); }
.seg--fill a,
.seg--fill button { border-radius: var(--r-sm); color: var(--ink-soft); }
.seg--fill a:hover,
.seg--fill button:hover { background: transparent; color: var(--ink); }
.seg--fill a.is-active,
.seg--fill a.is-on,
.seg--fill button.is-active,
.seg--fill button.is-on {
    background: var(--panel);
    color: var(--ink);
    box-shadow: var(--shadow-1);
}

/* ─────────────── §9 标签 ─────────────── */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 5px;
    border: 1px solid var(--tag-line);
    border-radius: 3px;
    background: var(--fill);
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 17px;
    white-space: nowrap;
}

.chip--ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.chip--warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.chip--danger { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.chip--info { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.chip--muted { color: var(--muted); }
.chip--brand { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0 5px;
    border-radius: 3px;
    background: var(--brand-soft);
    color: var(--brand-ink);
    font-size: 11px;
    line-height: 17px;
    white-space: nowrap;
}
.badge--soft {
    background: var(--fill);
    border: 1px solid var(--tag-line);
    color: var(--muted);
}

/* 大号标签：正文里当状态词用，不是表格列 */
.chip--lg {
    padding: 0 8px;
    font-size: 12px;
    line-height: 22px;
    border-radius: var(--r-sm);
}

/* 可移除标签：× 是 <button class="chip__close">，别塞进 <a> */
.chip__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-right: -2px;
    padding: 0;
    border: 0;
    border-radius: var(--r-xs);
    background: none;
    color: currentColor;
    font: inherit;
    font-size: 12px;
    line-height: 1;
    opacity: .6;
    cursor: pointer;
}
.chip__close:hover { opacity: 1; background: rgba(0, 0, 0, .06); }

/* ─────────────── §10 统计卡 ─────────────── */

.kpi-grid,
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat,
.kpi {
    padding: 14px 16px;
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: none;
}

.stat__label,
.kpi__label { margin: 0; font-size: 12px; font-weight: 400; color: var(--muted); }

.stat__value,
.kpi__value {
    margin: 6px 0 2px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.kpi__value--sm { font-size: 18px; letter-spacing: 0; }

/* 前后缀（元 / 人 / %）：跟数值同一基线，弱化一档 */
.kpi__prefix,
.kpi__suffix { font-size: 14px; font-weight: 400; color: var(--muted); }
.kpi__prefix { margin-right: 3px; }
.kpi__suffix { margin-left: 3px; }

.stat__hint,
.kpi__hint { margin: 0; font-size: 12px; color: var(--weak); }

/* 强调卡不染色，只在顶部压一条品牌细线 */
.kpi--accent,
.stat--accent {
    border-color: var(--edge);
    background: var(--panel);
    box-shadow: inset 0 2px 0 var(--brand);
}
.kpi--accent .kpi__value { color: var(--ink); }

/* ─────────────── §11 提示与空态 ─────────────── */

.notice {
    margin: 12px 0;
    padding: 10px 14px;
    border: 1px solid var(--edge);
    border-radius: var(--r-lg);
    background: #fbfcfe;
    color: var(--ink-soft);
    font-size: 12px;
}
.notice--warn { border-color: var(--warn-line); background: var(--warn-soft); color: var(--warn); }
.notice--error { border-color: var(--danger-line); background: var(--danger-soft); color: var(--danger); }

/* 带图标的提示条：图标槽固定在左，标题一行，说明可折行 */
.notice--row { display: flex; align-items: flex-start; gap: 8px; }
.notice__icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: currentColor;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.notice__title { font-weight: 600; }
.notice__desc { margin-top: 2px; opacity: .85; }

.flash {
    margin-bottom: 14px;
    padding: 10px 14px;
    border: 1px solid var(--ok-line);
    border-radius: var(--r-lg);
    background: var(--ok-soft);
    color: var(--ok);
    font-size: 12px;
}
.flash--error { border-color: var(--danger-line); background: var(--danger-soft); color: var(--danger); }

/* 空态：一行浅灰说明，不画虚线占位框 */
.empty {
    margin: 0;
    padding: 48px 24px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
    text-align: center;
}
.empty::before { display: none; }
.card > .empty { padding: 48px 24px; }

/* ─────────────── §12 分页 ─────────────── */

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    font-size: 13px;
}

.pager__link {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--panel);
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 26px;
    text-align: center;
}
.pager__link:hover { background: var(--hover); border-color: #c6cbd4; text-decoration: none; }
.pager__link.is-on { border-color: var(--brand); background: var(--brand); color: #fff; }
.pager__link.is-disabled {
    border-color: var(--edge);
    background: var(--zebra);
    color: var(--disabled);
    pointer-events: none;
}
.pager__info { color: var(--muted); font-size: 12px; }

/* ─────────────── §13 页签 ─────────────── */

/* 下划线式页签：和分段控件区分开，用于「全部 / 待办 / 已完成」这类视图切换 */
.tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 10px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}

.tab {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    height: 42px;
    padding: 0 10px;
    border: 0;
    background: none;
    color: var(--ink-soft);
    font: inherit;
    font-size: 13px;
    line-height: 42px;
    cursor: pointer;
    transition: color .15s var(--ease);
}
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-on { color: var(--brand-ink); font-weight: 600; }
.tab.is-on::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--brand);
}

.tab__n {
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}
.tab.is-on .tab__n { color: var(--brand-ink); }


/* ─────────────── §14 下拉菜单 ─────────────── */

.menu {
    min-width: 168px;
    padding: 4px;
    border: 1px solid var(--edge);
    border-radius: var(--r-lg);
    background: var(--panel);
    box-shadow: var(--shadow-2);
}

.menu__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--r-sm);
    color: var(--ink-soft);
    font-size: 13px;
    white-space: nowrap;
}
.menu__item:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.menu__item.is-on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 500; }
.menu__sep { height: 1px; margin: 4px 6px; background: var(--line); }

/* ─────────────── §15 弹窗（layer） ─────────────── */

body .layui-layer.yimi-layer {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(16, 32, 24, .18);
}

body .layui-layer.yimi-layer .layui-layer-title {
    height: 48px;
    line-height: 48px;
    padding: 0 18px;
    border-bottom: 1px solid var(--edge);
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--panel);
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
}

body .layui-layer.yimi-layer .layui-layer-setwin { top: 16px; right: 14px; }

body .layui-layer.yimi-layer .layui-layer-content {
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.7;
}

body .layui-layer.yimi-layer .layui-layer-btn { padding: 0 16px 14px; text-align: right; }

body .layui-layer.yimi-layer .layui-layer-btn a {
    height: 32px;
    line-height: 30px;
    margin-left: 8px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: var(--r-ctl);
    background: var(--panel);
    color: var(--ink-soft);
    font-size: 13px;
}
body .layui-layer.yimi-layer .layui-layer-btn .layui-layer-btn0 {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}
body .layui-layer.yimi-layer .layui-layer-btn a:hover { opacity: .9; }
body .layui-layer.yimi-layer .layui-layer-ico { margin-top: 2px; }

.yimi-layer__body {
    padding: 16px 18px 6px;
    max-height: calc(100vh - 240px);
    overflow: auto;
}
.yimi-layer__body.dict-edit__panel { display: block; }

.yimi-layer__body .form-grid {
    margin: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}
.yimi-layer__body .field { grid-column: span 1; }
.yimi-layer__body .field--wide { grid-column: 1 / -1; }
.yimi-layer__body .field--check { grid-column: 1 / -1; }
.yimi-layer__body .form-actions { grid-column: 1 / -1; padding-top: 4px; }

.yimi-layer__body .dict-edit__danger {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.yimi-layer__body .dict-edit__danger + .dict-edit__danger {
    margin-top: 8px;
    padding-top: 0;
    border-top: 0;
}

/* 轻提示：黑底白字，落屏幕正中 */
body .layui-layer-msg.yimi-toast {
    min-width: 0;
    max-width: 520px;
    padding: 0;
    border: none;
    border-radius: var(--r-lg);
    background: rgba(24, 28, 26, .9);
    box-shadow: 0 10px 28px rgba(22, 32, 44, .22);
    color: #fff;
}

body .layui-layer-msg.yimi-toast .layui-layer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    color: #fff;
    font-size: 13px;
    line-height: 1.65;
    text-align: center;
    white-space: normal;
    word-break: break-word;
}

.yimi-toast__text { display: inline; }

.yimi-toast__mark {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    color: #10201a;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
}
.yimi-toast__mark--success { background: #6ee7a3; }
.yimi-toast__mark--error { background: #ff8f86; }
.yimi-toast__mark--warn { background: #f5c663; }

/* ─────────────── §16 DataTables ─────────────── */

.dt-container { font-size: 13px; color: var(--ink-soft); }
.dt-container .table { margin: 0; width: 100% !important; }

div.dt-container div.dt-layout-row {
    margin: 0;
    padding: 12px 18px 6px;
    gap: 10px;
    align-items: center;
}
div.dt-container div.dt-layout-row:last-child { padding-top: 6px; padding-bottom: 12px; }

.dt-container .dt-layout-cell { padding: 0; gap: 6px; }

.dt-container .dt-length,
.dt-container .dt-info,
.dt-container .dt-search {
    color: var(--muted);
    font-size: 12px;
}

.dt-container .dt-length select,
.dt-container .dt-search input {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-ctl);
    background: var(--panel);
    color: var(--ink);
    font-size: 13px;
    outline: none;
    transition: border-color .15s var(--ease);
}
.dt-container .dt-search input { width: 220px; margin-left: 6px; padding-left: 32px; }
.dt-container .dt-length select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 26px;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23bfbfbf' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px 6px;
}
.dt-container .dt-length select:focus,
.dt-container .dt-search input:focus { border-color: var(--brand); box-shadow: none; }

/* 分页按钮：插件默认 color/background 带 !important，这里同前缀 + !important 才盖得住 */
div.dt-container .dt-paging {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}

div.dt-container .dt-paging .dt-paging-button {
    min-width: 28px;
    height: 28px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-sm) !important;
    background: var(--panel) !important;
    background-image: none !important;
    color: var(--ink-soft) !important;
    font-family: inherit;
    font-size: 12px;
    font-weight: 400;
    line-height: 26px;
    text-align: center;
    box-shadow: none;
    transition: background .15s, border-color .15s, color .15s;
}

div.dt-container .dt-paging .dt-paging-button:hover:not(.disabled):not(.current) {
    border-color: #c6cbd4 !important;
    background: var(--hover) !important;
    color: var(--ink) !important;
}

div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button.current:hover {
    border-color: var(--brand) !important;
    background: var(--brand) !important;
    color: #fff !important;
    font-weight: 500;
}

div.dt-container .dt-paging .dt-paging-button.disabled,
div.dt-container .dt-paging .dt-paging-button.disabled:hover {
    border-color: transparent !important;
    background: transparent !important;
    color: var(--disabled) !important;
    box-shadow: none;
    cursor: not-allowed;
}

div.dt-container .dt-paging .ellipsis {
    border-color: transparent !important;
    background: transparent !important;
    color: var(--muted) !important;
    padding: 0 2px;
}

div.dt-container .dt-paging .dt-paging-button.previous,
div.dt-container .dt-paging .dt-paging-button.next,
div.dt-container .dt-paging .dt-paging-button.first,
div.dt-container .dt-paging .dt-paging-button.last { padding: 0 11px; }

/* 排序指示：插件用 ▲▼ 字符画，这里改用 CSS 三角，紧跟标签文字 */
table.dataTable thead > tr > th.dt-orderable-asc,
table.dataTable thead > tr > th.dt-orderable-desc,
table.dataTable thead > tr > th.dt-ordering-asc,
table.dataTable thead > tr > th.dt-ordering-desc {
    position: relative;
    cursor: pointer;
}

table.dataTable thead span.dt-column-order {
    position: relative !important;
    display: inline-block;
    right: auto !important;
    top: auto;
    bottom: auto;
    width: 9px !important;
    height: 11px;
    margin-left: 5px;
    vertical-align: -1px;
}

table.dataTable thead span.dt-column-order:before,
table.dataTable thead span.dt-column-order:after {
    content: "" !important;
    position: absolute;
    left: 0;
    width: 0;
    height: 0;
    font-size: 0 !important;
    line-height: 0 !important;
    opacity: 1 !important;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}
table.dataTable thead span.dt-column-order:before {
    top: 0;
    border-top: 0;
    border-bottom: 5px solid color-mix(in srgb, currentColor 26%, transparent);
}
table.dataTable thead span.dt-column-order:after {
    top: 6px;
    border-bottom: 0;
    border-top: 5px solid color-mix(in srgb, currentColor 26%, transparent);
}
table.dataTable thead th.dt-ordering-asc span.dt-column-order:before { border-bottom-color: var(--brand); }
table.dataTable thead th.dt-ordering-desc span.dt-column-order:after { border-top-color: var(--brand); }
table.dataTable thead th.dt-ordering-asc span.dt-column-order:after {
    border-top-color: color-mix(in srgb, currentColor 14%, transparent);
}
table.dataTable thead th.dt-ordering-desc span.dt-column-order:before {
    border-bottom-color: color-mix(in srgb, currentColor 14%, transparent);
}

/* 表头带 tabindex，去掉浏览器默认焦点环 */
table.dataTable thead > tr > th:focus,
table.dataTable thead > tr > th:focus-visible,
table.dataTable tbody > tr > td:focus,
table.dataTable tbody > tr > td:focus-visible { outline: none; box-shadow: none; }

table.dataTable { border-collapse: collapse; }
table.dataTable > tbody > tr > td,
table.dataTable > thead > tr > th { border-left: 0; border-right: 0; }

.dt-container .table--compact > tbody > tr > td { padding-top: 8px; padding-bottom: 8px; }

/* fetch 提交中的表单 */
form[aria-busy="true"] { opacity: .72; pointer-events: none; transition: opacity .15s; }

/* ─────────────── §17 排版（参考 Ant Typography） ─────────────── */

/* 标题阶梯 38 / 30 / 24 / 20 / 16，行高按 Ant 的比例收紧；正文 14、行高 1.5714。
   页面级标题仍走 .page-head（18px），这套给正文里成段的内容与看板数字用。 */
.typo-h1, .typo-h2, .typo-h3, .typo-h4, .typo-h5 {
    margin: 0;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0;
}
.typo-h1 { font-size: 38px; line-height: 1.21; }
.typo-h2 { font-size: 30px; line-height: 1.27; }
.typo-h3 { font-size: 24px; line-height: 1.33; }
.typo-h4 { font-size: 20px; line-height: 1.4; }
.typo-h5 { font-size: 16px; line-height: 1.5; }

/* 正文四级色：主 / 次 / 描述 / 禁用（对应 Ant 的 .88 / .65 / .45 / .25） */
.typo-body { font-size: 14px; line-height: 1.5714; color: var(--ink); }
.typo-secondary { color: var(--ink-soft); }
.typo-tertiary { color: var(--muted); }
.typo-quaternary { color: var(--weak); }

.typo-sm { font-size: 12px; }
.typo-lg { font-size: 16px; }
.typo-strong { font-weight: 600; }
.typo-success { color: var(--ok); }
.typo-warning { color: var(--warn); }
.typo-danger { color: var(--danger); }

/* 行内标记：只压一层淡底，不抢正文 */
.typo-mark { padding: 0 2px; background: color-mix(in srgb, var(--warn) 16%, transparent); color: inherit; }
.typo-del { color: var(--weak); text-decoration: line-through; }
.typo-u {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    cursor: pointer;
}
.typo-u:hover { color: var(--brand); }

.typo-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.typo-para { margin: 0 0 8px; font-size: 14px; line-height: 1.5714; color: var(--ink-soft); }
.typo-para:last-child { margin-bottom: 0; }

/* 作用域版本：容器里直接用 h1~h5 / p / ul，不必逐个加类 */
.typo { font-size: 14px; line-height: 1.5714; color: var(--ink-soft); }
.typo h1, .typo h2, .typo h3, .typo h4, .typo h5 {
    margin: 0 0 8px;
    font-weight: 600;
    color: var(--ink);
}
.typo h1 { font-size: 38px; line-height: 1.21; }
.typo h2 { font-size: 30px; line-height: 1.27; }
.typo h3 { font-size: 24px; line-height: 1.33; }
.typo h4 { font-size: 20px; line-height: 1.4; }
.typo h5 { font-size: 16px; line-height: 1.5; }
.typo p { margin: 0 0 8px; }
.typo ul, .typo ol { margin: 0 0 8px; padding-left: 20px; }
.typo li { margin-bottom: 4px; }

/* ─────────────── §18 间距、分隔与弹性布局 ─────────────── */

/* 间距刻度取 4 的倍数：4 / 8 / 12 / 16 / 24。
   同一组元素只用 space 的 gap，不要再叠 margin。 */
.space { display: flex; align-items: center; gap: 8px; }
.space--v { flex-direction: column; align-items: stretch; }
.space--sm { gap: 4px; }
.space--lg { gap: 16px; }
.space--xl { gap: 24px; }
.space--start { align-items: flex-start; }
.space--between { justify-content: space-between; }
.space--wrap { flex-wrap: wrap; }

/* 分割线：默认 1px 浅线；带文字时用两侧伪元素画线，文字居中 */
.divider {
    margin: 16px 0;
    border: 0;
    border-top: 1px solid var(--line);
}
.divider--dashed { border-top-style: dashed; }

.divider--text {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 0;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}
.divider--text::before,
.divider--text::after {
    content: "";
    flex: 1 1 auto;
    border-top: 1px solid var(--line);
}
.divider--text.divider--dashed::before,
.divider--text.divider--dashed::after { border-top-style: dashed; }

/* 垂直分割线：行内用，高度跟着字号走 */
.divider--v {
    display: inline-block;
    width: 1px;
    height: 1em;
    margin: 0 8px;
    border-top: 0;
    border-left: 1px solid var(--line);
    vertical-align: -.125em;
}

/* 弹性布局：Ant Flex 的常用组合 */
.flex { display: flex; }
.flex--center { align-items: center; }
.flex--start { align-items: flex-start; }
.flex--between { align-items: center; justify-content: space-between; }
.flex--end { align-items: center; justify-content: flex-end; }
.flex--col { flex-direction: column; align-items: stretch; }
/* 竖排同时要水平居中时，显式写上（否则被上面的 stretch 盖掉） */
.flex--col.flex--center { align-items: center; }
.flex--wrap { flex-wrap: wrap; }
.flex--1 { flex: 1 1 auto; min-width: 0; }

/* ─────────────── §19 描述列表 / 时间轴 / 步骤条 ─────────────── */

/* 描述列表（Ant Descriptions）：label 灰色在左，值在右；宽屏多列 */
.desc {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 24px;
    margin: 0;
}
.desc__item { display: flex; gap: 8px; min-width: 0; }
.desc__item--wide { grid-column: 1 / -1; }
.desc__label {
    flex: 0 0 auto;
    min-width: 72px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5714;
}
.desc__value p { margin: 0; }

.desc__value {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.5714;
    word-break: break-word;
}
.desc--1 { grid-template-columns: minmax(0, 1fr); }
.desc--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.desc--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 带边框版：外框只画上、左，内部每格画右、下，网格自然闭合 */
.desc--bordered {
    gap: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
}
.desc--bordered .desc__item {
    gap: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.desc--bordered .desc__label { padding: 10px 14px; background: var(--fill-alter); }
.desc--bordered .desc__value { padding: 10px 14px; }

/* 时间轴：竖线 + 圆点，最新一条放最前 */
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline__item {
    position: relative;
    padding: 0 0 18px 20px;
    border-left: 1px solid var(--line);
}
.timeline__item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline__dot {
    position: absolute;
    left: -4px;
    top: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border);
}
.timeline__item--ok .timeline__dot { background: var(--ok); }
.timeline__item--warn .timeline__dot { background: var(--warn); }
.timeline__item--danger .timeline__dot { background: var(--danger); }
.timeline__item--brand .timeline__dot { background: var(--brand); }
.timeline__time {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.timeline__body { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }

/* 步骤条：编号圆点 + 连接线，横向默认，窄屏自动转竖排 */
.steps {
    display: flex;
    align-items: flex-start;
    margin: 0;
    padding: 0;
    list-style: none;
}
.step { position: relative; flex: 1 1 0; min-width: 0; padding-right: 12px; }
.step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--panel);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.step__title {
    display: block;
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 500;
}
.step__desc { margin-top: 2px; color: var(--weak); font-size: 12px; }
.step::after {
    content: "";
    position: absolute;
    left: 32px;
    right: 12px;
    top: 12px;
    height: 1px;
    background: var(--line);
}
.step:last-child::after { display: none; }
.step.is-done .step__num { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-ink); }
.step.is-done::after { background: var(--brand-line); }
.step.is-on .step__num { border-color: var(--brand); background: var(--brand); color: #fff; }
.step.is-on .step__title { color: var(--ink); }

/* 竖排：编号绝对定位到左侧，间距放在 step 内部，连线才能一直接到下一个编号 */
.steps--v { flex-direction: column; gap: 0; }
.steps--v .step { flex: none; padding: 0 0 20px 36px; }
.steps--v .step:last-child { padding-bottom: 0; }
.steps--v .step__num { position: absolute; left: 0; top: 0; }
.steps--v .step__title { margin-top: 2px; }
.steps--v .step::after {
    left: 12px;
    right: auto;
    top: 28px;
    bottom: 0;
    width: 1px;
    height: auto;
}
.steps--v .step:last-child::after { display: none; }

@media (max-width: 720px) {
    .desc, .desc--3, .desc--4 { grid-template-columns: minmax(0, 1fr); }
    .steps { flex-direction: column; gap: 0; }
    .steps .step { padding: 0 0 20px 36px; }
    .steps .step:last-child { padding-bottom: 0; }
    .steps .step__num { position: absolute; left: 0; top: 0; }
    .steps .step__title { margin-top: 2px; }
    .steps .step::after {
        left: 12px;
        right: auto;
        top: 28px;
        bottom: 0;
        width: 1px;
        height: auto;
    }
    .steps .step:last-child::after { display: none; }
}

/* ─────────────── §20 进度条 / 骨架屏 / 结果页 ─────────────── */

/* 进度条：默认细线，右侧带百分比；--sm 更细，用在表格单元格里 */
.meter { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.meter__bar {
    flex: 1 1 auto;
    height: 6px;
    border-radius: 999px;
    background: var(--fill-3);
    overflow: hidden;
}
.meter__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--brand);
    transition: width .3s var(--ease);
}
.meter__num {
    flex: 0 0 auto;
    min-width: 34px;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.meter--ok .meter__fill { background: var(--ok); }
.meter--warn .meter__fill { background: var(--warn); }
.meter--danger .meter__fill { background: var(--danger); }
.meter--sm .meter__bar { height: 4px; }
.meter--sm .meter__num { font-size: 11px; }

/* 宽度档位：只给静态示意（组件页、说明页）用。
   真实数据的宽度是动态值，在页面里直接写 width，不要凑类。 */
.meter--p25 .meter__fill { width: 25%; }
.meter--p50 .meter__fill { width: 50%; }
.meter--p75 .meter__fill { width: 75%; }
.meter--p100 .meter__fill { width: 100%; }

/* 骨架屏：只用于首屏等待，内容到了整块换掉，不要留着做装饰 */
.skeleton { display: flex; flex-direction: column; gap: 10px; }
.skeleton__line,
.skeleton__title,
.skeleton__avatar {
    background: linear-gradient(90deg, var(--fill-2) 25%, var(--fill-alter) 37%, var(--fill-2) 63%);
    background-size: 400% 100%;
    animation: skeleton-load 1.4s ease infinite;
}
.skeleton__line { height: 14px; border-radius: var(--r-sm); }
.skeleton__line:last-child { width: 62%; }
.skeleton__title { width: 38%; height: 20px; border-radius: var(--r-sm); }
.skeleton__avatar { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; }
.skeleton--row { flex-direction: row; align-items: center; gap: 12px; }

@keyframes skeleton-load {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton__line,
    .skeleton__title,
    .skeleton__avatar { animation: none; }
}

/* 结果页：成功 / 警告 / 失败 / 无权限。图标用文字符号，不引图标字体 */
.result { padding: 28px 24px; text-align: center; }
.result__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}
.result__icon--ok { background: var(--ok-soft); color: var(--ok); }
.result__icon--warn { background: var(--warn-soft); color: var(--warn); }
.result__icon--error { background: var(--danger-soft); color: var(--danger); }
.result__icon--info { background: var(--brand-soft); color: var(--brand-ink); }
.result__title { margin: 14px 0 0; color: var(--ink); font-size: 20px; font-weight: 600; line-height: 1.4; }
.result__desc { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.result__actions { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }

/* ─────────────── §21 折叠面板 / 气泡提示 / 面包屑 / 头像 ─────────────── */

/* 折叠面板：用 details/summary 即可，不需要脚本；summary 直接套 .collapse__head */
.collapse {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
}
.collapse__item + .collapse__item { border-top: 1px solid var(--line); }
.collapse__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    background: var(--fill-alter);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    list-style: none;
}
.collapse__head::-webkit-details-marker { display: none; }
.collapse__head:hover { background: var(--hover); }
.collapse__head::after {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin-right: 2px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: rotate(45deg) translateY(-1px);
    transition: transform .2s var(--ease);
}
details[open] > .collapse__head::after { transform: rotate(-135deg) translateY(-1px); }
.collapse__body { padding: 14px 16px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }

/* 气泡提示：纯 CSS，悬停或键盘聚焦才显示 */
.tip { position: relative; display: inline-flex; align-items: center; }
.tip__content {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 30;
    transform: translateX(-50%);
    padding: 6px 10px;
    border-radius: var(--r-md);
    background: rgba(0, 0, 0, .85);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s var(--ease);
}
.tip:hover .tip__content,
.tip:focus-within .tip__content { opacity: 1; visibility: visible; }
.tip--bottom .tip__content { top: calc(100% + 8px); bottom: auto; }
.tip--start .tip__content { left: 0; transform: none; }
.tip__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--muted);
    font-size: 10px;
    line-height: 1;
    cursor: help;
}
.tip__mark:hover { border-color: var(--brand); color: var(--brand); }

/* 面包屑补全：主体在 app.css（云盘目录在用），这里只补状态与分隔 */
.crumbs .is-on { color: var(--ink); }
.crumbs__sep { color: var(--disabled); }

/* 头像：基础尺寸在 chrome.css，这里补尺寸、方形、成组 */
.avatar--sm { width: 24px; height: 24px; font-size: 11px; }
.avatar--lg { width: 40px; height: 40px; font-size: 15px; }
.avatar--square { border-radius: var(--r-md); }
.avatar--plain { background: var(--fill-3); color: var(--ink-soft); }
.avatar-group { display: inline-flex; align-items: center; }
.avatar-group .avatar { border: 2px solid var(--panel); }
.avatar-group .avatar + .avatar { margin-left: -8px; }

/* ─────────────── §22 兼容别名与工具类 ─────────────── */

/* 旧页面的类名仍然要能用，别名在这里收口，页面不必改 */
.dim-text { font-size: 12px; color: var(--ink-soft); }


/* 列宽刻度：只写在 <th> / <td> 上，代替 style="width:NNpx"。
   表格列宽统一落在刻度上，DataTables 与固定布局才有一致的表现。 */

.w-36 { width: 36px; }
.w-60 { width: 60px; }
.w-66 { width: 66px; }
.w-68 { width: 68px; }
.w-70 { width: 70px; }
.w-74 { width: 74px; }
.w-76 { width: 76px; }
.w-78 { width: 78px; }
.w-80 { width: 80px; }
.w-88 { width: 88px; }
.w-92 { width: 92px; }
.w-96 { width: 96px; }
.w-100 { width: 100px; }
.w-104 { width: 104px; }
.w-110 { width: 110px; }
.w-112 { width: 112px; }
.w-120 { width: 120px; }
.w-132 { width: 132px; }
.w-140 { width: 140px; }
.w-150 { width: 150px; }
.w-168 { width: 168px; }
.w-190 { width: 190px; }
.w-220 { width: 220px; }

.mw-84 { min-width: 84px; }
.mw-88 { min-width: 88px; }
.mw-96 { min-width: 96px; }
.mw-104 { min-width: 104px; }
.mw-112 { min-width: 112px; }
.mw-124 { min-width: 124px; }
.mw-128 { min-width: 128px; }
.mw-150 { min-width: 150px; }
.mw-190 { min-width: 190px; }

/* 百分比列宽：机构树这类按比例分列的表格用 */
.wp-10 { width: 10%; }
.wp-12 { width: 12%; }

/* 工具类只留「排版语义」这几个，避免变成第二种内联样式 */
.u-hidden { display: none !important; }
.u-nowrap { white-space: nowrap; }
.u-right { text-align: right; }
.u-full { width: 100%; }
.u-flex { display: flex; align-items: center; }
.u-between { display: flex; align-items: center; justify-content: space-between; }
.u-wrap { flex-wrap: wrap; }
.u-gap-8 { gap: 8px; }
.u-gap-12 { gap: 12px; }
.u-grow { flex: 1 1 auto; min-width: 0; }
.u-mt-0 { margin-top: 0; }
.u-mb-0 { margin-bottom: 0; }
.u-mt-10 { margin-top: 10px; }
.u-mt-12 { margin-top: 12px; }
.u-mb-12 { margin-bottom: 12px; }

/* ---------------- 云盘文件选择器 ---------------- */
/* 课程管理挂附件、备课工作台补附件共用一套；类名沿用 cp-pick，
   改名前先确认两处脚本与页面都没有残留引用 */

.cp-pick {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--panel);
}

.cp-pick__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}

.cp-pick__bar .ctrl { width: 240px; }
.cp-pick__bar .muted { font-size: 12px; }

.cp-pick__body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
}

.cp-pick__side {
    flex: 0 0 232px;
    border-right: 1px solid var(--line);
    background: #fcfdfe;
    overflow: auto;
}

.cp-pick__tree { padding: 8px; }
.cp-pick__hint { margin: 0; padding: 14px 8px; color: var(--muted); font-size: 12.5px; }

.cp-pick__main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.cp-pick__crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.cp-pick__crumb {
    padding: 2px 5px;
    border: 0;
    border-radius: var(--r-sm);
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.cp-pick__crumb:hover { background: var(--brand-soft); color: var(--brand-ink); }
.cp-pick__crumb.is-current { color: var(--ink); }
.cp-pick__sep { color: var(--weak); }

.cp-pick__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 4px 8px 10px;
}

.cp-pick__row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: var(--r-sm);
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.cp-pick__row:hover { background: var(--hover); }

.cp-pick__row input[type="checkbox"] {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--brand);
    cursor: pointer;
}

.cp-pick__icon { display: inline-flex; color: var(--weak); }
.cp-pick__row.is-folder .cp-pick__icon { color: var(--brand); }

.cp-pick__name {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--ink-soft);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-pick__meta { flex: 0 0 auto; color: var(--weak); font-size: 11.5px; }

.cp-pick__foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
}

.cp-pick__sel { margin-right: auto; color: var(--muted); font-size: 12.5px; }
.cp-pick__sel b { color: var(--ink); }

.cp-pick__tree-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 层级缩进只由 .cp-pick__tree-kids 一层承担，避免与 ul 的 margin 叠加 */
.cp-pick__tree-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cp-pick__tree-item {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
}

.cp-pick__caret {
    flex: 0 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--weak);
    cursor: pointer;
    transition: transform .15s var(--ease);
}

.cp-pick__caret.is-open { transform: rotate(90deg); }
.cp-pick__caret--empty { visibility: hidden; cursor: default; }

.cp-pick__tree-row {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    padding: 5px 6px;
    border: 0;
    border-radius: var(--r-sm);
    background: none;
    color: var(--ink-soft);
    font: inherit;
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
}

.cp-pick__tree-row:hover { background: var(--brand-soft); color: var(--brand-ink); }
.cp-pick__tree-row.is-current { background: var(--brand-soft); color: var(--brand-ink); font-weight: 500; }

.cp-pick__tree-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-pick__tree-kids { margin-left: 12px; }

/* 窄屏：目录树让位给文件列表 */
@media (max-width: 860px) {
    .cp-pick__side { flex-basis: 150px; }
}
