/* ===== 红十字课程排课管理 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  --red: #c0392b;
  --red-dark: #96281b;
  --bg: #f4f5f7;
  --panel: #ffffff;
  --line: #e2e5ea;
  --text: #2c3e50;
  --muted: #8a94a6;
  --blue: #2f6fdd;
  --green: #1e9e62;
  --amber: #e6a23c;
}
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- 顶栏 ---------- */
.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 52px;
  flex-shrink: 0;
}
.brand { font-size: 16px; font-weight: 700; color: var(--red); white-space: nowrap; }

/* ---------- 顶栏培训班栏 ---------- */
.class-bar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.class-bar .cb-label { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.class-bar .search-select { width: 240px; }
.class-bar .btn { flex-shrink: 0; white-space: nowrap; }

/* ---------- 顶部用户栏 ---------- */
.user-bar { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.user-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f2f4f8; border: 1px solid var(--line); border-radius: 16px;
  padding: 3px 12px; font-size: 13px; color: var(--text);
}
.user-chip .user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-badge {
  font-size: 11px; color: #fff; background: linear-gradient(135deg, #b8860b, #d4af37);
  border-radius: 9px; padding: 1px 8px; font-weight: 600; letter-spacing: 1px;
}

/* ---------- 登录/注册门 ---------- */
#authGate {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 20% -10%, rgba(192,57,43,.35), transparent 55%),
    radial-gradient(ellipse at 85% 110%, rgba(47,111,221,.28), transparent 55%),
    linear-gradient(160deg, #1b2735 0%, #202f45 45%, #24344e 100%);
}
#authGate[hidden] { display: none; }
.auth-inner { text-align: center; padding: 24px; max-width: 420px; width: 92%; }
.auth-brand { margin-bottom: 28px; }
.auth-logo {
  width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff; font-size: 34px; line-height: 68px; text-align: center;
  box-shadow: 0 8px 24px rgba(192,57,43,.4);
}
.auth-brand h1 { color: #fff; font-size: 24px; letter-spacing: 2px; margin-bottom: 8px; }
.auth-brand p { color: rgba(255,255,255,.65); font-size: 13px; letter-spacing: 1px; }
.auth-card {
  background: #fff; border-radius: 12px; padding: 26px 30px 22px;
  box-shadow: 0 18px 48px rgba(0,0,0,.35); text-align: left;
}
.auth-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.auth-tab {
  flex: 1; background: none; border: none; padding: 10px 0; font-size: 15px;
  color: var(--muted); cursor: pointer; font-family: inherit;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.auth-tab.active { color: var(--red); border-bottom-color: var(--red); font-weight: 600; }
.auth-card label { display: block; margin-bottom: 14px; font-size: 13px; color: #555; }
.auth-card input {
  display: block; width: 100%; margin-top: 6px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 6px; font-size: 14px;
  font-family: inherit; outline: none; transition: border-color .15s;
}
.auth-card input:focus { border-color: var(--red); }
.auth-error {
  background: #fdecea; color: #c0392b; border: 1px solid #f5c6c2;
  border-radius: 6px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px;
}
.auth-info {
  background: #e8f3ff; color: #1a73c2; border: 1px solid #bcdcff;
  border-radius: 6px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px;
}
.btn-block { width: 100%; padding: 10px 0; font-size: 15px; letter-spacing: 4px; }
.auth-note { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.auth-foot { margin-top: 22px; color: rgba(255,255,255,.55); font-size: 12px; letter-spacing: 1px; }

/* ---------- 用户管理 ---------- */
#userTable .role-cell { font-size: 12px; }
.user-add-box, .user-pending-box { background: #fafbfc; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.user-add-title { font-size: 13px; font-weight: 600; color: #333; margin-bottom: 8px; }
.user-add-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.user-add-form input, .user-add-form select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.user-add-form input { flex: 1; min-width: 120px; }
.user-add-form select { min-width: 96px; }

/* ============ 账号管理完整页面 ============ */
.users-page { width: 100%; overflow-y: auto; padding: 22px 28px 48px; max-width: 1180px; margin: 0 auto; }
.users-page .page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.users-page .page-head h2 { font-size: 20px; margin: 0; }
.users-page .page-desc { margin: 0 0 18px; font-size: 13px; line-height: 1.6; }
.card-block { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.blk-title { font-size: 15px; font-weight: 600; color: #222; margin: 0 0 12px; padding-left: 10px; border-left: 3px solid var(--primary, #c0392b); }
.users-page .user-add-form input, .users-page .user-add-form select { font-size: 14px; padding: 8px 12px; }
.users-page .user-add-form .btn-primary { padding: 8px 18px; white-space: nowrap; }

/* 密码结果展示框 */
.pwd-result-box { display: flex; align-items: center; gap: 12px; background: #f4f8ff; border: 1px dashed #4a90e2; border-radius: 8px; padding: 12px 14px; margin-top: 6px; }
.pwd-result-box code { flex: 1; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 18px; font-weight: 600; color: #c0392b; letter-spacing: 2px; word-break: break-all; }
.role-select { padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; font-family: inherit; }
.user-del-btn { color: #d9534f; }
.class-bar { display: flex; align-items: center; gap: 6px; }
.class-bar select {
  max-width: 320px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 13px; background: #fff;
}
.tabs { margin-left: auto; display: flex; gap: 4px; }
.tab {
  border: none; background: none; padding: 8px 18px; cursor: pointer;
  font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent;
}
.tab.active { color: var(--red); border-bottom-color: var(--red); font-weight: 600; }

/* ---------- 按钮 ---------- */
.btn {
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 13px; color: var(--text);
  transition: all .15s;
}
.btn:hover { border-color: var(--red); color: var(--red); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--red); }
.btn-ghost.danger:hover { color: #fff; background: #d9534f; border-color: #d9534f; }
.spacer { flex: 1; }

/* ---------- 视图 ---------- */
.view { display: none; flex: 1; overflow: hidden; }
.view.active { display: flex; }

/* ---------- 师资视图 ---------- */
#view-teachers.active { flex-direction: column; }
.teachers-layout { display: flex; flex: 1; overflow: hidden; gap: 0; }
.teachers-col {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  min-width: 0;
}
.teachers-col:first-child { border-right: 1px solid var(--line); }
.teachers-col .toolbar { flex-shrink: 0; }
.teachers-col .toolbar h3 { font-size: 14px; white-space: nowrap; }
.teachers-col .table-wrap { flex: 1; overflow: auto; }
.teachers-col .table-wrap table { min-width: 100%; }
.teachers-col .btn-sm-table { font-size: 12px; padding: 2px 8px; }

/* ---------- 排课视图 ---------- */
#view-schedule.active { display: flex; flex-direction: column; }
#view-schedule-templates.active { display: flex; flex-direction: column; }
.schedule-top { display: flex; flex: 1; overflow: hidden; }
.schedule-wrap { flex: 1; overflow: auto; padding: 16px; }
.empty-hint { text-align: center; color: var(--muted); padding: 80px 0; font-size: 15px; }

.schedule-grid { border-collapse: collapse; width: 100%; background: var(--panel); table-layout: fixed; }
.schedule-grid th, .schedule-grid td { border: 1px solid var(--line); vertical-align: top; }
.schedule-grid thead th {
  background: #fafbfc; padding: 10px 6px; font-size: 14px; text-align: center;
}
.schedule-grid thead th .date-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.schedule-grid .slot-head {
  width: 84px; background: #fafbfc; text-align: center; padding: 8px 4px;
  font-weight: 600; font-size: 13px;
}
.schedule-grid .slot-head .cap { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 4px; }
.schedule-grid td.cell { min-height: 90px; height: 110px; padding: 4px; background: #fff; }
.schedule-grid td.cell.dragover { background: #fdeceb; outline: 2px dashed var(--red); outline-offset: -2px; }
.schedule-grid td.cell .cap-used { font-size: 11px; color: var(--muted); padding: 0 2px 4px; }
.schedule-grid td.cell .cap-used.full { color: var(--green); }
.schedule-grid td.cell .cap-used.over { color: var(--amber); }

/* 课程块 */
.block {
  background: #eef4ff; border: 1px solid #c8d9f5; border-left: 3px solid var(--blue);
  border-radius: 5px; padding: 5px 7px; margin-bottom: 4px; cursor: grab;
  font-size: 13px; position: relative;
}
.block.mode-实作 { background: #fdf1e8; border-color: #f3d3b8; border-left-color: #e07b39; }
.block.dragging { opacity: .45; }
.block .b-name { font-weight: 600; font-size: 14px; }
.block .b-meta { color: var(--muted); margin-top: 1px; font-size: 12px; }
.block .b-teachers { margin-top: 3px; color: #444; line-height: 1.55; white-space: pre-line; font-size: 13px; }
.block .b-teachers .none { color: #c0a020; }
.block .b-ops { position: absolute; top: 3px; right: 4px; display: none; gap: 2px; }
.block:hover .b-ops { display: flex; }
.block .b-ops button {
  border: none; background: rgba(255,255,255,.85); cursor: pointer;
  font-size: 13px; padding: 2px 7px; border-radius: 3px; color: var(--blue);
}
.block .b-ops button.del { color: var(--red); }

/* ---------- 右侧面板 ---------- */
.side-panel {
  width: 260px; flex-shrink: 0; border-left: 1px solid var(--line);
  background: var(--panel); overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.panel { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; background: #fafbfc; border-bottom: 1px solid var(--line);
}
.panel-head h3 { font-size: 13px; }
.muted { color: var(--muted); font-weight: 400; font-size: 11px; }
.card-list { padding: 8px; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
#courseList.card-list { max-height: none; flex: 1; }
.card-list:empty::after { content: "空"; display: block; text-align: center; color: var(--muted); padding: 12px; font-size: 12px; }

.c-card {
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px;
  background: #fff; cursor: grab; font-size: 12px; position: relative;
}
.c-card:hover { border-color: var(--blue); }
.c-card.dragging { opacity: .45; }
.c-card .c-name { font-weight: 600; font-size: 13px; }
.c-card .c-meta { color: var(--muted); margin-top: 2px; }
.c-card .c-ops { position: absolute; top: 4px; right: 6px; display: none; gap: 4px; }
.c-card:hover .c-ops { display: flex; }
.c-card .c-ops a { cursor: pointer; font-size: 11px; color: var(--blue); text-decoration: none; }
.c-card .c-ops a.del { color: var(--red); }
.badge { display: inline-block; padding: 0 5px; border-radius: 3px; font-size: 11px; margin-left: 4px; }
.badge-理论 { background: #e8f0fe; color: var(--blue); }
.badge-实作 { background: #fdeee0; color: #d46b1f; }
.badge-level { background: #eef0f3; color: #555; }
.badge-done { background: #e8e8e8; color: #888; }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-deny { background: #fdecea; color: #c0392b; }
.c-card.c-done { opacity: .5; cursor: not-allowed; }
.c-card.c-done:hover { border-color: var(--line); }
.rate-note { padding: 6px 10px; font-size: 11px; color: var(--muted); border-top: 1px dashed var(--line); }

/* ---------- 工具条 & 表格 ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px 0; }
.tip { padding: 6px 16px 0; font-size: 12px; }
.table-wrap { flex: 1; overflow: auto; padding: 12px 16px; }
#view-students, #view-fees { flex-direction: column; }
.data-table { border-collapse: collapse; width: 100%; background: var(--panel); font-size: 13px; }
.data-table th, .data-table td { border: 1px solid var(--line); padding: 6px 8px; text-align: center; }
.data-table th { background: #fafbfc; position: sticky; top: 0; }
.data-table td.l { text-align: left; }
.data-table tr.subtotal td { background: #faf6ec; font-weight: 600; }
.data-table tr.total td { background: #fdeceb; font-weight: 700; }
.fee-total { font-size: 15px; font-weight: 700; color: var(--red); }
.link { color: var(--blue); cursor: pointer; font-size: 12px; }
.link.del { color: var(--red); }

/* ---------- 弹窗 ---------- */
.form-row { display: flex; gap: 12px; }
.form-row label { flex: 1; }
.form-row label input, .form-row label select { width: 100%; }
.req { color: var(--red); font-weight: 700; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal-mask[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 10px; padding: 20px; width: 420px;
  max-height: 85vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
/* 安排师资弹窗加宽，让老师搜索结果显示更多 */
#modalAssign .modal { width: 580px; max-width: 94vw; }
.modal h3 { margin-bottom: 14px; font-size: 16px; }
.modal label { display: block; margin-bottom: 10px; font-size: 13px; color: #555; }
.modal input, .modal select, .modal textarea {
  width: 100%; margin-top: 4px; padding: 7px 9px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 13px; font-family: inherit;
}
.modal .row2 { display: flex; gap: 10px; }
.modal .row2 label { flex: 1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.assign-list {
  border: 1px solid var(--line); border-radius: 6px; max-height: 180px;
  overflow-y: auto; padding: 6px 10px;
}
.assign-list label { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.assign-list input { width: auto; margin: 0; }
.fee-preview { margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---------- 照片上传入口弹窗 ---------- */
.photo-entry-modal { width: 460px !important; max-width: 94vw; }
.photo-entry-desc { font-size: 13px; color: #555; line-height: 1.7; margin-bottom: 14px; }
.photo-entry-desc strong { color: #1e2a3a; }
.photo-entry-qr { text-align: center; margin: 12px 0 14px; }
.photo-entry-qr img { width: 190px; height: 190px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.photo-entry-url {
  font-size: 13px; color: #1e2a3a; background: #f4f5f7; padding: 10px 12px;
  border-radius: 6px; word-break: break-all; text-align: center; border: 1px solid var(--line);
}

/* ---------- 管理端学员照片管理弹窗 ---------- */
.modal-photo-mgr { width: 560px !important; max-width: 94vw; }
.photo-mgr-info { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; font-size: 14px; }
.photo-mgr-name { font-weight: 700; color: #1e2a3a; }
.photo-mgr-current {
  display: flex; align-items: center; gap: 14px; margin-bottom: 12px;
  padding: 12px; background: #f4f5f7; border: 1px solid var(--line); border-radius: 8px;
}
.photo-mgr-current img {
  width: 90px; height: 120px; object-fit: cover; border-radius: 6px;
  background: #e8ecf1; border: 1px solid var(--line);
}
.photo-mgr-state { font-size: 13px; color: #888; }
.photo-mgr-crop {
  width: 100%; height: 300px; background: #e8ecf1; border-radius: 8px;
  overflow: hidden; margin: 10px 0;
}
.photo-mgr-crop img { display: block; max-width: 100%; }
.modal-photo-mgr .hint { font-size: 12px; color: #888; margin: 8px 0; line-height: 1.6; }
.modal-photo-mgr .field label { margin-bottom: 4px; }
.modal-photo-mgr .error { color: #c62828; font-size: 13px; margin-top: 8px; }

/* ---------- 多选搜索组件 ---------- */
.multi-select { width: 100%; }
.ms-selected { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; min-height: 28px; }
.ms-tag {
  background: #e3f2fd; color: #1565c0; padding: 3px 8px; border-radius: 12px;
  font-size: 12px; display: inline-flex; align-items: center; gap: 4px;
}
.ms-tag .ms-remove { cursor: pointer; font-weight: bold; color: #e53935; margin-left: 2px; }
.ms-tag .ms-remove:hover { color: #c62828; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: #323232; color: #fff; padding: 10px 22px; border-radius: 6px;
  font-size: 13px; z-index: 200; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

/* ---------- 统计视图 ---------- */
#view-stats { flex-direction: column; }
.stats-wrap { flex: 1; overflow: auto; padding: 16px; }
.stats-filters {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  background: var(--panel); padding: 12px 16px; border-radius: 8px; border: 1px solid var(--line);
}
.stats-filters label { font-size: 13px; color: #555; display: flex; align-items: center; gap: 6px; }
.stats-filters select {
  padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; font-size: 13px; background: #fff;
}
.stats-cards {
  display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.stat-card {
  flex: 1; min-width: 150px; background: var(--panel); border-radius: 8px;
  border: 1px solid var(--line); border-top: 3px solid var(--accent, var(--red));
  padding: 16px 20px; text-align: center;
}
.stat-val { font-size: 28px; font-weight: 700; color: var(--accent, var(--red)); }
.stat-unit { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.stat-label { font-size: 13px; color: #777; margin-top: 6px; }
.stats-sections { display: flex; flex-direction: column; gap: 20px; }
.stats-sec {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.stats-sec h3 { font-size: 14px; padding: 10px 16px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.stats-sec .data-table { border: none; }
.stats-sec .data-table th { position: static; }
.status-badge {
  display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 500;
}

/* ---------- 首页看板 ---------- */
#view-dashboard { flex-direction: column; }
.dashboard-wrap { flex: 1; overflow: auto; padding: 16px; }
.dash-cards {
  display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.dash-cards .stat-card {
  flex: 1; min-width: 130px; position: relative; padding: 14px 16px;
}
.stat-icon {
  position: absolute; top: 10px; right: 12px; font-size: 22px; opacity: .35;
}
.dash-grid {
  display: flex; gap: 16px; margin-bottom: 16px;
}
.dash-grid .dash-sec { flex: 1; }
.dash-sec {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  margin-bottom: 16px;
}
.dash-sec h3 { font-size: 14px; padding: 10px 16px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.dash-list { padding: 4px 0; max-height: 320px; overflow-y: auto; }
.dash-item {
  padding: 8px 16px; cursor: pointer; border-bottom: 1px solid #f0f0f0;
  transition: background .15s;
}
.dash-item:hover { background: #f8f9fb; }
.dash-item:last-child { border-bottom: none; }
.dash-item-main { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.dash-item-name { font-weight: 600; font-size: 13px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-item-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.dash-days { color: var(--red); font-weight: 500; }
.dash-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }

/* CSS柱状图 */
.dash-chart { padding: 16px; min-height: 180px; }
.bar-chart {
  display: flex; align-items: flex-end; gap: 8px; height: 140px; padding-bottom: 4px;
}
.bar-group {
  flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%;
  justify-content: flex-end;
}
.bar-stack {
  width: 100%; max-width: 40px; height: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; gap: 1px;
}
.bar {
  width: 100%; border-radius: 3px 3px 0 0; min-height: 2px; transition: height .3s;
}
.bar-classes { background: var(--red); }
.bar-students { background: var(--blue); }
.bar-label { font-size: 11px; color: var(--muted); margin-top: 4px; }
.chart-legend {
  display: flex; gap: 14px; justify-content: center; margin-top: 10px; font-size: 12px; color: #777;
}
.legend-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 3px; vertical-align: middle;
}

/* 类型分布条形图 */
.type-bars { padding: 8px 0; }
.type-bar-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 16px; font-size: 13px;
}
.type-bar-label { width: 100px; text-align: right; color: #555; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-bar-track { flex: 1; height: 20px; background: #f0f2f5; border-radius: 4px; overflow: hidden; }
.type-bar-fill { height: 100%; border-radius: 4px; transition: width .4s; }
.type-bar-count { width: 30px; font-weight: 600; color: #555; }

/* ---------- 培训日历 ---------- */
#view-calendar { flex-direction: column; }
.cal-wrap { flex: 1; overflow: auto; padding: 16px; }
.cal-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  background: var(--panel); padding: 12px 16px; border-radius: 8px; border: 1px solid var(--line);
}
.cal-title { font-size: 18px; font-weight: 700; min-width: 140px; text-align: center; }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px;
}
.cal-weekdays span {
  text-align: center; padding: 6px; font-size: 12px; font-weight: 600; color: #555;
  background: #fafbfc; border-radius: 4px;
}
.cal-weekdays .cal-weekend { color: var(--red); }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-cell {
  min-height: 90px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 4px; font-size: 12px; overflow: hidden;
}
.cal-cell.cal-empty { background: transparent; border-color: transparent; }
.cal-cell.cal-today { border-color: var(--red); border-width: 2px; }
.cal-cell.cal-weekend-cell { background: #fefdfd; }
.cal-date { font-weight: 600; font-size: 13px; padding: 2px 4px; color: #555; }
.cal-today .cal-date { color: var(--red); }
.cal-event {
  margin-top: 2px; padding: 2px 4px; border-radius: 3px; background: #f8f9fb; font-size: 11px;
  cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background .15s;
}
.cal-event:hover { background: #eef4ff; }
.cal-event-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 3px;
  vertical-align: middle;
}

/* ---------- 考勤管理 ---------- */
#view-attendance { flex-direction: column; }
.att-wrap { flex: 1; overflow: auto; padding: 12px 16px; }
.att-legend {
  display: flex; align-items: center; gap: 4px; font-size: 12px; color: #555; margin: 0 4px;
}
.att-dot {
  display: inline-block; width: 12px; height: 12px; border-radius: 3px;
}
.att-dot.att-present { background: #1e9e62; }
.att-dot.att-absent { background: #e74c3c; }
.att-dot.att-late { background: #e6a23c; }
.att-table { font-size: 12px; }
.att-table th { font-size: 11px; padding: 4px; }
.att-date-head { background: #f0f4f8; font-size: 12px; }
.att-slot-head { font-size: 10px; color: var(--muted); font-weight: 400; }
.att-name { font-weight: 600; white-space: nowrap; }
.att-cell {
  cursor: pointer; padding: 2px !important; min-width: 32px; transition: background .1s;
}
.att-batch-cell { padding: 2px 4px !important; text-align: center; }
.att-batch-btn {
  font-size: 11px; padding: 2px 8px; background: #e8f5e9; color: #1e9e62;
  border: 1px solid #a5d6a7; border-radius: 4px; cursor: pointer;
  white-space: nowrap; transition: all .15s;
}
.att-batch-btn:hover { background: #c8e6c9; border-color: #66bb6a; }
.att-cell:hover { background: #eef4ff; }
.att-cell.att-modified { background: #fff8e1; }
.att-badge {
  display: inline-block; width: 24px; height: 24px; line-height: 24px; text-align: center;
  border-radius: 4px; font-size: 12px; font-weight: 600;
}
.att-badge-出席 { background: #d4edda; color: #155724; }
.att-badge-缺席 { background: #f8d7da; color: #721c24; }
.att-badge-迟到 { background: #fff3cd; color: #856404; }

/* ---------- 统计页图表 ---------- */
.stats-chart-row {
  display: flex; gap: 16px; margin-bottom: 20px;
}
.stats-chart-sec {
  flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.stats-chart-sec h3 { font-size: 14px; padding: 10px 16px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.stats-chart-body { padding: 16px; min-height: 200px; }

/* CSS甜甜圈图 */
.donut {
  width: 100px; height: 100px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.donut-hole {
  width: 60px; height: 60px; background: var(--panel); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donut-num { font-size: 20px; font-weight: 700; color: var(--text); }
.donut-label { font-size: 10px; color: var(--muted); }
.donut-legend { font-size: 13px; line-height: 2; color: #555; }
.donut-legend .legend-dot { margin-right: 6px; }

/* ---------- 可搜索下拉组件 ---------- */
.search-select { position: relative; display: inline-block; }
.search-select input {
  width: 100%; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 13px; background: #fff;
}
.search-select input:focus { outline: none; border-color: var(--red); }
.search-select-dropdown {
  position: fixed; z-index: 9999;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  max-height: 340px; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.ss-item {
  padding: 7px 12px; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid #f0f0f0; transition: background .1s;
}
.ss-item:hover { background: #f4f5f7; }
.ss-item.ss-selected { background: #fff3e0; color: var(--red); font-weight: 600; }
.ss-empty { padding: 12px; color: var(--muted); text-align: center; font-size: 13px; }
.ss-group {
  padding: 5px 12px; font-size: 11px; color: var(--muted);
  background: #f6f7f9; border-bottom: 1px solid #ececec;
  font-weight: 600; letter-spacing: 1px; position: sticky; top: 0; z-index: 1;
}
.ss-item { display: flex; flex-direction: column; gap: 2px; }
.ss-main { font-size: 13px; line-height: 1.3; }
.ss-sub { font-size: 11px; color: var(--muted); }

/* ============ 整体布局：侧边栏 + 内容 ============ */
.layout { flex: 1; display: flex; overflow: hidden; }
.content { flex: 1; display: flex; min-width: 0; overflow: hidden; }
.sidebar {
  width: 230px; flex-shrink: 0; background: var(--panel);
  border-right: 1px solid var(--line); overflow-y: auto;
  padding: 12px 10px 24px; display: flex; flex-direction: column; gap: 14px;
}
.side-section.class-picker { display: flex; flex-direction: column; gap: 8px; }
.side-title {
  font-size: 12px; font-weight: 600; color: var(--muted);
  letter-spacing: 1px; padding: 0 2px;
}

/* 侧边栏导航 */
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 9px 12px; border-radius: 7px; font-size: 14px; color: var(--text);
  text-decoration: none; border: none; background: none; font-family: inherit;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: #f0f2f5; color: var(--red); }
.nav-item.tab.active {
  background: #fff3e0; color: var(--red); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--red);
}
/* 一级菜单（分组标题）：小号加粗 + 分隔线，明显区别于二级菜单项 */
.nav-group { margin-top: 10px; }
.nav-group:first-child { margin-top: 0; }
.nav-group-header {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12px; font-weight: 700; color: #78808a; letter-spacing: 2px;
  padding: 6px 8px; user-select: none;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.nav-group-header:hover { color: var(--text); }
.nav-group-header .twist { display: inline-block; transition: transform .15s; font-size: 10px; }
.nav-group.collapsed .twist { transform: rotate(-90deg); }
.nav-group.collapsed > .nav-item { display: none; }
/* 二级菜单项：缩进，体现从属关系 */
.nav-group .nav-item { padding-left: 24px; }
.nav-item.action { color: var(--text); }


/* 顶栏班级搜索 */
#classSelectWrap { width: 240px; }
#classSelectInput { max-width: 240px; }

/* 弹窗内搜索 */
#assignMainWrap, #clsHeadWrap { width: 100%; }
#assignMainWrap input, #clsHeadWrap input { width: 100%; }

/* ---------- 排课页底部班级明细 ---------- */
.schedule-bottom {
  flex-shrink: 0; max-height: 40vh; overflow-y: auto;
  background: var(--panel); border-top: 2px solid var(--line); padding: 16px 20px 20px;
}
.schedule-bottom h3 {
  font-size: 15px; margin-bottom: 10px; color: var(--text);
}
.schedule-bottom .data-table { font-size: 13px; }
.status-select { cursor: pointer; font-size: 12px; border-radius: 4px; }

/* 复制排课弹窗 */
.copy-sched-list { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.copy-sched-item { display: flex; align-items: center; padding: 8px 4px; cursor: pointer; border-bottom: 1px solid #f5f5f5; font-size: 14px; }
.copy-sched-item:last-child { border-bottom: none; }
.copy-sched-item:hover { background: #f8f9fa; }
.copy-sched-item input[type="radio"] { margin-right: 8px; }
.copy-sched-badge { margin-left: 8px; background: #e8f5e9; color: #1e9e62; font-size: 11px; padding: 1px 6px; border-radius: 3px; }
.copy-sched-badge-muted { margin-left: 8px; color: var(--muted); font-size: 11px; }
.copy-target {
  background: #f0f7ff; border: 1px solid #cfe3ff; border-radius: 8px;
  padding: 10px 14px; margin-bottom: 10px; font-size: 14px;
}
.copy-target b { color: var(--red); }
.copy-sched-name { font-weight: 600; }
.copy-sched-badge-cur {
  margin-left: 8px; background: #fff3e0; color: #e67e22; font-size: 11px;
  padding: 1px 6px; border-radius: 3px;
}

/* ---------- 课程通知 ---------- */
.notify-text {
  width: 100%; min-height: 420px; max-height: 60vh;
  font-family: "Microsoft YaHei", "PingFang SC", monospace;
  font-size: 14px; line-height: 1.8;
  border: 1px solid var(--line); border-radius: 6px;
  padding: 12px 16px; resize: vertical;
  background: #fafbfc; color: #333;
  white-space: pre; overflow-y: auto;
}

/* ---------- 学员备注 ---------- */
.student-inactive { opacity: 0.45; }
.student-inactive td { color: #999 !important; }
.remark-badge {
  display: inline-block; margin-left: 6px; font-size: 11px;
  padding: 1px 6px; border-radius: 3px;
  background: #fde2e2; color: #c0392b; vertical-align: middle;
}
.btn-remark { font-size: 12px; padding: 2px 8px; }
.remark-img-tag { font-size: 14px; margin-left: 2px; }
.remark-modal { max-width: 480px; }
.student-edit-modal { max-width: 620px; }
.sed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.sed-grid label { font-size: 13px; color: #555; margin-bottom: 3px; }
.sed-grid .input { width: 100%; }
.remark-presets { display: flex; gap: 8px; margin: 4px 0; }
.remark-presets .btn-preset {
  padding: 4px 16px; border-radius: 4px; cursor: pointer;
  font-size: 13px; border: 1px solid var(--line); background: #fff; color: #555;
}
.remark-presets .btn-preset.active {
  background: var(--red); color: #fff; border-color: var(--red);
}
.remark-input { margin-top: 4px; }
.remark-image-area { margin-top: 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.remark-preview { max-width: 200px; max-height: 150px; border-radius: 6px; border: 1px solid var(--line); }
.remark-no-img {
  width: 120px; height: 80px; border: 1px dashed var(--line); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px;
}
.btn-danger { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.btn-danger:hover { background: #c0392b; }

/* existing modal styles (shared) */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 9999;
}
.modal-overlay[hidden] { display: none !important; }
.modal-box {
  background: #fff; border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,.18);
  width: 90%; max-width: 520px; max-height: 80vh; overflow-y: auto;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.modal-header h3 { font-size: 16px; margin: 0; }
.modal-close { font-size: 24px; background: none; border: none; color: var(--muted); cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 16px 20px; }
.modal-body label { display: block; font-size: 13px; color: #555; margin-bottom: 4px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 20px; border-top: 1px solid var(--line);
}

/* ================================================================
   打印样式 —— 学员页 & 授课费页
   ================================================================ */
@media print {
  @page {
    size: A4 landscape;
    margin: 8mm;
  }

  /* ---- 全局重置 ---- */
  body {
    height: auto !important;
    overflow: visible !important;
    background: white !important;
    font-size: 11px !important;
    display: block !important;
    color: #000 !important;
  }

  /* ---- 只显示活跃视图 ---- */
  main.view {
    display: none !important;
    flex: none !important;
    overflow: visible !important;
  }
  main.view.active {
    display: block !important;
  }

  /* ---- 精简顶栏：只留品牌名 + 班级名 ---- */
  .topbar {
    display: block !important;
    height: auto !important;
    background: white !important;
    border: none !important;
    border-bottom: 2px solid #000 !important;
    padding: 0 0 8px 0 !important;
    margin-bottom: 12px !important;
    text-align: center !important;
  }
  .topbar .brand {
    font-size: 16px !important;
    color: #000 !important;
    display: block !important;
    margin-bottom: 4px !important;
  }
  .topbar .class-bar {
    display: block !important;
  }
  .topbar .class-bar #classSelectInput {
    display: inline-block !important;
    border: none !important;
    background: none !important;
    font-size: 14px !important;
    font-weight: bold !important;
    text-align: center !important;
    padding: 0 !important;
    color: #000 !important;
    width: auto !important;
    min-width: 200px !important;
    height: auto !important;
    margin: 0 !important;
  }
  /* 隐藏顶栏中的其他元素 */
  .topbar .tabs,
  .topbar .class-bar .search-select-dropdown,
  .topbar .class-bar button,
  .topbar .class-bar .btn,
  .topbar > button,
  .topbar > .btn {
    display: none !important;
  }

  /* ---- 隐藏交互动效 ---- */
  .toolbar { display: none !important; }
  .tip { display: none !important; }
  .btn { display: none !important; }
  button.btn { display: none !important; }
  input[type="file"] { display: none !important; }
  .modal-overlay { display: none !important; }
  .search-select-dropdown { display: none !important; }
  .spacer { display: none !important; }

  /* ---- 保留关键信息 ---- */
  #studentCount {
    display: block !important;
    font-size: 12px !important;
    margin: 4px 0 8px !important;
    color: #555 !important;
  }
  #feeTotal {
    display: block !important;
    font-size: 14px !important;
    font-weight: bold !important;
    margin: 4px 0 8px !important;
    color: #000 !important;
  }

  /* ---- 表格适配 A4 ---- */
  .table-wrap {
    overflow: visible !important;
    padding: 0 !important;
    max-height: none !important;
    flex: none !important;
  }
  .data-table {
    font-size: 10px !important;
    width: 100% !important;
    border-collapse: collapse !important;
  }
  .data-table th,
  .data-table td {
    padding: 3px 4px !important;
    border: 1px solid #999 !important;
  }
  .data-table th {
    position: static !important;
    background: #e6e6e6 !important;
    color: #000 !important;
    font-weight: bold !important;
  }
  .data-table tr.subtotal td {
    background: #f0f0f0 !important;
    font-weight: 600 !important;
  }
  .data-table tr.total td {
    background: #e0e0e0 !important;
    font-weight: 700 !important;
  }

  /* 防止表格行跨页撕裂 */
  .data-table tr {
    page-break-inside: avoid;
  }

  /* ---- 隐藏下拉菜单 ---- */
  .search-select-dropdown { display: none !important; }
}

/* ---------------- 发证管理 ---------------- */
#view-certs { flex-direction: column; }
.cert-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.cert-info { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cert-info h3 { font-size: 16px; margin: 0; }
.cert-info .muted { font-size: 13px; }
.cert-serial {
  font-size: 13px; color: var(--red); font-weight: 600;
  background: #fff3f0; padding: 2px 8px; border-radius: 4px;
}
.cert-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cert-tip {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 10px 16px 0; padding: 8px 12px;
  background: #f0f7ff; border: 1px solid #cfe3ff; border-radius: 6px;
  font-size: 12px; color: #555; line-height: 1.6;
}
.cert-tip .tip-icon {
  flex-shrink: 0; width: 18px; height: 18px; line-height: 18px;
  text-align: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: 11px;
}
.cert-issued td { background: #f8fff8; }
.cert-issued .cert-no-cell { font-weight: 700; color: #1a7a1a; letter-spacing: 0.5px; }
.badge-warn {
  display: inline-block; margin-left: 4px; padding: 0 5px;
  border-radius: 3px; font-size: 11px; color: #fff; background: #d9534f;
}

/* 电子证预览弹窗 */
.cert-preview-modal { max-width: 720px; width: 92%; }
.cert-preview-body { padding: 16px 20px; background: #f5f6f8; }
.cert-preview-cards {
  display: flex; justify-content: center; gap: 24px; flex-wrap: wrap;
}
.cert-preview-card { text-align: center; }
.cert-preview-title {
  font-size: 13px; color: #666; margin-bottom: 8px;
}
.cert-card {
  width: 85.60mm; height: 53.98mm; /* 与打印页 cert-page 一致，比例统一 */
  border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.15);
  position: relative; overflow: hidden; background: #fff;
  margin: 0 auto;
}
.cert-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.cert-card .cert-overlay {
  position: absolute; inset: 0;
}
.cert-card-back .cert-field {
  position: absolute; line-height: 1.15; white-space: nowrap; color: #000;
}
.cert-card-back .cert-field-cn { font-size: 1em; }
.cert-card-back .cert-field-en { font-size: 0.65em; opacity: 0.85; margin-top: 0.05em; color: #333; }
.cert-card-back .cert-field-value {
  font-size: 1em; color: #000;
}
/* 预览卡二维码、照片：覆盖 .cert-card img 通用规则，位置与打印页一致（mm） */
.cert-card-back .cert-card-qrcode,
.cert-card-back .cert-card-photo {
  position: absolute; right: auto; bottom: auto; object-fit: contain;
}
.cert-card-back .cert-card-qrcode { background: #fff; padding: 1mm; }
.cert-card-back .cert-card-photo { background: transparent; object-fit: cover; }
@media (max-width: 760px) {
  .cert-card { width: 280px; height: 177px; }
  .cert-card-back .cert-field { font-size: 9px; }
  .cert-card-back .cert-field-value { font-size: 1em; }
}

/* ---------- 快速建班向导 ---------- */
.qb-entry { color: var(--red); font-weight: 600; }
.qb-cta {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(90deg, #fff, #fbf3f2);
  border: 1px solid var(--line); border-left: 4px solid var(--red);
  border-radius: 10px; padding: 16px 20px; margin-bottom: 18px; cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.qb-cta:hover { box-shadow: 0 4px 16px rgba(192,57,43,.12); transform: translateY(-1px); }
.qb-cta-icon { font-size: 30px; line-height: 1; }
.qb-cta-text { flex: 1; }
.qb-cta-title { font-size: 17px; font-weight: 700; color: var(--text); }
.qb-cta-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }

.qb-wrap { max-width: 860px; margin: 0 auto; padding: 24px 28px 40px; overflow-y: auto; width: 100%; }
.qb-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.qb-intro { color: var(--muted); margin-bottom: 20px; font-size: 14px; }

.qb-steps { list-style: none; display: flex; gap: 0; margin-bottom: 22px; }
.qb-step {
  flex: 1; display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 8px; background: #eef0f3; color: var(--muted);
  border: 1px solid var(--line); border-right: none; font-size: 14px; cursor: pointer;
  position: relative; transition: background .15s, color .15s;
}
.qb-step:first-child { border-radius: 8px 0 0 8px; }
.qb-step:last-child { border-radius: 0 8px 8px 0; border-right: 1px solid var(--line); }
.qb-step-no {
  width: 22px; height: 22px; border-radius: 50%; background: #cfd4dc; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.qb-step.active { background: #fff; color: var(--red); font-weight: 700; box-shadow: inset 0 -3px 0 var(--red); }
.qb-step.active .qb-step-no { background: var(--red); }

.qb-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.qb-panel h3 { font-size: 17px; margin-bottom: 18px; }
.qb-form { display: flex; flex-direction: column; gap: 18px; }
.qb-row { display: flex; gap: 18px; }
.qb-row .qb-field { flex: 1; }
.qb-field { display: flex; flex-direction: column; gap: 6px; }
.qb-field label { font-size: 14px; font-weight: 600; }
.qb-field input, .qb-field select {
  height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--text); width: 100%;
}
.qb-field input:focus, .qb-field select:focus { outline: none; border-color: var(--red); }
.field-hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.req { color: var(--red); }
.qb-head-row { display: flex; gap: 10px; align-items: flex-start; }
.qb-head-select { flex: 1; }
.qb-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.qb-placeholder {
  border: 1px dashed var(--line); border-radius: 10px; padding: 28px; text-align: center;
  color: var(--muted); background: #fafbfc; font-size: 14px;
}

/* 复用通用按钮（btn / btn-primary / btn-ghost 已在全局定义） */

/* ---------- 排课模板管理（网格复用排课页样式） ---------- */
.st-bar { margin-bottom: 14px; }
.st-bar-label { font-weight: 600; font-size: 14px; }
.st-select {
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--text); min-width: 220px;
}
.st-select:focus { outline: none; border-color: var(--red); }
.st-editor {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 14px;
}
.st-editor .form-row { margin-bottom: 0; }

/* 快速建班第 2 步：模板选择 */
.qb2-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.qb2-card {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: #fff;
  transition: border-color .15s;
}
.qb2-card:hover { border-color: #d5b0ab; }
.qb2-card-main { flex: 1; min-width: 0; }
.qb2-card-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.qb2-card-items { font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb2-result { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #f0f9f0; border: 1px solid #cfe8cf; color: #2c6e2c; font-size: 13.5px; line-height: 1.7; }
.qb2-result.warn { background: #fff8e6; border-color: #f0dfa8; color: #7a5b13; }

/* 快速建班第 3 步：师资 */
.qb3-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.qb3-row {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: #fff;
}
.qb3-row-main { flex: 1; min-width: 0; }
.qb3-row-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.qb3-row-teachers { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.qb3-teacher-hint { margin-top: 14px; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* 快速建班第 4 步：学员 */
.qb4-actions { display: flex; gap: 10px; margin: 12px 0 6px; }
.qb4-manual { margin-top: 16px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 10px; background: #fafbfc; }
.qb4-manual h4 { font-size: 14.5px; margin-bottom: 10px; }
.qb4-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 12px; }
.qb4-form input, .qb4-form select {
  height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13.5px; background: #fff; color: var(--text); width: 100%;
}
.qb4-form input:focus, .qb4-form select:focus { outline: none; border-color: var(--red); }
.qb4-list-wrap { margin-top: 16px; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.qb4-list-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.qb4-list-wrap th, .qb4-list-wrap td { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.qb4-list-wrap thead th { position: sticky; top: 0; background: #f7f8f9; font-weight: 600; }

/* 快速建班完成回执 */
.qb-done-summary { margin-top: 4px; }
.qb-done-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.qb-done-table th, .qb-done-table td { border: 1px solid var(--line); padding: 9px 14px; text-align: left; }
.qb-done-table th { width: 110px; background: #f7f8f9; font-weight: 600; color: var(--muted); }
.qb-done-ok { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #f0f9f0; border: 1px solid #cfe8cf; color: #2c6e2c; font-size: 13.5px; }
.qb-done-warn { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #fff8e6; border: 1px solid #f0dfa8; color: #7a5b13; font-size: 13.5px; line-height: 1.7; }
.qb-step.done .qb-step-no { background: #2c6e2c; }
.qb-step.done::after { content: " ✓"; color: #2c6e2c; font-size: 12px; }
