/* ===== 多角色学生管理系统 - 浅色主题 ===== */
: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: 12.5px; }
.post-check { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; 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: 13.5px; 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: 12.5px; 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: 12.5px; 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: 13.5px; }
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: 12.5px; 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: 12.5px; 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: 12.5px; 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: 13.5px; }
.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: 12.5px; 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: 12.5px; }
.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: 11.5px; 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: 13.5px; 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: 12.5px; }
  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: 13.5px; }
  .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%; }
  /* 批量操作栏: 提示独占一行, 按钮双列网格 (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; }
  /* 弹窗: 底部弹出 */
  .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: 11.5px; }
  .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: 12.5px; }
}


/* ===== 学员管理: 业务页签 + 费用合并列 (第一期重构) ===== */
.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: 12.5px; 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: 12.5px; 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: 12.5px; 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-owe { background: #fff7f7; border-color: #f2c9c9; }
.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: 12.5px; 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: 12.5px; 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: 12.5px; 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.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; }

/* ===== 移动端增强 (第二轮优化) ===== */
@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: 10.5px; padding: 1px 6px; }
  .stu-table tbody td.stu-name-cell > div:first-child { font-size: 12.5px; }
  /* 操作列吸右时加左阴影, 滚动重叠边界清晰 */
  .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: 13.5px; 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: 10.5px; 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: 10.5px; }
}

/* ===== 学员微信联动 (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: 13.5px; 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: 12.5px; color: #64748b; }

/* ---------- 按钮三态 ---------- */
.btn { height: 34px; padding: 0 16px; font-size: 13.5px; 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-primary:active { transform: translateY(0); }
.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: 12.5px; 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: 12.5px; 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: 12.5px; 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: 12.5px; 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: 11.5px; 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: 13.5px; }
.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: 12.5px; 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; }
::-webkit-scrollbar-track { background: transparent; }

/* 表格容器内间距 */
.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: 13.5px; }
  /* 表格行高 + 操作按钮间距 (移动端卡片视图不受影响) */
  .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: 15.5px; }
  .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: 12.5px; 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: 10.5px; 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: 12.5px; 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: 12.5px; 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: 12.5px; }
.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: 10.5px; 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: 11.5px; 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: 11.5px; 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: 12.5px; }
  /* 业务列长文本(层次/学校/专业等)超出省略; 完整内容通过 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: 11.5px; 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: 13.5px; 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: 12.5px; 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: 12.5px !important; }
#studentModal .modal-body .form-section-title.sub { font-size: 14px !important; }
#studentModal .modal-body .eg-val { font-size: 13.5px; }
/* 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: 13.5px; }

/* ============ 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: 12.5px; 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: 12.5px; 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: 12.5px;
}

/* ============ 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: 11.5px; 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: 12.5px; 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%; }
}
