:root {
  --sider: #1f2329;
  --sider-2: #2a2f36;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #eff4ff;
  --bg: #f8fafc;
  --panel: #fff;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --text-3: #94a3b8;
  --line: #e2e8f0;
  --ok: #059669;
  --warn: #d97706;
  --err: #dc2626;
  --link: #2563eb;
  --cpp: #1d4ed8;
  --py: #059669;
  --sider-w: 236px;
  --sider-w-collapsed: 64px;
  --ring: #2563eb;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-1: 0 1px 2px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.06);
  --shadow-2: 0 8px 24px rgba(15,23,42,.12);
}



/* 开关（班级支持在线选班 / 课程启用状态） */
.cls-toggle { position: relative; display: inline-block; width: 36px; height: 18px; }
.cls-toggle input { opacity: 0; width: 0; height: 0; }
.cls-toggle span { position: absolute; inset: 0; background: #d9d9d9; border-radius: 18px; cursor: pointer; transition: .15s; }
.cls-toggle span::before { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; background: #fff; border-radius: 50%; transition: .15s; }
.cls-toggle input:checked + span { background: #165dff; }
.cls-toggle input:checked + span::before { transform: translateX(18px); }
.cls-toggle input:disabled + span { opacity: .5; cursor: not-allowed; }

/* 操作列链接（详情/编辑/点名/更多/学员管理/点名/更多） */
.cls-op-link { color: #165dff !important; text-decoration: none; margin-right: 10px; font-size: 13px; cursor: pointer; background: none !important; }
.cls-op-link:hover { text-decoration: underline; }
.cls-op-link.cls-op-more { color: #165dff !important; }
.cls-op-link.cls-op-more .caret { font-size: 10px; }

/* 班级名称链接（蓝色主题时是红的——统一用红色主题色，让点选即点） */
.cls-name-link { color: #165dff !important; text-decoration: none; font-weight: 500; }
.cls-name-link:hover { text-decoration: underline; }

/* 状态 active（已点名/在读学员/启用）绿色背景由 .badge.status-active 提供 */
/* 但 inline style="color: var(--accent)" 是 红色；保留状态 active 关键字色为绿，避免所有状态 都变红  */

}


* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.err { color: var(--err); min-height: 1.2em; }
.linkish {
  color: var(--link); text-decoration: none; font-size: 13px;
  background: transparent; border: 0; padding: 0; margin: 0; cursor: pointer;
  font-family: inherit; line-height: inherit;
}
.linkish:hover { text-decoration: underline; color: var(--accent-strong); }
.primary { background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; }
.ghost { background: #fff !important; color: var(--text) !important; border: 1px solid var(--line) !important; }

/* 主 CTA 按钮（红色主题）：报名/添加班级/新建老师/新建排课/保存等 */
.sd-cta {
  background: var(--accent) !important;
  color: #fff !important;
  border: 1px solid var(--accent) !important;
  border-radius: 4px;
  padding: 5px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.6;
}
.sd-cta:hover { background: #0e42d2 !important; border-color: #0e42d2 !important; }
.sd-cta:disabled { background: #b7c9f5 !important; border-color: #b7c9f5 !important; cursor: not-allowed; }
.sd-cta .caret { font-size: 10px; }
.off { background: #f2f3f5 !important; color: #86909c !important; }

button, .btn {
  border: 0;
  border-radius: 4px;
  padding: 7px 14px;
  cursor: pointer;
  font: inherit;
  background: var(--accent);
  color: #fff;
}
button:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn {
  background: transparent;
  color: inherit;
  border: 0;
  font-size: 18px;
  padding: 4px 8px;
  cursor: pointer;
}

input, select, textarea {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 10px;
  font: inherit;
  background: #fff;
  min-width: 0;
}
label { display: block; margin: 10px 0; }
label input, label select, label textarea { width: 100%; margin-top: 6px; }

/* login */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #2a2f36, #1f2329 50%, #3a2a18);
}
.login-card {
  width: min(380px, 92vw);
  background: #fff;
  border-radius: 10px;
  padding: 28px 24px;
  box-shadow: 0 16px 40px rgba(0,0,0,.25);
}
.login-brand { text-align: center; margin-bottom: 4px; }
.login-brand h1 { margin: 8px 0 0; }
.brand-logo {
  display: block;
  max-width: 120px;
  max-height: 72px;
  margin: 0 auto 4px;
  object-fit: contain;
}
.brand-logo.sm {
  height: 46px;
  width: auto;
  max-width: 180px;
  margin: 0;
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
}
.sider-brand-text {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
}
.sider-brand-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-grid { display: grid; gap: 16px; }
.settings-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}
.settings-card h3 { margin: 0 0 10px; font-size: 15px; }
.settings-card .form-grid { margin-bottom: 10px; }
.logo-preview {
  width: 120px;
  height: 72px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fafbfc;
  overflow: hidden;
  margin-bottom: 10px;
}
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.login-card button { width: 100%; margin-top: 12px; padding: 10px; }

/* shell */
.shell { display: flex; min-height: 100vh; }
.sider {
  width: var(--sider-w);
  background: var(--sider);
  color: #c9cdd4;
  display: flex;
  flex-direction: column;
  transition: width .2s ease;
  flex-shrink: 0;
}
.shell.collapsed .sider { width: var(--sider-w-collapsed); }
.shell.collapsed .sider-brand strong,
.shell.collapsed .sider-brand .brand-logo,
.shell.collapsed .nav-item span,
.shell.collapsed .nav-group-title span,
.shell.collapsed .nav-group-title .chev,
.shell.collapsed .sider-foot span { display: none; }
.shell.collapsed .nav-group-body { display: none !important; }
.sider-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 16px 14px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sider-nav { flex: 1; padding: 10px 8px; overflow: auto; }
.nav-group { margin-bottom: 4px; }
.nav-group-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  background: transparent;
  color: #9aa1ab;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12px;
  letter-spacing: .02em;
}
.nav-group-title:hover { background: var(--sider-2); color: #fff; }
.nav-group-title .chev {
  display: inline-block;
  transition: transform .15s ease;
  font-style: normal;
  opacity: .7;
}
.nav-group.open .nav-group-title .chev { transform: rotate(90deg); }
.nav-group-body {
  display: none;
  padding: 0 0 4px 6px;
}
.nav-group.open .nav-group-body { display: block; }
.nav-group-body .nav-item { padding: 8px 12px; margin-bottom: 2px; font-size: 13px; }
.nav-item {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #c9cdd4;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 6px;
}
.nav-item:hover { background: var(--sider-2); color: #fff; }
.nav-item.active { background: rgba(22,93,255,.18); color: var(--accent); }
.sider-foot {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.sider-foot .ghost { color: #c9cdd4 !important; background: transparent !important; border-color: rgba(255,255,255,.15) !important; }

.main {
  flex: 1;
  min-width: 0;
  padding: 16px 20px 32px;
  overflow: auto;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.page-head h1 { margin: 0; font-size: 20px; font-weight: 600; }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tab {
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  padding: 10px 16px;
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.filter-bar, .action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.filter-bar input { min-width: 220px; flex: 1; }
.filter-bar select { min-width: 110px; }
.action-bar .muted { margin-left: auto; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 14px;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.panel-head h2 { margin: 0; font-size: 15px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.stat b { display: block; font-size: 24px; margin-top: 6px; }

.dash-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.dash-app-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-app-title { font-size: 16px; font-weight: 600; }
.dash-app-desc { font-size: 12px; color: var(--muted, #8a8a8a); }
.dash-app-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  max-height: calc(100vh - 280px);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  position: sticky;
  top: 0;
  background: #fafafa;
  z-index: 1;
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  color: #4e5969;
  font-weight: 600;
}
.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data-table tbody tr:nth-child(even) { background: #fafbfc; }
.data-table tbody tr:hover { background: var(--accent-soft); }
.name-cell { font-weight: 600; }
.gender-m { color: #165dff; }
.gender-f { color: #f5319d; }
.class-cell { max-width: 260px; color: #4e5969; line-height: 1.4; }
.switch-btn {
  min-width: 40px;
  padding: 4px 8px;
  font-size: 12px;
}
.ops { display: flex; gap: 6px; flex-wrap: wrap; }
.ops button { padding: 4px 8px; font-size: 12px; }

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 999px;
  color: #fff;
}
.badge.cpp { background: var(--cpp); }
.badge.py { background: var(--py); }
.badge.other { background: #86909c; }
.badge.status-active { background: #e8ffea; color: #00b42a; }
.badge.status-disabled { background: #e8f0fe; color: #f53f3f; }

/* 占位徽章（规划中 / 模拟数据标签） */
.badge.mock-tag { background: #e8f0fe; color: #0e42d2; border: 1px solid #91caff; border-radius: 999px; }

/* 徽章变体（红色主题：绑定/采集/启用状态） */
.badge.ghost-badge { background: #fff; color: #8a919f; border: 1px solid #d9d9d9; }
.badge.ok-badge { background: #e8f0fe; color: #165dff; border: 1px solid #91caff; }
/* 兼容裸类 ghost-badge/ok-badge（不带 .badge） */
.ghost-badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 4px; background: #fff; color: #8a919f; border: 1px solid #d9d9d9; }
.ok-badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 4px; background: #e8f0fe; color: #165dff; border: 1px solid #91caff; }

.week-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.day-col h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.class-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
  margin-bottom: 8px;
}
.class-card:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(22,93,255,.12); }
.class-card .title { font-weight: 600; margin: 6px 0 4px; }
.class-card .meta { color: var(--muted); font-size: 12px; }

.pager {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
}

/* drawer / modal */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 40;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 96vw);
  height: 100vh;
  background: #fff;
  z-index: 50;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,.12);
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; font-size: 16px; }
.drawer-body { padding: 16px; overflow: auto; flex: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.form-grid .full { grid-column: 1 / -1; }
.kv { margin-bottom: 8px; }
.kv b { display: inline-block; min-width: 72px; color: var(--muted); font-weight: 500; }

.modal {
  position: fixed;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 94vw);
  background: #fff;
  border-radius: 8px;
  z-index: 60;
  box-shadow: 0 16px 40px rgba(0,0,0,.2);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.modal .drawer-body { max-height: 60vh; }

/* favicon 1:1 裁剪 */
.favicon-crop-modal {
  display: flex;
  flex-direction: column;
  max-height: 60vh;
}
.favicon-crop-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.favicon-crop-wrap {
  height: 40vh;
  max-height: 40vh;
  overflow: hidden;
  background: #16181d;
  border-radius: 8px;
  position: relative;
}
.favicon-crop-wrap img {
  display: block;
  max-width: 100%;
  max-height: 100%;
}
.favicon-crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  flex: 0 0 auto;
}
.favicon-crop-result {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 10px;
  background: #f5f7fa;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
}
.favicon-crop-result img {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
}
.modal .drawer-body { overflow-y: auto; }
.favicon-preview {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f5f7fa;
  flex: 0 0 auto;
}
.favicon-preview img { width: 100%; height: 100%; object-fit: contain; }

/* 品牌管理：每站 两上传 + 三预览 */
.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
}
.brand-row:first-of-type { border-top: 0; }
.brand-row h4 { margin: 0; min-width: 92px; }
.brand-previews { display: flex; gap: 12px; flex-wrap: wrap; }
.brand-preview {
  width: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  text-align: center;
}
.brand-preview .kv { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.brand-preview img {
  max-width: 100%;
  max-height: 48px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.brand-preview.favicon img { width: 40px; height: 40px; object-fit: contain; }
.brand-row .ops { display: flex; gap: 8px; }
.brand-row .ops label {
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

/* 品牌前缀实时预览 */
.brand-preview-names {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 16px;
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 10px 12px;
}
.brand-preview-names .kv { margin: 0; }
.brand-preview-names .kv b { min-width: 52px; }
.brand-preview-names .kv span { font-weight: 600; color: var(--text); }

/* ICP 备案号 */
.login-icp {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}
.login-icp a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}
.sider-icp {
  margin-top: 8px;
  font-size: 11px;
  color: #7d838c;
}
.sider-icp a {
  color: #7d838c;
  text-decoration: none;
}

/* dashboard day schedule */
.dash-sched-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.dash-sched-head h2 { margin: 0; font-size: 16px; }
.day-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.day-tab {
  background: #f2f3f5;
  color: var(--text);
  border: 1px solid transparent;
  padding: 6px 10px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.day-tab small { color: var(--muted); font-size: 11px; }
.day-tab.active { background: var(--accent-soft); border-color: #91caff; color: #0e42d2; font-weight: 600; }
.day-list { display: flex; flex-direction: column; gap: 8px; }
.day-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}
.day-time { font-weight: 600; color: #4e5969; font-variant-numeric: tabular-nums; }
.day-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.day-title span { font-weight: 600; }
.empty-day { padding: 24px 8px; text-align: center; }
.page-hint { margin: 0 0 12px; }
.shell-panel p { margin: 0 0 12px; line-height: 1.6; }
.shell-panel ul { margin: 0 0 12px; padding-left: 1.2em; line-height: 1.7; color: var(--muted); }
.shell-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sched-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.sched-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.sched-block h3 {
  margin: 0 0 10px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.sched-block h3 small { color: var(--muted); font-weight: 400; }
.sched-slot {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  background: #fafbfc;
}
.sched-slot:hover { border-color: #91caff; background: var(--accent-soft); }
.sched-slot .time { font-size: 12px; color: #0e42d2; font-weight: 600; }
.sched-slot .title { font-weight: 600; font-size: 13px; }
.sched-slot .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.shell-tabs-demo {
  display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 12px;
}
.shell-tabs-demo span {
  padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 13px;
}
.shell-tabs-demo span.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.mock-tag { background: #e8f0fe; color: #0e42d2; border: 1px solid #91caff; }

/* AI fab */
.ai-root { position: fixed; right: 22px; bottom: 22px; z-index: 80; }
.ai-fab {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 18px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(22,93,255,.35);
  display: grid; place-items: center;
}
.ai-panel {
  width: min(320px, calc(100vw - 40px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
}
.ai-panel-head { display: flex; justify-content: space-between; align-items: center; }
.ai-intro { margin: 8px 0 12px; font-size: 13px; }
.ai-actions { display: grid; gap: 8px; }
.ai-actions button { width: 100%; }
.ai-result { margin-top: 12px; font-size: 13px; line-height: 1.5; max-height: 220px; overflow: auto; }
.ai-result ul { margin: 8px 0; padding-left: 18px; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sider { width: 100% !important; max-height: 42vh; }
  .sider-nav { display: block; overflow: auto; }
  .nav-group-body .nav-item,
  .nav-item { white-space: nowrap; }
  .table-wrap { max-height: none; }
  .form-grid { grid-template-columns: 1fr; }
  .day-row { grid-template-columns: 1fr; }
}

/* 课表管理（小麦 1:1） — v2 */
#page-schedule { width: 100%; }
.sched-head { display: flex; justify-content: space-between; align-items: center; }
.sched-head-right { display: flex; gap: 16px; font-size: 13px; }
.sched-head-right a { color: #165dff; text-decoration: none; }
.sched-filter { display: flex; gap: 10px; align-items: center; }
.sched-filter .filter-expand { margin-left: auto; }
.sched-action { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; position: relative; }
.sched-action .caret { font-size: 10px; }
.sched-view-tabs { display: flex; border: 1px solid #d9d9d9; border-radius: 4px; overflow: hidden; }
.sched-view-tab { background: #fff; border: none; padding: 5px 14px; font-size: 13px; cursor: pointer; color: #595959; }
.sched-view-tab.active { background: #165dff; color: #fff; }
.sched-nav { display: flex; align-items: center; gap: 8px; position: absolute; left: 50%; transform: translateX(-50%); }
.sched-nav .ghost { padding: 3px 10px; }
.sched-nav span { font-size: 13px; color: #262626; }
.ghost-like { border: 1px solid #d9d9d9; border-radius: 4px; background: #fff; padding: 4px 8px; font-size: 12px; color: #595959; }
.sched-stat-bar { background: #e8f0fe; color: #165dff; border-radius: 4px; padding: 8px 14px; font-size: 13px; margin: 10px 0; }
.sched-timeline { border: 1px solid #e8e8e8; border-radius: 8px; overflow-x: auto; overflow-y: hidden; width: 100%; }
.sched-tl-head { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); background: #fafafa; border-bottom: 1px solid #e8e8e8; }
.sched-tl-axis-label { border-right: 1px solid #e8e8e8; }
.sched-tl-day { padding: 8px 6px; text-align: center; border-right: 1px solid #f0f0f0; display: flex; flex-direction: row; align-items: baseline; justify-content: center; gap: 6px; flex-wrap: wrap; overflow: hidden; min-width: 0; }
.sched-tl-day > b { font-size: 13px; font-weight: 600; }
.sched-tl-day > span { font-size: 11px; }
.sched-tl-body { max-height: 600px; overflow-y: auto; overflow-x: hidden; }
.sched-tl-row { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid #f0f0f0; }
.sched-tl-axis { padding: 8px 4px; font-size: 11px; color: #8c8c8c; text-align: center; border-right: 1px solid #f0f0f0; background: #fafafa; }
.sched-tl-cell { padding: 4px; min-height: 56px; min-width: 0; border-right: 1px solid #f0f0f0; overflow: hidden; }
.sched-card { border: 1px solid #91caff; background: #e8f0fe; border-radius: 6px; padding: 6px 8px; cursor: pointer; font-size: 12px; overflow: hidden; }
.sched-card:hover { border-color: #165dff; box-shadow: 0 2px 8px rgba(22,93,255,.15); }
.sched-card.unmarked { border-color: #91caff; background: #e8f0fe; }
.sched-card .time { color: #165dff; font-size: 11px; font-weight: 600; }
.sched-card.unmarked .time { color: #f5222d; }
.sched-card .title { color: #262626; font-weight: 500; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-card .meta { color: #8c8c8c; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.sched-form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #595959; }
.sched-form-grid label.full { grid-column: 1 / -1; }
.sched-form-grid input, .sched-form-grid select, .sched-form-grid textarea { padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; box-sizing: border-box; }
.sched-form-grid input:focus, .sched-form-grid select:focus, .sched-form-grid textarea:focus { border-color: #165dff; outline: none; }
.sched-repeat-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sched-repeat-tag { display: inline-block; padding: 4px 10px; border-radius: 4px; background: #fff; border: 1px solid #d9d9d9; color: #595959; font-size: 12px; cursor: pointer; }
.sched-repeat-tag.active { background: #165dff; color: #fff; border-color: #165dff; }
.sched-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.sched-month-day { min-height: 90px; border: 1px solid #e8e8e8; border-radius: 4px; padding: 4px; font-size: 12px; background: #fff; }
.sched-month-day .dnum { color: #8c8c8c; font-size: 11px; }
.sched-month-day.has { background: #e8f0fe; border-color: #91caff; }


/* 课表管理 v2：时间线撑满主区 */
.sched-board { display: block; }
.sched-board .sched-timeline { width: 100%; min-width: 0; }
.sched-block { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 12px; }

/* 老师管理 1:1 */
.tch-avatar-cell { white-space: nowrap; }
.tch-avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #f0f0f0; color: #595959; font-size: 12px; margin-right: 8px; vertical-align: middle; }
.tch-avatar.lg { width: 56px; height: 56px; font-size: 24px; }
.tch-detail-link { display: inline-flex; align-items: center; color: #165dff !important; text-decoration: none; }
.tch-detail-link:hover { text-decoration: underline; }
.tch-name { font-weight: 500; }
.tch-detail-head { display: flex; align-items: center; gap: 14px; padding: 8px 0 16px; border-bottom: 1px solid #f0f0f0; margin-bottom: 14px; }
.tch-detail-name { font-size: 18px; font-weight: 600; }
.tch-status { display: inline-block; padding: 2px 8px; border-radius: 4px; background: #f0f9eb; color: #389e0d; font-size: 12px; margin-left: 6px; }
.tch-detail-meta { color: #8c8c8c; font-size: 13px; margin-top: 4px; }
.tch-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.tch-stat-grid div { background: #fafafa; padding: 12px; border-radius: 6px; }
.tch-stat-grid div span { color: #8c8c8c; font-size: 12px; display: block; }
.tch-stat-grid div b { font-size: 20px; color: #165dff; }
.tch-section-title { font-weight: 600; font-size: 14px; margin: 12px 0 8px; }
.rec-reddot { display: inline-block; padding: 1px 6px; background: #ff4d4f; color: #fff; border-radius: 8px; font-size: 11px; margin-left: 4px; }
.rec-filter-group { display: flex; align-items: center; gap: 4px; }
.rec-filter-group span { color: #8c8c8c; }
.course-checks { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #595959; }
.course-checks label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.status-danger { background: #e8f0fe; color: #f5222d; border: 1px solid #91caff; }

/* 上课记录 1:1 */
.dpi-tag { display: inline-block; padding: 1px 5px; background: #e8f0fe; color: #f5222d; border: 1px solid #91caff; border-radius: 3px; font-size: 10px; margin-left: 4px; line-height: 1.4; vertical-align: middle; }
.rec-table th { user-select: none; }
.rec-table th.sortable { cursor: pointer; }
.rec-table th.sortable:hover { background: #f5f5f5; }
.rec-table th .sort-arrow { color: #8c8c8c; font-size: 10px; margin-left: 2px; }
.rec-table th.sort-active { color: #165dff; }
.rec-table th.sort-active .sort-arrow { color: #165dff; }
.rec-ops .rec-link { color: #595959 !important; font-size: 12px; text-decoration: none; padding: 0 4px; cursor: pointer; background: none !important; }
.rec-ops .rec-link:hover { text-decoration: underline; }
.rec-ops .rec-link.danger { color: #d4380d !important; }
.rec-ops .rec-sep { color: #d9d9d9; font-size: 12px; }
.rec-table tbody tr td { font-size: 13px; }
.rec-table tbody tr td:nth-child(1) { font-feature-settings: "tnum"; }
/* 默认定位按今天推算点名日期 */
.rec-default-mark-date { color: #262626; }

/* 上课记录 v2：表格布局贴合截图 */
.rec-table thead th:nth-child(2) { padding-left: 8px; padding-right: 8px; }
.rec-table tbody td:nth-child(2) { word-break: break-all; line-height: 1.45; }
.rec-table .class-name-cell { max-width: 360px; }
.rec-table th:nth-child(8) { text-align: left; }
.rec-table .rec-ops { white-space: nowrap; }

/* 上课记录 v3：贴齐小麦 */
.rec-table tbody td { vertical-align: middle; }
.rec-table tbody td:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.rec-table tbody td:nth-child(3) { color: #262626; }
.rec-table tbody td:nth-child(4) { white-space: nowrap; color: #262626; }
.rec-table tbody td:nth-child(7) { text-align: right; }
.rec-table thead th:nth-child(7) { text-align: right; }
.rec-table tbody td:nth-child(1) { color: #262626; }
.rec-table tbody td:nth-child(7) { font-feature-settings: "tnum"; font-weight: 500; }
.rec-table tbody td:nth-child(8) .rec-link { color: #595959; }
.rec-table tbody td:nth-child(8) .rec-link.danger { color: #d4380d; }
.rec-table tbody tr:hover { background: #e8f0fe; }

/* 点名（take_name）抽屉 */
.tk-info { border-bottom: 1px solid #f0f0f0; padding: 4px 0 14px; margin-bottom: 12px; }
.tk-info-main { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tk-class-name { font-size: 18px; color: #262626; }
.tk-date { color: #595959; font-size: 13px; background: #f5f5f5; padding: 2px 8px; border-radius: 4px; }
.tk-info-sub { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; color: #8c8c8c; font-size: 13px; }
.tk-stat-bar { display: flex; gap: 14px; flex-wrap: wrap; background: #e8f0fe; border: 1px solid #91caff; border-radius: 6px; padding: 8px 12px; font-size: 13px; color: #595959; margin-bottom: 10px; }
.tk-stat-bar b { color: #262626; }
.tk-stat-bar .tk-total-deduct { margin-left: auto; color: #165dff; font-weight: 600; }
.tk-stat-bar .tk-total-deduct b { color: #165dff; font-size: 16px; }
.tk-ok { color: #389e0d; }
.tk-late { color: #faad14; }
.tk-leave { color: #165dff; }
.tk-absent { color: #f5222d; }
.tk-remedial { color: #722ed1; }
.tk-trial { color: #13c2c2; }
.tk-adjust { color: #eb2f96; }
.tk-remark-row { margin-bottom: 10px; }
.tk-remark-row input { width: 100%; }
.tk-table-wrap { max-height: 50vh; overflow-y: auto; border: 1px solid #f0f0f0; border-radius: 6px; }
.tk-table { margin: 0; }
.tk-table th { background: #fafafa; font-size: 12px; }
.tk-table td { font-size: 13px; }
.tk-table .tk-status { padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; }
.tk-table .tk-deduct { width: 80px; padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; }
.tk-table .tk-row-remark { width: 100%; padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 12px; }
.tk-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

/* ============ 2026-08-08 改版覆盖层（token 化 + 可访问性 + 视觉升级） ============ */

/* 焦点可见性（键盘导航） */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}

/* 文字对比度 */
.muted { color: var(--text-2); }
.page-hint, .drawer-body .hint, .panel-head .muted { color: var(--text-3, var(--muted)); }

/* 按钮统一（保留原类名） */
.primary, .sd-cta {
  background: var(--accent) !important;
  color: #fff !important;
  border: 1px solid var(--accent) !important;
  border-radius: var(--radius-sm);
  min-height: 34px;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.primary:hover, .sd-cta:hover { background: var(--accent-strong) !important; border-color: var(--accent-strong) !important; box-shadow: 0 4px 12px rgba(37,99,235,.25); }
.primary:disabled, .sd-cta:disabled { background: #b7c9f5 !important; border-color: #b7c9f5 !important; cursor: not-allowed; }
.ghost {
  background: #fff !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm);
  min-height: 32px;
  transition: background .15s ease, border-color .15s ease;
}
.ghost:hover { background: var(--bg) !important; border-color: #cbd5e1 !important; }
.sider-foot .ghost:hover { background: var(--sider-2) !important; border-color: rgba(255,255,255,.2) !important; }
.icon-btn {
  min-width: 34px; min-height: 34px;
  border-radius: var(--radius-sm);
  transition: background .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.switch-btn { min-height: 26px; border-radius: var(--radius-sm); }
.ops button { min-height: 28px; border-radius: var(--radius-sm); }

/* 面板 / 卡片 */
.panel, .settings-card, .stat, .dash-app-card, .sched-block, .class-card, .shell-panel {
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.sider { box-shadow: 2px 0 12px rgba(15,23,42,.06); }
.nav-item.active { background: rgba(37,99,235,.22); color: #93c5fd; }

/* 表格 */
.table-wrap { border-radius: var(--radius-sm); box-shadow: var(--shadow-1); }
.data-table th { background: #f8fafc; color: var(--text-2); }
.data-table tbody tr:nth-child(even) { background: #fafbfc; }
.data-table tbody tr:hover { background: var(--accent-soft); }
.data-table td, .data-table th { padding: 10px 12px; }

/* 徽章统一 pill 风格 */
.badge, .ghost-badge, .ok-badge, .mock-tag, .rec-reddot, .dpi-tag, .tch-status {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 2px 10px;
  font-size: 12px; line-height: 1.6; white-space: nowrap;
}
.badge.status-active, .badge.ok-badge { background: #ecfdf5; color: #047857; border: 1px solid transparent; }
.badge.status-disabled { background: #fef2f2; color: #b91c1c; border: 1px solid transparent; }
.badge.mock-tag, .ok-badge { background: var(--accent-soft); color: var(--accent-strong); border: 1px solid #bfdbfe; }
.ghost-badge { background: #f1f5f9; color: var(--text-2); border: 1px solid var(--line); }
.badge.cpp { background: var(--accent-soft); color: var(--cpp); }
.badge.py { background: #ecfdf5; color: var(--py); }
.badge.other { background: #f1f5f9; color: var(--text-2); }

/* 标签页 / 统计 */
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.stat { padding: 16px; }
.stat b { font-family: "Inter", "PingFang SC", system-ui, sans-serif; font-variant-numeric: tabular-nums; }

/* 表单 */
.form-grid { gap: 14px 16px; }
.field input, .field select, .sched-form-grid input, .sched-form-grid select, .sched-form-grid textarea,
.drawer-input, .drawer-select, .tk-table input, .tk-table select {
  border-radius: var(--radius-sm);
}

/* 抽屉 / 弹窗：圆角 + 阴影 + 焦点 */
.drawer, .drawer-panel { border-radius: var(--radius) 0 0 var(--radius); box-shadow: var(--shadow-2); }
.modal { border-radius: var(--radius); box-shadow: var(--shadow-2); }
.drawer-mask, .modalMask { background: rgba(15,23,42,.45); }

/* 登录 */
.login-card { border-radius: 14px; }

/* 响应式微调 */
@media (max-width: 600px) {
  .main { padding: 14px 12px 32px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .filter-bar input { min-width: 0; }
  .drawer, .drawer-panel { width: 100vw; border-radius: 0; }
}

/* 减弱动态 */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ============ 2026-08-08 阶段二：加载反馈 / Toast / 表单校验 ============ */

/* 顶部全局加载条 */
.busy-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #60a5fa, #2563eb);
  background-size: 200% 100%;
  animation: busy-slide 1s linear infinite;
  box-shadow: 0 1px 4px rgba(37,99,235,.4);
}
@keyframes busy-slide {
  0% { background-position: 0% 0; }
  100% { background-position: -200% 0; }
}

/* Toast */
.toast-root {
  position: fixed; top: 16px; right: 16px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
}
.toast {
  display: flex; align-items: flex-start; gap: 8px;
  background: #fff; border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px; line-height: 1.5;
  box-shadow: var(--shadow-2);
  white-space: pre-wrap; word-break: break-word;
  animation: toast-in .18s ease;
}
.toast.success { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 表单 inline 校验 */
.field input.invalid, .form-grid input.invalid, label input.invalid,
.drawer-input.invalid, .tk-table input.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,.12);
}
.field .field-error, .form-grid .field-error {
  color: var(--danger); font-size: 12px; margin-top: 4px;
}

/* ============ 2026-08-08 阶段三：统计卡 ============ */
.stat { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stat-label { font-size: 13px; color: var(--text-2); }
.stat-value {
  font-size: 26px; font-weight: 700; line-height: 1.2; margin-top: 2px;
  font-family: "Inter", "PingFang SC", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.stat-trend { font-size: 12px; margin-top: 6px; }
.trend-up { color: var(--ok); }
.trend-down { color: var(--danger); }
.trend-flat { color: var(--text-3); }
.stat-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px; display: grid; place-items: center;
}
.stat-icon.blue { background: var(--accent-soft); color: var(--accent); }
.stat-icon.green { background: #ecfdf5; color: var(--ok); }
.stat-icon.amber { background: #fffbeb; color: var(--warn); }
.stat-icon.red { background: #fef2f2; color: var(--danger); }
