/* ===== app.css 合并产物 2026-11-17 =====
   合并顺序与原先 5 张样式表加载顺序一致, 规则内容未改动, 便于回滚:
   style.css / ui-enhance.css / ui-enhance-v2.css / ui-enhance-v3.css / tokens.css
   回滚: index.html 改回 5 行 link 即可, 原文件均保留在服务器上 */

/* ===== style.css ===== */
/* ===== 多角色学生管理系统 - 浅色主题 ===== */
:root {
  --primary: #2f6fed;
  --primary-dark: #2456c0;
  --primary-light: #e8f0fe;
  --danger: #e5484d;
  --danger-bg: #fdebec;
  --warning: #e8862d;
  --warning-bg: #fdf3e7;
  --success: #1a9e5c;
  --success-bg: #e7f6ee;
  --text: #1f2430;
  --text-2: #5c6370;
  --text-3: #8a91a0;
  --border: #e4e7ee;
  --bg: #f5f6fa;
  /* 标准中性底色 (颜色规范收敛: 原 8 种相近灰白) */
  --bg-tint: #f8fafc;
  --bg-soft: #f5f7fa;
  --bg-muted: #f0f2f5;
  --card: #ffffff;
  --sidebar-bg: #1c2333;
  --sidebar-text: #aeb6c8;
  --shadow: 0 2px 12px rgba(31, 36, 48, .08);
  --radius: 10px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; color: var(--text); background: #fff; outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,237,.12); }
input:disabled { background: var(--bg-soft); color: var(--text-3); cursor: not-allowed; }
label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.req { color: var(--danger); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 18px; border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; font-weight: 500; transition: all .15s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-plain { background: #fff; border-color: var(--border); color: var(--text-2); }
.btn-plain:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: #f8d7d9; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ===== 登录页 ===== */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef3ff 0%, #f5f6fa 55%, #eef6f1 100%);
  padding: 20px;
}
.login-card {
  width: 400px; background: var(--card); border-radius: 16px; padding: 40px 36px;
  box-shadow: 0 12px 40px rgba(31,36,48,.12);
}
.login-logo { display: flex; justify-content: center; margin-bottom: 16px; }
.login-card h1 { text-align: center; font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.login-sub { text-align: center; color: var(--text-3); font-size: 13px; margin: 8px 0 28px; }
.login-card .form-group { margin-bottom: 16px; }
.login-msg { color: var(--danger); font-size: 13px; min-height: 20px; margin-bottom: 8px; }
.login-hint {
  margin-top: 22px; padding: 14px 16px; background: var(--primary-light); border-radius: 8px;
  font-size: 12px; color: #3a5a9c; line-height: 1.9;
}
.hint-title { font-weight: 600; margin-bottom: 2px; }

/* ===== 布局 ===== */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 232px; background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 16px; }
.brand-name { color: #fff; font-size: 15px; font-weight: 700; }
.brand-sub { font-size: 11px; color: var(--sidebar-text); margin-top: 2px; }
.side-nav { flex: 1; padding: 8px 10px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 8px;
  color: var(--sidebar-text); font-size: 14px; cursor: pointer; transition: all .15s; margin-bottom: 2px;
  border: none; background: transparent; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item .nav-icon { display: inline-flex; }
.nav-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 7px; }
.side-user { border-top: 1px solid rgba(255,255,255,.08); padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-phone { font-size: 11px; color: var(--sidebar-text); margin-top: 2px; }
.logout-btn { background: none; border: none; color: var(--sidebar-text); padding: 6px; border-radius: 6px; }
.logout-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar {
  height: 56px; background: var(--card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0;
}
.topbar-title { font-size: 17px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-date { color: var(--text-3); font-size: 13px; }
.reminder-badge {
  display: flex; align-items: center; gap: 5px; background: var(--danger-bg); color: var(--danger);
  padding: 5px 11px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer;
}
#notifyBell { background: var(--bg-2, var(--bg-muted)); color: var(--text-2); position: relative; }
#notifyBell.has-new { background: var(--primary-light, #e6f0ff); color: var(--primary); }
#notifyCount { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
/* 通知下拉面板 */
.notify-panel {
  position: absolute; top: 58px; right: 16px; width: 340px; max-width: calc(100vw - 32px); max-height: 70vh;
  background: var(--card); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.14); border: 1px solid var(--border);
  z-index: 100; display: flex; flex-direction: column; overflow: hidden;
}
.notify-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.notify-head button { font-size: 12px; color: var(--primary); background: none; border: none; cursor: pointer; }
.notify-list { overflow-y: auto; flex: 1; }
.notify-item { padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notify-item:hover { background: var(--bg-2, var(--bg-soft)); }
.notify-item.unread { background: #f0f6ff; }
.notify-item .nt { font-weight: 600; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.notify-item.unread .nt::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.notify-item .nc { font-size: 12px; color: var(--text-2); margin: 3px 0; line-height: 1.5; }
.notify-item .ntime { font-size: 11px; color: var(--text-3); }
.notify-empty { padding: 30px; text-align: center; color: var(--text-3); font-size: 13px; }
.content { flex: 1; min-height: 0; overflow-y: auto; padding: 24px; }

/* ===== 卡片 & 统计 ===== */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
  border-left: 4px solid var(--primary); display: flex; flex-direction: column; gap: 6px;
}
.stat-card .stat-label { color: var(--text-2); font-size: 13px; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; }
.stat-card .stat-sub { font-size: 12px; color: var(--text-3); }
.stat-card.sc-red { border-left-color: var(--danger); }
.stat-card.sc-green { border-left-color: var(--success); }
.stat-card.sc-orange { border-left-color: var(--warning); }
.stat-card.sc-blue { border-left-color: var(--primary); }
.stat-card.sc-purple { border-left-color: #7c5ce0; }
.stat-card.sc-teal { border-left-color: #1d9e75; }

/* ===== 工资核算 ===== */
.salary-detail td { white-space: normal; }
.salary-detail table th, .salary-detail table td { padding: 6px 10px; font-size: 13px; }
.post-check { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); margin-right: 10px; white-space: nowrap; cursor: pointer; }

/* ===== 一人多报 ===== */
.tag-blue { background: #e8f0fe; color: #2f6fed; }
.related-tip {
  background: #f0f6ff; border: 1px solid #c9d8f5; border-radius: 8px; padding: 9px 14px;
  font-size: 13px; color: #3a5a9c; margin-bottom: 14px; line-height: 1.8;
}
.related-tip a { color: var(--primary); font-weight: 600; margin: 0 4px; }

/* ===== 导出列选择 ===== */
.export-scope { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.export-scope label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.export-scope input[type="radio"], .export-cols input[type="checkbox"], .export-scope input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: var(--primary); margin: 0; flex-shrink: 0; cursor: pointer;
}
.export-cols { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.col-group { margin-bottom: 12px; }
.col-group:last-child { margin-bottom: 0; }
.col-group-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; border-left: 3px solid var(--primary); padding-left: 8px; }
.col-items { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.col-items .post-check { margin-right: 0; }

/* ===== 附加费用 & 备注 ===== */
textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--text); outline: none; resize: vertical; background: #fff; }
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,237,.12); }
textarea:disabled { background: var(--bg-soft); color: var(--text-3); cursor: not-allowed; }
.extra-fees-wrap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.extra-fee-row { display: flex; align-items: center; gap: 10px; }
.extra-fee-row input[data-ef-name] { flex: 2; }
.extra-fee-row input[data-ef-amount] { flex: 1; }
.extra-empty { color: var(--text-3); font-size: 13px; padding: 4px 0; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; max-height: min(62vh, 620px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* 班级学员名单弹窗: 表格区域独立滚动, 表头吸顶+姓名列吸左, 滚动条常驻区域边缘, 无需拉到底 */
.tb-scroll { max-height: min(58vh, 560px); border: 1px solid var(--border); border-radius: 10px; }
.tb-scroll thead th { z-index: 5; background: var(--bg-tint); box-shadow: 0 1px 0 var(--border); }
.tb-scroll thead .sticky-col { z-index: 6; background: var(--bg-tint); }
.tb-scroll tbody td, .tb-scroll thead th { white-space: nowrap; }
.tb-scroll .sticky-col { position: sticky; left: 0; z-index: 4; background: #fff; box-shadow: 2px 0 4px rgba(0,0,0,.05); }
.tb-scroll tbody .sticky-col { z-index: 2; }
.tb-scroll tbody tr:hover .sticky-col { background: var(--bg-tint); }
.tb-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.tb-scroll::-webkit-scrollbar-thumb { background: #c9cdd6; border-radius: 4px; }
.tb-scroll::-webkit-scrollbar-thumb:hover { background: #aab0bc; }
.tb-scroll::-webkit-scrollbar-track { background: transparent; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-2); font-weight: 600; background: var(--bg-tint); font-size: 13px; }
/* 表头吸顶: 上下滚动时列名始终可见 */
thead th { position: sticky; top: 0; z-index: 3; }
/* 学员表操作列吸右: 查看/编辑按钮始终可见, 无需横向滚动到底 */
.stu-table thead th:last-child { position: sticky; right: 0; z-index: 4; }
.stu-table tbody td:last-child { position: sticky; right: 0; z-index: 2; background: #fff; }
.stu-table tbody tr:hover td:last-child { background: var(--bg-tint); }
.stu-table tbody tr.row-owe td:last-child { background: #fff7f7; }
.stu-table tbody tr.row-selected td:last-child { background: #eef4ff; }
/* 姓名列(吸左)与操作列(吸右)的表头 z 值均最高, 互不遮挡 */
.stu-table thead th:first-child, .stu-table.with-sel thead th:nth-child(2) { z-index: 5; }
/* 打印时还原普通表格流式布局 */
@media print {
  .table-wrap { max-height: none; overflow: visible; }
  thead th { position: static; }
  .stu-table thead th:last-child, .stu-table tbody td:last-child { position: static; }
}
tbody tr:hover { background: var(--bg-tint); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.tag-blue { background: var(--primary-light); color: var(--primary-dark); }
.tag-green { background: var(--success-bg); color: var(--success); }
.tag-orange { background: var(--warning-bg); color: var(--warning); }
.tag-red { background: var(--danger-bg); color: var(--danger); }
.tag-gray { background: #eef0f4; color: var(--text-2); }
.row-owe { background: #fff7f7 !important; }
.row-owe td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.money-red { color: var(--danger); font-weight: 700; }
.money-green { color: var(--success); font-weight: 700; }
.money-orange { color: var(--warning); font-weight: 700; }
.pay-pending-tip {
  background: var(--warning-bg); color: #9a5b13; border: 1px solid #f5d5ae; border-radius: 8px;
  padding: 10px 14px; font-size: 13px; margin-bottom: 14px; line-height: 1.6;
}
.actions { display: flex; gap: 6px; }
.op-btn { border: none; background: none; color: var(--primary); font-size: 13px; padding: 3px 6px; border-radius: 5px; }
.op-btn:hover { background: var(--primary-light); }
.op-btn.danger { color: var(--danger); }
.op-btn.danger:hover { background: var(--danger-bg); }

/* ===== 工具栏 ===== */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search-input { width: 240px; }
.toolbar .spacer { flex: 1; }
.toolbar .toolbar-hint { color: var(--text-3); font-size: 12px; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,20,30,.45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal { background: #fff; border-radius: 14px; width: 640px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 16px 60px rgba(0,0,0,.2); }
/* 凭证弹窗加宽: 凭证固定 794px, 电脑端完整显示(与手机端横滚的完整版式一致) */
#receiptModal .modal { width: 860px; }
.modal-sm { width: 420px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { border: none; background: none; font-size: 22px; color: var(--text-3); line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 22px; overflow-y: auto; min-height: 0; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.form-section-title { font-size: 13px; font-weight: 700; color: var(--primary-dark); margin: 18px 0 12px; padding-bottom: 6px; border-bottom: 1px dashed var(--border); }
.form-section-title:first-child { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-group .fee-ro input { background: #fdf6ec; }
.form-group .fee-auto input { color: var(--text-2); }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* ===== 缴费历史 ===== */
.pay-history { margin-top: 14px; }
.pay-history-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--bg-tint); border-radius: 8px; margin-bottom: 6px; font-size: 13px; }
.pay-row .pay-amount { color: var(--success); font-weight: 700; }
.pay-empty { color: var(--text-3); font-size: 13px; padding: 10px 0; }

/* ===== 缴费弹窗 ===== */
.pay-target { background: var(--primary-light); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.pay-student { font-size: 16px; font-weight: 700; }
.pay-summary { font-size: 13px; color: var(--text-2); margin-top: 6px; line-height: 1.7; }

/* ===== 看板 ===== */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.biz-table td:first-child { font-weight: 500; }
.bar-cell { min-width: 140px; }
.bar-track { background: #eef0f4; border-radius: 4px; height: 8px; width: 100%; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 4px; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rank-item:last-child { border-bottom: none; }
.rank-no { width: 24px; height: 24px; border-radius: 6px; background: #eef0f4; color: var(--text-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.rank-no.top { background: #ffd666; color: #7a4b00; }
.rank-name { flex: 1; font-weight: 500; }
.rank-stat { text-align: right; font-size: 13px; color: var(--text-2); }
.rank-stat b { color: var(--text); font-size: 14px; }

/* ===== 提醒 ===== */
.reminder-tip { color: var(--text-2); font-size: 13px; margin-bottom: 14px; }
.reminder-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; margin-bottom: 10px;
  border: 1px solid var(--border); background: var(--bg-tint);
}
.reminder-item.urgent { border-color: #f5c2c4; background: #fff5f5; }
.reminder-icon { font-size: 22px; }
.reminder-main { flex: 1; }
.reminder-name { font-weight: 600; }
.reminder-sub { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.reminder-days { text-align: right; flex-shrink: 0; }
.reminder-days .days { font-size: 18px; font-weight: 700; color: var(--danger); }
.reminder-days .days.soon { color: var(--warning); }
.reminder-days .unit { font-size: 12px; color: var(--text-3); }

/* ===== 导入弹窗 ===== */
.import-guide { background: var(--bg-tint); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; margin-bottom: 16px; }
.guide-title { font-weight: 700; margin-bottom: 8px; color: var(--text); }
.import-guide ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; line-height: 2; }
.import-file { display: flex; align-items: center; margin-bottom: 16px; }
.import-result { margin-top: 14px; border-radius: 10px; padding: 14px; font-size: 13px; }
.import-result.ok { background: var(--success-bg); color: var(--success); }
.import-result.has-fail { background: var(--danger-bg); color: var(--danger); }
.result-summary { font-weight: 600; margin-bottom: 8px; }
.fail-list { max-height: 180px; overflow-y: auto; border-top: 1px solid rgba(229,72,77,.2); padding-top: 8px; margin-top: 8px; }
.fail-item { padding: 4px 0; color: var(--text-2); font-size: 13px; }

/* ===== Toast ===== */
.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 200;
  background: #2b313e; color: #fff; padding: 11px 22px; border-radius: 8px; font-size: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.2); animation: toastIn .2s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ===== 员工管理 ===== */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.on { background: var(--success); }
.status-dot.off { background: #c4c9d4; }

/* ===== 收入统计 ===== */
.income-controls {
  display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px;
}
.income-tabs { display: flex; gap: 4px; background: #f0f2f6; border-radius: 8px; padding: 3px; }
.income-tab {
  border: none; background: transparent; padding: 7px 16px; border-radius: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-2); transition: all .15s;
}
.income-tab:hover { color: var(--text); }
.income-tab.active { background: var(--primary); color: #fff; }
.income-date-bar { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.income-date-bar label { margin-bottom: 2px; font-size: 12px; }
.income-date-bar input { width: auto; min-width: 140px; }

/* ===== 底价管理 (二级细分) ===== */
.price-biz { border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; background: var(--bg-tint); }
.price-biz-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.price-biz-name { font-size: 15px; font-weight: 700; }
.price-default { display: flex; align-items: flex-end; gap: 8px; }
.price-default label { margin-bottom: 2px; font-size: 12px; }
.price-default input { width: 130px; }
.price-items { width: 100%; border-collapse: collapse; }
.price-items th { color: var(--text-3); font-weight: 500; font-size: 12px; }
.price-items th, .price-items td { padding: 5px 8px; border-bottom: 1px solid var(--border); }
.price-items td:last-child, .price-items th:last-child { text-align: center; }
.price-items input { height: 32px; }
.price-empty { color: var(--text-3); font-size: 13px; padding: 10px 0 4px; }
.price-add { margin-top: 10px; }

/* ===== 业务类型管理 ===== */
.btype-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.btype-card { box-shadow: var(--shadow); }
.btype-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.btype-name { font-size: 16px; font-weight: 700; }
.btype-key { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.btype-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.btype-chip { background: #f0f2f6; border-radius: 6px; padding: 4px 10px; font-size: 12px; color: var(--text-2); }
.btype-chip b { color: var(--text); }
.btype-fields { display: flex; flex-wrap: wrap; gap: 6px; }
.btype-empty { color: var(--text-3); font-size: 13px; }
.modal-lg { width: 760px; }
.bt-fields-wrap { margin-bottom: 10px; }
.bt-field-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bt-field-row input, .bt-field-row select { flex: 1; }
.bt-field-row.bt-field-head { color: var(--text-3); font-size: 12px; margin-bottom: 4px; }
.bt-field-row.bt-field-head span { flex: 1; }
.bt-field-row.bt-field-head span:first-child { flex: 1.2; }
.bt-field-row input[data-f-label] { flex: 1.2; }
.bt-field-row select[data-f-type] { flex: 0.9; min-width: 110px; }
.bt-field-row input[data-f-options] { flex: 1.6; }

/* ===== 空状态 ===== */
.empty { text-align: center; color: var(--text-3); padding: 48px 0; font-size: 14px; }
.empty .empty-icon { font-size: 40px; margin-bottom: 10px; }

/* ===== 日志 ===== */
.log-item { padding: 12px 16px; border-left: 3px solid var(--primary-light); background: var(--bg-tint); border-radius: 0 8px 8px 0; margin-bottom: 8px; }
.log-item .log-head { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.log-item .log-time { color: var(--text-3); font-size: 12px; }
.log-item .log-action { font-weight: 600; color: var(--primary-dark); }
.log-item .log-detail { margin-top: 4px; color: var(--text-2); font-size: 13px; }
.log-role { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #eef0f4; color: var(--text-2); }

/* ===== 退费 ===== */
.pay-title-sub { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 12px 0 6px; }
.pay-row.refund span { color: var(--danger); }
.pay-amount.refund { color: var(--danger); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.btn-danger:hover { background: #f8d7d9; }

/* ===== 批量操作 ===== */
.batch-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 10px 16px;
  background: var(--primary-light); border: 1px solid #c9d8f5; border-radius: 10px;
  font-size: 13px; color: #3a5a9c; flex-wrap: wrap;
}
.batch-bar b { color: var(--primary-dark); }
.batch-bar .btn-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.batch-bar .btn-danger:hover { background: #f8d7d9; }
.row-selected { background: #eef4ff !important; }
.row-selected td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
input[type="checkbox"], input[type="radio"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); vertical-align: middle; margin: 0; flex-shrink: 0; }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d3d8e0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b8bfca; }

/* ===== 收款凭证 ===== */
/* 防伪双线边框: border 粗框 + ::before 伪元素内框 (伪元素为真实DOM节点, 屏幕/手机/打印/PDF均必显; 不用outline/box-shadow——部分打印引擎不渲染) */
.receipt-sheet {
  width: 794px; max-width: 100%;
  background: #fff;
  border: 2px solid #1a1a1a;
  padding: 8px 24px 10px;   /* 内框需要padding容纳(原来outline内缩5px) */
  margin: 0 auto;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #1a1a1a;
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
/* 内层细框: 距外边 3px, 四边真实边框节点 */
.receipt-sheet::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px; right: 3px; bottom: 3px;
  border: 1px solid #1a1a1a;
  pointer-events: none;
  z-index: 0;
}
/* 内容层在伪元素之上(不覆盖绝对定位元素自身position) */
.receipt-sheet > *:not(.receipt-pattern):not(.receipt-watermark):not(.receipt-stamp-wrap) { position: relative; z-index: 1; }
/* 防伪花纹底纹: 波浪曲线+微缩符号平铺, 淡色打印可见, 在内容之下 */
.receipt-pattern {
  position: absolute; inset: 0; z-index: 1;
  background-repeat: repeat;
  opacity: .09;   /* 花纹调淡 */
  pointer-events: none;
}
/* 凭证防伪序号 */
.receipt-verify {
  margin-top: 5px; font-size: 12px; color: var(--text-2);
  text-align: center; letter-spacing: .5px;
}
/* 凭证头部: 左品牌 + 右 No编码与扫码二维码 (v167: 绝对定位各自下移, 不挤动标题/表格) */
.receipt-head {
  position: relative; height: 69px;
  font-size: 13px;
}
.receipt-title {
  text-align: center; font-size: 24px; font-weight: 800; letter-spacing: 12px;
  line-height: 1.1; margin: 0 0 2px; text-indent: 12px;
  position: relative; top: -22px; /* 标题上移2行(视觉), 文档流位置不变 → 表格等其它内容不动 */
}
.receipt-brand { position: absolute; top: 24px; left: 24px; display: flex; align-items: center; gap: 8px; } /* LOGO下移两行 */
.receipt-head-side { position: absolute; top: 24px; right: 24px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; } /* 编码下移两行 */
.receipt-lookup {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  text-align: center; line-height: 1;
  margin-top: 3px; /* 二维码区最大可下移量: 再下移会压到表格文字(表格固定不动) */
}
/* 凭证头部品牌区: 圆形LOGO + 右侧横排字标, 排版协调 */
.receipt-logo { height: 42px; width: auto; object-fit: contain; }   /* 红色圆形LOGO: 34→38px 再放大两个字号 */
.receipt-logo2 { height: 18px; width: auto; object-fit: contain; }  /* 字标: 22→18px 再缩小两个字号 */
.receipt-no { font-size: 11px; letter-spacing: 1px; }
.receipt-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.receipt-table td { border: 1px solid #1a1a1a; padding: 9px 10px; font-size: 14px; vertical-align: middle; }
.receipt-table .rc-label { width: 15%; background: var(--bg-tint); font-weight: 600; text-align: center; color: #333; }
.receipt-table .rc-value { width: 35%; }
.receipt-table .rc-money { font-weight: 700; color: #c00; font-size: 16px; }
.receipt-note { font-size: 11px; color: #666; margin-top: 8px; }
/* 财务章: 覆盖在表格"收款人/金额"区域 (右列下部, 章底对齐表格底; 整体放大三个字号 118→124px) */
/* 财务章: 盖在表格"收款人/金额"区域 (右列下部, 底部对齐表格底; v179 由 top 固定改 bottom 相对定位, 高度变化不跑位) */
.receipt-stamp-wrap {
  position: absolute; right: 19px; bottom: 58px; z-index: 2;
  opacity: .95;
  pointer-events: none;
}
.receipt-stamp-img { width: 130px; height: 130px; }
.receipt-pending { margin-top: 4px; font-size: 11px; color: #c00; text-align: right; }
/* 全额退费作废章: 红色斜体大字, 覆盖凭证主体 */
.receipt-void {
  position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg);
  font-size: 56px; font-weight: 900; letter-spacing: 10px; color: rgba(200, 0, 0, .38);
  border: 5px solid rgba(200, 0, 0, .38); border-radius: 14px; padding: 10px 34px;
  pointer-events: none; z-index: 6; white-space: nowrap;
}
.receipt-void-tip { margin-top: 4px; font-size: 12px; font-weight: 700; color: #c00; text-align: right; }
@media print {
  .receipt-void { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* 防伪水印: 自定义图片居中浅显, 覆盖全凭证且不遮挡内容 (img 元素打印必显, 三端版式一致) */
.receipt-watermark {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5;
  display: flex; align-items: center; justify-content: center;
}
.receipt-watermark img {
  width: 96%; height: 96%; object-fit: contain; opacity: .15;
}
#receiptDownloadBtn:disabled { opacity: .6; cursor: wait; }

/* 打印: 仅打印凭证区域 */
/* 单张打印: 默认页竖版 A4 (v181: 凭证保持 794px 设计稿宽度, 打印时整体 scale(0.85) 缩到纸内;
 * 178.6mm + 浏览器默认边距(约12.7mm×2=25.4mm) = 204mm < 210mm 纸宽, 任何浏览器都不会超界;
 * 不用 210mm/100% 宽度——浏览器打印默认边距会把满幅凭证挤出纸外, 或手机端缩成小块) */
@media print {
  @page { size: A4 portrait; margin: 0; }
  body * { visibility: hidden !important; }
  /* 隐藏主界面占位(防生成空白页), 凭证在 body 顶层不受影响 */
  .app, .sidebar, .topbar, .content { display: none !important; }
  body { margin: 0; padding: 0; }
  html, body { width: 100%; }
  /* 凭证弹窗: 打印时必须显示(父级 display:none 会连带隐藏凭证) */
  #receiptModal { display: flex !important; visibility: visible !important; background: none !important; position: static !important; padding: 0 !important; }
  #receiptModal .modal { display: block !important; box-shadow: none !important; border: none !important; max-width: none !important; max-height: none !important; width: auto !important; }
  #receiptModal .modal-head, #receiptModal .modal-foot { display: none !important; }  /* 打印不显示标题栏/按钮 */
  #receiptModal .modal-body { overflow: visible !important; padding: 0 !important; }
  #receiptArea, #receiptArea * { visibility: visible !important; }
  #receiptArea {
    position: fixed; left: 0; top: 0;
    width: 794px !important; max-width: 794px !important;
    margin: 0 !important;
    border: 2px solid #1a1a1a !important;      /* 外层粗框: 打印必须可见 */
    transform: scale(0.85) !important;         /* 整体缩小15%: 兼容浏览器默认打印边距, 凭证完整在纸内 */
    transform-origin: top left !important;
  }
  /* 内层细框: 伪元素, 打印必显 */
  #receiptArea::before {
    content: ''; position: absolute; top: 3px; left: 3px; right: 3px; bottom: 3px;
    border: 1px solid #1a1a1a !important; pointer-events: none; z-index: 0;
  }
}

/* 批量打印凭证: A4 横版(命名页 batchPage, 与单张竖版默认页互不干扰), 每页 2×3 共 6 张 (凭证 62% 缩放 492×~215px, 左列贴左/右列贴右边距) */
#batchPrintArea { display: none; }
@media print {
  @page batchPage { size: A4 landscape; margin: 6mm; }
  body * { visibility: hidden !important; }
  /* 隐藏主界面占位(防空白页), 隐藏单张凭证避免与批量网格重叠 (仅批量打印时, 由 JS 加 body.batch-printing 类) */
  .app, .sidebar, .topbar, .content { display: none !important; }
  body { margin: 0; }
  body.batch-printing #receiptModal #receiptArea { visibility: hidden !important; }
  #batchPrintArea, #batchPrintArea * { visibility: visible !important; }
  #batchPrintArea {
    display: grid;
    grid-template-columns: repeat(2, 492px);
    justify-content: space-between;   /* 右列凭证靠右边距 */
    gap: 10px;
    position: fixed; left: 0; top: 0; width: 100%;
    page: batchPage;                  /* 批量打印使用横版命名页 */
  }
  #batchPrintArea .batch-cell { width: 492px; height: 224px; overflow: hidden; }
  /* 关键: 强制凭证保持 794px 原始布局再缩放(防 max-width:100% 压缩重排导致打印尺寸错误/截断) */
  #batchPrintArea .batch-sheet {
    width: 794px; max-width: 794px; transform: scale(0.62); transform-origin: top left;
    border: 2px solid #1a1a1a !important;   /* 外层粗框 */
  }
  #batchPrintArea .batch-sheet::before {
    content: ''; position: absolute; top: 3px; left: 3px; right: 3px; bottom: 3px;
    border: 1px solid #1a1a1a !important; pointer-events: none; z-index: 0;  /* 内层细框: 伪元素打印必显 */
  }
  #batchPrintArea .batch-cell:nth-child(6n):not(:last-child) { break-after: page; }
}
/* ===== 移动端适配 (手机/平板) ===== */
/* 移动端导航折叠按钮 (桌面隐藏, 手机显示) */
.nav-toggle { display: none; }

@media (max-width: 1023px) {
  /* 布局: 侧边栏 → 顶部导航栏 */
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; }
  .side-brand { padding: 8px 14px; }
  .brand-sub { display: none; }
  /* 手机端导航: 默认一行(高频4个) + 箭头展开/收起; 分组标题仅桌面显示 */
  .nav-group { display: none; }   /* 手机端不显示分组标题, 宫格保持干净 */
  .side-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 8px 10px 6px;
    max-height: 58px; overflow: hidden;
    transition: max-height .28s ease;   /* 展开/收起过渡动画 */
  }
  .sidebar.nav-open .side-nav { max-height: 520px; overflow: visible; }   /* 展开全部 */
  .nav-item {
    position: relative; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 8px 2px; font-size: 12px; text-align: center; white-space: normal;
    margin-bottom: 0; margin-right: 0; flex: 0 0 auto; border-radius: 10px;
  }
  .nav-item .nav-icon { font-size: 19px; line-height: 1; }
  .nav-badge { position: absolute; top: 3px; right: 8px; margin: 0; font-size: 10px; padding: 0 5px; }
  .nav-toggle {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(255,255,255,.07); border: none; border-radius: 10px;
    margin: 2px 12px 10px; color: var(--sidebar-text, #c3cadb);
    font-size: 13px; font-weight: 500; padding: 10px 12px; cursor: pointer;
  }
  .nav-toggle:active { background: rgba(255,255,255,.14); }
  .nav-toggle .nav-toggle-icon {
    font-size: 15px; line-height: 1; color: #7ab2ff;   /* 亮蓝箭头, 深色侧栏上醒目 */
    transition: transform .28s ease;
  }
  .sidebar.nav-open .nav-toggle .nav-toggle-icon { transform: rotate(180deg); }
  .sidebar.nav-open .nav-toggle { background: rgba(255,255,255,.1); }
  .side-user { display: none !important; }
  .sidebar.nav-open .side-user { display: block !important; }
  .side-user { padding: 8px 14px; }
  .user-avatar { width: 30px; height: 30px; font-size: 12px; }
  .user-phone { display: none; }
  .topbar { height: 50px; padding: 0 12px; }
  .topbar-title { font-size: 15px; }
  .content { padding: 12px; }
  /* 卡片 & 统计 */
  .card { padding: 14px; }
  .card-title { font-size: 14px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 13px; }
  .stat-card .stat-value { font-size: 20px; }
  /* 表格: 横向滚动 + 紧凑 */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  table { font-size: 13px; }
  th, td { padding: 9px 10px; }
  .actions { flex-wrap: wrap; gap: 2px; }
  .op-btn { padding: 6px 8px; }
  /* 工具栏: 换行排列 */
  .toolbar { gap: 8px; }
  .toolbar .search-input { width: 100%; }
  /* 筛选下拉: 每行 2 个, 保证文字完整显示(不平分挤压成空白) */
  .toolbar select { flex: 1 1 calc(50% - 8px); min-width: 0; width: auto; font-size: 13px; }
  .toolbar .spacer { display: none; }
  .toolbar .toolbar-hint { width: 100%; }
  /* 按钮: 每行约 3 个等宽排列, 文字不换行不错位 */
  .toolbar .btn { flex: 1 1 auto; min-width: 31%; max-width: 100%; padding: 0 6px; font-size: 13px; white-space: nowrap; line-height: 1.2; }
  /* 其他收款: 移动端统计卡 2 列 (覆盖内联 auto-fit minmax(180px) 的 1 列) */
  .misc-stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  /* 其他收款: 移动端筛选控件去内联定宽, 搜索独占一行, 状态+月份各半行 */
  #miscKw, #miscStatus, #miscMonth { flex: 1 1 calc(50% - 8px) !important; width: auto !important; min-width: 0 !important; }
  #miscKw { flex-basis: 100% !important; }
  /* 面包屑: 窄屏不竖排, 超出省略 */
  .topbar-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  /* 弹窗: 底部弹出 */
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-width: 100%; border-radius: 16px 16px 0 0; max-height: 94vh; }
  .modal-sm { width: 100%; }
  .modal-head { padding: 14px 16px; }
  .modal-body { padding: 14px 16px; }
  .modal-foot { padding: 12px 16px; gap: 8px; }
  .modal-foot .btn { flex: 1; }
  /* 表单: 单列 */
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .extra-fee-row { flex-wrap: wrap; }
  /* 批量操作栏: 提示独占一行, 按钮双列网格 (v89 规则, 旧单行规则已移除避免覆盖) */
  .batch-bar { flex-wrap: wrap; gap: 8px; padding: 12px; align-items: stretch; margin-top: 2px; }
  .batch-bar > span { width: 100%; margin-bottom: 2px; }
  .batch-bar .btn-sm { flex: 1 1 calc(50% - 8px); min-width: 0; max-width: 100%; margin: 0; white-space: nowrap; padding: 9px 4px; font-size: 13px; }
  /* 凭证: 手机端整体缩放适配屏宽(v179: transform 缩放, 布局保持 794px 不重排, 边框/章子/内容完整在框内) */
  .receipt-sheet { max-width: none; transform-origin: top left; overflow: hidden; }
  #receiptModal .modal-body { overflow-x: hidden; overflow-y: auto; padding: 10px 6px; }
  /* 登录页 */
  .login-page { padding: 16px; }
  .login-card { width: 100%; max-width: 380px; padding: 30px 24px; }
  /* 防 iOS 输入自动缩放 + 触控目标 */
  input, select, textarea { font-size: 16px; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 32px; }
  /* 其他 */
  .export-scope { gap: 12px; }
  .price-biz { padding: 12px; }
  .salary-detail table { font-size: 12px; }
  .toast { max-width: 88%; white-space: normal; }
  .related-tip { font-size: 12px; }
  .reminder-badge { padding: 4px 9px; font-size: 12px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card .stat-value { font-size: 17px; }
  .nav-item { font-size: 11px; padding: 8px 1px; }
  .nav-item .nav-icon { font-size: 17px; }
  .topbar-title { font-size: 14px; }
  .form-group label { font-size: 13px; }
}


/* ===== 学员管理: 业务页签 + 费用合并列 (第一期重构) ===== */
.stu-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
.stu-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); background: #fff; border: 1px solid var(--border); white-space: nowrap; user-select: none; transition: all .15s ease; }
.stu-tab:hover { border-color: var(--primary); color: var(--primary-dark); background: #fff; }
.stu-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.stu-tab .n { font-size: 11px; font-weight: 400; background: #eef0f4; color: var(--text-2); border-radius: 8px; padding: 0 7px; line-height: 18px; }
.stu-tab:hover .n { background: var(--primary-light); color: var(--primary-dark); }
.stu-tab.active .n { background: rgba(255,255,255,.28); color: #fff; }
.stu-tabs-sep { width: 1px; height: 22px; background: var(--border); margin: 0 6px; }
.stu-tab-badge { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; white-space: nowrap; user-select: none; border: 1px solid transparent; transition: all .15s ease; }
.stu-tab-badge b { font-size: 13px; }
.stu-tab-badge.owe { background: var(--danger-bg); color: var(--danger); border-color: #f2c9c9; }
.stu-tab-badge.owe:hover, .stu-tab-badge.owe.on { background: var(--danger); color: #fff; border-color: var(--danger); }
.stu-tab-badge.pend { background: var(--warning-bg); color: #9a5b13; border-color: #f0dcb4; }
.stu-tab-badge.pend:hover, .stu-tab-badge.pend.on { background: var(--warning); color: #fff; border-color: var(--warning); }
.stu-tab-badge.del { background: #f3e8fb; color: #7b2fb5; border-color: #e0c8f2; }
.stu-tab-badge.del:hover, .stu-tab-badge.del.on { background: #7b2fb5; color: #fff; border-color: #7b2fb5; }
.fee-cell { font-size: 12px; line-height: 1.55; white-space: nowrap; }
/* 学员详情概要栏 */
.stu-summary { display: flex; align-items: center; gap: 14px; background: var(--bg-tint); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 4px; flex-wrap: wrap; }
.stu-sum-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 20px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.stu-sum-main { flex: 1; min-width: 160px; }
.stu-sum-name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stu-sum-sub { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.stu-sum-fee { display: flex; gap: 18px; font-size: 13px; flex-wrap: wrap; }
.stu-sum-fee .sf-item { font-variant-numeric: tabular-nums; }
.form-section-title .section-sub { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 6px; }
.form-section-title.sub { margin-top: 10px; font-size: 13px; color: var(--text-2); border-bottom: 1px dashed var(--border); padding-bottom: 4px; }
@media (max-width: 1023px) {
  .stu-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 8px 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .stu-tabs::-webkit-scrollbar { display: none; }
  .stu-tab, .stu-tab-badge, .stu-tabs-sep { flex: 0 0 auto; }
  .stu-summary { padding: 12px; gap: 10px; }
  .stu-sum-avatar { width: 40px; height: 40px; font-size: 17px; }
  .stu-sum-name { font-size: 15px; }
  .stu-sum-fee { gap: 12px; font-size: 12px; }
}
/* 移动端学员卡片视图 */
.stu-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.stu-card.row-selected { background: #eef4ff; border-color: var(--primary); }
.stu-card .sc-top { display: flex; align-items: center; gap: 8px; padding-right: 36px; }
.stu-card .sc-name { font-size: 15px; font-weight: 700; }
.stu-card .sc-status { margin-left: auto; }
.stu-card .sc-info { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.stu-card .sc-info2 { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.stu-card .sc-fee { font-size: 13px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); font-variant-numeric: tabular-nums; }
.stu-card .sc-fee .sc-sep { color: var(--text-3); margin: 0 2px; }
.stu-card .sc-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.stu-card .sc-actions .op-btn { flex: 1; text-align: center; padding: 7px 8px; }

/* ===== 其他收款: 移动端卡片视图 (v268, 替代横向溢出表格) ===== */
.misc-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.misc-card.row-voided { background: #fafbfc; }
.misc-card .mc-top { display: flex; align-items: center; gap: 8px; }
.misc-card .mc-no { font-size: 13px; color: var(--text-2); }
.misc-card .mc-no .no { font-family: monospace; font-size: 12px; color: var(--text-1); }
.misc-card .mc-status { margin-left: auto; flex: 0 0 auto; }
.misc-card .mc-title { font-size: 15px; font-weight: 700; margin-top: 6px; word-break: break-word; }
.misc-card .mc-info { font-size: 13px; color: var(--text-2); margin-top: 5px; }
.misc-card .mc-note { font-size: 12px; color: var(--text-3); margin-top: 4px; word-break: break-word; }
.misc-card .mc-fee { display: flex; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.misc-card .mc-amount { font-size: 16px; font-weight: 700; color: #c00; margin-right: 4px; font-variant-numeric: tabular-nums; }
.misc-card .mc-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.misc-card .mc-actions .op-btn { flex: 1 1 auto; min-width: 88px; text-align: center; padding: 8px; min-height: 36px; }

/* ===== v275: 数据看板汇总卡下钻 + 下钻明细视图 ===== */
/* 注意: .stat-card::after 已被装饰圆占用, 下钻提示改用 ::before */
.stat-card.drillable { cursor: pointer; }
.stat-card.drillable:hover { border-color: var(--primary); }
.stat-card.drillable::before {
  content: '↗'; position: absolute; top: 12px; right: 14px;
  font-size: 13px; font-weight: 700; color: #cbd5e1;
  pointer-events: none; transition: color .15s ease;
}
.stat-card.drillable:hover::before { color: var(--primary); }
body.dark-mode .stat-card.drillable::before { color: #475569; }
body.dark-mode .stat-card.drillable:hover::before { color: var(--primary); }

.drill-head .drill-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.drill-head .drill-title { font-size: 17px; font-weight: 700; }
.drill-head .drill-sub { font-size: 13px; color: var(--text-2); margin-top: 6px; line-height: 1.9; }
.drill-head .drill-total { text-align: right; flex: 0 0 auto; }
.drill-head .drill-total .dl { font-size: 12px; color: var(--text-3); }
.drill-head .drill-total .dv { font-size: 22px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.drill-head .drill-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.drill-row { cursor: pointer; }
.drill-row:hover td { background: var(--bg-tint); }
@media (max-width: 1023px) {
  .drill-head .drill-title-row { gap: 10px; }
  .drill-head .drill-total { text-align: left; }
  .drill-head .drill-actions .btn { flex: 1 1 auto; }
}

/* ===== 姓名列冻结 (电脑端+手机端: 表格横向滚动时姓名固定可见, 定位学生) ===== */
.sticky-col { position: sticky; left: 0; z-index: 2; background: #fff; box-shadow: 2px 0 4px rgba(0, 0, 0, .05); min-width: 104px; }
thead .sticky-col { background: var(--bg-tint); }
tbody tr:hover .sticky-col { background: var(--bg-tint); }
tr.row-owe .sticky-col { background: #fff7f7; }
tr.row-selected .sticky-col { background: #eef4ff; }
/* 学员管理表: 姓名列冻结 (全端生效), 有选择列时左偏移 */
.stu-table thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--bg-tint); }
.stu-table tbody td.stu-name-cell { position: sticky; left: 0; z-index: 2; background: #fff; box-shadow: 2px 0 4px rgba(0, 0, 0, .05); }

/* ===== 移动端增强 (第二轮优化) ===== */
@media (max-width: 1023px) {
  /* 学员列表: 仅冻结"姓名"列(手机端隐藏性别/身份证副行, 固定列收窄让更多数据列可见) */
  .stu-table { min-width: 820px; }
  /* 手机端姓名列: 只显示姓名一行, 固定列收窄 */
  .stu-table tbody td.stu-name-cell .stu-sub { display: none; }
  .stu-table tbody td.stu-name-cell { min-width: 58px; line-height: 1.3; }
  .stu-table .sticky-col { min-width: 58px; }
  /* 学员列表紧凑: 减小内边距/字号, 一屏看到更多行与更多列 */
  .stu-table th, .stu-table td { padding: 8px 6px; }
  .stu-table table, .stu-table { font-size: 12px; }
  .stu-table .tag { font-size: 11px; padding: 1px 6px; }
  .stu-table tbody td.stu-name-cell > div:first-child { font-size: 13px; }
  /* 操作列吸右时加左阴影, 滚动重叠边界清晰 */
  .stu-table thead th:last-child, .stu-table tbody td:last-child { box-shadow: -2px 0 4px rgba(0, 0, 0, .06); }
  /* 表头: 姓名列表头冻结 (无checkbox时为首列, 有checkbox时在第2列) */
  .stu-table thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--bg-tint); }
  .stu-table.with-sel thead th:nth-child(2) { position: sticky; left: 34px; z-index: 2; background: var(--bg-tint); }
  /* 姓名列: 冻结 + 不透明背景 (解决滚动时内容透出重叠) */
  .stu-table tbody td.stu-name-cell {
    position: sticky; left: 0; z-index: 2;
    background: #fff;
    box-shadow: 2px 0 4px rgba(0, 0, 0, .05);
  }
  .stu-table.with-sel tbody td.stu-name-cell { left: 34px; }
  .stu-table tbody tr.row-owe td.stu-name-cell { background: #fff7f7; }
  .stu-table tbody tr.row-selected td.stu-name-cell { background: #eef4ff; }

  /* iPhone 底部安全区 (底部弹窗/操作栏不被 home 条遮挡) */
  .modal-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .batch-bar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .side-user { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }

  /* 凭证弹窗: 下载/打印按钮全宽并排 */
  #receiptModal .modal-body > div:first-child { display: flex; gap: 8px; }
  #receiptModal .modal-body > div:first-child .btn { flex: 1; }

  /* 弹窗内部滚动流畅 */
  .modal-body { -webkit-overflow-scrolling: touch; min-width: 0; }
  .table-wrap { -webkit-overflow-scrolling: touch; }

  /* 金额数字在小屏不折行 */
  .money, .stat-value { font-variant-numeric: tabular-nums; }

  /* 操作按钮区小屏换行不溢出 */
  .actions { max-width: 100%; }

  /* 详情弹窗: 行信息小屏可换行 */
  .modal .row { flex-wrap: wrap; }

  /* 输入框/下拉在小屏触控高度 */
  input, select, textarea, .btn { min-height: 42px; }
  .btn-sm { min-height: 32px; }

  /* 列表工具栏提示文字在手机上完整显示 */
  .toolbar-hint { line-height: 1.5; }
}

/* 退款管理: 待处理记录高亮 (待管理员审核/管理员已通过/办理中) */
.row-todo { background: #fffbe6; }
.row-todo:hover { background: #fff3c4; }
.row-todo td { border-color: #f0e3b0; }

/* 合并模块页签 (报销退款 / 信息查询) */
.seg-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.seg-tab { padding: 8px 18px; border: 1px solid var(--border, #e2e6ed); border-radius: 8px; background: #fff; font-size: 14px; cursor: pointer; color: var(--text-2); }
.seg-tab.active { background: var(--primary, #2f6fed); color: #fff; border-color: var(--primary, #2f6fed); font-weight: 600; }

/* 一键拨号链接 (移动端便携办公) */
.phone-link { color: var(--primary); text-decoration: none; white-space: nowrap; }
.phone-link:hover { text-decoration: underline; }

/* 公告横幅 (管理员发布, 全员可见) */
.announce-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--warning-bg, #FFF8E1); color: var(--warning, #9a5b13);
  border-bottom: 1px solid rgba(154, 91, 19, .18);
  padding: 9px 18px; font-size: 13px;
}
.announce-banner.hidden { display: none; }

/* 花名册打印: A4 竖版命名页, 与凭证打印互不干扰 */
#rosterPrintArea { display: none; }
@media print {
  @page rosterPage { size: A4 portrait; margin: 12mm; }
  #rosterPrintArea, #rosterPrintArea * { visibility: visible !important; }
  #rosterPrintArea { display: block; position: fixed; left: 0; top: 0; width: 100%; page: rosterPage; font-size: 12px; color: #000; }
  #rosterPrintArea table { width: 100%; border-collapse: collapse; }
  #rosterPrintArea th, #rosterPrintArea td { border: 1px solid #333; padding: 4px 6px; text-align: left; }
  #rosterPrintArea .rh { font-size: 15px; font-weight: 600; text-align: center; margin-bottom: 8px; }
}

/* 导航分组标题 (桌面: 侧栏小标签; 移动端: 宫格整行) */
.nav-group {
  padding: 12px 14px 5px; font-size: 11px; letter-spacing: 2px;
  color: var(--sidebar-text, rgba(255,255,255,.4)); user-select: none;
}
.nav-group:first-child { padding-top: 6px; }

/* ===== 手机端工具栏折叠 (v156) ===== */
@media (max-width: 1023px) {
  .toolbar-m .t-row2 { display: flex; align-items: center; gap: 10px; width: 100%; }
  .toolbar-m .t-row2 .toolbar-hint { width: auto; flex: 1; margin: 0; }
  .toolbar-m .stu-filter-toggle { position: relative; flex-shrink: 0; }
  .stu-filter-toggle .stu-filter-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
    background: var(--danger); color: #fff; border-radius: 9px; font-size: 11px; font-weight: 600;
  }
  .stu-filter-panel {
    margin-bottom: 10px; background: #fff;
    border: 1px solid var(--primary); border-radius: 12px; padding: 12px;
    box-shadow: 0 3px 14px rgba(47,111,237,.12);
  }
  .stu-filter-panel .sf-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--primary-dark); margin-bottom: 10px;
  }
  .stu-filter-panel .sf-title::before {
    content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--primary);
  }
  .stu-filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .stu-filter-grid select {
    width: 100% !important; font-size: 13px; height: 42px;
    border-radius: 8px; border: 1px solid var(--border); background: var(--bg);
    padding: 0 10px; color: var(--text); font-weight: 400;
  }
  .stu-filter-grid select.has-val {
    border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); font-weight: 600;
  }
  .stu-filter-actions { display: flex; gap: 8px; margin-top: 12px; }
  .stu-filter-actions .btn { flex: 1; font-weight: 500; }
  .t-more { width: 100%; }
  .stu-more-toggle { width: 100%; }
  .stu-more-panel { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
  .stu-more-panel .btn { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .stu-more-panel.batch-more { margin-bottom: 0; margin-top: 8px; }
  .batch-m-row { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
  .batch-m-row .btn { flex: 1 1 calc(33.33% - 8px); min-width: 0; white-space: nowrap; }
  .batch-bar > span { width: 100%; }
}

/* ===== 学员卡片 ⋯ 菜单 (手机端) ===== */
.sc-more-btn {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 26px; height: 26px; line-height: 22px; text-align: center;
  border: 1px solid var(--border); border-radius: 7px; background: #fff;
  color: var(--text-2); font-size: 15px; padding: 0; cursor: pointer;
}
.stu-card .stu-sel {
  flex: 0 0 auto; width: 15px; height: 15px; min-height: 15px; margin: 0; padding: 0;
  accent-color: var(--primary); cursor: pointer;
}
.sc-menu {
  position: absolute; top: 38px; right: 8px; z-index: 9;
  min-width: 118px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 4px 18px rgba(31,36,48,.12); overflow: hidden;
}
.sc-mi { padding: 10px 14px; font-size: 13px; color: var(--text); cursor: pointer; }
.sc-mi:hover { background: var(--primary-light); }
.sc-mi.danger { color: var(--danger); }
.sc-mi.danger:hover { background: var(--danger-bg); }

/* ===== 通用"左右滑动"指示 (页签栏/表格右侧渐隐 + 箭头) ===== */
.scroll-hint-wrap { position: relative; }
.scroll-hint {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 6;
  width: 44px; display: flex; align-items: center; justify-content: flex-end;
  pointer-events: none; opacity: 0; transition: opacity .25s ease;
}
.scroll-hint.on { opacity: 1; pointer-events: auto; }
.scroll-hint .sh-fade {
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(270deg, rgba(255,255,255,.94), rgba(255,255,255,0));
}
.scroll-hint .sh-arrow {
  position: relative; margin-right: 6px; flex-shrink: 0;
  width: 26px; height: 26px; line-height: 24px; text-align: center;
  border: none; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer; padding: 0;
  box-shadow: 0 2px 8px rgba(47,111,237,.35);
  animation: sh-nudge 1.2s ease-in-out infinite;
}
@keyframes sh-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
@media (max-width: 1023px) {
  .stu-tabs { position: relative; }
}

/* ===== 成考报名自动同步小标签 (v156) ===== */
.ck-auto-tip {
  display: inline-block; margin-left: 3px; padding: 0 5px;
  font-size: 11px; line-height: 16px; border-radius: 8px;
  background: var(--success-bg); color: var(--success); font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 1023px) {
  .ck-auto-tip { display: none; }
}

/* ===== 话术模板模块 (v159) ===== */
.sms-cat-tag {
  display: inline-block; padding: 1px 8px; border-radius: 8px;
  color: #fff; font-size: 11px; font-weight: 500; line-height: 17px;
}
.sms-var {
  display: inline-block; padding: 0 4px; margin: 0 1px; border-radius: 4px;
  background: var(--primary-light); color: var(--primary-dark);
  font-size: 12px; font-weight: 600;
}
.sms-var-input {
  font-size: 14px; height: 38px;
}
@media (max-width: 1023px) {
  .sms-cat-tag { font-size: 11px; }
}

/* ===== 学员微信联动 (v160) ===== */
.stu-sum-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
@media (max-width: 1023px) {
  .stu-sum-actions { width: 100%; }
  .stu-sum-actions .btn { flex: 1; }
}

/* ===== 看板增强 (v172): 欠费榜副标题 + 饼图 ===== */
.rank-sub { font-size: 11px; color: var(--text-3); font-weight: 400; margin-top: 1px; }

/* ===== 通用表单弹窗 (v174, 替代原生 prompt) ===== */
.fm-input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border, #dde1e8);
  border-radius: 8px; font-size: 13px; box-sizing: border-box;
  background: #fff; color: var(--text-1, #1f2430);
}
.fm-input:focus { outline: none; border-color: var(--primary, #185FA5); box-shadow: 0 0 0 2px rgba(24,95,165,.12); }
.modal-sm .form-group { display: block; }
.modal-sm .form-group label { display: block; margin-bottom: 4px; }
.modal-sm .form-group select.fm-input { appearance: auto; }

/* ============================================================
 * UI 美化增强层 (v189) — 纯展示层, 不涉及业务逻辑/数据/接口
 * 深蓝+浅蓝校园办公风格: 侧边栏悬浮/选中、顶栏面包屑、按钮三态、
 * 输入框聚焦光环、表格斑马纹+hover、卡片柔和阴影、字体层级
 * ============================================================ */
:root {
  --primary-600: #1d4ed8;      /* 主色加深: 按钮/选中 */
  --primary-500: #2563eb;      /* 主色 */
  --primary-100: #dbeafe;      /* 浅蓝辅助 */
  --primary-50: #eff6ff;       /* 极浅蓝底 */
  --brand-gradient: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  --radius-lg: 14px;
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-hover: 0 2px 4px rgba(15, 23, 42, .06), 0 14px 32px rgba(15, 23, 42, .10);
  --sidebar-w: 236px;
}
html { -webkit-font-smoothing: antialiased; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif; letter-spacing: .01em; }

/* ---------- 侧边栏: 悬浮 / 选中高亮 / 分组 (仅桌面端, 手机端为顶部导航不走这些规则) ---------- */
@media (min-width: 1024px) {
.sidebar { width: var(--sidebar-w); background: linear-gradient(180deg, #16203a 0%, #1c2a4a 100%); box-shadow: 1px 0 12px rgba(15, 23, 42, .10); }
.nav-group { padding: 14px 20px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: rgba(174, 182, 200, .55); text-transform: uppercase; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px;
  margin: 2px 10px; padding: 9px 14px; border-radius: 9px;
  font-size: 13px; letter-spacing: .02em; transition: all .18s ease;
  border: none; background: transparent; color: var(--sidebar-text);
}
.nav-item .nav-icon { font-size: 15px; width: 20px; text-align: center; opacity: .85; transition: opacity .18s; }
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; transform: translateX(3px); }
.nav-item:hover .nav-icon { opacity: 1; }
.nav-item.active { background: var(--brand-gradient); color: #fff; box-shadow: 0 4px 14px rgba(37, 99, 235, .35); font-weight: 600; }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%); width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: #60a5fa; }
}

/* ---------- 顶栏: 白底阴影 + 面包屑 ---------- */
.topbar { background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .04); }
.topbar-title { font-size: 17px; font-weight: 700; color: #0f172a; letter-spacing: .01em; }
.reminder-badge { transition: all .15s; border: none; background: #f1f5f9 !important; color: #475569 !important; border-radius: 8px; }
.reminder-badge:hover { background: var(--primary-100) !important; color: var(--primary-600) !important; transform: translateY(-1px); }
.topbar-date { font-size: 13px; color: #64748b; }

/* ---------- 按钮三态 ---------- */
.btn { height: 34px; padding: 0 16px; font-size: 13px; border-radius: 8px; font-weight: 500; letter-spacing: .01em; transition: all .16s ease; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.btn-primary { background: var(--brand-gradient); border: none; box-shadow: 0 4px 12px rgba(37, 99, 235, .28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37, 99, 235, .34); }
.btn-plain { background: #fff; border: 1px solid var(--border); color: #334155; }
.btn-plain:hover { border-color: var(--primary-500); color: var(--primary-600); background: var(--primary-50); }
.btn-danger { background: var(--danger-bg); border: 1px solid #f3c0c2; color: var(--danger); }
.btn-danger:hover { background: #fce3e4; border-color: var(--danger); color: #d03034; }
.btn-sm { height: 28px; padding: 0 12px; font-size: 13px; border-radius: 7px; }

/* ---------- 输入框/下拉: 聚焦光环 ---------- */
input[type="text"], input[type="number"], input[type="date"], input[type="tel"], input[type="password"], select, textarea {
  border-radius: 8px; transition: border-color .15s, box-shadow .15s, background .15s;
  border: 1px solid #d6dbe4; background: #fff;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary-500); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); outline: none; background: #fff;
}
.form-group label { font-size: 13px; font-weight: 600; color: #334155; letter-spacing: .02em; }

/* ---------- 表格: 表头 / 斑马纹 / hover ---------- */
.table-wrap { border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-soft); }
.tb-scroll thead th, .stu-table thead th, table thead th, .tb-scroll thead .sticky-col, .stu-table thead th:first-child { background: #eef2f8 !important; color: #334155 !important; font-weight: 600; font-size: 13px; letter-spacing: .02em; }
.stu-table tbody tr:nth-child(even) td { background: var(--bg-tint); }
.stu-table tbody tr:hover td { background: var(--primary-50) !important; }
.stu-table tbody tr:hover td:last-child { background: var(--primary-50) !important; }
.stu-table tbody tr.row-owe:hover td { background: #fdf3f3 !important; }
td { font-size: 13px; color: #1e293b; }
tbody td { border-bottom: 1px solid #eef1f5; }

/* ---------- 卡片: 柔和阴影 + hover 微抬升 ---------- */
.card { border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); border: 1px solid rgba(15, 23, 42, .04); transition: box-shadow .2s ease; }
.card:hover { box-shadow: var(--shadow-hover); }
.card-title { font-size: 15px; font-weight: 700; color: #0f172a; }
.stat-card { border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); border: 1px solid rgba(15, 23, 42, .04); }

/* ---------- 工具栏 / 页签 ---------- */
.toolbar { padding: 0 0 4px; }
.stu-tab, .tab-item { border-radius: 8px; font-weight: 500; transition: all .15s; }
.stu-tab.active, .tab-item.active { background: var(--primary-100); color: var(--primary-600); }

/* ---------- 弹窗 ---------- */
.modal { border-radius: 16px; box-shadow: 0 24px 64px rgba(15, 23, 42, .18); border: 1px solid rgba(15, 23, 42, .06); }

/* ---------- 登录页 ---------- */
.login-card { border-radius: 18px; box-shadow: 0 24px 64px rgba(15, 23, 42, .16); }

/* ---------- 移动端不变 (仅桌面美化) ---------- */
@media (max-width: 1023px) {
  .nav-item:hover { transform: none; }
  .table-wrap { border-radius: 10px; box-shadow: none; }
}

/* ---------- 打印隔离: 美化层规则不影响打印输出 (凭证/报表尺寸不变) ---------- */
@media print {
  .table-wrap, .card, .stat-card, .modal, .login-card {
    box-shadow: none !important; border-radius: 0 !important; border: none !important;
  }
  table thead th { background: #f5f5f5 !important; color: #000 !important; }
  .stu-table tbody tr:nth-child(even) td { background: #fff !important; }
  .stu-table tbody tr:hover td { background: #fff !important; }
  .topbar { box-shadow: none !important; background: #fff !important; }
  .sidebar { box-shadow: none !important; }
}

/* ============================================================
 * UI 美化增强层 · 第二阶段 (v189-2) — 看板/报销/工资/列表细分
 * ============================================================ */

/* ---------- 统计卡: 渐变左侧条 + 数值醒目 + hover 上浮 ---------- */
.stat-card { position: relative; overflow: hidden; transition: all .2s ease; }
.stat-card::after { content: ''; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(37,99,235,.06) 0%, transparent 70%); pointer-events: none; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.stat-card .stat-label { font-size: 13px; font-weight: 600; color: #64748b; letter-spacing: .03em; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.stat-card .stat-sub { font-size: 12px; color: #94a3b8; }
.stat-card.sc-blue { border-left: 4px solid var(--primary-500); background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%); }
.stat-card.sc-red { border-left: 4px solid var(--danger); background: linear-gradient(135deg, #ffffff 0%, #fef9f9 100%); }
.stat-card.sc-green { border-left: 4px solid var(--success); background: linear-gradient(135deg, #ffffff 0%, #f7fdf9 100%); }
.stat-card.sc-orange { border-left: 4px solid var(--warning); background: linear-gradient(135deg, #ffffff 0%, #fefbf6 100%); }

/* ---------- 看板列表/图表区 ---------- */
.dash-grid .card { padding: 22px 24px; }
.card-title { display: flex; align-items: center; gap: 8px; }
.card-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border) 0%, transparent 100%); margin-left: 4px; }

/* ---------- 报销/退款流程卡片 ---------- */
.reimburse-card, .exp-card { border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); border: 1px solid rgba(15,23,42,.04); transition: all .2s; }
.reimburse-card:hover, .exp-card:hover { box-shadow: var(--shadow-hover); }
.reimburse-item, .exp-item { border-radius: 10px; transition: background .15s; }
.reimburse-item:hover, .exp-item:hover { background: var(--primary-50); }

/* ---------- 功能页通用容器 ---------- */
.toolbar { background: #fff; padding: 14px 16px; border-radius: var(--radius-lg); border: 1px solid rgba(15,23,42,.04); box-shadow: var(--shadow-soft); margin-bottom: 16px; }
.filter-bar, .summary-bar { border-radius: var(--radius-lg); }

/* ---------- 页签细化 ---------- */
.stu-tab, .tab-item { padding: 7px 16px; font-size: 13px; }
.stu-tab:hover, .tab-item:hover { background: var(--primary-50); }

/* ---------- 金额高亮 ---------- */
.money-red { font-weight: 700; }

/* ---------- 消息通知面板 ---------- */
.notify-panel { border-radius: 14px; box-shadow: 0 16px 48px rgba(15,23,42,.16); border: 1px solid rgba(15,23,42,.06); }
.notify-item { border-radius: 8px; transition: background .15s; }

/* ---------- 花名册/导出预览 ---------- */
.roster-print-wrap { border-radius: 12px; }

/* ---------- 状态徽标/标签 ---------- */
.tag, .status-tag, .badge { border-radius: 20px; letter-spacing: .02em; }

/* ---------- 登录页细化 ---------- */
.login-page { background: linear-gradient(135deg, #0f1e3d 0%, #1d3a6e 50%, #2563eb 100%); }
.login-card { border-radius: 20px; box-shadow: 0 32px 80px rgba(2, 10, 30, .35); }

/* ---------- 空状态 ---------- */
.empty { color: #94a3b8; }

/* ============================================================
 * UI 美化增强层 · 第三阶段 (v191) — 页签数字可读性修复
 * ============================================================ */
/* 学员/话术业务页签: 选中态数字清晰(浅蓝底 + 深蓝数字, 白字数字看不清) */
.stu-tab.active .n,
.stu-tab.active .n:hover { background: var(--primary-600); color: #fff; }
.stu-tab:not(.active) .n { background: #eef1f6; color: #64748b; }
.stu-tab:not(.active):hover .n { background: var(--primary-100); color: var(--primary-600); }
/* 选中态整体: 用渐变色块替代浅蓝底, 数字对比更强 */
.stu-tab.active { background: var(--brand-gradient) !important; border-color: transparent !important; color: #fff !important; box-shadow: 0 3px 10px rgba(37, 99, 235, .28); }

/* ============================================================
 * UI 美化增强层 · 收尾 (v192) — 表格操作按钮/工资明细/细节点缀
 * ============================================================ */

/* 表格内操作按钮: 统一为小号胶囊, hover 增强 */
.op-btn { border-radius: 6px; padding: 3px 10px; font-size: 13px; transition: all .15s; border: 1px solid transparent; }
.op-btn:hover { background: var(--primary-50); border-color: var(--primary-100); }

/* 工资明细展开行: 浅蓝底 + 内缩 */
.salary-detail td { background: var(--bg-tint) !important; }
.salary-detail table { border-radius: 8px; overflow: hidden; }

/* 表格行选中态 */
.stu-table tbody tr.row-selected td { background: #e8f1ff !important; }

/* 复选框 accent 色 + 大小 */
input[type="checkbox"] { accent-color: var(--primary-500); width: 15px; height: 15px; }

/* 链接/查看按钮颜色 */
a { color: var(--primary-600); transition: color .15s; }
a:hover { color: var(--primary-500); }

/* 滚动条细化 (桌面) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 表格容器内间距 */
.table-wrap { padding: 0; }
.table-wrap table { border-radius: 14px; }

/* 必填星号 */
.req { color: var(--danger); font-weight: 700; }

/* 提示文字统一 */
.toolbar-hint, .hint, .tip { color: #94a3b8; }

/* ============================================================
 * UI 优化 · 手机端触控体验 (v193) — 放大触控目标, 不重排版
 * ============================================================ */
@media (max-width: 1023px) {
  /* 学员卡片"更多"按钮: 26px → 34px 触控区 */
  .sc-more-btn { width: 34px; height: 34px; line-height: 30px; font-size: 17px; border-radius: 9px; }
  /* 卡片展开箭头: 26px → 32px */
  .scroll-hint .sh-arrow { width: 32px; height: 32px; line-height: 30px; font-size: 16px; }
  /* 复选框: 15px → 20px (移动端勾选更易点中) */
  .stu-card .stu-sel, input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; }
  /* 操作菜单项: 增加高度, 触控更宽裕 */
  .sc-mi { padding: 12px 14px; font-size: 13px; }
  /* 表格行高 + 操作按钮间距 (移动端卡片视图不受影响) */
  .stu-table td { padding-top: 10px; padding-bottom: 10px; }
  /* 弹窗底部按钮: 高度加大, 便于拇指操作 */
  .modal-foot .btn { height: 42px; font-size: 15px; }
  /* 页签: 高度加大 */
  .stu-tab, .tab-item { padding: 9px 14px; }
  /* 顶部"更多"操作按钮组 */
  .toolbar .btn { height: 38px; }
  /* 表单输入框: 移动端加大内边距, 避免误触 */
  .form-group input, .form-group select, .form-grid input, .form-grid select { min-height: 40px; }
}

/* ============================================================
 * UI 美化 · 手机端对齐电脑端风格 (v194)
 * 深蓝+浅蓝校园风格在移动端的落地: 卡片阴影/渐变侧边栏/页签/按钮
 * ============================================================ */
@media (max-width: 1023px) {
  /* 学员卡片: 柔和阴影 + 圆角, 与电脑端卡片一致 */
  .stu-card { border-radius: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 20px rgba(15,23,42,.05); border: 1px solid rgba(15,23,42,.05); }
  .stu-card:active { box-shadow: 0 2px 4px rgba(15,23,42,.08), 0 10px 28px rgba(15,23,42,.10); }
  .stu-card.row-owe { background: #fff7f7; border-color: #f2c9c9; }
  .stu-card.row-selected { background: #eef4ff; border-color: var(--primary-500); }
  .stu-card .sc-name { font-size: 16px; }
  .stu-card .sc-info { font-size: 13px; color: #475569; }
  .stu-card .sc-info2 { color: #94a3b8; }
  .stu-card .sc-fee { border-top-color: #eef1f5; }

  /* 手机端侧边栏: 深蓝渐变 + 悬浮 */
  .sidebar { background: linear-gradient(180deg, #16203a 0%, #1c2a4a 100%); box-shadow: 2px 0 16px rgba(15,23,42,.12); }
  .nav-item.active { background: var(--brand-gradient); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
  .nav-group { color: rgba(174,182,200,.55); }

  /* 统计卡: 手机端加圆角阴影 (看板/线索等) */
  .stat-card { border-radius: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 20px rgba(15,23,42,.06); }
  .stat-card .stat-value { font-size: 24px; }

  /* 通用卡片容器 */
  .card { border-radius: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 20px rgba(15,23,42,.06); }

  /* 页签: 卡片化底色 */
  .stu-tabs { background: #eef2f8; border-radius: 14px; }
  .stu-tab { border-radius: 9px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }

  /* 工具栏: 白底卡片化 */
  .toolbar-m { background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 20px rgba(15,23,42,.06); border: 1px solid rgba(15,23,42,.05); }

  /* 按钮: 与电脑端一致的圆角/阴影 */
  .btn { border-radius: 9px; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
  .btn-primary { box-shadow: 0 4px 12px rgba(37,99,235,.28); }

  /* 输入框/下拉: 圆角统一 */
  input, select, textarea { border-radius: 9px; }

  /* 筛选面板: 与卡片一致 */
  .stu-filter-panel { border-radius: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 20px rgba(15,23,42,.06); }
  .stu-filter-grid select { border-radius: 9px; }

  /* 弹窗: 全屏圆角 (顶部圆角, 底部贴边) */
  .modal { border-radius: 16px 16px 0 0; }
  .modal-head { border-bottom: 1px solid #eef1f5; }

  /* 空状态/提示居中 */
  .empty { color: #94a3b8; }

  /* 通知面板 */
  .notify-panel { border-radius: 14px; box-shadow: 0 12px 40px rgba(15,23,42,.14); }
}

/* ============================================================
 * UI 修复 · 手机端导航显示不协调 (v195)
 * 根因: 桌面美化层 .sidebar 宽度/渐变在手机端误伤, 露白两色
 * ============================================================ */
@media (max-width: 1023px) {
  /* 侧边栏(顶部导航): 强制全宽 + 统一深蓝单色, 消除两色露白 */
  .sidebar { width: 100% !important; background: linear-gradient(180deg, #16203a 0%, #1c2a4a 100%) !important; box-shadow: 0 1px 8px rgba(15,23,42,.10) !important; }
  /* 手机端导航项: 无桌面 hover 位移/指示条, 选中态用浅蓝底+白字(宫格内协调) */
  .nav-item:hover { transform: none !important; }
  .nav-item.active::before { display: none !important; }
  .nav-item.active { background: rgba(59,130,246,.28) !important; box-shadow: none !important; color: #fff !important; }
  /* 展开后的导航项底色协调: 半透明白, 宫格可见 */
  .sidebar.nav-open .nav-item { background: rgba(255,255,255,.05); }
  .sidebar.nav-open .nav-item:hover { background: rgba(255,255,255,.12); }
  /* 展开箭头/底部按钮: 与导航背景协调 */
  .nav-toggle { color: #c3cadb; }
}

/* ============================================================
 * 报销退款模块美化 (v198) — 操作分级/待办高亮/迷你进度条
 * ============================================================ */
/* 操作按钮分级: 主操作实心, 次操作弱化 */
.op-btn { border-radius: 7px; padding: 4px 11px; font-size: 13px; border: 1px solid var(--border); background: #fff; color: #475569; cursor: pointer; transition: all .15s; white-space: nowrap; }
.op-btn:hover { border-color: var(--primary-500); color: var(--primary-600); background: var(--primary-50); }
.op-primary { background: var(--brand-gradient); color: #fff !important; border: none; box-shadow: 0 2px 8px rgba(37,99,235,.25); }
.op-primary:hover { background: var(--primary-600); border: none; transform: translateY(-1px); }
.op-success { background: var(--success); color: #fff !important; border: none; box-shadow: 0 2px 8px rgba(26,158,92,.22); }
.op-success:hover { background: #158a4f; border: none; transform: translateY(-1px); }
.op-danger { background: #fff; color: var(--danger) !important; border: 1px solid #f3c0c2; }
.op-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.op-view { background: #fff; color: #475569; }
.op-view:hover { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary-600); }

/* 待办行: 浅色底 + 左侧状态色条 */
.row-todo { position: relative; }
.todo-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 0 3px 3px 0; }
.todo-bar-orange { background: var(--warning); }
.todo-bar-blue { background: var(--primary-500); }

/* 退款迷你进度条 */
.step-mini { display: flex; align-items: center; gap: 4px; }
.step-dot { width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0; flex-shrink: 0; }
.step-dot.cur { background: var(--primary-500); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.step-dot.done { background: var(--success); }
.step-line { width: 14px; height: 2px; background: #e2e8f0; border-radius: 1px; flex-shrink: 0; }
.step-mini .step-dot.cur ~ .step-line { background: var(--primary-200, #bfdbfe); }

/* 报销/退款卡片标题提示 */
.card-title .hint-inline { font-size: 12px; font-weight: 400; color: #94a3b8; margin-left: 8px; }

/* ============================================================
 * v203 顶栏全局快捷搜索 + 搜索结果列表
 * ============================================================ */
.global-search { flex: 1; max-width: 360px; margin: 0 16px; position: relative; }
.global-search input {
  width: 100%; height: 34px; padding: 0 36px 0 14px; font-size: 13px;
  border: 1px solid #d6dbe4; border-radius: 9px; background: var(--bg-tint);
  transition: all .18s ease; outline: none;
}
.global-search input:focus { background: #fff; border-color: var(--primary-500); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.gs-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: none; border-radius: 7px;
  background: transparent; color: #64748b; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.gs-btn:hover { background: var(--primary-100); color: var(--primary-600); }
.gs-result { padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background .13s; }
.gs-result:hover { background: var(--primary-50); }
.gs-result + .gs-result { border-top: 1px solid #f1f4f8; }
@media (max-width: 1023px) {
  /* 移动端: 全局搜索改为紧凑自适应(不隐藏), 允许收缩, 保持可用 */
  .global-search { max-width: 40vw; margin: 0 8px; flex: 1 1 auto; min-width: 0; }
  .global-search input { height: 32px; font-size: 13px; padding: 0 32px 0 10px; }
  .global-search .gs-btn { width: 24px; height: 24px; right: 3px; }
}

/* ============ v220: 学员详情/列表实用性增强 ============ */
/* 1. 分区折叠: 分区标题变为可点击, 带折叠箭头 */
.form-section-title.collapsible { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 6px; }
.form-section-title.collapsible::before { content: '▾'; font-size: 11px; color: var(--text-3); transition: transform .2s; }
.form-section-title.collapsible.collapsed::before { transform: rotate(-90deg); }
.form-section-title.collapsible:hover { color: var(--primary); }
.section-collapse { transition: opacity .15s; }
.section-collapse.collapsed { display: none; }

/* 2. 学员姓名列副行: 负责人+年级 */
.stu-sub .sub-tags { display: inline-flex; gap: 4px; margin-left: 4px; vertical-align: middle; }
.stu-sub .sub-tags .tag { font-size: 11px; padding: 0 6px; line-height: 16px; }

/* 3. 最近动态提示条 */
.stu-recent { display: flex; align-items: center; gap: 8px; background: linear-gradient(90deg, rgba(37,99,235,.06), transparent); border: 1px solid rgba(37,99,235,.12); border-radius: 10px; padding: 8px 12px; margin: 10px 0 4px; font-size: 13px; color: var(--text-2); }
.stu-recent .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex: 0 0 auto; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* 4. 快速催缴按钮 */
.collect-quick { display: inline-flex; align-items: center; gap: 4px; }

/* 5. 缴费时间线 */
.pay-history { margin-top: 8px; position: relative; }
.pay-tl-item { position: relative; padding: 7px 0 7px 8px; margin-left: 16px; }
.pay-tl-item::before { content: ''; position: absolute; left: -20px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; box-shadow: 0 0 0 1px #22c55e55; }
.pay-tl-item.pending::before { background: #f59e0b; box-shadow: 0 0 0 1px #f59e0b55; }
.pay-tl-item.refund::before { background: #ef4444; box-shadow: 0 0 0 1px #ef444455; }
.pay-history .pay-title-sub { position: relative; margin-left: 16px; }
.pay-history .pay-title-sub::before { content: ''; position: absolute; left: -20px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; box-shadow: 0 0 0 1px #ef444455; }
.pay-tl-item + .pay-tl-item, .pay-tl-item + .pay-title-sub, .pay-title-sub + .pay-tl-item { margin-top: 2px; }
.pay-tl-item:not(:last-child)::after, .pay-tl-item + .pay-title-sub::after, .pay-title-sub + .pay-tl-item::after { content: ''; position: absolute; left: -16px; top: 20px; bottom: -8px; width: 2px; background: #e2e8f0; }

/* 6. 身份证格式化 */
.idcard-fmt { font-variant-numeric: tabular-nums; letter-spacing: .5px; }

/* 7. 列显隐面板 */
.cols-panel { position: absolute; top: 100%; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 10px 12px; z-index: 30; min-width: 180px; }
.cols-panel label { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 0; cursor: pointer; }
.cols-panel label:hover { color: var(--primary); }

/* 7b. 紧凑视图: 隐藏负责教务/班级列 (姓名列副行已含负责人缩写+年级) */
.table-wrap.compact-cols .col-manager { display: none; }
.table-wrap.compact-cols .col-class { display: none; }

/* 缴费记录行保留旧样式兼容 */
.pay-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
.pay-row:last-child { border-bottom: none; }
.pay-row.refund { background: #fef2f2; border-radius: 6px; margin-top: 2px; }
.pay-amount { font-weight: 600; white-space: nowrap; }
.pay-amount.refund { color: #ef4444; }

/* ============ v210: 学员详情考务/毕业信息集成 ============ */
/* 考务/毕业信息 网格布局 */
.eg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; padding: 4px 0; }
.eg-cell { background: var(--bg-tint); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; min-height: 52px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.eg-key { font-size: 11px; color: var(--text-3); }
.eg-val { font-size: 13px; font-weight: 600; color: var(--text-1); line-height: 1.4; }
.eg-actions { background: transparent; border: none; justify-content: flex-end; min-height: 0; padding: 4px 0; }
/* 移动端: 考务/毕业信息两列 */
@media (max-width: 1023px) {
  .eg-grid { grid-template-columns: 1fr 1fr; }
}

/* ============ v211: 全生命周期状态条 ============ */
.lifecycle-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.lc-tag { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 999px; white-space: nowrap; cursor: default; }
.lc-ok   { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.lc-info { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.lc-warn { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.lc-bad  { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
/* 表格状态列内: 生命周期标签与状态标签上下排列 */
.stu-table .lifecycle-tags { margin: 5px 0 0; }
/* 移动端卡片内状态条 */
.stu-card .lifecycle-tags { margin: 6px 0 2px; }

/* ============================================================
   v215: 表格底部常驻横向滚动条 (v2 - 隐藏原生横向滚动条, 单一自定义滚动条)
   要点: ①隐藏原生横向滚动条(webkit) ②自定义bar热区14px方便点按
        ③拖动/点击均联动 ④不随纵向滚动消失 ⑤深色模式适配
   ============================================================ */
/* 隐藏 .table-wrap 全部原生滚动条(横+纵), 横向由自定义 bar 接管, 纵向靠滚轮/触摸滚动 */
.table-wrap { scrollbar-width: none; -ms-overflow-style: none; }
.table-wrap::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* 桌面端同样隐藏, 避免与自定义 bar 形成双滚动条 */
/* 自定义常驻横向滚动条 */
.tw-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20px;                 /* 热区高度: 鼠标/手指更易点按 */
  background: transparent;
  cursor: pointer;
  touch-action: none;
  z-index: 8;
  display: none;
  align-items: center;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}
.tw-bar.on { display: flex; }
/* 轨道背景(细条) */
.tw-bar::before {
  content: '';
  position: absolute;
  left: 2px; right: 2px; top: 50%;
  height: 8px;
  transform: translateY(-50%);
  background: rgba(148, 163, 184, .22);
  border-radius: 8px;
  transition: background .15s ease;
}
.tw-bar:hover::before { background: rgba(148, 163, 184, .32); }
.tw-thumb {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  height: 12px;
  min-width: 48px;
  background: var(--primary, #185FA5);
  border-radius: 8px;
  opacity: .85;
  transition: opacity .15s ease, background .15s ease, height .12s ease;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25);
}
.tw-bar:hover .tw-thumb { opacity: 1; }
.tw-bar.dragging .tw-thumb {
  height: 14px;
  opacity: 1;
  background: var(--primary-dark, #123f78);
  box-shadow: 0 2px 8px rgba(24, 95, 165, .45);
}
.tw-bar:active .tw-thumb { background: var(--primary-dark, #123f78); }
/* 深色模式 */
body.dark-mode .tw-bar::before, .dark-mode .tw-bar::before { background: rgba(148, 163, 184, .28); }
body.dark-mode .tw-thumb, .dark-mode .tw-thumb { background: #3b82f6; }
/* ===== 深色模式(类驱动, 原 prefers-color-scheme) ===== */
/* dark */ body.dark-mode .tw-bar::before {
  background: rgba(148, 163, 184, .28);
}
/* dark */ body.dark-mode .tw-thumb {
  background: #3b82f6;
}

/* 打印时隐藏常驻滚动条 */
@media print { .tw-bar { display: none !important; } }

/* ========== 支出往来 (代缴学费等手工登记的往来账目) ========== */
.po-voided { opacity: .55; }
.po-voided td { text-decoration: line-through; text-decoration-color: rgba(214,69,69,.5); }
#poStudentCand {
  position: absolute; z-index: 60; left: 0; right: 0; background: #fff;
  border: 1px solid var(--border); border-radius: 8px; margin-top: 2px;
  box-shadow: 0 6px 20px rgba(15,23,42,.14); max-height: 230px; overflow-y: auto;
}
#poStudentCand .po-cand-item:hover { background: var(--bg-soft); }
#po_owe, #po_status { background: var(--bg-soft); color: var(--text-2); font-weight: 600; }

/* ========== 资金往来模块: 视觉规范统一 (统计卡激活态 / 可点击卡 / 筛选控件) ========== */
/* 统计卡激活态: 表示当前列表正按该卡筛选 (点击统计卡筛选时高亮) */
.stat-card.sc-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(74, 124, 255, .18), var(--shadow-soft);
  background: var(--bg-tint);
}
/* 可点击统计卡: 轻微悬停反馈, 让"能点"这件事可见 */
.stat-card[onclick] { transition: transform .12s ease, box-shadow .12s ease; }
.stat-card[onclick]:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(15, 23, 42, .10); }
/* 工具栏内筛选控件统一高度与字号 (搜索框/下拉/月份选择器视觉一致) */
.toolbar .gs-input, .toolbar select.gs-input, .toolbar input.gs-input { height: 34px; font-size: 13px; }
/* 统计卡三段式间距统一 (标签 / 数值 / 副说明) */
.stat-card .stat-sub { margin-top: 2px; line-height: 1.5; }
/* 表格行内操作按钮: 统一间距, 避免密集堆叠 */
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* 页签待办数字徽标 (资金往来: 该页签下有活时才显示) */
.seg-tab-num {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
  padding: 0 5px; margin-left: 6px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; text-align: center;
}
.seg-tab.active .seg-tab-num { background: #fff; color: var(--primary); }

/* v260: 折叠区块标题右侧的条目数标记 (附件/催缴记录等低频区块) */
.form-section-title .sec-count {
  font-size: 12px; font-weight: 500; color: var(--text-3);
  background: var(--bg-muted); border-radius: 8px; padding: 0 7px; line-height: 17px;
  margin-left: auto;
}
.form-section-title.collapsible.collapsed:hover .sec-count { color: var(--primary); }

/* ============ v260: 学员列表 可读性与总宽优化 ============ */
/* 桌面表格(≥1024px): 收紧内边距与字号 + 长文本省略
   改造前: 表格总宽 1398px > 可视 1112px(1440 屏), 溢出 286px, 「费用/状态」列需左右拖动才能看全;
   改造后: 合并「负责教务/班级」、国开 4→2 列、成考 4→3 列 + 密度收紧, 1440px 屏幕内完整显示 */
@media (min-width: 1024px) {
  .stu-table th, .stu-table td { padding: 8px; font-size: 13px; }
  /* 业务列长文本(层次/学校/专业等)超出省略; 完整内容通过 title 悬停查看 */
  .stu-table td.biz-cell { max-width: 164px; overflow: hidden; text-overflow: ellipsis; }
  /* 学员列副行(手机号/身份证)超出省略, 完整内容 title 悬停查看 */
  .stu-table td.stu-name-cell .stu-sub { max-width: 172px; overflow: hidden; text-overflow: ellipsis; }
  .stu-table .fee-cell { max-width: 134px; }
  /* 合并后的「负责教务 / 班级」列: 允许换行, 负责人名与班级标签同行展示 */
  .stu-table td.col-manager.col-class { white-space: normal; line-height: 1.5; }
  .stu-table td.col-manager.col-class .cell-main { font-weight: 600; }
  .stu-table td.col-manager.col-class .tag { font-size: 11px; padding: 1px 7px; }
}

/* ============ v261: 学员模块 P1 体验规范 ============ */
/* 1. 工具栏控件尺寸统一 (改造前: 高度 38/34/28px、字号 14/13.5/12.5px 三种混排) */
@media (min-width: 1024px) {
  .toolbar { gap: 8px; }
  .toolbar input:not([type="checkbox"]):not([type="radio"]),
  .toolbar select,
  .toolbar .btn { height: 34px; font-size: 13px; line-height: 1.2; box-sizing: border-box; }
  .toolbar input:not([type="checkbox"]):not([type="radio"]),
  .toolbar select { padding-top: 0; padding-bottom: 0; }
  /* 工具栏按功能分组: 筛选区(左) / 数据操作区 / 主操作(右) */
  .toolbar .tb-group { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .toolbar .tb-primary { margin-left: 2px; }
  .toolbar .tb-clear { color: var(--text-2); }
  .toolbar-hint b { font-weight: 700; color: var(--text); }
  .toolbar .cv-state { margin-left: 5px; font-size: 12px; font-weight: 600; color: var(--primary); }
}
/* 2. 统计卡数值单位后缀 (人 / 笔) */
.stat-card .stat-value .u { font-size: 14px; font-weight: 600; margin-left: 2px; }
/* 3. 表格行「⋯ 更多操作」菜单 (与移动端卡片 ⋯ 菜单同款, 收拢低频/危险操作) */
.row-more-wrap { position: relative; display: inline-block; }
.row-menu {
  position: absolute; top: 26px; right: 0; z-index: 30;
  min-width: 158px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 26px rgba(31, 36, 48, .16); overflow: hidden; padding: 4px 0;
}
.rm-item { display: block; padding: 9px 14px; font-size: 13px; color: var(--text); cursor: pointer; white-space: nowrap; }
.rm-item:hover { background: var(--primary-light); }
.rm-item.danger { color: var(--danger); }
.rm-item.danger:hover { background: var(--danger-bg); }
.rm-item.ok { color: var(--success); }
.rm-item.ok:hover { background: #e8f7ef; }
/* 4. 文本粘连修复: 副行标签与电话之间强制留白 + 表格内多标签加间距 */
.stu-sub .sub-tags { margin-left: 8px; }
.stu-sub .sub-tags::before { content: '·'; margin-right: 6px; color: var(--text-3); }
.stu-table td .tag + .tag,
.stu-table td .lc-tag + .lc-tag,
.stu-table td .tag + .lc-tag,
.stu-table td .lc-tag + .tag { margin-left: 4px; }
.lifecycle-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
/* 5. 详情弹窗字号基线 (收敛方向: 区块标题 14 / 标签·辅助 12.5 / 正文 13.5 / 关键金额 15) */
#studentModal .modal-body { font-size: 13px; line-height: 1.6; }
#studentModal .form-section-title { font-size: 14px; font-weight: 600; }
#studentModal .form-section-title.sub { font-size: 13px; }
#studentModal label { font-size: 13px; color: var(--text-3); }
#studentModal .stu-sum-fee .sf-item b { font-size: 15px; font-weight: 700; }
/* v261 补充: 详情弹窗内一律使用 4 级字号阶梯 (内联写的 11/12px 也用 !important 收敛)
   阶梯: 关键金额 15 / 区块标题 14 / 正文 13.5 / 标签·辅助 12.5 */
#studentModal .modal-body .tag,
#studentModal .modal-body .eg-key,
#studentModal .modal-body .sec-count,
#studentModal .modal-body #idCardFmt { font-size: 13px !important; }
#studentModal .modal-body .form-section-title.sub { font-size: 14px !important; }
#studentModal .modal-body .eg-val { font-size: 13px; }
/* v261 补充2: 费用概览条目与详情内表格统一到「正文 13.5px」层级
   注: th/td 有独立的元素级 font-size 规则, 必须直接命中单元格才能收敛 */
#studentModal .modal-body .sf-item,
#studentModal .modal-body table,
#studentModal .modal-body th,
#studentModal .modal-body td { font-size: 13px; }

/* ============ v262: 学员列表 分页 / 加载更多 (C4) ============
   背景: 441 名学员全量渲染 → 手机端页高 103,923px, 首屏渲染慢且难以定位;
   改造: 首屏只渲染一批(桌面 80 / 手机 40), 底部提供「加载更多 / 显示全部」 */
.stu-pager { margin-top: 12px; }
.stu-pager .sp-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-tint);
}
.stu-pager .sp-hint { font-size: 13px; color: var(--text-2); }
.stu-pager .sp-hint b { font-weight: 700; color: var(--text); }
.stu-pager .sp-actions { margin-left: auto; display: inline-flex; gap: 8px; }
.stu-pager .sp-done {
  text-align: center; padding: 10px; font-size: 13px; color: var(--text-3);
}
@media (max-width: 1023px) {
  /* 手机端: 计数在左、按钮在右时容易挤成两行 → 改成上下排列, 主操作占满宽 */
  .stu-pager .sp-bar { flex-direction: column; align-items: stretch; gap: 9px; }
  .stu-pager .sp-hint { text-align: center; }
  .stu-pager .sp-actions { margin-left: 0; display: flex; }
  .stu-pager .sp-actions .btn { flex: 1; height: 38px; }
}

/* ============ v262: 手机端触控目标优化 (A11) ============
   依据 WCAG 2.5.5 / iOS HIG: 可点元素建议 ≥44×44px。
   ⚠️ 注意: ui-enhance-v3.css 已实现大部分触控目标优化 (.btn / .nav-item / .tab 44px, .op-btn 36px),
      且该文件在 style.css 之后加载 → 此处**禁止**重复定义 .btn / .op-btn, 否则规则无效反成技术债。
      本块只补齐 ui-enhance 未覆盖的元素。 */
@media (max-width: 1023px) {
  /* 页签: 学员管理 .stu-tab / 资金往来 .seg-tab 等不在 ui-enhance 的 .tab 选择器内 (实测改造前 39px) */
  .stu-tab, .seg-tab, .tab-nav > *, .income-tab, .price-tab {
    min-height: 44px; display: inline-flex; align-items: center;
  }

  /* 顶栏「到期提醒 / 消息通知」为 div (非 button), 未被 ui-enhance 的按钮规则覆盖 */
  .reminder-badge { min-height: 44px; min-width: 44px; justify-content: center; padding: 0 10px; }

  /* 表格行「⋯ 更多操作」菜单项 */
  .rm-item { min-height: 44px; display: flex; align-items: center; }

  /* 表单控件: 输入框/下拉/月份选择器触控高度 (实测改造前 42px, 略低于规范) */
  .toolbar input:not([type="checkbox"]):not([type="radio"]),
  .toolbar select,
  .search-input,
  .gs-input { min-height: 44px; }

  /* 分页「加载更多」按钮主操作占满宽度 */
  .stu-pager .sp-actions .btn { min-height: 44px; }
}

/* ============ v262: 学员详情弹窗 只读态 (D4) ============
   只读时字段呈现为"信息展示"而非"待填表单": 去掉边框底色, 隐藏必填星号。
   —— 既降低误改风险, 也缓解"23 个字段平铺像录入表"的观感问题。 */
#studentModal.stu-readonly .form-grid input[readonly],
#studentModal.stu-readonly .form-grid textarea[readonly] {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding-left: 0;
  cursor: default;
  color: var(--text);
}
#studentModal.stu-readonly .form-grid select {
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
  padding-left: 0;
  color: var(--text);
}
#studentModal.stu-readonly .form-grid .req { display: none; }
#studentModal.stu-readonly .form-grid .form-group label { color: var(--text-3); }
/* 只读提示条: 让用户明确当前是"查看"状态 */
#studentModal.stu-readonly .modal-body::before {
  content: '👁 当前为查看模式 —— 如需修改请点右上角「✏️ 编辑资料」';
  display: block;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--bg-tint);
  color: var(--text-3);
  font-size: 13px;
}

/* ============ v264: C5 移动端业务页签换行 (原横滑 1103px 才能看到最后一个页签) ============
   8 个业务页签在手机上总宽 1467px / 可视 364px, 需长距离横滑;
   改为自动换行(约 2 行), 所有页签一眼可见 —— 换取的可读性优于"保持单行"。 */
@media (max-width: 1023px) {
  .stu-tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 6px; gap: 6px; padding: 8px 9px; }
  .stu-tab, .stu-tab-badge { flex: 0 1 auto; }
  .stu-tabs-sep { display: none; }        /* 竖线分隔符在换行后位置错乱, 移动端隐藏 */
  /* 压缩页签尺寸: 8 个业务页签在 390px 宽度下, 按原尺寸会占 5 行(255px);
     收紧字号与内边距后可降至 3 行左右, 同时保持触控高度 ≥44px (见上方触控目标规则) */
  .stu-tab { padding: 6px 9px; font-size: 12px; gap: 4px; }
  .stu-tab .n { font-size: 10px; padding: 0 5px; line-height: 16px; }
  .stu-tab-badge { padding: 6px 9px; font-size: 12px; gap: 4px; }
  .stu-tab-badge b { font-size: 12px; }
}

/* ============ v264: C6 表头允许换行 (列名统一为「字段 / 字段」后不再挤压列宽) ============ */
.stu-table thead th { white-space: normal; line-height: 1.35; }

/* ============ v264: C7 详情弹窗锚点导航 (手机端内容 3238px, 快速跳转分区) ============
   v267 修复「隐藏部分无法左右滑动」:
   ① 结构改为 外层 .stu-anchor-wrap(承担 sticky/背景/裁切) + 内层 .stu-anchor-bar(横向滚动容器)。
      滚动提示箭头挂在外层(不滚动), 因此不会随内容一起滚出可视区。
   ② 横向滚动条一直是 display:none, 桌面上鼠标既看不到也无法拖动 →
      补「‹ › 箭头 + 鼠标按住拖拽」两种方式, 并给容器 grab 光标做提示。
   ③ 增 overscroll-behavior-x:contain, 防止滑到尽头后把弹窗内容整体横向带走。 */
.stu-anchor-wrap {
  position: sticky; top: 0; z-index: 12;
  margin: -4px 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.stu-anchor-bar {
  display: flex; flex-wrap: nowrap; gap: 6px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  overscroll-behavior-x: contain;
  padding: 2px 0 10px;
  cursor: grab;
}
.stu-anchor-bar.dragging { cursor: grabbing; }
.stu-anchor-bar.dragging .sab-item { pointer-events: none; }
.stu-anchor-bar::-webkit-scrollbar { display: none; }
.stu-anchor-bar:empty { display: none; }
.stu-anchor-bar .sab-item {
  flex: 0 0 auto; padding: 5px 12px; border-radius: 14px;
  font-size: 13px; white-space: nowrap; cursor: pointer;
  background: var(--bg-soft); color: var(--text-2); border: 1px solid var(--border);
  transition: all .15s;
}
.stu-anchor-bar .sab-item:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.stu-anchor-bar .sab-item.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
/* v267: 滚动提示箭头压在边缘锚点上方 → 只让箭头按钮本身可点, 容器不拦截点击 */
.stu-anchor-wrap .scroll-hint,
.stu-anchor-wrap .scroll-hint.on { pointer-events: none; }
.stu-anchor-wrap .scroll-hint .sh-arrow { pointer-events: auto; }
.stu-anchor-wrap .scroll-hint { width: 40px; }
.stu-anchor-wrap .scroll-hint-right .sh-arrow { margin-right: 4px; }
.stu-anchor-wrap .scroll-hint-left .sh-arrow { margin-left: 4px; }
@media (max-width: 1023px) {
  .stu-anchor-bar .sab-item { min-height: 34px; display: inline-flex; align-items: center; }
}

/* ============ v265: D7 移动端学员卡片瘦身 ============
   报告结论: 学员卡片"偏厚" —— 单卡约 180px, 441 人浏览时滚动距离过长。
   在保持信息完整(A11 触控高度 44px 不变)的前提下, 收紧内边距与元素间距,
   单卡省约 10px, 40 张首批卡片累计省约 400px。 */
@media (max-width: 1023px) {
  .stu-card { padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; }
  .stu-card .sc-info { margin-top: 5px; }
  .stu-card .sc-info2 { margin-top: 2px; }
  .stu-card .sc-fee { margin-top: 6px; padding-top: 6px; }
  .stu-card .sc-actions { margin-top: 8px; gap: 6px; }
}

/* ============ v266: D6 费用单元格瘦身 ============ */
.fee-cell .fee-box { line-height: 1.5; }
.fee-cell .fee-box > span { display: inline-block; }
/* 待核对标记: 由独占一行降级为行内小角标 (金额移入悬停提示) */
.fe-pend {
  display: inline-block; font-size: 11px; line-height: 15px; padding: 0 5px;
  border-radius: 8px; background: var(--warning-bg, #fff7e6); color: #9a5b13;
  vertical-align: middle; cursor: help;
}
.fe-ok { font-size: 12px; color: var(--text-3); }

/* ============ v266: D8 状态列语义分组 ============ */
.stu-status-cell .ss-row {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
/* 第二行 = 学籍/进度（与缴费状态语义不同）→ 用淡色左边线做视觉分组 */
.stu-status-cell .ss-row-sub {
  margin-top: 5px; padding-left: 7px;
  border-left: 2px solid var(--border);
}
.stu-status-cell .ss-row-sub .lifecycle-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }

/* ============ v266: D5 长文本截断 (负责教务/班级列) ============ */
.stu-table .cell-cls {
  max-width: 88px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; display: inline-block; vertical-align: middle;
}

/* ============ v266: A8 「批量导入」与「录入学员」同组 ============ */
.toolbar .tb-add { gap: 8px; }
.toolbar .tb-add .tb-import { margin-left: 0; }
.toolbar .tb-add .tb-primary { margin-left: 0; }

/* ============ v266: C8 移动端弹窗横向溢出修复 ============
   实测: modal-body 435 > 388 (溢 47px), 根因是「缴费计划」4 列表格需 415px 而可用仅 348px。
   修复: 表格外包横向滚动容器 —— 窄屏可横滑, 不再撑开弹窗内容区。 */
.inst-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.inst-scroll::-webkit-scrollbar { height: 4px; }
.inst-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
@media (max-width: 1023px) {
  .inst-scroll .inst-table { min-width: 340px; }
  /* 弹窗内其他内嵌表格(如缴费历史)同样保护: 自身可横滑, 不撑开父级 */
  #studentModal .modal-body { overflow-x: hidden; }
  #studentModal .modal-body table { max-width: 100%; }
}

/* ===== ui-enhance.css ===== */
/* ============================================================
   清华职校管理系统 - UI视觉增强样式包 v1.0
   包含: Lucide图标 / 骨架屏 / 空状态 / 登录页升级 / 细节优化
   用法: 在index.html的</head>前引入 <link rel="stylesheet" href="css/ui-enhance.css?v=1">
   ============================================================ */

/* ===== 1. Lucide 图标基础样式 ===== */
.lucide {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.lucide-sm { width: 14px; height: 14px; }
.lucide-lg { width: 22px; height: 22px; }
.lucide-xl { width: 28px; height: 28px; }

/* 侧边栏图标 */
.nav-item .lucide {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}
.nav-item.active .lucide { opacity: 1; }

/* 按钮图标 */
.btn .lucide { width: 16px; height: 16px; }
.btn-sm .lucide { width: 14px; height: 14px; }

/* 卡片标题图标 */
.card-title .lucide { color: var(--primary); }

/* ===== 2. 骨架屏加载动画 ===== */
.skeleton {
  background: linear-gradient(90deg, #eef0f4 25%, #f6f7f9 50%, #eef0f4 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 骨架屏容器 */
.skeleton-wrap { padding: 4px; }
.skeleton-line { height: 14px; margin-bottom: 10px; }
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-circle { width: 36px; height: 36px; border-radius: 50%; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-card { height: 90px; border-radius: 10px; margin-bottom: 12px; }
.skeleton-table-row { height: 44px; border-bottom: 1px solid var(--border); }

/* 数据看板骨架屏 */
.skeleton-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.skeleton-stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border-left: 4px solid #e8f0fe;
}
.skeleton-stat-label { width: 80px; height: 13px; margin-bottom: 10px; }
.skeleton-stat-value { width: 120px; height: 28px; margin-bottom: 8px; }
.skeleton-stat-sub { width: 100px; height: 12px; }

/* 表格骨架屏 */
.skeleton-table {
  width: 100%;
  border-collapse: collapse;
}
.skeleton-table th {
  height: 40px;
  background: var(--bg-tint);
  border-bottom: 1px solid var(--border);
}
.skeleton-table td {
  height: 48px;
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
}

/* ===== 3. 空状态设计 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 50%;
}
.empty-state-icon .lucide {
  width: 40px;
  height: 40px;
  color: var(--text-3);
  opacity: 0.6;
}
.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.empty-state-desc {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 16px;
  line-height: 1.6;
}
.empty-state-action {
  display: inline-flex;
  gap: 10px;
}

/* 不同场景空状态配色 */
.empty-state.students .empty-state-icon { background: #e8f0fe; }
.empty-state.students .empty-state-icon .lucide { color: var(--primary); }
.empty-state.search .empty-state-icon { background: #fdf3e7; }
.empty-state.search .empty-state-icon .lucide { color: var(--warning); }
.empty-state.notify .empty-state-icon { background: #e7f6ee; }
.empty-state.notify .empty-state-icon .lucide { color: var(--success); }
.empty-state.owe .empty-state-icon { background: #fdebec; }
.empty-state.owe .empty-state-icon .lucide { color: var(--danger); }

/* ===== 4. 登录页视觉升级 ===== */
.login-page-v2 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
/* 背景装饰圆 */
.login-page-v2::before,
.login-page-v2::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.login-page-v2::before {
  width: 400px;
  height: 400px;
  top: -150px;
  right: -100px;
}
.login-page-v2::after {
  width: 300px;
  height: 300px;
  bottom: -100px;
  left: -80px;
}
/* 背景网格 */
.login-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.login-container-v2 {
  display: flex;
  width: 900px;
  max-width: 100%;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0,0,0,0.25);
  position: relative;
  z-index: 1;
}
.login-left-v2 {
  flex: 1;
  background: linear-gradient(160deg, #2f6fed 0%, #1a3f8f 100%);
  padding: 50px 40px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-left-v2::before {
  content: '';
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  top: -80px;
  right: -60px;
}
.login-brand-v2 {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.login-brand-v2 img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.login-brand-v2 .brand-text-v2 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}
.login-brand-v2 .brand-sub-v2 {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 2px;
}
.login-hero-v2 {
  position: relative;
  z-index: 1;
}
.login-hero-v2 h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 14px;
}
.login-hero-v2 p {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.8;
}
.login-features-v2 {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.login-feature-v2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  opacity: 0.85;
}
.login-feature-v2 .lucide {
  width: 16px;
  height: 16px;
  background: rgba(255,255,255,0.15);
  padding: 4px;
  border-radius: 6px;
}

.login-right-v2 {
  width: 420px;
  padding: 50px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-right-v2 .login-title-v2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.login-right-v2 .login-subtitle-v2 {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 32px;
}
.input-group-v2 {
  position: relative;
  margin-bottom: 18px;
}
.input-group-v2 label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 7px;
}
.input-wrap-v2 {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap-v2 .input-icon-v2 {
  position: absolute;
  left: 12px;
  color: var(--text-3);
  display: flex;
}
.input-wrap-v2 input {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 42px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: all 0.2s;
}
.input-wrap-v2 input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(47,111,237,0.1);
}
.input-wrap-v2 input::placeholder { color: var(--text-3); }
.toggle-pwd-v2 {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  transition: color 0.15s;
}
.toggle-pwd-v2:hover { color: var(--primary); }

.login-options-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.remember-me-v2 {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
}
.remember-me-v2 input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.forgot-pwd-v2 {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}
.forgot-pwd-v2:hover { text-decoration: underline; }

.btn-login-v2 {
  width: 100%;
  height: 46px;
  background: linear-gradient(135deg, #2f6fed 0%, #2456c0 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(47,111,237,0.3);
}
.btn-login-v2:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(47,111,237,0.4);
}
.btn-login-v2:active { transform: translateY(0); }
.btn-login-v2:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.btn-login-v2 .loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-footer-v2 {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}
.login-footer-v2 a {
  color: var(--text-3);
  text-decoration: none;
}
.login-footer-v2 a:hover { color: var(--primary); }

/* 登录页移动端适配 */
@media (max-width: 1023px) {
  .login-container-v2 { flex-direction: column; width: 100%; max-width: 420px; }
  .login-left-v2 { padding: 32px 28px; }
  .login-left-v2 .login-hero-v2,
  .login-left-v2 .login-features-v2 { display: none; }
  .login-right-v2 { width: 100%; padding: 32px 28px; }
}

/* ===== 5. 其他视觉细节优化 ===== */
/* 卡片悬停效果增强 */
.card {
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 4px 20px rgba(31,36,48,0.1);
}

/* 统计卡片渐变边框 */
.stat-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(31,36,48,0.1);
}

/* 按钮涟漪效果（可选） */
.btn {
  position: relative;
  overflow: hidden;
}

/* 表格行悬停 */
table tbody tr {
  transition: background 0.15s;
}

/* 标签样式优化 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

/* 模态框动画 */
.modal-mask {
  animation: fadeIn 0.2s ease;
}
.modal {
  animation: slideUp 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 通知面板动画 */
.notify-panel {
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 侧边栏菜单项动画 */
.nav-item {
  position: relative;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: #fff;
  border-radius: 0 3px 3px 0;
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #c8ccd4;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #a8adb8; }

/* 侧边栏滚动条 */
.side-nav::-webkit-scrollbar { width: 4px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }

/* 顶部栏日期优化 */
.topbar-date {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 全局搜索框优化 */
.global-search input {
  background: var(--bg);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.global-search input:focus {
  background: #fff;
  border-color: var(--primary);
}

/* Toast 通知样式增强 */
.toast {
  border-radius: 10px !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15) !important;
  padding: 12px 20px !important;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== 6. 响应式适配补充 ===== */
@media (max-width: 1023px) {
  .skeleton-stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .skeleton-stat-card { padding: 14px; }
  .empty-state { padding: 40px 16px; }
  .empty-state-icon { width: 64px; height: 64px; }
  .empty-state-icon .lucide { width: 32px; height: 32px; }
}

/* ===== ui-enhance-v2.css ===== */
/* ============================================================
   清华职校管理系统 - UI增强第二阶段样式 v2.0
   包含: ECharts图表区域 / Excel导出按钮 / 学员详情时间线 / 证书提醒增强
   ============================================================ */

/* ===== 1. 数据看板图表区域 ===== */
.dash-charts-section {
  margin-bottom: 16px;
}
.dash-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.chart-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.chart-card:hover {
  box-shadow: 0 4px 20px rgba(31,36,48,0.1);
}
.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.chart-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-card-title .lucide {
  color: var(--primary);
}
.chart-card-actions {
  display: flex;
  gap: 6px;
}
.chart-tab-btn {
  padding: 4px 10px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.chart-tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.chart-tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.chart-container {
  width: 100%;
  height: 280px;
}
.chart-container.small {
  height: 220px;
}
.chart-container.large {
  height: 340px;
}
.chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-3);
  font-size: 13px;
}
.chart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-3);
  font-size: 13px;
  gap: 8px;
}

/* ===== 2. Excel导出按钮 ===== */
.btn-excel {
  background: linear-gradient(135deg, #1d6f42 0%, #185a36 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(29,111,66,0.25);
}
.btn-excel:hover {
  background: linear-gradient(135deg, #22804d 0%, #1d6f42 100%);
  box-shadow: 0 4px 12px rgba(29,111,66,0.35);
}
.btn-excel .lucide {
  color: #fff;
}

/* 导出进度弹窗 */
.export-progress-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.export-progress-box {
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  width: 360px;
  max-width: 90vw;
  box-shadow: 0 16px 60px rgba(0,0,0,0.2);
}
.export-progress-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.export-progress-bar-wrap {
  height: 8px;
  background: var(--bg-muted);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}
.export-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #4a8af5);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.export-progress-text {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  justify-content: space-between;
}

/* ===== 3. 学员详情时间线 ===== */
.student-timeline-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.student-timeline-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.student-timeline {
  position: relative;
  padding-left: 24px;
}
.student-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-light), var(--border));
  border-radius: 1px;
}
.timeline-item {
  position: relative;
  padding-bottom: 16px;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -24px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  z-index: 1;
}
.timeline-dot.success {
  border-color: var(--success);
}
.timeline-dot.warning {
  border-color: var(--warning);
}
.timeline-dot.danger {
  border-color: var(--danger);
}
.timeline-dot.info {
  border-color: #4a8af5;
}
.timeline-content {
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 14px;
  border-left: 3px solid var(--primary);
}
.timeline-content.success {
  border-left-color: var(--success);
}
.timeline-content.warning {
  border-left-color: var(--warning);
}
.timeline-content.danger {
  border-left-color: var(--danger);
}
.timeline-content.info {
  border-left-color: #4a8af5;
}
.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.timeline-type {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.timeline-date {
  font-size: 11px;
  color: var(--text-3);
}
.timeline-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}
.timeline-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--success);
  margin-top: 4px;
}
.timeline-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-3);
  font-size: 13px;
}

/* ===== 4. 证书到期提醒增强 ===== */
.cert-alert-card {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  border: 1px solid #ffd4d4;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cert-alert-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cert-alert-icon.urgent {
  background: var(--danger-bg);
}
.cert-alert-icon.urgent .lucide {
  color: var(--danger);
}
.cert-alert-icon.warning {
  background: var(--warning-bg);
}
.cert-alert-icon.warning .lucide {
  color: var(--warning);
}
.cert-alert-icon.info {
  background: var(--primary-light);
}
.cert-alert-icon.info .lucide {
  color: var(--primary);
}
.cert-alert-content {
  flex: 1;
  min-width: 0;
}
.cert-alert-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.cert-alert-desc {
  font-size: 12px;
  color: var(--text-2);
}
.cert-alert-count {
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}
.cert-alert-count.urgent {
  color: var(--danger);
}
.cert-alert-count.warning {
  color: var(--warning);
}
.cert-alert-count.info {
  color: var(--primary);
}

/* 提醒项级别标签 */
.reminder-level-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
}
.reminder-level-tag.urgent {
  background: var(--danger-bg);
  color: var(--danger);
}
.reminder-level-tag.warning {
  background: var(--warning-bg);
  color: var(--warning);
}
.reminder-level-tag.info {
  background: var(--primary-light);
  color: var(--primary);
}

/* ===== 5. 响应式适配 ===== */
@media (max-width: 1023px) {
  .dash-charts-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .chart-container {
    height: 240px;
  }
  .chart-container.large {
    height: 280px;
  }
  .student-timeline {
    padding-left: 20px;
  }
  .cert-alert-card {
    padding: 10px 12px;
  }
  .cert-alert-icon {
    width: 36px;
    height: 36px;
  }
  .cert-alert-count {
    font-size: 18px;
  }
}

/* ===== ui-enhance-v3.css ===== */
/* ========== 基础样式修复（从原始CSS恢复） ========== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,20,30,.45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}

.modal-mask.hidden {
  display: none !important;
}

/* ========== 原始CSS内容 ==========
/* ============================================================
   清华职校管理系统 - UI增强第三阶段 v3.0
   功能: 深色模式 / 快捷键 / 批量操作 / 表格优化 / 搜索历史
   设计原则: 轻量、无新依赖、不影响性能
   ============================================================ */

/* ===== 1. 深色模式 ===== */
body.dark-mode {
  --bg-primary: #1a1d23;
  --bg-secondary: #23272f;
  --bg-tertiary: #2d323b;
  --bg-card: #23272f;
  --bg-hover: #2d323b;
  --bg-active: #363c47;
  --text-primary: #e4e7ee;
  --text-secondary: #a0a6b3;
  --text-muted: #6b7280;
  --border-color: #363c47;
  --border-light: #2d323b;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --accent-blue: #4a8af5;
  --accent-green: #1a9e5c;
  --accent-orange: #e8862d;
  --accent-red: #e5484d;
  --accent-purple: #7f77dd;
}

body.dark-mode {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

/* 登录页深色模式 */
body.dark-mode #loginPage {
  background: linear-gradient(135deg, #1a1d23 0%, #23272f 50%, #1a1d23 100%) !important;
}

body.dark-mode .login-container-v2 {
  background: var(--bg-card) !important;
  box-shadow: 0 20px 60px var(--shadow-color) !important;
}

body.dark-mode .login-title-v2 {
  color: var(--text-primary) !important;
}

body.dark-mode .login-subtitle-v2 {
  color: var(--text-secondary) !important;
}

body.dark-mode .input-group-v2 input {
  background: var(--bg-tertiary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

body.dark-mode .input-group-v2 input:focus {
  border-color: var(--accent-blue) !important;
  background: var(--bg-secondary) !important;
}

body.dark-mode .input-group-v2 input::placeholder {
  color: var(--text-muted) !important;
}

body.dark-mode .input-icon-v2 {
  color: var(--text-muted) !important;
}

body.dark-mode .login-btn-v2 {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #2f6fed 100%) !important;
}

body.dark-mode .login-footer-v2 {
  color: var(--text-muted) !important;
}

/* 侧边栏深色模式 */
body.dark-mode .sidebar {
  background: var(--bg-secondary) !important;
  border-right-color: var(--border-color) !important;
}

body.dark-mode .sidebar-logo {
  color: var(--text-primary) !important;
  border-bottom-color: var(--border-color) !important;
}

body.dark-mode .nav-item {
  color: var(--text-secondary) !important;
}

body.dark-mode .nav-item:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

body.dark-mode .nav-item.active {
  background: var(--brand-gradient) !important;
  color: #fff !important;
  border-left-color: transparent !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
}

body.dark-mode .nav-icon {
  color: var(--text-muted) !important;
}

body.dark-mode .nav-item.active .nav-icon {
  color: #fff !important;
}

/* 顶部栏深色模式 */
body.dark-mode .topbar {
  background: var(--bg-secondary) !important;
  border-bottom-color: var(--border-color) !important;
}

body.dark-mode .topbar-title {
  color: var(--text-primary) !important;
}

body.dark-mode .user-info {
  color: var(--text-secondary) !important;
}

body.dark-mode .user-avatar {
  background: var(--accent-blue) !important;
  color: #fff !important;
}

/* 主内容区深色模式 */
body.dark-mode .main-content {
  background: var(--bg-primary) !important;
}

body.dark-mode .page-container {
  background: var(--bg-primary) !important;
}

/* 卡片深色模式 */
body.dark-mode .card,
body.dark-mode .stat-card,
body.dark-mode .chart-card,
body.dark-mode .toolbar {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 2px 8px var(--shadow-color) !important;
}

body.dark-mode .card-title,
body.dark-mode .stat-card-title {
  color: var(--text-primary) !important;
}

body.dark-mode .stat-card-value {
  color: var(--text-primary) !important;
}

body.dark-mode .stat-card-label {
  color: var(--text-secondary) !important;
}

/* 表格深色模式 */
body.dark-mode table {
  background: var(--bg-card) !important;
}

body.dark-mode thead th {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-bottom-color: var(--border-color) !important;
}

body.dark-mode tbody td {
  color: var(--text-secondary) !important;
  border-bottom-color: var(--border-light) !important;
}

body.dark-mode tbody tr:hover {
  background: var(--bg-hover) !important;
}

body.dark-mode tbody tr:nth-child(even) {
  background: var(--bg-secondary) !important;
}

body.dark-mode tbody tr:nth-child(even):hover {
  background: var(--bg-hover) !important;
}

/* 按钮深色模式 */
body.dark-mode .btn {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .btn:hover {
  background: var(--bg-active) !important;
  border-color: var(--accent-blue) !important;
}

body.dark-mode .btn-primary {
  background: var(--accent-blue) !important;
  color: #fff !important;
  border-color: var(--accent-blue) !important;
}

body.dark-mode .btn-primary:hover {
  background: #3a7ae5 !important;
}

body.dark-mode .btn-success {
  background: var(--accent-green) !important;
  color: #fff !important;
  border-color: var(--accent-green) !important;
}

body.dark-mode .btn-danger {
  background: var(--accent-red) !important;
  color: #fff !important;
  border-color: var(--accent-red) !important;
}

body.dark-mode .btn-warning {
  background: var(--accent-orange) !important;
  color: #fff !important;
  border-color: var(--accent-orange) !important;
}

/* 输入框深色模式 */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
  border-color: var(--accent-blue) !important;
  background: var(--bg-secondary) !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: var(--text-muted) !important;
}

/* 模态框深色模式 */
body.dark-mode .modal-mask {
  background: rgba(0, 0, 0, 0.6) !important;
}

body.dark-mode .modal-box {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 20px 60px var(--shadow-color) !important;
}

body.dark-mode .modal-header {
  color: var(--text-primary) !important;
  border-bottom-color: var(--border-color) !important;
}

body.dark-mode .modal-body {
  color: var(--text-secondary) !important;
}

body.dark-mode .modal-footer {
  border-top-color: var(--border-color) !important;
}

/* 标签/徽章深色模式 */
body.dark-mode .badge,
body.dark-mode .tag {
  background: var(--bg-tertiary) !important;
  color: var(--text-secondary) !important;
}

body.dark-mode .badge-success,
body.dark-mode .tag-success {
  background: rgba(26, 158, 92, 0.2) !important;
  color: var(--accent-green) !important;
}

body.dark-mode .badge-danger,
body.dark-mode .tag-danger {
  background: rgba(229, 72, 77, 0.2) !important;
  color: var(--accent-red) !important;
}

body.dark-mode .badge-warning,
body.dark-mode .tag-warning {
  background: rgba(232, 134, 45, 0.2) !important;
  color: var(--accent-orange) !important;
}

body.dark-mode .badge-info,
body.dark-mode .tag-info {
  background: rgba(74, 138, 245, 0.2) !important;
  color: var(--accent-blue) !important;
}

/* 分页深色模式 */
body.dark-mode .pagination button {
  background: var(--bg-tertiary) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .pagination button:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

body.dark-mode .pagination button.active {
  background: var(--accent-blue) !important;
  color: #fff !important;
  border-color: var(--accent-blue) !important;
}

body.dark-mode .pagination button:disabled {
  opacity: 0.4 !important;
}

/* Toast深色模式 */
body.dark-mode .toast {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 4px 12px var(--shadow-color) !important;
}

/* 下拉菜单深色模式 */
body.dark-mode .dropdown-menu {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 4px 12px var(--shadow-color) !important;
}

body.dark-mode .dropdown-item {
  color: var(--text-secondary) !important;
}

body.dark-mode .dropdown-item:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

/* 时间线深色模式 */
body.dark-mode .student-timeline-section {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .student-timeline-title {
  color: var(--text-primary) !important;
}

body.dark-mode .timeline-content {
  background: var(--bg-tertiary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .timeline-type {
  color: var(--text-primary) !important;
}

body.dark-mode .timeline-date {
  color: var(--text-muted) !important;
}

body.dark-mode .timeline-desc {
  color: var(--text-secondary) !important;
}

/* 图表卡片深色模式 */
body.dark-mode .chart-card {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .chart-card-title {
  color: var(--text-primary) !important;
}

body.dark-mode .chart-tab-btn {
  background: var(--bg-tertiary) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .chart-tab-btn.active {
  background: var(--accent-blue) !important;
  color: #fff !important;
}

/* 空状态深色模式 */
body.dark-mode .empty-state {
  color: var(--text-muted) !important;
}

body.dark-mode .empty-state-icon {
  background: var(--bg-tertiary) !important;
}

/* 搜索历史下拉 */
.search-history-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e4e7ee;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
  display: none;
}

.search-history-dropdown.show {
  display: block;
}

.search-history-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #5c6370;
  border-bottom: 1px solid var(--bg-muted);
  transition: background 0.15s;
}

.search-history-item:hover {
  background: var(--bg-soft);
}

.search-history-item:last-child {
  border-bottom: none;
}

.search-history-clear {
  padding: 8px 12px;
  text-align: center;
  font-size: 12px;
  color: #8a91a0;
  cursor: pointer;
  border-top: 1px solid var(--bg-muted);
  transition: color 0.15s;
}

.search-history-clear:hover {
  color: #e5484d;
}

body.dark-mode .search-history-dropdown {
  background: var(--bg-card);
  border-color: var(--border-color);
}

body.dark-mode .search-history-item {
  color: var(--text-secondary);
  border-bottom-color: var(--border-light);
}

body.dark-mode .search-history-item:hover {
  background: var(--bg-hover);
}

body.dark-mode .search-history-clear {
  color: var(--text-muted);
  border-top-color: var(--border-color);
}

/* 深色模式切换按钮 */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.2s;
  margin-right: 8px;
}

.theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .theme-toggle-btn:hover {
  background: var(--bg-hover);
}

/* 快捷键提示 */
.shortcut-hint {
  display: inline-block;
  padding: 2px 6px;
  background: var(--bg-muted);
  border-radius: 4px;
  font-size: 11px;
  color: #8a91a0;
  font-family: monospace;
  margin-left: 8px;
}

body.dark-mode .shortcut-hint {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

/* 快捷键帮助面板 */
.shortcut-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 24px;
  z-index: 10000;
  width: 480px;
  max-width: 90vw;
  display: none;
}

.shortcut-panel.show {
  display: block;
}

.shortcut-panel-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1d23;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shortcut-panel-close {
  cursor: pointer;
  font-size: 20px;
  color: #8a91a0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
}

.shortcut-panel-close:hover {
  background: var(--bg-muted);
}

.shortcut-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-soft);
  border-radius: 6px;
}

.shortcut-key {
  font-family: monospace;
  font-size: 12px;
  color: #2f6fed;
  background: #e8f0fe;
  padding: 2px 8px;
  border-radius: 4px;
}

.shortcut-desc {
  font-size: 13px;
  color: #5c6370;
}

body.dark-mode .shortcut-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

body.dark-mode .shortcut-panel-title {
  color: var(--text-primary);
}

body.dark-mode .shortcut-panel-close {
  color: var(--text-muted);
}

body.dark-mode .shortcut-panel-close:hover {
  background: var(--bg-hover);
}

body.dark-mode .shortcut-item {
  background: var(--bg-tertiary);
}

body.dark-mode .shortcut-key {
  color: var(--accent-blue);
  background: rgba(74, 138, 245, 0.15);
}

body.dark-mode .shortcut-desc {
  color: var(--text-secondary);
}

.shortcut-panel-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
}

.shortcut-panel-mask.show {
  display: block;
}

/* 表格行选中状态 */
tbody tr.row-selected {
  background: rgba(47, 111, 237, 0.08) !important;
}

body.dark-mode tbody tr.row-selected {
  background: rgba(74, 138, 245, 0.15) !important;
}

/* 批量操作栏 */
.batch-action-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  padding: 12px 20px;
  display: none;
  align-items: center;
  gap: 16px;
  z-index: 1000;
  border: 1px solid #e4e7ee;
}

.batch-action-bar.show {
  display: flex;
  animation: slideUpBar 0.2s ease;
}

@keyframes slideUpBar {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.batch-action-count {
  font-size: 14px;
  color: #5c6370;
  font-weight: 500;
}

.batch-action-count strong {
  color: #2f6fed;
  font-size: 18px;
}

.batch-action-buttons {
  display: flex;
  gap: 8px;
}

body.dark-mode .batch-action-bar {
  background: var(--bg-card);
  border-color: var(--border-color);
  box-shadow: 0 8px 32px var(--shadow-color);
}

body.dark-mode .batch-action-count {
  color: var(--text-secondary);
}

body.dark-mode .batch-action-count strong {
  color: var(--accent-blue);
}

/* 表格列宽调整手柄 */
th.resizable {
  position: relative;
  user-select: none;
}

th .resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  cursor: col-resize;
  background: transparent;
  transition: background 0.15s;
}

th .resize-handle:hover,
th .resize-handle.active {
  background: #2f6fed;
}

body.dark-mode th .resize-handle:hover,
body.dark-mode th .resize-handle.active {
  background: var(--accent-blue);
}

/* ============================================================
 * 移动端全局搜索适配 (修复 ≤1023px 全局搜索被隐藏的问题)
 * 2026-08-29
 * ============================================================ */
@media (max-width: 1023px) {
  /* 布局: 侧边栏 → 顶部导航栏 */
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; }
  .side-brand { padding: 8px 14px; }
  .brand-sub { display: none; }
  /* 手机端导航: 默认一行(高频4个) + 箭头展开/收起; 分组标题仅桌面显示 */
  .nav-group { display: none; }   /* 手机端不显示分组标题, 宫格保持干净 */
  .side-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 8px 10px 6px;
    max-height: 58px; overflow: hidden;
    transition: max-height .28s ease;   /* 展开/收起过渡动画 */
  }
  .sidebar.nav-open .side-nav { max-height: 520px; overflow: visible; }   /* 展开全部 */
  .nav-item {
    position: relative; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 8px 2px; font-size: 12px; text-align: center; white-space: normal;
    margin-bottom: 0; margin-right: 0; flex: 0 0 auto; border-radius: 10px;
  }
  .nav-item .nav-icon { font-size: 19px; line-height: 1; }
  .nav-badge { position: absolute; top: 3px; right: 8px; margin: 0; font-size: 10px; padding: 0 5px; }
  .nav-toggle {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(255,255,255,.07); border: none; border-radius: 10px;
    margin: 2px 12px 10px; color: var(--sidebar-text, #c3cadb);
    font-size: 13px; font-weight: 500; padding: 10px 12px; cursor: pointer;
  }
  .nav-toggle:active { background: rgba(255,255,255,.14); }
  .nav-toggle .nav-toggle-icon {
    font-size: 15px; line-height: 1; color: #7ab2ff;   /* 亮蓝箭头, 深色侧栏上醒目 */
    transition: transform .28s ease;
  }
  .sidebar.nav-open .nav-toggle .nav-toggle-icon { transform: rotate(180deg); }
  .sidebar.nav-open .nav-toggle { background: rgba(255,255,255,.1); }
  .side-user { display: none !important; }
  .sidebar.nav-open .side-user { display: block !important; }
  .side-user { padding: 8px 14px; }
  .user-avatar { width: 30px; height: 30px; font-size: 12px; }
  .user-phone { display: none; }
  .topbar { height: 50px; padding: 0 12px; }
  .topbar-title { font-size: 15px; }
  .topbar-date { display: none; }
  .content { padding: 12px; }
  /* 卡片 & 统计 */
  .card { padding: 14px; }
  .card-title { font-size: 14px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 13px; }
  .stat-card .stat-value { font-size: 20px; }
  /* 表格: 横向滚动 + 紧凑 */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  table { font-size: 13px; }
  th, td { padding: 9px 10px; }
  .actions { flex-wrap: wrap; gap: 2px; }
  .op-btn { padding: 6px 8px; }
  /* 工具栏: 换行排列 */
  .toolbar { gap: 8px; }
  .toolbar .search-input { width: 100%; }
  /* 筛选下拉: 每行 2 个, 保证文字完整显示(不平分挤压成空白) */
  .toolbar select { flex: 1 1 calc(50% - 8px); min-width: 0; width: auto; font-size: 13px; }
  .toolbar .spacer { display: none; }
  .toolbar .toolbar-hint { width: 100%; }
  /* 按钮: 每行约 3 个等宽排列, 文字不换行不错位 */
  .toolbar .btn { flex: 1 1 auto; min-width: 31%; max-width: 100%; padding: 0 6px; font-size: 13px; white-space: nowrap; line-height: 1.2; }
  .batch-bar > span { width: 100%; margin-bottom: 2px; }
  /* 弹窗: 底部弹出 */
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-width: 100%; border-radius: 16px 16px 0 0; max-height: 94vh; }
  .modal-sm { width: 100%; }
  .modal-head { padding: 14px 16px; }
  .modal-body { padding: 14px 16px; }
  .modal-foot { padding: 12px 16px; gap: 8px; }
  .modal-foot .btn { flex: 1; }
  /* 表单: 单列 */
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .extra-fee-row { flex-wrap: wrap; }
  /* 批量操作栏: 提示独占一行, 按钮双列网格 (v89 规则, 旧单行规则已移除避免覆盖) */
  .batch-bar { flex-wrap: wrap; gap: 8px; padding: 12px; align-items: stretch; margin-top: 2px; }
  .batch-bar > span { width: 100%; margin-bottom: 2px; }
  .batch-bar .btn-sm { flex: 1 1 calc(50% - 8px); min-width: 0; max-width: 100%; margin: 0; white-space: nowrap; padding: 9px 4px; font-size: 13px; }
  /* 凭证: 手机端整体缩放适配屏宽(v179: transform 缩放, 布局保持 794px 不重排, 边框/章子/内容完整在框内) */
  .receipt-sheet { max-width: none; transform-origin: top left; overflow: hidden; }
  #receiptModal .modal-body { overflow-x: hidden; overflow-y: auto; padding: 10px 6px; }
  /* 登录页 */
  .login-page { padding: 16px; }
  .login-card { width: 100%; max-width: 380px; padding: 30px 24px; }
  /* 防 iOS 输入自动缩放 + 触控目标 */
  input, select, textarea { font-size: 16px; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 32px; }
  /* 其他 */
  .export-scope { gap: 12px; }
  .price-biz { padding: 12px; }
  .salary-detail table { font-size: 12px; }
  .toast { max-width: 88%; white-space: normal; }
  .related-tip { font-size: 12px; }
  .reminder-badge { padding: 4px 9px; font-size: 12px; }
}
@media (max-width: 400px) {
  .topbar-date { display: none; }
}

/* ============================================================
 * 手机端修复: grid/flex 子项被表格内容(min-content)撑开,
 * 导致卡片/看板超宽被右侧裁剪 (2026-08-29)
 * ============================================================ */
@media (max-width: 1023px) {
  .dash-grid > div, .dash-grid > div > .card,
  .dash-grid .card, .dash-grid .card-title, .dash-grid .table-wrap,
  .dash-grid .card * { min-width: 0; }
}

/* ============================================================
 * 增强工具: 通用打印 / 导入预览校验 / 自定义主题色 (2026-08-29)
 * ============================================================ */

/* ---------- 通用打印优化: 只打印内容区, 隐藏 UI 壳 ---------- */
.print-header { display: none; }
@media print {
  body { background: #fff !important; }
  .sidebar, .topbar, .nav-toggle, .side-user, .logout-btn, .reminder-badge,
  .notify-panel, .global-search, .toolbar, .pagination, .stu-tabs,
  .btn, .op-btn, .modal-mask, #toast, .gs-btn, .batch-bar, .print-fab,
  .topbar-date { display: none !important; }
  .main { padding: 0 !important; margin: 0 !important; }
  .content { padding: 0 !important; display: block !important; width: 100% !important; }
  .card { box-shadow: none !important; border: 1px solid #d5dbe3 !important;
    border-radius: 6px !important; break-inside: avoid; margin-bottom: 10px !important; }
  .table-wrap { max-height: none !important; overflow: visible !important; }
  thead th { position: static !important; }
  .stat-grid { grid-template-columns: repeat(5, 1fr) !important; }
  .stat-card { break-inside: avoid; }
  .print-header { display: block !important; margin-bottom: 14px; }
  .print-header h2 { margin: 0 0 6px; font-size: 20px; color: #1f2430; }
  .print-header .print-meta { font-size: 12px; color: #5c6370; }
  .no-print { display: none !important; }
}

/* ---------- 自定义主题色设置 ---------- */
.theme-options { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.theme-swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff;
  box-shadow: 0 0 0 2px #d6dbe4; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.theme-swatch:hover { transform: scale(1.15); }
.theme-swatch.active { box-shadow: 0 0 0 2px #1f2430, 0 0 0 4px #fff; transform: scale(1.08); }
.theme-custom { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.theme-custom input[type=color] { width: 40px; height: 32px; padding: 0; border: 1px solid #d6dbe4; border-radius: 6px; cursor: pointer; background: none; }
.theme-custom .theme-hex { font-size: 13px; color: var(--text-2); font-family: monospace; }
.theme-reset { font-size: 13px; color: var(--primary); cursor: pointer; margin-left: auto; border: none; background: none; }
.theme-reset:hover { text-decoration: underline; }

/* ---------- 导入预览校验 ---------- */
.import-preview { margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.import-preview-head { padding: 8px 12px; background: var(--bg-tint); border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.import-preview-wrap { max-height: 240px; overflow: auto; }
.import-preview-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.import-preview-table th, .import-preview-table td { padding: 6px 8px; border: 1px solid #eef2f7; text-align: left; white-space: nowrap; }
.import-preview-table thead th { background: var(--bg-tint); position: sticky; top: 0; z-index: 1; }
.import-preview-table .row-err { background: #fff5f5; }
.import-preview-table .row-err td:first-child::before { content: '⚠ '; color: #c0392b; }
.import-preview-table .row-ok td:first-child::before { content: '✓ '; color: #16a34a; }
.imp-stat-err { color: var(--danger); font-weight: 600; }
.imp-stat-ok { color: var(--success); font-weight: 600; }
.imp-preview-note { padding: 8px 12px; font-size: 12px; color: var(--text-3); background: #fff; border-top: 1px solid var(--border); }

/* ---------- 顶栏打印按钮 ---------- */
#printPageBtn { display: flex; align-items: center; gap: 4px; background: #f1f5f9; color: #475569;
  border: none; border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s; }
#printPageBtn:hover { background: var(--primary-100); color: var(--primary-600); transform: translateY(-1px); }
#printPageBtn svg { width: 14px; height: 14px; }

/* ========== 第二批: 学员卡片欠费样式 ========== */
.stu-card-owe {
  border-left: 3px solid #e5484d !important;
  background: linear-gradient(90deg, rgba(229,72,77,.04) 0%, transparent 30%) !important;
}
.stu-card-owe .sc-name { color: #e5484d; }

/* ========== 第二批: 表格行高统一 ========== */
.stu-table tbody tr { height: 52px; }
.stu-table td { padding: 8px 10px; vertical-align: middle; }
.biz-table tbody tr { height: 40px; }

/* ========== 第三批: 打印样式优化 ========== */
@media print {
  .sidebar, .topbar, .notify-panel, .modal-mask, .nav-toggle,
  .btn, .op-btn, .actions, .stu-tabs, .toolbar, .batch-bar,
  .card-title .btn, #printPageBtn, .gs-btn, .reminder-badge,
  .sc-more-btn, .sc-actions, .stu-sel, .empty-icon { display: none !important; }
  .main { margin-left: 0 !important; padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
  .stat-grid { grid-template-columns: repeat(5, 1fr) !important; }
  .stat-card { border: 1px solid #ddd !important; }
  .dash-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .table-wrap { max-height: none !important; overflow: visible !important; }
  .stu-table { font-size: 11px !important; }
  .stu-table tbody tr { height: auto !important; }
  }

.stu-card {
  position: relative;
}
.stu-card .sc-actions {
  position: relative;
  z-index: 20;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* 确保收款按钮可点击 - 提高z-index和点击区域 */
.sc-actions {
  position: relative;
  z-index: 20;
}
.sc-actions .op-btn {
  position: relative;
  z-index: 21;
  cursor: pointer;
  touch-action: manipulation;
  /* 不使用inline-flex，保持原有block布局 */
  display: inline-block !important;
  min-height: 36px;
  padding: 8px 12px;
  line-height: 1.2;
  vertical-align: middle;
}
/* 收款按钮特殊样式 */
.sc-actions .op-btn[onclick*="openPayModal"] {
  background: rgba(22, 163, 74, 0.1);
  border-radius: 8px;
  font-weight: 600;
}
.sc-actions .op-btn[onclick*="openPayModal"]:active {
  background: rgba(22, 163, 74, 0.2);
}
@media print {
  body { background: #fff !important; color: #000 !important; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .money-red { color: #c0392b !important; }
  .money-green { color: #16a34a !important; }
  .money-orange { color: #d97706 !important; }
  .tag { border: 1px solid #999 !important; }
}

/* ========== 第三批: 夜间模式优化 ========== */
/* ===== 深色模式(类驱动, 原 prefers-color-scheme) ===== */
/* dark */ body.dark-mode {
  --bg: #0f172a;
    --card-bg: #1e293b;
    --border: #334155;
    --text: #e2e8f0;
    --text-2: #94a3b8;
    --text-3: #64748b;
    --primary: #3b82f6;
    --primary-light: rgba(59,130,246,.15);
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
}
/* dark */ body.dark-mode {
  background: var(--bg); color: var(--text);
}
/* dark */ body.dark-mode .card {
  background: var(--card-bg); border-color: var(--border);
}
/* dark */ body.dark-mode .stat-card {
  background: var(--card-bg); border-color: var(--border);
}
/* dark */ body.dark-mode .stu-table th {
  background: #263449; color: var(--text);
}
/* dark */ body.dark-mode .stu-table tbody tr:hover {
  background: rgba(59,130,246,.08);
}
/* dark */ body.dark-mode .stu-card {
  background: var(--card-bg); border-color: var(--border);
}
/* dark */ body.dark-mode .stu-card-owe {
  background: linear-gradient(90deg, rgba(239,68,68,.1) 0%, transparent 30%) !important;
}
/* dark */ body.dark-mode .biz-table th {
  background: #263449;
}
/* dark */ body.dark-mode .rank-item:hover {
  background: rgba(59,130,246,.08);
}
/* dark */ body.dark-mode .tag-gray {
  background: #334155; color: #94a3b8;
}
/* dark */ body.dark-mode .tag-blue {
  background: rgba(59,130,246,.2); color: #60a5fa;
}
/* dark */ body.dark-mode .tag-green {
  background: rgba(34,197,94,.2); color: #4ade80;
}
/* dark */ body.dark-mode .tag-red {
  background: rgba(239,68,68,.2); color: #f87171;
}
/* dark */ body.dark-mode .tag-orange {
  background: rgba(234,179,8,.2); color: #facc15;
}
/* dark */ body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
  background: #0f172a; color: var(--text); border-color: var(--border);
}
/* dark */ body.dark-mode .btn-plain {
  background: transparent; color: var(--text-2); border-color: var(--border);
}
/* dark */ body.dark-mode .btn-plain:hover {
  background: var(--primary-light); color: var(--primary);
}
/* dark */ body.dark-mode .global-search input {
  background: #0f172a; border-color: var(--border); color: var(--text);
}
/* dark */ body.dark-mode .topbar {
  background: var(--card-bg); border-color: var(--border);
}
/* dark */ body.dark-mode .sidebar {
  background: var(--card-bg); border-color: var(--border);
}
/* dark */ body.dark-mode .nav-item:hover {
  background: var(--primary-light);
}
/* dark */ body.dark-mode .nav-item.active {
  background: var(--primary-light); color: var(--primary);
}
/* dark */ body.dark-mode .empty {
  color: var(--text-3);
}
/* dark */ body.dark-mode .modal {
  background: var(--card-bg); border-color: var(--border);
}
/* dark */ body.dark-mode .modal-head {
  border-color: var(--border);
}
/* dark */ body.dark-mode .form-group label {
  color: var(--text-2);
}
/* dark */ body.dark-mode .table-wrap::-webkit-scrollbar-thumb {
  background: var(--border);
}


/* ========== 手动夜间模式 (通过body类名切换) ========== */
body.dark-mode {
  --bg: #0f172a;
  --card-bg: #1e293b;
  --border: #334155;
  --text: #e2e8f0;
  --text-2: #94a3b8;
  --text-3: #64748b;
  background: var(--bg);
  color: var(--text);
}
body.dark-mode .card, body.dark-mode .stat-card { background: var(--card-bg); border-color: var(--border); }
body.dark-mode .stu-table th { background: #263449; }
body.dark-mode .stu-card { background: var(--card-bg); border-color: var(--border); }
body.dark-mode input, body.dark-mode select, body.dark-mode textarea { background: #0f172a; color: var(--text); border-color: var(--border); }
body.dark-mode .topbar, body.dark-mode .sidebar { background: var(--card-bg); border-color: var(--border); }

/* ========== 第四批: 登录页美化 ========== */
.login-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #185FA5 100%);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,.1) 0%, transparent 60%);
  animation: loginBgFloat 20s ease-in-out infinite;
}
@keyframes loginBgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(5%, 5%) rotate(180deg); }
}
.login-card {
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.5);
  padding: 40px 36px;
  max-width: 400px;
  width: 90%;
  animation: loginCardIn .6s cubic-bezier(.22,1,.36,1);
  position: relative;
  z-index: 1;
}
@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(30px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-card h1 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 16px 0 4px;
  text-align: center;
  letter-spacing: .5px;
}
.login-card .login-logo {
  text-align: center;
  margin-bottom: 8px;
}
.login-card .form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 6px;
}
.login-card input {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  transition: all .2s;
  background: var(--bg-tint);
}
.login-card input:focus {
  border-color: #185FA5;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(24,95,165,.1);
  outline: none;
}
.login-card .btn-primary {
  background: linear-gradient(135deg, #185FA5 0%, #2563eb 100%);
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  box-shadow: 0 4px 15px rgba(24,95,165,.3);
  transition: all .2s;
}
.login-card .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24,95,165,.4);
}
.login-card .btn-primary:active {
  transform: translateY(0);
}

/* ========== 第四批: 空状态统一 ========== */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  color: var(--text-3, #94a3b8);
  text-align: center;
  min-height: 120px;
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: .6;
  animation: emptyFloat 3s ease-in-out infinite;
}
@keyframes emptyFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.empty:empty::before {
  content: '📭';
  font-size: 48px;
  opacity: .5;
}
.empty:empty::after {
  content: '暂无数据';
  font-size: 14px;
  margin-top: 8px;
  color: var(--text-3, #94a3b8);
}

/* ========== 第四批: 弹窗按钮样式统一 ========== */
.modal {
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0,0,0,.25);
  border: 1px solid rgba(0,0,0,.05);
  overflow: hidden;
  animation: modalIn .25s cubic-bezier(.22,1,.36,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  background: linear-gradient(135deg, var(--bg-tint) 0%, #fff 100%);
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #1a1a2e);
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-3, #94a3b8);
  font-size: 20px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: #f1f5f9;
  color: var(--text, #1a1a2e);
  transform: rotate(90deg);
}
.modal-body {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border, #e2e8f0);
  background: var(--bg-tint);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 按钮统一样式 */
.btn {
  border-radius: 8px;
  font-weight: 600;
  transition: all .15s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-primary {
  background: linear-gradient(135deg, #185FA5 0%, #2563eb 100%);
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(24,95,165,.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24,95,165,.35);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(239,68,68,.25);
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239,68,68,.35);
}
.btn-plain {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  color: var(--text-2, #4a5568);
}
.btn-plain:hover {
  background: var(--bg-tint);
  border-color: #cbd5e1;
  color: var(--text, #1a1a2e);
}
.btn-sm {
  padding: 5px 12px;
  font-size: 13px;
}

/* 操作按钮统一样式 */
.op-btn {
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid var(--border, #e2e8f0);
  background: #fff;
  color: var(--text-2, #4a5568);
  cursor: pointer;
  transition: all .15s;
}
.op-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.op-btn.danger {
  color: #ef4444;
  border-color: #fecaca;
}
.op-btn.danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

/* ========== 第五批: 滚动提示箭头全面优化 ========== */
/* 覆盖原有样式，优化渐变和箭头显示 */
.scroll-hint {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 10;
  width: 50px;
  display: flex;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
.scroll-hint-right {
  right: 0;
  justify-content: flex-end;
}
.scroll-hint-left {
  left: 0;
  justify-content: flex-start;
}
.scroll-hint.on {
  opacity: 1;
  pointer-events: none;
}
/* 仅箭头按钮可点击(滚动), 容器与渐变区永不拦截下方内容点击 */
.scroll-hint .sh-arrow {
  pointer-events: auto;
}

/* 渐变遮罩 - 使用半透明背景，适配各种底色 */
.scroll-hint .sh-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  pointer-events: none;
}
.sh-fade-right {
  right: 0;
  background: linear-gradient(270deg, var(--card-bg, #fff) 0%, rgba(255,255,255,0.85) 40%, transparent 100%);
}
.sh-fade-left {
  left: 0;
  background: linear-gradient(90deg, var(--card-bg, #fff) 0%, rgba(255,255,255,0.85) 40%, transparent 100%);
}

/* 箭头按钮 - 更明显、更现代 */
.scroll-hint .sh-arrow {
  position: relative;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--primary, #185FA5);
  background: var(--card-bg, #fff);
  color: var(--primary, #185FA5);
  font-size: 16px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: all .2s ease;
  animation: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scroll-hint-right .sh-arrow {
  margin-right: 8px;
}
.scroll-hint-left .sh-arrow {
  margin-left: 8px;
}
.scroll-hint .sh-arrow:hover {
  background: var(--primary, #185FA5);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(24,95,165,.35);
}
.scroll-hint .sh-arrow:active {
  transform: scale(0.95);
}

/* 首次显示时的脉冲提示动画 */
.scroll-hint.on:first-child .sh-arrow {
  animation: sh-pulse 2s ease-in-out;
}
@keyframes sh-pulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
  50% { box-shadow: 0 0 0 6px rgba(24,95,165,.2), 0 2px 8px rgba(0,0,0,.12); }
}

/* 手机端优化 */
@media (max-width: 1023px) {
  .scroll-hint {
    width: 44px;
  }
  .scroll-hint .sh-arrow {
    width: 34px;
    height: 34px;
    font-size: 18px;
    line-height: 30px;
  }
  .scroll-hint-right .sh-arrow {
    margin-right: 6px;
  }
  .scroll-hint-left .sh-arrow {
    margin-left: 6px;
  }
  /* 手机端页签栏的滚动提示更明显 */
  .stu-tabs .scroll-hint .sh-arrow {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }
}

/* 深色模式适配 */
/* ===== 深色模式(类驱动, 原 prefers-color-scheme) ===== */
/* dark */ body.dark-mode .sh-fade-right {
  background: linear-gradient(270deg, #1e293b 0%, rgba(30,41,59,0.85) 40%, transparent 100%);
}
/* dark */ body.dark-mode .sh-fade-left {
  background: linear-gradient(90deg, #1e293b 0%, rgba(30,41,59,0.85) 40%, transparent 100%);
}
/* dark */ body.dark-mode .scroll-hint .sh-arrow {
  background: #1e293b;
    border-color: #3b82f6;
    color: #3b82f6;
}
/* dark */ body.dark-mode .scroll-hint .sh-arrow:hover {
  background: #3b82f6;
    color: #fff;
}

body.dark-mode .sh-fade-right {
  background: linear-gradient(270deg, #1e293b 0%, rgba(30,41,59,0.85) 40%, transparent 100%);
}
body.dark-mode .sh-fade-left {
  background: linear-gradient(90deg, #1e293b 0%, rgba(30,41,59,0.85) 40%, transparent 100%);
}
body.dark-mode .scroll-hint .sh-arrow {
  background: #1e293b;
  border-color: #3b82f6;
  color: #3b82f6;
}

/* ========== 第六批: 学员详情手机端Tab样式 ========== */
.stu-detail-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: var(--bg-tint);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sdt-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2, #64748b);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.sdt-tab:hover {
  background: #eef2f7;
  color: var(--text, #1e293b);
}
.sdt-tab.active {
  background: var(--primary, #185FA5);
  color: #fff;
  box-shadow: 0 2px 8px rgba(24,95,165,.3);
}

/* ========== 第六批: 学员卡片快捷按钮样式 ========== */
.sc-quick-btn {
  width: 32px;
  height: 32px;
  padding: 0 !important;
  font-size: 15px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px !important;
}
.sc-quick-btn:hover {
  transform: scale(1.1);
  background: #f0f7ff;
}

/* ========== 第六批: 手机端首页快捷操作入口 ========== */
.mobile-quick-actions {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.mqa-btn {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.mqa-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  border-color: var(--primary, #185FA5);
}
.mqa-btn:active {
  transform: translateY(0);
}
.mqa-icon {
  font-size: 22px;
  margin-bottom: 4px;
}
.mqa-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2, #475569);
}

/* 手机端显示快捷操作栏 */
@media (max-width: 1023px) {
  .mobile-quick-actions {
    display: grid;
  }
  /* 手机端学员详情Tab内容 */
  .stu-tab-content {
    display: block;
  }
  .stu-tab-content.hidden {
    display: none;
  }
}

/* 桌面端隐藏Tab，显示全部内容 */
@media (min-width: 1024px) {
  .stu-detail-tabs {
    display: none !important;
  }
  .stu-tab-content {
    display: block !important;
  }
}

/* ========== 第七批: 收款快捷金额按钮样式 ========== */
.pay-quick-amt {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.pay-amt-btn {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--bg-tint);
  color: var(--text-2, #475569);
  cursor: pointer;
  transition: all .15s;
}
.pay-amt-btn:hover {
  background: var(--primary, #185FA5);
  color: #fff;
  border-color: var(--primary, #185FA5);
  transform: translateY(-1px);
}
.pay-amt-btn:active {
  transform: translateY(0);
}

/* ========== 第八批: 语音输入按钮样式 ========== */
.voice-input-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all .15s;
  vertical-align: middle;
}
.voice-input-btn:hover {
  background: #f0f7ff;
  transform: scale(1.1);
}

/* ========== 第九批: 跟进记录时间线样式 ========== */
.follow-timeline {
  position: relative;
  padding-left: 24px;
  margin: 12px 0;
}
.follow-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border, #e2e8f0);
}
.follow-item {
  position: relative;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-tint);
  border-radius: 10px;
  border: 1px solid var(--border, #e2e8f0);
}
.follow-dot {
  position: absolute;
  left: -20px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--border, #e2e8f0);
}
.follow-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
  font-size: 12px;
}
.follow-type {
  font-weight: 700;
  font-size: 13px;
}
.follow-by {
  color: var(--text-2, #475569);
}
.follow-time {
  color: var(--text-3, #94a3b8);
  margin-left: auto;
}
.follow-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text, #1e293b);
}
.follow-next {
  margin-top: 8px;
  font-size: 12px;
  color: var(--warning, #f59e0b);
  font-weight: 600;
}

/* ========== 第九批: 工作日志样式 ========== */
.worklog-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.worklog-item {
  padding: 14px;
  background: var(--bg-tint);
  border-radius: 10px;
  border: 1px solid var(--border, #e2e8f0);
}
.worklog-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}
.worklog-type {
  font-weight: 700;
  font-size: 13px;
  color: var(--primary, #185FA5);
  background: var(--primary-light, #eff6ff);
  padding: 2px 8px;
  border-radius: 6px;
}
.worklog-by {
  color: var(--text-2, #475569);
}
.worklog-time {
  color: var(--text-3, #94a3b8);
  margin-left: auto;
}
.worklog-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text, #1e293b);
}

/* 手机端跟进记录和工作日志优化 */
@media (max-width: 1023px) {
  .follow-header, .worklog-header {
    flex-wrap: wrap;
    gap: 6px;
  }
  .follow-time, .worklog-time {
    width: 100%;
    margin-left: 0;
  }
}

/* ============================================================
   iOS Safari 专项优化 (苹果手机显示问题修复)
   ============================================================ */

/* 1. 全局基础修复 */
* {
  -webkit-tap-highlight-color: transparent;  /* 移除点击高亮 */
  -webkit-touch-callout: none;                /* 禁用长按菜单 */
}

html {
  -webkit-text-size-adjust: 100%;             /* 防止文字自动调整 */
  text-size-adjust: 100%;
}

body {
  /* iOS 100vh 修复：使用 -webkit-fill-available */
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: fill-available;
  /* 优化滚动性能 */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;                /* 防止橡皮筋效果影响布局 */
}

/* 2. 安全区域适配 (iPhone X及以上刘海屏) */
.safe-area-top {
  padding-top: env(safe-area-inset-top);
  padding-top: constant(safe-area-inset-top);
}
.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom);
  padding-bottom: constant(safe-area-inset-bottom);
}
.safe-area-left {
  padding-left: env(safe-area-inset-left);
  padding-left: constant(safe-area-inset-left);
}
.safe-area-right {
  padding-right: env(safe-area-inset-right);
  padding-right: constant(safe-area-inset-right);
}

/* 顶部栏安全区域 */
.topbar {
  padding-top: max(8px, env(safe-area-inset-top));
  padding-top: max(8px, constant(safe-area-inset-top));
}

/* 底部固定元素安全区域 */
.modal-foot,
.bottom-bar,
[style*="position: fixed"][style*="bottom"] {
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  padding-bottom: max(12px, constant(safe-area-inset-bottom));
}

/* 3. 输入框优化 - 防止iOS自动缩放（font-size必须>=16px） */
@media (max-width: 1023px) {
  input, select, textarea {
    font-size: 16px !important;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 8px;
  }
  
  /* 搜索框特殊处理 */
  .global-search input {
    font-size: 16px !important;
    height: 40px !important;
  }
  
  /* 按钮优化 */
  button {
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;  /* 消除300ms点击延迟 */
  }
  
  /* 下拉箭头重置 */
  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
  }
}

/* 4. backdrop-filter iOS兼容 */
.login-card,
.glass-effect,
[style*="backdrop-filter"] {
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

/* 5. 固定定位元素优化 */
@media (max-width: 1023px) {
  .modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* iOS固定定位修复 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  
  .modal-body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  
  /* 弹窗最大高度适配 */
  .modal-card {
    max-height: 90vh;
    max-height: calc(90vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: -webkit-fill-available;
  }
}

/* 6. 表格横向滚动优化 */
.table-wrap {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

/* 7. 图片和媒体优化 */
img {
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none;
  user-drag: none;
}

/* 8. 防止iOS输入框聚焦时页面上移问题 */
@media (max-width: 1023px) {
  input:focus, select:focus, textarea:focus {
    font-size: 16px !important;
  }
  
  /* 表单容器避免被键盘遮挡 */
  .form-grid, .modal-body {
    padding-bottom: 20px;
  }
}

/* 9. 侧边栏滑动优化 */
.sidebar,
.side-menu {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* 10. 日期选择器优化 */
input[type="date"],
input[type="datetime-local"],
input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  min-height: 40px;
}

/* 11. 开关/复选框优化 */
input[type="checkbox"],
input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
}
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: var(--primary, #185FA5);
  border-color: var(--primary, #185FA5);
}
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="radio"] {
  border-radius: 50%;
}
input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

/* 12. 滚动条隐藏（iOS风格） */
@media (max-width: 1023px) {
  .table-wrap::-webkit-scrollbar,
  .modal-body::-webkit-scrollbar,
  .sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
}

/* 13. 防止文字选中（按钮和标签） */
button, .btn, .op-btn, .tab, .nav-item {
  -webkit-user-select: none;
  user-select: none;
}

/* 14. 优化触摸目标大小（iOS建议至少44px） */
@media (max-width: 1023px) {
  .btn, .nav-item, .tab, .mqa-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* op-btn保持原有布局，仅增加最小高度，不改变display */
  .op-btn {
    min-height: 36px;
    padding: 8px 12px;
    line-height: 1.2;
  }
  
  /* 学员卡片操作按钮特殊处理 */
  .sc-actions .op-btn {
    min-height: 36px;
    min-width: auto;
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .sc-quick-btn {
    min-height: 36px;
    min-width: 36px;
    padding: 6px !important;
  }
  
  .pay-amt-btn, .theme-swatch {
    min-height: 36px;
    min-width: 36px;
  }
}



/* 15. 修复iOS下position: sticky的问题 */
.sticky-col,
[style*="position: sticky"] {
  position: -webkit-sticky;
  position: sticky;
}


/* ============================================================
   自定义轻量弹窗样式（替代prompt/confirm，手机端响应更快）
   ============================================================ */
.quick-input-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  /* 确保mask不会意外覆盖页面 - JS创建时才显示 */
  pointer-events: auto;
  animation: quickMaskIn 0.15s ease;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
@keyframes quickMaskIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.quick-input-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px 16px;
  width: 85%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: quickCardIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes quickCardIn {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.quick-input-title {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
  text-align: center;
}
.quick-input-msg {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
}
.quick-input-field {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px !important;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 16px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  transition: border-color 0.15s;
}
.quick-input-field:focus {
  border-color: #185FA5;
}
.quick-input-btns {
  display: flex;
  gap: 10px;
}
.quick-input-btn {
  flex: 1;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  min-height: 44px;
}
.quick-input-btn:active {
  transform: scale(0.97);
}
.quick-input-btn.cancel {
  background: #f1f5f9;
  color: #64748b;
}
.quick-input-btn.ok {
  background: #185FA5;
  color: #fff;
}

/* 优化：减少全属性过渡，只过渡必要属性 */
@media (max-width: 1023px) {
  .btn, .op-btn, .mqa-btn, .pay-amt-btn {
    transition: background 0.1s, opacity 0.1s, transform 0.1s !important;
  }
  .btn:active, .op-btn:active, .mqa-btn:active {
    transform: scale(0.97);
    opacity: 0.85;
  }
  /* 减少弹窗动画时间 */
  .modal-card {
    animation: modalIn 0.18s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }
}

/* 点击反馈：按钮按下效果 */
.btn:active, .op-btn:active, .nav-item:active, .tab:active, .mqa-btn:active {
  transform: scale(0.97);
  opacity: 0.85;
}


/* ============================================================
   最终修复：确保手机端收款按钮可点击
   ============================================================ */
@media (max-width: 1023px) {
  /* 学员卡片操作区域 - 明确flex布局 */
  .sc-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 8px 0 !important;
    position: relative !important;
    z-index: 100 !important;
  }
  
  /* 操作按钮 - 明确尺寸和布局 (v18.5: inline-flex居中 + flex均分等宽) */
  .sc-actions .op-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    flex: 1 1 0% !important;
    min-width: 50px !important;
    min-height: 40px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    vertical-align: middle !important;
    position: relative !important;
    z-index: 101 !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border: none !important;
    background: transparent !important;
  }
  
  /* 收款按钮 - 明确样式 */
  .sc-actions .pay-btn-mobile {
    background: rgba(22, 163, 74, 0.12) !important;
    color: #16a34a !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    min-width: 60px !important;
  }
  .sc-actions .pay-btn-mobile:active {
    background: rgba(22, 163, 74, 0.25) !important;
    transform: scale(0.95) !important;
  }
  
  /* 快捷按钮（拨号/微信） */
  .sc-actions .sc-quick-btn {
    min-width: 36px !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    font-size: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* 确保按钮不被学员卡片的onclick拦截 */
.stu-card {
  position: relative;
}
.stu-card .sc-actions {
  position: relative;
  z-index: 100;
}


/* ============================================================
   全局修复：确保所有按钮可点击
   ============================================================ */
button, .btn, .op-btn {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* 确保没有元素意外覆盖按钮 */
.modal-mask.hidden,
.quick-input-mask[style*="display: none"] {
  display: none !important;
  pointer-events: none !important;
}

/* 学员卡片中的按钮确保在最上层 */
.stu-card button,
.stu-card .op-btn {
  position: relative;
  z-index: 10;
}


/* ============================================================
   学员卡片左上侧布局优化 - 防止复选框与姓名重叠
   ============================================================ */
.stu-card .sc-top {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 4px 40px 4px 12px !important;
  position: relative !important;
}

.stu-card .stu-sel {
  flex: 0 0 auto !important;
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: var(--primary, #185FA5) !important;
  cursor: pointer !important;
  position: relative !important;
  z-index: 2 !important;
}

.stu-card .sc-name {
  flex: 0 1 auto !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  position: relative !important;
  z-index: 1 !important;
  min-width: 0 !important;
}

.stu-card .sc-status {
  margin-left: auto !important;
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 1 !important;
}

/* 手机端进一步优化 */
@media (max-width: 1023px) {
  .stu-card .sc-top {
    gap: 8px !important;
    padding: 4px 36px 4px 10px !important;
  }
  
  .stu-card .stu-sel {
    width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
  }
  
  .stu-card .sc-name {
    font-size: 14px !important;
  }
}

/* 确保复选框不被其他元素遮挡 - 使用自定义样式，避免与原生对勾重叠 */
.stu-card input[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
}

/* 自定义复选框勾选对勾 - 确保只有一个对勾显示 */
.stu-card input[type="checkbox"]:checked {
  background: var(--primary, #185FA5) !important;
  border-color: var(--primary, #185FA5) !important;
}

.stu-card input[type="checkbox"]:checked::after {
  content: '' !important;
  position: absolute !important;
  left: 4px !important;
  top: 1px !important;
  width: 5px !important;
  height: 9px !important;
  border: solid white !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg) !important;
  display: block !important;
}

/* 确保::before不显示对勾 */
.stu-card input[type="checkbox"]::before {
  content: none !important;
  display: none !important;
}


/* ============================================================
   更多操作按钮位置修复 - 确保在右上侧，与左上复选框对称
   ============================================================ */
.stu-card .sc-more-btn {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 10 !important;
  width: 30px !important;
  height: 30px !important;
  line-height: 26px !important;
  text-align: center !important;
  border: 1px solid var(--border, #e4e7ee) !important;
  border-radius: 8px !important;
  background: var(--card-bg, #fff) !important;
  color: var(--text-2, #64748b) !important;
  font-size: 16px !important;
  padding: 0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.stu-card .sc-more-btn:hover {
  background: var(--primary-light, #eef4ff) !important;
  color: var(--primary, #185FA5) !important;
  border-color: var(--primary, #185FA5) !important;
}

.stu-card .sc-more-btn:active {
  transform: scale(0.95) !important;
}

/* 确保sc-top为右上按钮预留空间 */
.stu-card .sc-top {
  padding-right: 44px !important;
}

/* 手机端更多操作按钮尺寸 */
@media (max-width: 1023px) {
  .stu-card .sc-more-btn {
    width: 34px !important;
    height: 34px !important;
    line-height: 30px !important;
    font-size: 17px !important;
    border-radius: 9px !important;
    top: 8px !important;
    right: 8px !important;
  }
  
  .stu-card .sc-top {
    padding-right: 48px !important;
  }
}

/* ============================================================
   UI增强 v16 — 选择框(checkbox/radio)圆润化优化
   圆角增大 / 对勾更清晰 / hover与焦点反馈 / 平滑过渡
   ============================================================ */
input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .1s ease;
}
/* hover: 边框变主题色 + 浅色底 */
input[type="checkbox"]:hover,
input[type="radio"]:hover {
  border-color: var(--primary, #185FA5);
  background: rgba(24, 95, 165, .06);
}
/* 焦点可见环 (键盘导航可达) */
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: 2px solid var(--primary, #185FA5);
  outline-offset: 1px;
}
/* 按下微缩放反馈 */
input[type="checkbox"]:active,
input[type="radio"]:active {
  transform: scale(.92);
}
/* checked: 主题色填充 + 投影 */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: var(--primary, #185FA5);
  border-color: var(--primary, #185FA5);
  box-shadow: 0 1px 4px rgba(24, 95, 165, .35);
}
/* 对勾: 更大更清晰居中 */
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(1.1);
  transform-origin: center;
}
/* radio: 圆润 + 白点 */
input[type="radio"] {
  border-radius: 50%;
}
input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}
/* 移动端触控: 稍微放大 */
@media (max-width: 1023px) {
  input[type="checkbox"],
  input[type="radio"] {
    width: 20px;
    height: 20px;
    border-radius: 7px;
  }
  input[type="checkbox"]:checked::after {
    left: 5px;
    top: 2px;
    width: 5.5px;
    height: 10px;
  }
}

/* ============================================================
   UI增强 v17 — 勾选框(卡片/表格)对勾精细化
   对勾加大加粗 / 位置居中 / 视觉更清晰
   ============================================================ */
/* 卡片勾选框: 覆盖既有 !important 规则, 对勾更大更居中 */
.stu-card input[type="checkbox"]:checked::after {
  content: '' !important;
  position: absolute !important;
  left: 6px !important;
  top: 2px !important;
  width: 6px !important;
  height: 11px !important;
  border: solid #fff !important;
  border-width: 0 2.5px 2.5px 0 !important;
  transform: rotate(45deg) !important;
  border-radius: 1px !important;
  display: block !important;
}
/* 卡片勾选框尺寸微调: 视觉更饱满 */
.stu-card input[type="checkbox"] {
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.02) !important;
}
.stu-card input[type="checkbox"]:checked {
  background: var(--primary, #185FA5) !important;
  border-color: var(--primary, #185FA5) !important;
  box-shadow: 0 1px 4px rgba(24, 95, 165, .35) !important;
}
/* 通用勾选框对勾微调: 稍大更清晰 */
input[type="checkbox"]:checked::after {
  left: 5px !important;
  top: 1.5px !important;
  width: 5.5px !important;
  height: 10px !important;
  border-width: 0 2.5px 2.5px 0 !important;
}
/* 移动端卡片勾选框: 触控更大 + 对勾适配 */
@media (max-width: 1023px) {
  .stu-card .stu-sel,
  .stu-card input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    border-radius: 8px !important;
  }
  .stu-card input[type="checkbox"]:checked::after {
    left: 6.5px !important;
    top: 2.5px !important;
    width: 6.5px !important;
    height: 12px !important;
    border-width: 0 2.5px 2.5px 0 !important;
  }
}

/* ============================================================
   UI增强 v18 — 勾选框统一定为正方形
   修复表格内 checkbox 被 padding 拉伸成 28x20 长方形的问题
   ============================================================ */
/* 所有勾选框: 去除横向 padding, 统一正方形 */
input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border-radius: 6px !important;
}
/* 表格单元格内的勾选框: 强制不随 td padding 拉伸 */
td input[type="checkbox"],
td .stu-sel {
  width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
}
/* 勾选后的对勾: 适配正方形 20px */
input[type="checkbox"]:checked::after {
  left: 4.5px !important;
  top: 1.5px !important;
  width: 5.5px !important;
  height: 10px !important;
  border-width: 0 2.5px 2.5px 0 !important;
}
/* 卡片勾选框: 22px 正方形 (触控友好) */
.stu-card .stu-sel,
.stu-card input[type="checkbox"] {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  border-radius: 7px !important;
}
.stu-card input[type="checkbox"]:checked::after {
  left: 6px !important;
  top: 2px !important;
  width: 6px !important;
  height: 11px !important;
  border-width: 0 2.5px 2.5px 0 !important;
}
/* 移动端: 统一 22px */
@media (max-width: 1023px) {
  input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    border-radius: 7px !important;
  }
  td input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
  }
  input[type="checkbox"]:checked::after {
    left: 5px !important;
    top: 2px !important;
    width: 5.5px !important;
    height: 10px !important;
  }
}

/* ============================================================
   UI增强 v18.1 — 勾选框正方形修正
   移动端表格内 checkbox 统一 20x20 正方形 (避免被通用移动端规则拉到 22 高)
   ============================================================ */
@media (max-width: 1023px) {
  td input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
  }
}

/* ============================================================
   UI增强 v18.2 — 修复 op-primary / op-success 按钮白字白底
   资金往来"付款/报销""通过"、退款管理"办理中""已付款"等按钮,
   背景被上方通用 .op-btn{background:#fff} 覆盖 → 白字白底看不见
   ============================================================ */
.op-primary {
  background: var(--brand-gradient, linear-gradient(135deg,#185FA5 0%,#2563eb 100%)) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(37,99,235,.25);
}
.op-primary:hover {
  background: var(--primary-600, #1d4ed8) !important;
  border: none !important;
  transform: translateY(-1px);
}
.op-success {
  background: var(--success, #1a9e5c) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(26,158,92,.22);
}
.op-success:hover {
  background: #158a4f !important;
  border: none !important;
  transform: translateY(-1px);
}

/* ===== v18.3 按钮文字排版统一: 行内操作按钮图标统一为SVG并对齐 ===== */
.op-btn { display: inline-flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; }
.op-btn svg.lucide, .op-btn .lucide { width: 14px; height: 14px; flex-shrink: 0; }
.btn svg.lucide, .btn .lucide { flex-shrink: 0; vertical-align: -1px; }
.btn .lucide-sm { width: 14px; height: 14px; }

/* ===== v18.4 分段选项卡(seg-tab)图标统一为SVG并对齐 ===== */
.seg-tab { display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.seg-tab svg.lucide { width: 15px; height: 15px; flex-shrink: 0; }

/* ========== 开收据 (其他收款) 凭证打印与手机端适配 (2026-09-18) ========== */
@media (max-width: 1023px) {
  #miscReceiptModal .modal-body { overflow-x: hidden; overflow-y: auto; padding: 10px 6px; }
}
@media print {
  #miscReceiptModal { display: flex !important; visibility: visible !important; background: none !important; position: static !important; padding: 0 !important; }
  #miscReceiptModal .modal { display: block !important; box-shadow: none !important; border: none !important; max-width: none !important; max-height: none !important; width: auto !important; }
  #miscReceiptModal .modal-head, #miscReceiptModal .modal-foot { display: none !important; }
  #miscReceiptModal .modal-body { overflow: visible !important; padding: 0 !important; }
  #miscReceiptArea, #miscReceiptArea * { visibility: visible !important; }
  #miscReceiptArea {
    position: fixed; left: 0; top: 0;
    width: 794px !important; max-width: 794px !important;
    margin: 0 !important;
    border: 2px solid #1a1a1a !important;
    transform: scale(0.85) !important;
    transform-origin: top left !important;
  }
  #miscReceiptArea::before {
    content: ''; position: absolute; top: 3px; left: 3px; right: 3px; bottom: 3px;
    border: 1px solid #1a1a1a !important; pointer-events: none; z-index: 0;
  }
}

/* ===== tokens.css ===== */
/* ===== 统一设计令牌 & 组件校准 2026-11-17 ===== */
:root{
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 14px;
}
@media screen{
  /* 1. 圆角收敛：控件 8px / 卡片 12px / 弹窗 14px */
  .btn, button.btn, input:not([type=checkbox]):not([type=radio]), select, textarea,
  .search-input, .form-control { border-radius: var(--r-sm) !important; }
  .card, .stat-card, .panel, .page-toolbar { border-radius: var(--r-md) !important; }
  .modal, .modal-box, .modal-content, .dialog { border-radius: var(--r-lg) !important; }

  /* 2. 主色统一为品牌蓝（消除 4 套蓝色并存） */
  .btn-primary { background: #2f6fed !important; background-image: none !important; }
  .btn-primary:hover { background: #2563eb !important; }
  .stat-card { border-left-width: 3px !important; }

  /* 3. 统计卡列数自适应，3/5 张卡不再留空 */
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important; }

  /* 4. 表头字号统一 */
  .table-wrap table thead th, table thead th { font-size: 12.5px !important; letter-spacing: 0; }

  /* 5. 统一分页条 */
  .pager-bar {
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    padding:10px 12px; margin-top:8px; border:1px solid var(--border);
    border-radius:10px; background:var(--card-bg,#fff); font-size:13px; flex-wrap:wrap;
  }
  .pager-bar .pager-info { color: var(--text-3); }
  .pager-bar .pager-btns { display:flex; gap:8px; }
}
@media screen and (max-width:1023px){
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }

  /* 6. 工具栏自动换行：搜索独占一行，筛选 2 列，主按钮自动落行 */
  .toolbar { flex-wrap: wrap !important; }
  .toolbar .search-input { flex: 1 1 100% !important; }
  .toolbar select { flex: 1 1 140px !important; min-width: 0 !important; }

  /* 7. 窄屏表格：横向滚动 */
  .table-wrap { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 600px; }
  /* 窄屏表格保持横向滚动；首列不启用 sticky:
     border-collapse:collapse 下 sticky 单元格背景失效, 会遮挡内容 */
}

@media screen and (max-width:1023px){
  /* 奇数张统计卡时，末卡跨两列，避免右侧留空 */
  .stat-grid > .stat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media screen and (max-width:1023px){
  /* 报名/任务等页的 page-toolbar：搜索独占一行，下拉两列，按钮不拉伸 */
  .page-toolbar > div { width: 100%; }
  .page-toolbar input:not([type=checkbox]):not([type=radio]),
  .page-toolbar .search-input { flex: 1 1 100% !important; width: auto !important; min-width: 0 !important; }
  .page-toolbar select { flex: 1 1 calc(50% - 5px) !important; width: auto !important; min-width: 0 !important; max-width: calc(50% - 5px) !important; }
  .toolbar .btn { flex: 0 0 auto !important; }
}

@media screen and (max-width:1023px){
  /* 任务派发表单：窄屏改两行，标题整行、指派与日期各半 */
  #taskTitle { flex: 1 1 100% !important; min-width: 0 !important; }
  #taskAssignee, #taskDue { flex: 1 1 calc(50% - 5px) !important; min-width: 0 !important; max-width: calc(50% - 5px) !important; }
}

@media screen{
  /* 8. 操作列按钮保持一行, 不再逐个换行把行高撑高; 表格可横向滚动 */
  .table-wrap .actions { flex-wrap: nowrap !important; }
  .table-wrap th:last-child, .table-wrap td:last-child { white-space: nowrap; }
  /* 9. 暗色输入框占位符与正文区分 */
  body.dark-mode input::placeholder, body.dark-mode textarea::placeholder { color: #8b93a1 !important; }
}

@media screen{
  /* 10. 员工表: 按钮紧凑, 窄屏隐藏创建时间列(完整值在 title 中), 避免操作列被挤出 */
  .staff-table .actions { gap: 4px !important; }
  .staff-table .op-btn { padding: 2px 7px !important; }
}
@media screen and (max-width:1023px){
  .staff-table thead th:nth-child(5), .staff-table tbody td:nth-child(5) { display: none !important; }
}

@media screen{
  /* 11. 次要文字对比度: --text-3 原白底 3.16:1 / 暗底 3.73:1, 提到 4.83 / 5.73 */
  :root { --text-3: #6b7280 !important; }
  body.dark-mode, html[data-theme="dark"], [data-theme="dark"] body { --text-3: #8b93a1 !important; }
}

@media screen{
  /* 12. 浅色主题小字硬编码 #94a3b8(对比度约 2.8:1) 统一改用 --text-3 */
  .stat-card .stat-sub,
  .empty,
  .toolbar-hint, .hint, .tip,
  .stu-card .sc-info2,
  .card-title .hint-inline { color: var(--text-3) !important; }
}

/* ===== 登录页一致性 2026-11-17 (卡片圆角/按钮圆角与输入框对齐) ===== */
@media screen{
  #loginPage .login-container-v2 { border-radius: 16px !important; box-shadow: 0 18px 50px rgba(15,20,30,.18) !important; }
  #loginPage #loginBtn { border-radius: 8px !important; height: 44px !important; }
}

/* ===== 空态统一 2026-11-17 (各页 empty padding/行距/图标尺寸不一) ===== */
@media screen{
  #content .empty { padding: 44px 20px !important; line-height: 1.75 !important; text-align: center !important; }
  .empty-icon { display: inline-block !important; font-size: 34px !important; line-height: 1 !important; margin: 0 0 12px !important; opacity: .9 !important; }
  .empty .empty-icon + span, .empty > div + div { margin-top: 4px; }
}

/* ===== 空态图标统一 2026-11-17 (emoji 换成线性图标与转圈动画) ===== */
@media screen{
  .empty-icon svg { display:inline-block; vertical-align:middle; }
  .empty-icon.loading {
    display:inline-block !important;
    width:22px !important; height:22px !important;
    margin:0 auto 14px !important;
    border:2px solid rgba(47,111,237,.20) !important;
    border-top-color:#2f6fed !important;
    border-radius:50% !important;
    font-size:0 !important;
    animation:smSpin .75s linear infinite !important;
  }
}
@keyframes smSpin { to { transform: rotate(360deg); } }

/* ===== 宽表窄屏收敛 2026-11-17 (≤860px 隐藏次要列, 减少横向滚动) ===== */
@media screen and (max-width: 860px){
  .tb-payroll th:nth-child(3), .tb-payroll td:nth-child(3),
  .tb-payroll th:nth-child(4), .tb-payroll td:nth-child(4) { display: none; }

  .tb-exam th:nth-child(2), .tb-exam td:nth-child(2),
  .tb-exam th:nth-child(4), .tb-exam td:nth-child(4) { display: none; }

  .tb-grad th:nth-child(4), .tb-grad td:nth-child(4),
  .tb-grad th:nth-child(7), .tb-grad td:nth-child(7) { display: none; }

  .tb-cash th:nth-child(3), .tb-cash td:nth-child(3),
  .tb-cash th:nth-child(4), .tb-cash td:nth-child(4) { display: none; }

  .tb-backup td:nth-child(3) { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ===== 窄屏表格内边距收敛 2026-11-17 ===== */
@media screen and (max-width: 860px){
  .table-wrap > table.tb th,
  .table-wrap > table.tb td { padding-left: 7px; padding-right: 7px; }
  .table-wrap > table.tb th { font-size: 11.5px; }
}

/* ===== 窄屏再收敛 2026-11-17 ===== */
@media screen and (max-width: 860px){
  .tb-payroll th:nth-child(2) { font-size: 0; }
  .tb-payroll th:nth-child(2)::after { content: "岗位"; font-size: 11.5px; }
  .tb-backup th:nth-child(2), .tb-backup td:nth-child(2) { display: none; }
}

@media screen and (max-width: 860px){
  .tb-payroll td:nth-child(2) { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tb-payroll th:nth-child(7), .tb-payroll td:nth-child(7) { display: none; }
}

@media screen and (max-width: 860px){
  .tb-cashout th:nth-child(7), .tb-cashout td:nth-child(7) { display: none; }
}

/* ---- 导航统一线性图标(与顶部 lucide 同风格) ---- */
.nav-item .nav-icon svg { width: 16px; height: 16px; display: block; stroke-width: 1.6; }
@media screen and (max-width: 860px) {
  .nav-item .nav-icon svg { width: 18px; height: 18px; }
}

/* ===== 数据看板视觉重设计 2026-11-18 ===== */
/* 1) 统计卡：中性底，语义色只作左侧细条 */
.stat-grid.dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .stat-grid.dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .stat-grid.dash-stats { grid-template-columns: 1fr; } }
.stat-grid.dash-stats .stat-card { border-left-width: 3px; border-left-color: var(--border); }
.stat-grid.dash-stats .stat-card.sc-green { border-left-color: var(--success); }
.stat-grid.dash-stats .stat-card.sc-red { border-left-color: var(--danger); }
.stat-grid.dash-stats .stat-card.sc-orange { border-left-color: var(--warning); }
.stat-grid.dash-stats .stat-card.sc-blue { border-left-color: var(--primary); }
.stat-grid.dash-stats .stat-card.sc-muted { border-left-color: #dfe3ea; }
.stat-grid.dash-stats .stat-value { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* 2) 在册学员 / 员工 meta 行 */
.dash-meta { font-size: 12.5px; color: var(--text-3); margin: -6px 0 16px; }
.dash-meta b { color: var(--text-2); font-weight: 600; }

/* 3) 区块标题图标统一 */
.card-title .ct-ico { width: 16px; height: 16px; flex: 0 0 16px; color: var(--text-2); }
.card-title { font-weight: 600; }

/* 4) 看板空态压缩 */
.empty-sm { padding: 18px 0 !important; font-size: 13px; line-height: 1.6; }

/* 5) 窄屏首屏空间回收 */
@media (max-width: 900px) {
  .side-brand { padding: 7px 14px; }
  .nav-toggle { height: auto; padding: 5px 12px; margin: 2px 12px 8px; font-size: 12.5px; line-height: 1.4; }
  .topbar { height: 46px; }
}


/* ===== 数据看板视觉重设计 2026-11-18 (v2) ===== */

/* P1-5 排行榜紧凑化（仅看板作用域，不影响其他页面） */
.dash-grid .rank-item { min-height: 0 !important; padding: 7px 10px !important; gap: 10px !important; }
.dash-grid .rank-item .rank-no { width: 22px; height: 22px; line-height: 22px; font-size: 12px; }
.dash-grid .rank-item .rank-name { font-size: 13.5px; }
.dash-grid .rank-item .rank-stat { font-size: 12.5px; line-height: 1.35; }
.dash-grid .rank-item:nth-child(-n+3) { background: var(--bg-soft); }

/* P2-8 数字等宽对齐 */
.stat-value, .dash-meta, .dash-todo-num { font-variant-numeric: tabular-nums; }

/* P2-9 待办中心：去掉整块红底，改左侧语义色条 */
.dash-todo { border-left: 3px solid var(--border) !important; }
.dash-todo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.dash-todo-item { display: block; background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--warning); border-radius: 10px; padding: 10px 13px; transition: background .15s, border-color .15s; }
.dash-todo-item:hover { background: var(--bg-soft); }
.dash-todo-label { font-size: 12px; color: var(--text-2); }
.dash-todo-num { font-size: 18px; font-weight: 700; margin-top: 2px; }

/* P2-10 统计卡 hover 反馈 */
.stat-card { transition: border-color .15s ease, box-shadow .15s ease; }

/* P3-12 键盘焦点可见 */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }


/* P0-3 补：卡片内空态统一压缩（含"暂无数据/无临近到期"等） */
.card > .empty { padding: 20px 0 !important; }
.card > .empty .empty-icon { margin-bottom: 6px !important; }

/* P1-5 补：排行榜再收紧一行高度 */
.dash-grid .rank-item { padding: 6px 10px !important; }
.dash-grid .rank-item .rank-stat { line-height: 1.3 !important; }


/* P2-11 数据说明折叠「?」气泡 */
.dash-help { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 6px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-2); font-size: 12px; font-weight: 600; cursor: pointer; line-height: 1; padding: 0; transition: border-color .15s, color .15s; }
.dash-help:hover { border-color: var(--primary); color: var(--primary); }

/* P3-12 暗色语义色适配 */
body.dark-mode .dash-todo-item,
html[data-theme="dark"] .dash-todo-item,
[data-theme="dark"] body .dash-todo-item { background: #23272f !important; border-color: #333a45 !important; }
body.dark-mode .dash-todo-item:hover,
html[data-theme="dark"] .dash-todo-item:hover,
[data-theme="dark"] body .dash-todo-item:hover { background: #2b3038 !important; }
body.dark-mode .dash-grid .rank-item:nth-child(-n+3),
html[data-theme="dark"] .dash-grid .rank-item:nth-child(-n+3),
[data-theme="dark"] body .dash-grid .rank-item:nth-child(-n+3) { background: #23272f !important; }
body.dark-mode .stat-card.sc-muted,
html[data-theme="dark"] .stat-card.sc-muted,
[data-theme="dark"] body .stat-card.sc-muted { border-left-color: #39414d !important; }
body.dark-mode .dash-help,
html[data-theme="dark"] .dash-help,
[data-theme="dark"] body .dash-help { background: #2b3038; border-color: #38404c; color: #9aa3b2; }

/* P3-11 更宽屏四列 / 超窄单列 */
@media (min-width: 1100px) { .stat-grid.dash-stats { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 420px) { .stat-grid.dash-stats { grid-template-columns: 1fr !important; } }

/* 看板下钻弹窗: 窄屏隐藏「业务线」列, 保证金额列可见 */
@media (max-width: 560px) {
  #drillModal table th:nth-child(3), #drillModal table td:nth-child(3) { display: none; }
}

/* 看板下钻弹窗: 覆盖窄屏表格 min-width:600px, 让三列自适应弹窗宽度 */
@media screen and (max-width: 1023px) {
  #drillModal .table-wrap table { min-width: 0 !important; width: 100% !important; }
}

/* ===== 缴费记录重构 v395 (学员详情) ===== */
.pay-history { margin-top: 14px; }
.ph-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ph-head-l { display: flex; flex-direction: column; gap: 2px; }
.ph-title { font-size: 13px; font-weight: 600; color: var(--text); }
.ph-title b { color: var(--success); font-size: 16px; font-weight: 700; margin-left: 2px; }
.ph-sub { font-size: 11.5px; color: var(--text-3); }
.ph-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.ph-group { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 8px; background: var(--card); }
.ph-group-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; background: var(--bg-tint); border-bottom: 1px solid var(--border); }
.ph-gname { font-size: 12.5px; font-weight: 600; color: var(--text); }
.ph-gname i { font-style: normal; font-weight: 400; font-size: 11px; color: var(--text-3); margin-left: 6px; }
.ph-sum { font-size: 11.5px; color: var(--text-3); text-align: right; }
.ph-sum b { color: var(--success); font-size: 13px; }
.ph-sum .ph-pend { color: var(--warning); }
.ph-day { display: flex; justify-content: space-between; align-items: center; padding: 4px 10px; font-size: 11px; color: var(--text-3); background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.ph-day span:last-child { color: var(--text-2); }
.ph-row { display: flex; align-items: center; gap: 7px; padding: 6px 10px; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.ph-row:last-child { border-bottom: none; }
.ph-time { flex: 0 0 42px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ph-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.ph-label em { font-style: normal; font-size: 11.5px; color: var(--text-3); margin-left: 7px; }
.ph-amt { font-weight: 600; font-size: 13px; color: var(--success); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ph-amt.void, .ph-amt.muted { color: var(--text-3); }
.ph-amt.refund { color: var(--danger); }
.ph-amt-old { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.ph-tag { font-size: 10.5px; padding: 1px 6px; border-radius: 9px; white-space: nowrap; line-height: 1.6; }
.ph-tag.ok { color: #15803d; background: #dcfce7; }
.ph-tag.void, .ph-tag.rej, .ph-tag.gray { color: #6b7280; background: #f1f5f9; }
.ph-tag.pend { color: #b45309; background: #fef3c7; }
.ph-tag.blue { color: #1d4ed8; background: #e0edff; }
.ph-dots { border: none; background: none; color: var(--text-3); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.ph-dots:hover { background: var(--bg-muted); color: var(--text); }
.ph-dotsp { width: 24px; flex: 0 0 24px; }
.ph-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 10px 8px 59px; background: var(--bg-tint); border-bottom: 1px solid var(--border); }
.ph-row.void .ph-label { color: var(--text-3); text-decoration: line-through; }
.ph-row.rej .ph-label { color: var(--text-3); }
.ph-void-head { display: flex; justify-content: space-between; align-items: center; padding: 5px 10px; background: var(--bg-tint); border-bottom: 1px solid var(--border); cursor: pointer; font-size: 11.5px; color: var(--text-3); }
.ph-void-head:hover { color: var(--text-2); }
.ph-void-body { background: var(--card); }
.ph-caret { color: var(--text-3); font-size: 11px; }
.ph-agency .ph-group-head { cursor: pointer; }
.ph-refund .ph-group-head { background: #fef2f2; }
.ph-refund .ph-gname { color: #b91c1c; }
.ph-refund .ph-amt { color: var(--danger); }

/* v395 修正: 退费行时间不换行 + 折叠箭头可见 */
.ph-row.refund .ph-time { flex: 0 0 auto; white-space: nowrap; }
.ph-caret { font-size: 13px; line-height: 1; }
.ph-void-head { justify-content: flex-start; gap: 6px; }
.ph-amt.neg { color: var(--danger); }
.ph-time { flex: 0 0 48px; }
.ph-caret { color: var(--primary); font-size: 12px; font-weight: 700; opacity: 1; }

/* ============ v396 教学管理 · 成人学历督学 ============ */
.teach-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-bottom:14px}
.teach-kpi{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:14px 16px;display:flex;flex-direction:column;gap:4px}
.teach-kpi span{font-size:12px;color:var(--text-3)}
.teach-kpi b{font-size:22px;font-weight:700;line-height:1.2}
.teach-kpi i{font-size:11.5px;color:var(--text-3);font-style:normal}
.teach-kpi.warn{border-color:#fca5a5;background:#fef2f2}
.teach-kpi.warn b{color:var(--danger)}
.teach-termline{background:var(--bg-tint);border:1px solid var(--border);border-radius:10px;padding:10px 14px;display:flex;gap:12px;flex-wrap:wrap;font-size:12.5px;margin-bottom:12px;color:var(--text-2)}
.teach-termline b{color:var(--text-1)}
.teach-staffrow{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;margin-bottom:14px}
.teach-staff{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:7px}
.teach-staff b{font-size:12.5px}
.teach-staff i{font-size:11px;color:var(--text-3);font-style:normal;margin-left:6px}
.teach-bar{height:6px;background:var(--bg-tint);border-radius:4px;overflow:hidden}
.teach-bar span{display:block;height:100%;background:var(--primary);border-radius:4px}
.teach-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.teach-toolbar select,.teach-toolbar input{padding:6px 10px;border:1px solid var(--border);border-radius:8px;background:var(--card);font-size:12.5px;color:var(--text-1)}
.teach-toolbar input{min-width:160px}
.teach-bulk{display:flex;align-items:center;gap:8px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:10px;padding:8px 12px;margin-bottom:10px;font-size:12.5px;flex-wrap:wrap}
.teach-tablewrap{overflow-x:auto;border:1px solid var(--border);border-radius:12px;background:var(--card)}
.teach-table{width:100%;border-collapse:collapse;min-width:720px}
.teach-table th{text-align:left;font-size:11.5px;color:var(--text-3);font-weight:600;padding:10px 12px;border-bottom:1px solid var(--border);background:var(--bg-tint);white-space:nowrap}
.teach-table td{padding:9px 12px;border-bottom:1px solid var(--border);font-size:12.5px;vertical-align:middle}
.teach-table tbody tr:hover{background:var(--bg-tint)}
.teach-name{font-weight:600}
.teach-sub{font-size:11px;color:var(--text-3);margin-top:2px}
.teach-chips{display:flex;gap:6px;flex-wrap:wrap}
.teach-chip{border:1px solid var(--border);background:var(--card);border-radius:999px;padding:3px 10px;font-size:11.5px;cursor:pointer;color:var(--text-2);transition:.15s;white-space:nowrap}
.teach-chip:hover{border-color:var(--primary);color:var(--primary)}
.teach-chip.done{background:#ecfdf5;border-color:#34d399;color:#047857}
.teach-chip.overdue{background:#fef2f2;border-color:#fca5a5;color:#b91c1c}
.teach-badge{display:inline-block;font-size:11px;padding:2px 8px;border-radius:999px;background:var(--bg-tint);color:var(--text-2);white-space:nowrap}
.teach-badge.overdue{background:#fef2f2;color:#b91c1c}
.teach-badge.ok{background:#ecfdf5;color:#047857}
.teach-pager{display:flex;align-items:center;justify-content:center;gap:14px;padding:14px 0;font-size:12.5px;color:var(--text-2)}
@media (max-width:640px){
  .teach-kpis{grid-template-columns:repeat(2,1fr)}
  .teach-kpi b{font-size:18px}
  .teach-toolbar input{min-width:0;flex:1}
}

/* 窄屏适配：2×2 KPI、收窄按钮、隐藏学期列 */
@media (max-width:900px){
  .teach-kpis{grid-template-columns:repeat(2,1fr)}
  .teach-toolbar .btn{width:auto;padding:6px 16px}
  .teach-toolbar select{flex:1;min-width:110px}
  .teach-table th:nth-child(5),.teach-table td:nth-child(5){display:none}
  .teach-table{min-width:600px}
}
@media (max-width:900px){
  .teach-toolbar{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
  .teach-toolbar select{flex:none;min-width:0}
  .teach-toolbar input{grid-column:1/3;width:auto;min-width:0}
  .teach-toolbar .btn{grid-column:3;width:auto;justify-self:stretch}
  .teach-toolbar .spacer{display:none}
  .teach-toolbar .toolbar-hint{grid-column:1/-1}
}
