/* ============================================================================
   卓禾教务 · 学员管理系统 · 视觉层
   设计语言：TDesign 冰川蓝灰（品牌蓝渐变 + 玻璃拟态 + 轻量柔影）
   ----------------------------------------------------------------------------
   分两层：
     1) 令牌层 —— 颜色 / 圆角 / 阴影 / 控件高度，换皮只改这一段
     2) 组件层 —— 只消费令牌，不写死色值
   ========================================================================== */

:root {
  /* ---- 品牌蓝 ---- */
  --brand: #0052d9;
  --brand-2: #006eff;
  --brand-grad: linear-gradient(90deg, var(--brand), var(--brand-2));
  --brand-grad-135: linear-gradient(135deg, var(--brand-2), var(--brand));
  --brand-l: #dce9fb;
  --brand-l2: #e9f1fc;
  --brand-ring: rgba(0, 110, 255, .14);

  /* ---- 页面与表面 ---- */
  --bg-grad: linear-gradient(160deg, #cfdef2 0%, #dbe6f4 35%, #e6eff9 70%, #d4e1f2 100%);
  --surface: #fdfeff;
  --surface-2: #eef4fb;
  --surface-3: #e8f0fa;
  --glass: rgba(238, 244, 252, .82);

  /* ---- 描边 ---- */
  --line: #ccd9ec;
  --line-soft: #e3ecf7;
  --line-row: #f2f6fc;
  --line-card: rgba(219, 231, 246, .95);

  /* ---- 文字三级 ---- */
  --txt: #1d2733;
  --txt-2: #4e5d78;
  --txt-3: #7e90ac;

  /* ---- 语义色 ---- */
  --ok: #00a870;
  --ok-l: #e2f7ef;
  --warn: #e37318;
  --warn-l: #fdf1e5;
  --danger: #d54941;
  --danger-l: #fdeceb;
  --info: #0594fa;
  --info-l: #e6f4fe;
  --purple: #6e4fd8;
  --purple-l: #f0eafc;

  /* ---- 形状 ---- */
  --r-sm: 6px;
  --r: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 14px;

  /* ---- 光影 ---- */
  --shadow: 0 1px 2px rgba(29, 52, 96, .04), 0 4px 16px rgba(29, 52, 96, .06);
  --shadow-hover: 0 4px 8px rgba(0, 82, 217, .06), 0 12px 28px rgba(0, 82, 217, .12);
  --shadow-pop: 0 12px 32px rgba(20, 40, 80, .16);
  --shadow-modal: 0 24px 64px rgba(20, 40, 80, .28);

  /* ---- 控件 ---- */
  --h-ctl: 34px;

  /* ---- 旧变量名兜底（模板内联 / 历史写法仍然可用） ---- */
  --bg: #dbe6f4;
  --border: var(--line);
  --text: var(--txt);
  --muted: var(--txt-3);
  --primary: var(--brand);
  --primary-soft: var(--brand-l2);
  --ok-soft: var(--ok-l);
  --warn-soft: var(--warn-l);
  --danger-soft: var(--danger-l);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--txt);
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-2); text-decoration: none; }

h1, h2, h3 { margin: 0; }
p { margin: 0 0 0; }

/* 细滚动条：默认的粗灰条会把玻璃质感打回原形 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #c3d4ea;
  border: 3px solid transparent;
  border-radius: 6px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #a9c1de; background-clip: content-box; }

::selection { background: rgba(0, 110, 255, .18); }

/* ============================================================================
   布局：侧栏 + 顶栏 + 内容
   ========================================================================== */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 224px;
  flex: 0 0 224px;
  display: flex;
  flex-direction: column;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-right: 1px solid rgba(204, 217, 236, .7);
  box-shadow: 1px 0 0 rgba(255, 255, 255, .45);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  flex: 0 0 58px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--txt);
}
.brand-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  background: var(--brand-grad-135);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 4px 10px rgba(0, 82, 217, .3);
}
.brand-txt { min-width: 0; overflow: hidden; }
.brand-txt b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.brand small,
.brand-txt small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--txt-3);
  letter-spacing: .4px;
  line-height: 1.4;
}

.nav { padding: 10px 12px 16px; }

.nav-label {
  padding: 14px 12px 6px;
  font-size: 11.5px;
  color: var(--txt-3);
  letter-spacing: 1px;
  opacity: .85;
}
.nav-label:first-child { padding-top: 4px; }

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 3px;
  border-radius: var(--r-md);
  color: var(--txt-2);
  font-size: 13.5px;
  letter-spacing: .2px;
  position: relative;
  transition: all .18s ease;
}
.nav a svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .78;
  transition: opacity .18s;
}
.nav a:hover svg,
.nav a.active svg { opacity: 1; }
.nav a:hover {
  background: var(--brand-l2);
  color: var(--brand);
  transform: translateX(3px);
}
.nav a.active {
  background: var(--brand-grad);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 82, 217, .26);
  transform: none;
}
/* 左侧高亮条：只做个点缀，不抢渐变的戏 */
.nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  height: 56%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #fff;
  opacity: .9;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--txt-3);
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: .2px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--txt-3);
  flex: 0 0 7px;
}
.dot.green { background: var(--ok); box-shadow: 0 0 0 3px rgba(0, 168, 112, .14); }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 58px;
  flex: 0 0 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 50;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--txt-3);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crumb i { font-style: normal; color: #b9c6da; font-size: 12px; }
.crumb b { color: var(--txt); font-weight: 600; font-size: 14px; }
.crumb-sys { color: var(--txt-3); }

.main-body {
  flex: 1;
  padding: 22px 28px 64px;
  min-width: 0;
}

/* ============================================================================
   页面头部与排版
   ========================================================================== */

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
}
.page-head > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--txt);
  line-height: 1.4;
}
.sub {
  color: var(--txt-3);
  font-size: 12.5px;
  margin: 6px 0 18px;
  line-height: 1.7;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--txt);
}
.section-title .muted { font-weight: 400; font-size: 12px; }

.muted { color: var(--txt-3); }
.mono { font-family: Consolas, Menlo, monospace; font-size: 12.5px; }
.empty {
  color: var(--txt-3);
  padding: 34px 0;
  text-align: center;
  font-size: 13px;
}

/* ============================================================================
   卡片
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.form-section {
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.form-section.alert-warn { background: var(--warn-l); border-color: #f3d9a9; }

/* ============================================================================
   统计卡
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stats:has(> .stat:only-child) { grid-template-columns: minmax(0, 240px); }

.stat {
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: var(--r-lg);
  padding: 15px 18px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s, border-color .2s;
  /* 模板结构是 <b>数字</b><span>标签</span>，倒序让标签在上、数字在下的层级更稳 */
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
}
.stat:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: #cfe0f8;
}
.stat span { color: var(--txt-2); font-size: 12.5px; letter-spacing: .2px; }
.stat b {
  display: block;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  margin: 4px 0 0;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
  color: var(--txt);
}

/* ============================================================================
   表格
   ========================================================================== */

.table-wrap {
  /* 14 列最窄 1180px，横向滚动必须留在容器里，所以这里是 overflow: auto
     而不是 visible —— 见下方表头吸顶的说明。 */
  overflow: auto;
  /* 限高让长表格在容器内部滚动。不限高时容器高度等于内容高度，
     纵向滚动会落回页面（见下），吸顶就不成立。
     用 max() 而不是再写 min-height：数据只有几条时容器跟着内容收缩，
     不会被撑成一个 420px 的白框；数据多时又保证小屏也不少于 380px。 */
  max-height: max(380px, calc(100vh - 480px));
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: var(--surface);
}
.table-wrap table { min-width: 1180px; margin: 0; }
.table-wrap table.compact { min-width: 0; width: 100%; }

/* 表头吸顶。
   sticky 是相对「最近的可滚动祖先」定位的。.table-wrap 因为要给 14 列做
   横向滚动，已经带 overflow，本身就是那个祖先 —— 所以只写下面这段 th
   的 sticky 而容器不限高，等于让它相对一个不滚动的盒子吸附，页面一滚
   表头照样走（这是最容易踩空的一步）。
   480 = 1600x1000 视口实测：表格容器顶部距视口顶 360（顶栏 58 + 上内边距
   22 + 页面头部/筛选栏/选择条约 280）+ 分页条 60 + 余量 60。取这个值是为了
   让容器底部和分页条一起落在首屏内，页面不再出现第二条滚动条 —— 双滚动
   最难受的场景就是表格内滚到底了、分页条还在屏幕外。
   1366x768 按 480 算只剩 288px，所以外面套了 max(380px, ...) 兜底：宁可
   有一点整页滚动，也不把表格压到只剩 6 行。 */
.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  /* border-collapse: collapse 时 sticky 单元格的边框属于 table，
     滚动过程中下行会从缝隙里透出来。改用 inset 阴影画分隔线。 */
  box-shadow: inset 0 -1px 0 var(--line);
}
/* 末列既吸右又吸顶，层级要压过其它表头，否则横向滚动时被别的 th 盖住 */
.table-wrap thead th:last-child { z-index: 3; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }

th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--txt-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  letter-spacing: .3px;
}
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-row);
  vertical-align: top;
  color: var(--txt);
}
tbody tr { transition: background .14s; }
tbody tr:hover td { background: #eaf2fc; }
tbody tr:last-child td { border-bottom: 0; }
td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
th.right, td.right { text-align: right; }
td.num.right { font-variant-numeric: tabular-nums; }

/* 卡片里的表格不再套一层边框，避免双重描边 */
.card > .table-wrap,
.card .table-wrap { border: 0; }

/* 列多时表格必然横向溢出，把「操作」列钉在右边，
   不让编辑/删除按钮滚出视野。不溢出时等同于普通单元格。 */
.table-wrap th:last-child,
.table-wrap td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  /* 114 = 「编辑 删除」实测 86 + 左右内边距 24 + 2px 余量。
     少 2px 就会换行，两行高矮不齐比窄一点更难看。 */
  min-width: 114px;
  background: var(--surface);
  border-left: 1px solid var(--line-soft);
}
.table-wrap th:last-child { background: var(--surface-2); }
.table-wrap tbody tr:hover td:last-child { background: #eaf2fc; }

/* 勾选列：只放一个方框，宽度压到最小，别跟日期列抢空间。
   选择器带上 .table-wrap 是为了盖过 `.table-wrap td` 的 12px 内边距。 */
.table-wrap th.col-check,
.table-wrap td.col-check {
  width: 38px;
  min-width: 38px;
  padding-left: 12px;
  padding-right: 0;
  text-align: center;
}
.table-wrap th.col-check input,
.table-wrap td.col-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
  vertical-align: middle;
  accent-color: var(--brand);
}

/* 勾中的行。hover 本身是淡蓝 #eaf2fc，选中态要更深一档才分得清
   「鼠标停在这」和「我勾了这条」。 */
.table-wrap tbody tr.is-selected td,
.table-wrap tbody tr.is-selected:hover td { background: var(--brand-l); }
/* 末列 sticky 自带背景，不一起改就会出现「选中行右边缺一块」 */
.table-wrap tbody tr.is-selected td:last-child,
.table-wrap tbody tr.is-selected:hover td:last-child { background: var(--brand-l); }

/* 「报考证书类别」是全表最长的文本（三级拼接，40+ 汉字很常见），
   一列能吃掉 300px。限宽 + 省略号把它压到 180，
   完整值挂在 title 上，鼠标停一下就看见。
   180 这个数不是拍的：14 列在 1600px 视口下总宽要 ≤ 容器宽 + 「来源」列宽，
   否则 sticky 的操作列会把「来源」整列盖掉，看上去像表格少了那一列。 */
.table-wrap td.cert-col {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================================
   状态标签：淡底胶囊 + 前置圆点
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 11px;
  font-size: 12px;
  line-height: 18px;
  border: 0;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .9;
}
.badge.pending { background: var(--brand-l); color: var(--brand); }
.badge.staged { background: var(--warn-l); color: var(--warn); }
.badge.sent { background: var(--ok-l); color: var(--ok); }
.badge.failed { background: var(--danger-l); color: var(--danger); }
.badge.skipped,
.badge.dup { background: #eef2f8; color: var(--txt-2); }
.badge.new { background: var(--ok-l); color: var(--ok); }

/* ============================================================================
   按钮
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--h-ctl);
  padding: 0 16px;
  border-radius: var(--r);
  border: 1px solid #d3e0f2;
  background: #fff;
  color: var(--txt-2);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
  user-select: none;
}
.btn:hover {
  border-color: var(--brand-2);
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(0, 110, 255, .12);
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: var(--brand-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 10px rgba(0, 82, 217, .26);
}
.btn.primary:hover {
  background: linear-gradient(90deg, #0043b8, var(--brand));
  color: #fff;
  box-shadow: 0 5px 14px rgba(0, 82, 217, .34);
}

.btn.ghost {
  height: 28px;
  padding: 0 9px;
  border-color: transparent;
  background: transparent;
  color: var(--txt-2);
}
.btn.ghost:hover {
  background: rgba(255, 255, 255, .8);
  color: var(--brand);
  box-shadow: none;
}

.btn.danger { color: var(--danger); border-color: #f3cfcd; }
.btn.danger:hover {
  background: var(--danger-l);
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: 0 2px 8px rgba(213, 73, 65, .15);
}
.btn.danger.solid {
  background: var(--danger);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 10px rgba(213, 73, 65, .24);
}
.btn.danger.solid:hover { background: #bd3b34; color: #fff; }

.btn.sm { height: 28px; padding: 0 11px; font-size: 12px; border-radius: var(--r-sm); }

/* 行内文字按钮：表格里一屏十几行，每行都挂描边按钮会把表格切得七零八落。
   去掉边框和底色，靠彩色文字本身做点击入口——品牌蓝=可点，危险红=破坏性操作，
   颜色就是唯一的重音，剩下的留白还给数据本身。 */
.btn.text {
  height: 26px;
  padding: 0 7px;
  border-color: transparent;
  background: transparent;
  color: var(--brand);
  /* 跟表格正文同号（13px），靠颜色和字重做重音。
     字号反而缩到 12.5 会让「可点」比「数据」还轻，越改越不显眼。 */
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-sm);
}
.btn.text:hover {
  /* 用 --brand-l 而不是更淡的 --brand-l2：表格行本身 hover 就是 #eaf2fc，
     按钮底色跟它几乎同色的话，hover 反馈就看不见了。 */
  background: var(--brand-l);
  border-color: transparent;
  color: var(--brand);
  box-shadow: none;
  text-decoration: none;
}
.btn.text:focus-visible {
  outline: 2px solid var(--brand-ring);
  outline-offset: 1px;
}
.btn.text.danger {
  color: var(--danger);
  border-color: transparent;
}
.btn.text.danger:hover {
  background: var(--danger-l);
  border-color: transparent;
  color: var(--danger);
  box-shadow: none;
}

.btn[disabled],
.btn[disabled]:hover {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 文字按钮自带 7px 内边距，行间只留 2px 就够，否则两个操作离得太远。
   这里不能给负 margin 去凑视觉对齐：操作列是 sticky 列、左边有分隔线，
   负边距会把按钮压到线上，看着像溢出了。 */
.row-actions { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.row-actions form { display: inline; margin: 0; }
form.inline,
.inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }

/* ============================================================================
   表单控件
   ========================================================================== */

.filters input,
.filters select,
.form-row input[type=text],
.form-row input[type=number],
.form-row input[type=date],
.form-row input[type=password],
.form-row select,
.form-row textarea,
.upload-form input[type=file],
.opt-add input,
.opt-toolbar input[type=search],
input[type=search],
input[type=text],
input[type=date],
input[type=password],
input[type=number],
select {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-3);
  color: var(--txt);
  font-family: inherit;
  font-size: 13px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.filters input,
.filters select,
.form-row input[type=text],
.form-row input[type=number],
.form-row input[type=date],
.form-row input[type=password],
.form-row select,
.opt-add input,
.opt-toolbar input[type=search],
input[type=search],
input[type=text],
input[type=date],
input[type=password],
input[type=number],
select {
  height: var(--h-ctl);
  padding: 0 11px;
}

.form-row textarea {
  padding: 9px 11px;
  line-height: 1.6;
  resize: vertical;
  min-height: 72px;
}

.filters input:focus,
.filters select:focus,
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
.opt-add input:focus,
.opt-toolbar input:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--brand-2);
  background: #fff;
  box-shadow: 0 0 0 3px var(--brand-ring);
}

input::placeholder,
textarea::placeholder { color: #9dabc1; }

.form-row { margin-bottom: 15px; }
.form-row label {
  display: block;
  font-size: 12.5px;
  color: var(--txt-2);
  margin-bottom: 6px;
  letter-spacing: .2px;
}
.form-row input[type=text],
.form-row input[type=number],
.form-row input[type=date],
.form-row select,
.form-row textarea { width: 100%; max-width: 560px; }
.form-row .help { color: var(--txt-3); font-size: 12px; margin-top: 4px; }
.form-row .error { color: var(--danger); font-size: 12px; margin-top: 4px; }
.form-row.checkbox { display: flex; align-items: center; gap: 8px; }
.form-row.checkbox label { margin: 0; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 20px;
}
.form-grid .form-row input,
.form-grid .form-row select { max-width: none; }

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 4px 0 48px;
  flex-wrap: wrap;
}

.check-inline {
  font-size: 13px;
  color: var(--txt);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
input[type=checkbox],
input[type=radio] { accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }

/* ============================================================================
   筛选条：浮起来的一块浅面板
   ========================================================================== */

.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, .66);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-card);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.filters label { color: var(--txt-3); font-size: 12.5px; letter-spacing: .2px; }

/* 勾选状态条。常驻显示，不是选中才出现 —— 翻页后如果没有「已选 N 条」，
   用户会以为之前勾的都丢了，然后重新勾一遍，导出里就出现重复记录。 */
.select-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 9px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  color: var(--txt-3);
  font-size: 13px;
  transition: background .16s, color .16s, border-color .16s;
}
.select-bar.has-selection {
  border-color: transparent;
  background: var(--brand-l2);
  color: var(--brand);
}
.filters input, .filters select { background: #fff; }
.filters input[type=date] { min-width: 150px; }
.filters select { min-width: 104px; }
.filters .muted { font-size: 12.5px; }

/* ============================================================================
   消息提示
   ========================================================================== */

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li {
  padding: 10px 14px 10px 15px;
  border-radius: var(--r-md);
  margin-bottom: 8px;
  font-size: 13px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--txt-3);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(29, 52, 96, .04);
}
.messages li.success { background: var(--ok-l); border-color: #c6ece0; border-left-color: var(--ok); color: #087a51; }
.messages li.info { background: var(--brand-l2); border-color: #cfe0f8; border-left-color: var(--brand); color: var(--brand); }
.messages li.warning { background: var(--warn-l); border-color: #f3d9a9; border-left-color: var(--warn); color: #b55a0f; }
.messages li.error { background: var(--danger-l); border-color: #f6cfcd; border-left-color: var(--danger); color: #a83a33; }

.alert-warn {
  background: var(--warn-l);
  border-color: #f3d9a9;
}
.alert-warn > b { color: var(--warn); }
.alert-warn table { margin-top: 10px; background: #fff; border-radius: var(--r); overflow: hidden; }

.content-preview {
  max-width: 420px;
  color: var(--txt-3);
  font-size: 12.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================================
   弹窗
   ========================================================================== */

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px 60px;
  overflow-y: auto;
}
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 40, 80, .35);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--r-xl);
  width: min(800px, 100%);
  padding: 22px 26px 0;
  box-shadow: var(--shadow-modal);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: modal-in .2s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(-8px) scale(.99); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h2 { font-size: 16px; font-weight: 600; letter-spacing: .2px; }
.modal-panel.narrow { width: min(470px, 100%); }

.modal-close {
  border: 0;
  background: transparent;
  color: var(--txt-3);
  font-size: 21px;
  line-height: 1;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all .15s;
}
.modal-close:hover { background: var(--surface-3); color: var(--txt); }

.modal .form-section {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0 0 4px;
  margin-bottom: 18px;
  box-shadow: none;
}
.modal .form-section.alert-warn {
  background: var(--warn-l);
  border: 1px solid #f3d9a9;
  border-radius: var(--r);
  padding: 12px 14px;
}

.modal-foot {
  display: flex;
  gap: 10px;
  align-items: center;
  position: sticky;
  bottom: 0;
  background: var(--surface);
  padding: 13px 0 15px;
  border-top: 1px solid var(--line-soft);
  margin-top: 6px;
}

.confirm-table { margin-bottom: 16px; }
.confirm-table th {
  width: 96px;
  background: transparent;
  font-weight: 400;
  color: var(--txt-3);
  vertical-align: middle;
  font-size: 13px;
  letter-spacing: 0;
}
.confirm-table td { vertical-align: middle; }
.confirm-table tr:last-child th,
.confirm-table tr:last-child td { border-bottom: 0; }

/* ============================================================================
   只读详情
   ========================================================================== */

.detail-table th {
  width: 140px;
  background: transparent;
  font-weight: 400;
  color: var(--txt-3);
  vertical-align: top;
  font-size: 13px;
  letter-spacing: 0;
}
.detail-table td {
  word-break: break-word;
  white-space: pre-wrap;
  color: var(--txt);
}
.detail-table tr:last-child th,
.detail-table tr:last-child td { border-bottom: 0; }

.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.readonly-value {
  min-height: 24px;
  padding: 1px 0 6px;
  word-break: break-word;
}
.readonly-block { max-width: 720px; }

/* ============================================================================
   分页
   ========================================================================== */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--txt-3);
}
.pager-btns { display: flex; align-items: center; gap: 6px; }
.pager-current {
  min-width: 32px;
  text-align: center;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  background: var(--brand-grad);
  color: #fff;
  font-weight: 600;
  font-size: 12.5px;
  box-shadow: 0 2px 8px rgba(0, 82, 217, .22);
}

/* ============================================================================
   批量导入
   ========================================================================== */

.upload-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.upload-form input[type=file] {
  padding: 6px 10px;
  height: auto;
  background: #fff;
  font-size: 13px;
  color: var(--txt-2);
  cursor: pointer;
}
/* 原生「选择文件」按钮是浏览器默认的灰方块，单独调一下 */
input[type=file]::file-selector-button {
  height: 24px;
  margin-right: 10px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--txt-2);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
input[type=file]::file-selector-button:hover {
  border-color: var(--brand-2);
  color: var(--brand);
}
.preview-table { min-width: 980px; }
tr.row-bad td { background: #fffafa; }
.err-text { color: var(--danger); font-size: 12px; margin-top: 4px; }

/* ============================================================================
   可搜索下拉 combobox
   ========================================================================== */

.cb-wrap { position: relative; display: inline-block; vertical-align: middle; }
.form-row .cb-wrap { display: block; width: 100%; }
.filters .cb-wrap { margin: 0 6px 0 0; min-width: 140px; max-width: 200px; }

.cb-native { /* 隐藏但保留可提交，不依赖它交互 */ }

.cb-control {
  display: block;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  height: var(--h-ctl);
  transition: border-color .15s, box-shadow .15s;
}
.cb-control:focus-within {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.cb-input {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 28px 0 11px;
  font: inherit;
  font-size: 13px;
  color: var(--txt);
  border-radius: var(--r);
}
.cb-input:focus { box-shadow: none; background: transparent; }

.cb-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--txt-3);
  font-size: 16px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 5px;
  user-select: none;
  transition: all .15s;
}
.cb-clear:hover { color: var(--txt); background: var(--surface-2); }

.cb-drop {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  max-height: 264px;
  overflow: auto;
  text-align: left;
  padding: 4px;
}
.cb-group {
  padding: 7px 10px 5px;
  font-size: 11.5px;
  color: var(--txt-3);
  letter-spacing: .5px;
}
.cb-item {
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: var(--r-sm);
  transition: background .12s, color .12s;
}
.cb-item:hover,
.cb-item.cb-active { background: var(--brand-l2); color: var(--brand); }
.cb-item.cb-selected { font-weight: 600; color: var(--brand); }
.cb-empty { padding: 14px 10px; color: var(--txt-3); font-size: 13px; text-align: center; }

/* ============================================================================
   顶栏用户区
   ========================================================================== */

.userbar {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin: 0;
  font-size: 13px;
  flex: 0 0 auto;
}
.userbar .who {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  margin-right: 6px;
  text-align: right;
}
.userbar .who b { font-size: 13px; font-weight: 600; color: var(--txt); }
.userbar .who span { font-size: 11px; color: var(--txt-3); }

.avatar-sm {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: var(--brand-grad-135);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 82, 217, .28);
  user-select: none;
}
.userbar .inline-form { margin: 0; }

/* ============================================================================
   学员材料附件
   ========================================================================== */

.attach-hint {
  margin: -6px 0 14px;
  font-size: 12.5px;
  color: var(--txt-3);
  line-height: 1.7;
}

/* 单个槽位的业务提示（如付款截图可分开传定金/尾款），只在可写形态出现 */
.attach-slot-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--txt-3);
  line-height: 1.6;
}

.attach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.attach-slot {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 13px;
  background: #fbfdff;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.attach-slot:hover { border-color: #cfe0f8; box-shadow: 0 2px 10px rgba(0, 82, 217, .06); }

.attach-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--txt);
}
.attach-tag {
  font-size: 11px;
  font-weight: 400;
  color: var(--txt-3);
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
  border-radius: 10px;
  padding: 0 7px;
  line-height: 17px;
}
.attach-tag.is-empty {
  color: var(--warn);
  border-color: #f3d9a9;
  background: var(--warn-l);
}

.attach-items { display: flex; flex-direction: column; gap: 8px; }

/* 空格位原来是一块空白的浅蓝底，看着像没加载完。
   改成虚线框 + 一行提示，明确「这一类还没传」。
   注意不能用 :empty —— 模板里的空 div 带着换行空白文本节点，:empty 不匹配。 */
.attach-items:not(:has(.attach-item)) {
  display: block;
  padding: 14px 0;
  text-align: center;
  border: 1px dashed #d5e2f3;
  border-radius: var(--r-sm);
  color: #a7b6c9;
  font-size: 12px;
}
.attach-items:not(:has(.attach-item))::after { content: "暂无材料"; }

/* 可编辑态：格子里本来就有「上传」按钮，占位只留一行淡字，
   否则虚线大框会把按钮顶到下面，看着像两个不相干的东西。 */
.attach-slot:has(.attach-actions) .attach-items:not(:has(.attach-item)) {
  border: 0;
  padding: 2px 0 4px;
  text-align: left;
  color: #b6c3d6;
}

.attach-slot:not(:has(.attach-actions)):has(.attach-items:not(:has(.attach-item))) {
  border-style: dashed;
  border-color: #dbe6f5;
}

.attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 8px;
  transition: box-shadow .15s, border-color .15s;
}
.attach-item:hover { border-color: #cfe0f8; box-shadow: 0 2px 8px rgba(0, 82, 217, .06); }

.attach-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--danger);
  border: 1px solid var(--line-soft);
}
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-thumb.is-pdf { background: var(--danger-l); border-color: #f6cfcd; letter-spacing: .5px; }

.attach-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  line-height: 1.5;
  color: var(--txt-3);
}
.attach-name {
  font-size: 13px;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.attach-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.attach-pick { cursor: pointer; position: relative; }
.attach-pick.is-busy { opacity: .55; pointer-events: none; }
.attach-pick-text { font-size: 12px; }

.attach-note {
  flex: 1 1 120px;
  min-width: 0;
  max-width: none;
  font-size: 12px;
  height: 30px;
  padding: 0 9px;
}

.attach-status { font-size: 12px; }
.attach-status.ok { color: var(--ok); }
.attach-status.error { color: var(--danger); }
.attach-status.busy { color: var(--txt-3); }

/* ---- 拖拽上传 ----
   进入格子时整格高亮并盖一层提示。类别归属靠「拖到哪一格」表达，
   所以静态页面上不多写说明文字 —— 只有拖着文件时才出现。
   遮罩 pointer-events: none，drop 的 target 仍然是格子里的元素。 */
.attach-slot.is-drop {
  border-color: var(--brand-2);
  background: var(--brand-l2);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.attach-drop-mask {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px;
  text-align: center;
  border: 2px dashed var(--brand-2);
  border-radius: var(--r-md);
  /* 实色，不是半透明：底下本来就排着缩略图、说明输入框和按钮，
     透出来就是一片叠影，反而看不清「松开落到哪一类」。 */
  background: #eaf3ff;
  color: var(--brand);
  font-size: 13px;
  pointer-events: none;
}
.attach-slot.is-drop .attach-drop-mask { display: flex; }
.attach-drop-title { font-weight: 600; font-size: 13px; }
.attach-drop-sub { font-size: 12px; color: var(--txt-3); }

/* ============================================================================
   选项维护：分段标签 + 树
   ========================================================================== */

.opt-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-card);
  border-radius: var(--r-md);
  margin-bottom: 18px;
  flex-wrap: wrap;
  box-shadow: 0 1px 2px rgba(29, 52, 96, .04);
}

.opt-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--r);
  color: var(--txt-2);
  font-size: 13.5px;
  transition: all .16s;
}
.opt-tab:hover { background: var(--brand-l2); color: var(--brand); text-decoration: none; }
.opt-tab.is-on {
  background: var(--brand-grad);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 3px 8px rgba(0, 82, 217, .24);
}
.opt-tab.is-on:hover { color: #fff; }

.opt-count {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--txt-3);
  background: var(--surface-2);
  border-radius: 10px;
  padding: 0 7px;
  line-height: 17px;
}
.opt-tab.is-on .opt-count { background: rgba(255, 255, 255, .24); color: #fff; }

.opt-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
@media (max-width: 1100px) { .opt-cols { grid-template-columns: 1fr; } }

.opt-col { margin: 0; }

.opt-add { display: flex; gap: 8px; margin-bottom: 14px; }
.opt-add input { min-width: 0; flex: 1; }

.opt-list { list-style: none; margin: 0; padding: 0; }

.opt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  border-top: 1px solid var(--line-row);
  transition: background .12s;
}
.opt-row:first-child { border-top: 0; }
.opt-row:hover { background: #f7fbff; }
.opt-row.is-off .opt-name { color: var(--txt-3); text-decoration: line-through; }
.opt-name { flex: 1; min-width: 0; word-break: break-all; font-size: 13px; }

.opt-acts {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity .14s;
}
.opt-row:hover .opt-acts,
.opt-node:hover .opt-acts,
.opt-acts:focus-within { opacity: 1; }

.opt-link {
  background: none;
  border: 0;
  padding: 3px 7px;
  font-size: 12px;
  color: var(--txt-3);
  cursor: pointer;
  border-radius: var(--r-sm);
  font-family: inherit;
  transition: all .14s;
}
.opt-link:hover { background: var(--brand-l2); color: var(--brand); }
.opt-link.danger:hover { background: var(--danger-l); color: var(--danger); }

.opt-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.opt-toolbar input[type="search"] { flex: 1; min-width: 220px; }
.opt-add-top { margin: 0; flex: 0 0 auto; }
.opt-add-top input { width: 180px; flex: 0 0 auto; }
.opt-summary { font-size: 12.5px; white-space: nowrap; }
.opt-levels { margin: 0 0 12px; font-size: 12.5px; }

.opt-notice {
  margin: 0 0 14px;
  padding: 10px 13px;
  font-size: 12.5px;
  color: #b55a0f;
  background: var(--warn-l);
  border: 1px solid #f3d9a9;
  border-radius: var(--r);
}

.opt-branch.is-hidden { display: none; }
.opt-children { display: none; }
.opt-branch.is-open > .opt-children { display: block; }

/* 子级靠一条虚线引导线 + 缩进表达层级。
   原来子节点和父节点左对齐，展开后根本分不清谁在哪一级。 */
.opt-branch.is-open > .opt-children {
  margin-left: 15px;
  padding-left: 11px;
  border-left: 1px dashed #d7e3f4;
}
.opt-children .opt-name { font-size: 13px; }
.opt-children > .opt-branch > .opt-node { padding-top: 6px; padding-bottom: 6px; }

/* 证书树有近千个节点，全展开能拉到几千像素。
   给树一个自己的滚动区：工具栏、层级说明、搜索框始终留在视野里。 */
#opt-tree {
  max-height: min(62vh, 720px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  margin-right: -4px;
}

.opt-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-top: 1px solid var(--line-row);
  border-radius: var(--r-sm);
  transition: background .12s;
}
.opt-branch:first-child > .opt-node { border-top: 0; }
.opt-node:hover { background: #eaf2fc; }
.opt-node.is-off .opt-name { color: var(--txt-3); text-decoration: line-through; }

.opt-caret {
  flex: 0 0 16px;
  width: 16px;
  height: 18px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--txt-3);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  transition: color .14s;
}
.opt-caret:hover { color: var(--brand); }
.opt-caret.is-leaf { cursor: default; }

.opt-kids {
  font-size: 11.5px;
  color: var(--txt-3);
  background: var(--surface-2);
  border-radius: 10px;
  padding: 0 8px;
  line-height: 17px;
  white-space: nowrap;
}
.opt-used { font-size: 11.5px; color: var(--txt-3); white-space: nowrap; }
.opt-node .opt-acts { margin-left: auto; }

.opt-node.is-hit > .opt-name {
  background: #fff3c4;
  border-radius: 3px;
  padding: 0 3px;
}
.opt-node.is-focus { animation: opt-flash 2.4s ease-out; }
@keyframes opt-flash {
  0%, 40% { background: #fff3c4; }
  100% { background: transparent; }
}

.opt-rename { flex: 1; min-width: 0; font-family: inherit; font-size: 13px; height: 30px; }
.opt-adding { background: var(--brand-l2); border-radius: var(--r-sm); }
.opt-adding input {
  flex: 1;
  min-width: 0;
  max-width: 320px;
  font-family: inherit;
  font-size: 13px;
  height: 30px;
}

/* 一级节点（机构 / 部门）压一档，不然和下面的证书看起来是同一层 */
.opt-node.is-top {
  background: var(--surface-2);
  font-weight: 600;
}
.opt-node.is-top:hover { background: #e0edfd; }
.opt-node.is-top > .opt-name { font-weight: 600; }
.opt-node.is-top + .opt-children > .opt-branch > .opt-node { border-top-color: #e8eff9; }

/* ============================================================================
   登录页
   ========================================================================== */

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-grad);
  background-attachment: fixed;
  padding: 32px 16px;
  position: relative;
  overflow: hidden;
}
/* 两团柔光，把纯渐变的底子托出层次（不加噪点，避免糊） */
.login-body::before,
.login-body::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.login-body::before {
  width: 620px;
  height: 620px;
  left: -180px;
  top: -220px;
  background: radial-gradient(circle, rgba(0, 110, 255, .16), rgba(0, 110, 255, 0) 68%);
}
.login-body::after {
  width: 720px;
  height: 720px;
  right: -220px;
  bottom: -280px;
  background: radial-gradient(circle, rgba(110, 79, 216, .12), rgba(110, 79, 216, 0) 68%);
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: rgba(253, 254, 255, .92);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--r-xl);
  padding: 34px 32px 28px;
  box-shadow: 0 8px 24px rgba(29, 52, 96, .08), 0 24px 64px rgba(20, 40, 80, .16);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .3px;
  margin-bottom: 24px;
  color: var(--txt);
}
.login-brand .brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  font-size: 16px;
}
.login-brand small {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--txt-3);
  letter-spacing: .8px;
  margin-top: 2px;
}

.login-form { display: flex; flex-direction: column; gap: 6px; }
.login-form label {
  font-size: 12.5px;
  color: var(--txt-2);
  margin-top: 10px;
  letter-spacing: .2px;
}
.login-form input {
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font: inherit;
  font-size: 14px;
  background: rgba(232, 240, 250, .8);
  color: var(--txt);
  transition: all .15s;
}
.login-form input:focus {
  outline: none;
  border-color: var(--brand-2);
  background: #fff;
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.login-form .btn { margin-top: 22px; width: 100%; height: 42px; font-size: 14px; border-radius: var(--r-md); }
.login-hint {
  font-size: 12px;
  color: var(--txt-3);
  margin: 18px 0 0;
  text-align: center;
  line-height: 1.7;
}
.login-card .messages { margin: 0 0 14px; }

/* ============================================================================
   响应式：窄屏收起侧栏成横条
   ========================================================================== */

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex: 0 0 auto;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .brand { height: 52px; flex: 0 0 auto; border-bottom: 0; padding: 0 14px; }
  .nav { display: flex; padding: 6px 10px; gap: 4px; }
  .nav-label { display: none; }
  .nav a { margin-bottom: 0; white-space: nowrap; padding: 7px 12px; font-size: 13px; }
  .nav a.active::before { display: none; }
  .sidebar-footer { display: none; }
  .topbar { position: static; height: 52px; flex: 0 0 52px; padding: 0 14px; }
  .main-body { padding: 16px 14px 48px; }
  h1 { font-size: 18px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .userbar .who { display: none; }
}
