/* ============================================================
 * admin-ui.css —— 管理后台「清爽教育风」设计系统
 * 仅由 admin.html 引入（在 base.css 之后加载，覆盖后台主题）。
 * 设计令牌 → 布局壳 → 导航 → 组件（按钮/卡片/表格/表单/弹窗/标签/分页）
 * ============================================================ */

:root {
  /* 品牌色板：清爽蓝 + 辅助青绿，柔和浅底 */
  --ed-primary: #3b6cff;
  --ed-primary-d: #2f57d6;
  --ed-primary-soft: #e9f0ff;
  --ed-accent: #14b8a6;
  --ed-accent-soft: #e6f7f4;
  --ed-bg: #f3f6fb;
  --ed-card: #ffffff;
  --ed-line: #e6eaf2;
  --ed-text: #1c2333;
  --ed-text-2: #5b6577;
  --ed-text-3: #98a1b3;
  --ed-success: #16a34a;
  --ed-success-soft: #e7f6ed;
  --ed-warning: #d97706;
  --ed-warning-soft: #fdf1df;
  --ed-danger: #dc2626;
  --ed-danger-soft: #fdecec;
  --ed-radius: 14px;
  --ed-radius-sm: 10px;
  --ed-shadow: 0 1px 3px rgba(23, 43, 99, 0.06), 0 6px 22px rgba(23, 43, 99, 0.05);
  --ed-shadow-hover: 0 4px 10px rgba(23, 43, 99, 0.08), 0 12px 32px rgba(23, 43, 99, 0.08);
  /* 覆盖 base.css 的通用令牌，使沿用旧类名的元素同步换肤 */
  --primary: #3b6cff;
  --primary-d: #2f57d6;
  --bg: #f3f6fb;
  --line: #e6eaf2;
  --text: #1c2333;
  --text-2: #5b6577;
  --text-3: #98a1b3;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(23, 43, 99, 0.06), 0 6px 22px rgba(23, 43, 99, 0.05);
}

body { background: var(--ed-bg); color: var(--ed-text); }

/* 细滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d3dae7; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b9c3d6; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
 * 布局壳：浅色侧边栏 + 顶栏 + 内容区
 * ============================================================ */
.admin { display: flex; min-height: 100vh; }

.admin-side {
  width: 232px; flex-shrink: 0; display: flex; flex-direction: column;
  background: #ffffff; color: var(--ed-text-2);
  border-right: 1px solid var(--ed-line);
  position: sticky; top: 0; height: 100vh; overflow: hidden;
}
.admin-side .brand {
  padding: 20px 20px 16px; border-bottom: 1px solid var(--ed-line);
  font-size: 17px; font-weight: 700; color: var(--ed-text);
  display: flex; align-items: center; gap: 10px;
}
.admin-side .brand .logo {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #6f9bff, #3b6cff);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; box-shadow: 0 4px 10px rgba(59, 108, 255, .3);
}
.admin-side .brand small { display: block; font-size: 11px; font-weight: 500; color: var(--ed-text-3); margin-top: 1px; }
.admin-side .nav { flex: 1; padding: 10px 12px 16px; overflow-y: auto; }
.admin-side .nav .grp {
  padding: 16px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: 2px;
  color: var(--ed-text-3);
}
.admin-side .nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 2px; border-radius: 10px;
  color: var(--ed-text-2); font-size: 14px; cursor: pointer;
  transition: background .15s, color .15s;
}
.admin-side .nav a .ic { width: 20px; text-align: center; font-size: 15px; }
.admin-side .nav a:hover { background: #f2f5fb; color: var(--ed-text); }
.admin-side .nav a.active {
  background: var(--ed-primary-soft); color: var(--ed-primary); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--ed-primary);
}
.admin-side .foot {
  padding: 12px 16px; border-top: 1px solid var(--ed-line);
  font-size: 12px; color: var(--ed-text-3);
}

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

.admin-top {
  height: 58px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ed-line);
  display: flex; align-items: center; padding: 0 24px; gap: 12px;
  position: sticky; top: 0; z-index: 90;
}
.admin-top .crumb { font-size: 13px; color: var(--ed-text-3); display: flex; align-items: center; gap: 6px; }
.admin-top .crumb b { color: var(--ed-text); font-size: 14px; font-weight: 600; }
.admin-top .spacer { flex: 1; }
.admin-top .quick { display: flex; gap: 8px; }
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 6px;
  background: #f4f7fc; border: 1px solid var(--ed-line); border-radius: 999px;
}
.user-chip .uc-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #6f9bff, #3b6cff); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.user-chip .uc-name { font-size: 13px; font-weight: 600; color: var(--ed-text); line-height: 1.2; }
.user-chip .uc-role { font-size: 11px; color: var(--ed-text-3); line-height: 1.2; }
.user-chip .uc-exit {
  margin-left: 4px; border: none; background: none; color: var(--ed-text-3);
  font-size: 12px; cursor: pointer; padding: 3px 6px; border-radius: 6px;
}
.user-chip .uc-exit:hover { color: var(--ed-danger); background: var(--ed-danger-soft); }

.admin-content { flex: 1; padding: 20px 24px 40px; overflow-y: auto; }

/* 页头（标题 + 描述） */
.page-head { margin: 2px 0 16px; }
.page-head h2 { font-size: 20px; font-weight: 700; color: var(--ed-text); letter-spacing: .2px; }
.page-head p { margin: 4px 0 0; font-size: 13px; color: var(--ed-text-3); }

/* 页面切换动效 */
.admin-content > div { animation: pageIn .22s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============================================================
 * 登录页
 * ============================================================ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(800px 400px at 12% -8%, rgba(59, 108, 255, .16), transparent 60%),
    radial-gradient(700px 380px at 100% 108%, rgba(20, 184, 166, .14), transparent 60%),
    var(--ed-bg);
}
.login-card {
  display: flex; width: 100%; max-width: 860px; min-height: 480px;
  background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 18px 60px rgba(23, 43, 99, .14);
}
.login-hero {
  flex: 1.1; padding: 44px 40px; color: #fff; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(150deg, #4f7bff 0%, #3b6cff 55%, #2c53c9 100%);
}
.login-hero .logo { font-size: 44px; margin-bottom: 14px; }
.login-hero h1 { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.login-hero > p { font-size: 13px; opacity: .85; margin: 0 0 26px; }
.login-hero ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.login-hero li { font-size: 13.5px; opacity: .92; display: flex; align-items: center; gap: 8px; }
.login-form { flex: 1; padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { font-size: 21px; font-weight: 700; margin-bottom: 4px; }
.login-form .sub { font-size: 13px; color: var(--ed-text-3); margin: 0 0 22px; }
.login-form .btn-primary { margin-top: 6px; padding: 12px 16px; font-size: 15px; }
.login-form .links { text-align: center; margin-top: 18px; font-size: 13px; color: var(--ed-text-3); }
@media (max-width: 760px) { .login-hero { display: none; } .login-card { max-width: 420px; } }

/* ============================================================
 * 组件翻新
 * ============================================================ */

/* 按钮 */
.btn { border-radius: var(--ed-radius-sm); font-weight: 600; transition: all .16s; }
.btn:focus-visible { outline: 2px solid var(--ed-primary-soft); outline-offset: 1px; }
.btn-primary {
  background: linear-gradient(135deg, #4f83ff, #3b6cff); color: #fff;
  box-shadow: 0 3px 8px rgba(59, 108, 255, .28);
}
.btn-primary:hover { background: linear-gradient(135deg, #3f74f5, #2f57d6); box-shadow: 0 5px 14px rgba(59, 108, 255, .34); transform: translateY(-1px); }
.btn-danger { background: var(--ed-danger); box-shadow: 0 3px 8px rgba(220, 38, 38, .22); }
.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--ed-line); }
.btn-ghost:hover { border-color: #c7d2e8; background: #f7f9fd; }
.btn-success { background: var(--ed-success); }
.btn-warn { background: #f59e0b; }

/* 卡片 */
.card { border: 1px solid var(--ed-line); box-shadow: var(--ed-shadow); border-radius: var(--ed-radius); padding: 18px; transition: box-shadow .2s; }
.card-title { font-size: 15px; margin-bottom: 14px; }
.card-title::before { content: ''; display: inline-block; width: 4px; height: 14px; border-radius: 4px; background: linear-gradient(180deg, #4f83ff, #3b6cff); margin-right: 8px; vertical-align: -2px; }

/* 指标卡 */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.stat-card {
  position: relative; border: 1px solid var(--ed-line); border-radius: var(--ed-radius);
  padding: 16px 18px 14px; box-shadow: var(--ed-shadow); overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--ed-shadow-hover); }
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, #6f9bff, #3b6cff); opacity: .85;
}
.stat-card .v { font-size: 23px; letter-spacing: .3px; }
.stat-card .k { font-size: 12.5px; margin-top: 5px; color: var(--ed-text-3); }
.stat-card .ic { position: absolute; top: 14px; right: 14px; font-size: 18px; opacity: .16; line-height: 1; }
.stat-card.accent-blue::before { background: linear-gradient(180deg, #6f9bff, #3b6cff); }
.stat-card.accent-green::before { background: linear-gradient(180deg, #34d399, #16a34a); }
.stat-card.accent-orange::before { background: linear-gradient(180deg, #fbbf24, #d97706); }
.stat-card.accent-red::before { background: linear-gradient(180deg, #f87171, #dc2626); }
.stat-card.accent-teal::before { background: linear-gradient(180deg, #2dd4bf, #14b8a6); }
.stat-card.accent-purple::before { background: linear-gradient(180deg, #a78bfa, #7c3aed); }

/* 徽标（状态标签） */
.badge { padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: 12px; }
.badge-blue { background: var(--ed-primary-soft); color: var(--ed-primary); }
.badge-green { background: var(--ed-success-soft); color: var(--ed-success); }
.badge-orange { background: var(--ed-warning-soft); color: var(--ed-warning); }
.badge-red { background: var(--ed-danger-soft); color: var(--ed-danger); }
.badge-gray { background: #eef1f6; color: var(--ed-text-2); }

/* 工具栏（筛选区）：白底卡片化 */
.toolbar {
  background: #fff; border: 1px solid var(--ed-line); border-radius: var(--ed-radius);
  box-shadow: var(--ed-shadow); padding: 12px 14px; margin-bottom: 14px;
}
.card .toolbar, .app-modal .toolbar { background: #f8fafd; box-shadow: none; }

/* 表单 */
.input, .select, textarea.input { border-radius: var(--ed-radius-sm); border-color: var(--ed-line); transition: border-color .15s, box-shadow .15s; }
.input:hover, .select:hover { border-color: #c7d2e8; }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--ed-primary); box-shadow: 0 0 0 3px rgba(59, 108, 255, .12); }
.field label { font-weight: 500; }

/* 表格 */
.table { border: 1px solid var(--ed-line); box-shadow: var(--ed-shadow); border-radius: var(--ed-radius); }
.table th {
  background: #f7f9fd; color: var(--ed-text-2); font-size: 12px;
  text-transform: none; letter-spacing: .3px; white-space: nowrap;
}
.table td { font-size: 13px; }
.table tr:hover td { background: #f6f9ff; }
.table .empty { padding: 40px 0; text-align: center; }
.table .empty::before { content: '🗂'; display: block; font-size: 30px; opacity: .35; margin-bottom: 8px; }
/* 空态插画（由 emptyRow 注入 SVG，覆盖默认 emoji） */
.table .empty.empty-illu-cell::before { content: none; }
.empty-illu-cell { padding: 34px 0; }
.empty-illu { width: 116px; height: 84px; margin: 0 auto 8px; display: block; }
.empty-illu svg { width: 100%; height: 100%; display: block; }
.empty-t { font-size: 13px; color: var(--ed-text-3); }
.table-scroll { border-radius: var(--ed-radius); }

/* 分页 */
.pager { margin-top: 14px; }
.pager .cur { font-size: 12.5px; }
.pager .btn { border: 1px solid var(--ed-line); background: #fff; }
.pager .btn:hover:not(:disabled) { border-color: var(--ed-primary); color: var(--ed-primary); }

/* 标签页：胶囊式 */
.tabs { border-bottom: none; background: #fff; border: 1px solid var(--ed-line); border-radius: 999px; padding: 4px; display: inline-flex; gap: 2px; box-shadow: var(--ed-shadow); margin-bottom: 18px; }
.tabs .tab { border-bottom: none; margin-bottom: 0; border-radius: 999px; padding: 8px 18px; font-size: 13.5px; transition: all .16s; }
.tabs .tab:hover { color: var(--ed-primary); background: #f2f6ff; }
.tabs .tab.on { background: linear-gradient(135deg, #4f83ff, #3b6cff); color: #fff; border-bottom-color: transparent; box-shadow: 0 3px 8px rgba(59, 108, 255, .3); }

/* 弹窗 */
.app-modal-overlay { background: rgba(21, 30, 51, .5); backdrop-filter: blur(3px); animation: fadeIn .18s ease; }
.app-modal { border-radius: 16px; padding: 22px 24px; animation: modalIn .22s cubic-bezier(.2, .9, .3, 1.2); box-shadow: 0 24px 70px rgba(13, 25, 55, .3); }
.app-modal-title { font-size: 16.5px; padding-bottom: 12px; border-bottom: 1px solid var(--ed-line); margin-bottom: 16px; }
.app-modal-actions { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ed-line); }
/* 弹窗内分组区块 */
.modal-section { margin: 4px 0 14px; }
.modal-section + .modal-section { border-top: 1px dashed var(--ed-line); padding-top: 14px; }
.modal-section-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ed-text-2); margin-bottom: 11px; }
.modal-section-title::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: linear-gradient(135deg, #4f83ff, #3b6cff); display: inline-block; }
.modal-section-title .sub { font-weight: 400; font-size: 11.5px; color: var(--ed-text-3); }
/* 字段下方说明/错误 */
.field-hint { font-size: 11.5px; color: var(--ed-text-3); margin-top: 5px; line-height: 1.55; }
.field label .req { color: #e5484d; margin-left: 2px; font-weight: 600; }
.field-err { font-size: 11.5px; color: #e5484d; margin-top: 5px; line-height: 1.5; }
.input.invalid, .select.invalid { border-color: #e5484d !important; box-shadow: 0 0 0 3px rgba(229, 72, 77, .12); }
/* 金额字段前缀 */
.price-field { position: relative; }
.price-field .unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ed-text-3); pointer-events: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* 详情键值对 */
.d-item { background: #f8fafd; border: 1px solid var(--ed-line); border-radius: var(--ed-radius-sm); padding: 9px 12px; }
.d-item label, .d-item span:first-child { color: var(--ed-text-3); }

/* 图表容器 */
.chart-box { border-radius: var(--ed-radius); border-color: var(--ed-line); background: #fbfcfe; }

/* 排班网格 */
.time-label .mini, .day-label .mini { background: var(--ed-primary); border-radius: 5px; }
/* 排课格内「固化」单格开关（显示当前时段是否支持固化，点击单格切换） */
.fix-tag { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; user-select: none;
  font-size: 11px; line-height: 1; font-weight: 700; padding: 3px 7px; border-radius: 999px;
  background: #fff; color: var(--ed-text-3); border: 1px solid var(--ed-line); transition: all .15s; }
.fix-tag.on { background: #f3edff; color: #7c3aed; border-color: #e3d6ff; }
.fix-tag.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #7c3aed; }
.fix-tag:hover { box-shadow: 0 1px 3px rgba(23,43,99,.12); }
.fix-tag:active { transform: scale(.96); }
/* 排课页「1教师=1门1对1私教课」平台约束提示条 */
.rule-banner { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; font-size: 12px; line-height: 1.5;
  background: var(--ed-primary-soft); border: 1px solid rgba(59,108,255,.25); color: var(--ed-primary); }
.rule-banner.muted { background: #f4f6fb; border-color: #e3e8f2; color: var(--ed-text-2); }
.rule-banner b { color: var(--ed-primary); }
.slot { border-radius: 999px; padding: 7px 15px; transition: all .14s; }
.slot:hover { border-color: var(--ed-primary); color: var(--ed-primary); }
.slot.on { background: linear-gradient(135deg, #4f83ff, #3b6cff); border-color: transparent; box-shadow: 0 3px 8px rgba(59, 108, 255, .3); }

/* 空态 */
.empty { color: var(--ed-text-3); }
.empty-td { padding: 44px 0; text-align: center; color: var(--ed-text-3); }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }.mb16 { margin-bottom: 16px; }

/* Toast 融合主题 */
.app-toast { border-radius: 12px; }

/* 学员管理并列布局细节 */
.students-split > .dash-card { background: #fff; }

/* ============================================================
 * 教师详情页
 * ============================================================ */
.teacher-detail { max-width: 1080px; }
.td-loading, .td-empty { padding: 60px 0; text-align: center; color: var(--ed-text-3); font-size: 14px; }
.td-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--ed-primary-soft); border-top-color: var(--ed-primary); border-radius: 50%; margin-right: 8px; vertical-align: -3px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.td-hero { display: flex; align-items: center; gap: 18px; padding: 18px 22px; margin-bottom: 16px; position: relative; }
.td-back { position: absolute; top: 14px; right: 16px; border: 1px solid var(--ed-line); background: #fff; color: var(--ed-text-2); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; cursor: pointer; transition: all .15s; }
.td-back:hover { border-color: var(--ed-primary); color: var(--ed-primary); background: var(--ed-primary-soft); }
.td-avatar, .td-avatar-img { width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0; object-fit: cover; }
.td-avatar { background: linear-gradient(135deg, #6f9bff, #3b6cff); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; box-shadow: 0 6px 16px rgba(59, 108, 255, .3); }
.td-avatar-img { box-shadow: 0 6px 16px rgba(23, 43, 99, .12); }
.td-id { flex: 1; min-width: 0; }
.td-name { font-size: 18px; font-weight: 700; color: var(--ed-text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.td-sub { font-size: 12.5px; color: var(--ed-text-3); margin-top: 5px; }
.td-metrics { display: flex; gap: 10px; margin-left: auto; }
.td-metric { background: #f8fafd; border: 1px solid var(--ed-line); border-radius: 12px; padding: 9px 16px; text-align: center; min-width: 104px; }
.td-metric .v { font-size: 18px; font-weight: 700; color: var(--ed-text); letter-spacing: .3px; }
.td-metric .k { font-size: 11.5px; color: var(--ed-text-3); margin-top: 2px; }

.td-profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.td-profile .span2 { grid-column: 1 / -1; }
.td-pay-note { margin-top: 12px; font-size: 12px; line-height: 1.65; color: var(--ed-text-3); background: #f3f6fc; border: 1px solid var(--ed-line); border-radius: 10px; padding: 10px 12px; }
.td-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 2px; padding-top: 14px; border-top: 1px solid var(--ed-line); }
.td-section { background: #fbfcfe; border: 1px solid var(--ed-line); border-radius: 12px; padding: 16px 18px; }
.td-section-title { font-size: 13px; font-weight: 700; color: var(--ed-text); margin-bottom: 12px; padding-left: 10px; border-left: 3px solid var(--ed-primary); display: flex; align-items: center; }
.td-edit-btn { margin-left: auto; }
.td-link { color: var(--ed-primary); text-decoration: none; word-break: break-all; }
.td-link:hover { text-decoration: underline; }
.td-bio { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--ed-line); }
.td-bio-k { display: block; font-size: 13px; color: var(--ed-text-3); margin-bottom: 6px; }
.td-bio p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--ed-text); white-space: pre-wrap; word-break: break-word; }
.td-metric .v.empty { color: var(--ed-text-3); }

/* 排课网格单元 */
.td-grid .table td.sch-cell { text-align: center; cursor: pointer; height: 36px; transition: background .14s; vertical-align: middle; }
.td-grid .table td.sch-cell.sch-off { color: var(--ed-text-3); background: repeating-linear-gradient(45deg, #fbfcfe, #fbfcfe 6px, #f4f6fb 6px, #f4f6fb 12px); }
.td-grid .table td.sch-cell.sch-on { background: var(--ed-primary-soft); }
.td-grid .table td.sch-cell:hover { filter: brightness(.975); }
.sch-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ed-primary); margin-right: 6px; vertical-align: middle; }
.sch-plus { font-size: 14px; opacity: .35; }

/* 团课管理 · 按周排课工具栏与图例 */
.gc-toolbar { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; flex-wrap: wrap; }
.gc-week-range { font-weight: 600; color: var(--ed-text); }
.gc-legend { font-size: 12px; color: var(--ed-text-3); margin-left: 6px; }
.gc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 3px 0 8px; vertical-align: middle; }
.gc-dot.free { background: #2bbf6a; }
.gc-dot.has { background: #2bbf6a; }
.gc-dot.busy { background: #c2c8d4; }
.gc-dot.booked { background: #d9534f; }
.gc-dot.locked { background: #c2c8d4; }
.gc-dot.empty { background: #e2e7ef; }
.gc-dot.glocked { background: #8b5cf6; }

/* 周历单元格状态（叠加在 .sch-cell 之上） */
/* gc-free：未来有效期内但暂无 1v1 可预约排班 —— 非开放态，中性灰，不与可开团的 gc-1v1 混淆 */
.td-grid .table td.sch-cell.gc-free { background: #fafbfc; color: #cdd3de; }
.td-grid .table td.sch-cell.gc-free:hover { filter: none; box-shadow: none; }
.gc-free-label { font-size: 11px; color: #c2c8d4; }
/* 团课页「无 1v1 可预约课时」引导横幅 */
.gc-empty-hint { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 12px;
  background: linear-gradient(135deg, #eef4ff, #f3f7ff); border: 1px solid #d6e4ff; border-left: 4px solid var(--ed-primary);
  border-radius: var(--ed-radius); box-shadow: var(--ed-shadow); }
.gc-empty-ic { font-size: 30px; line-height: 1; flex: 0 0 auto; }
.gc-empty-body { flex: 1 1 auto; }
.gc-empty-title { font-weight: 600; color: var(--ed-text); font-size: 14px; margin-bottom: 4px; }
.gc-empty-sub { font-size: 12px; color: var(--ed-text-3); line-height: 1.6; }
.gc-empty-sub b { color: var(--ed-primary); }
.gc-empty-hint .btn-primary { flex: 0 0 auto; }
.td-grid .table td.sch-cell.gc-has { background: var(--ed-primary-soft); cursor: pointer; }
.td-grid .table td.sch-cell.gc-has:hover { filter: brightness(.97); }
.td-grid .table td.sch-cell.gc-busy.booked { background: #fdecec; color: #d9534f; cursor: not-allowed; }
.td-grid .table td.sch-cell.gc-busy.locked { background: repeating-linear-gradient(45deg, #f1f3f7, #f1f3f7 6px, #e9edf4 6px, #e9edf4 12px); color: var(--ed-text-3); cursor: not-allowed; }
/* 团课锁定：该课时被团课班次占用（teacher_day_time.group_class_id 非空），对 1v1 关闭且不可约 */
.td-grid .table td.sch-cell.gc-busy.glocked { background: #f3edff; color: #7c3aed; cursor: not-allowed; }
.td-grid .table td.sch-cell.gc-past { color: #cdd3de; background: #fafbfc; cursor: not-allowed; }
/* 1v1 私教课可约课时段：团课候选池（可开团，绿色可点） */
.td-grid .table td.sch-cell.gc-1v1 { background: #eafaf1; }
.td-grid .table td.sch-cell.gc-1v1:hover { background: #d7f5e4; filter: none; box-shadow: inset 0 0 0 2px #2bbf6a; }
.td-grid .table td.sch-cell.gc-1v1.booked { background: #fdecec; color: #d9534f; }
/* 固化/非 1v1 可预约课时：团课不开放（斜纹禁用态） */
.td-grid .table td.sch-cell.gc-locked { background: repeating-linear-gradient(45deg, #f3f5f9, #f3f5f9 6px, #eaedf3 6px, #eaedf3 12px); color: var(--ed-text-3); cursor: not-allowed; }
.td-grid .table td.sch-cell.gc-locked:hover { filter: none; box-shadow: none; }
/* 无可预约课时：团课不能绑定（灰空态，禁用） */
.td-grid .table td.sch-cell.gc-none { background: #fafbfc; color: #cdd3de; cursor: not-allowed; }
.td-grid .table td.sch-cell.gc-none:hover { filter: none; box-shadow: none; }
.gc-dot.none { background: #e2e7ef; }
.gc-busy-label .gc-sub { font-size: 10px; opacity: .85; margin-left: 2px; }
.td-grid .table td.sch-cell.gc-empty { background: #f7f9fc; }
.td-grid .table td.sch-cell.gc-selected { box-shadow: inset 0 0 0 2px var(--ed-primary); }

/* 单元格内团课块 / 1v1 占用标记 */
.gc-chip { font-size: 11px; line-height: 1.3; text-align: left; }
.gc-chip-time { display: block; font-weight: 700; color: #1aa55f; }
.gc-chip-title { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.gc-busy-label { font-size: 11px; color: var(--ed-text-3); }
.gc-busy-label.booked { color: #d9534f; font-weight: 600; }
.gc-busy-label.locked { color: var(--ed-text-3); }
.gc-busy-label.glocked { color: #7c3aed; font-weight: 600; }

/* 固化课时开关（1v1 选时弹窗内） */
.switch { position: relative; display: inline-block; width: 42px; height: 22px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #cbd2de; border-radius: 22px; transition: background .2s; }
.switch .slider:before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--ed-primary, #3b6cff); }
.switch input:checked + .slider:before { transform: translateX(20px); }
.fix-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; background: #f3edff; border: 1px solid #e3d6ff; border-radius: 8px; }
.fix-row.disabled { background: #f1f3f7; border-color: #e5e7eb; }
.fix-row.disabled .slider { background: #d9dee6; cursor: not-allowed; }
.fix-row.disabled .switch { opacity: .7; }
.fix-label { font-size: 12px; color: #5b21b6; line-height: 1.5; }
.fix-row.disabled .fix-label { color: var(--ed-text-3); }

/* 排课页底部「批量固化」工具栏（此前无样式定义，此处补齐布局） */
.sched-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 14px; background: var(--ed-bg);
  border: 1px solid var(--ed-line); border-radius: var(--ed-radius-sm); transition: all .2s; }
.sched-toolbar.active { background: #f3edff; border-color: #e3d6ff; }
.sched-toolbar-text { flex: 1 1 auto; min-width: 180px; }
.switch-label { font-size: 13px; font-weight: 600; color: var(--ed-text); line-height: 1.4; }
/* 固化语义统一用品牌紫，与格内固化标记、约课弹窗固化条一致 */
.switch.fix input:checked + .slider { background: #7c3aed; }
.badge-purple { display: inline-flex; align-items: center; background: #f3edff; color: #7c3aed;
  border: 1px solid #e3d6ff; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }

/* 周历表头“今日”高亮 */
.td-grid .table th.day-today { background: var(--ed-primary-soft); color: var(--ed-primary); border-radius: 6px 6px 0 0; }

/* 页头缺学员信息警告 */
.ph-warn { color: #d97706; }

/* 弹窗内扣费提示条 */
.price-callout { margin-top: 8px; padding: 8px 10px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; color: #c2410c; font-size: 13px; }
.price-callout b { color: #b45309; }

@media (max-width: 900px) {
  .td-hero { flex-wrap: wrap; }
  .td-metrics { width: 100%; }
  .td-metric { flex: 1; min-width: 0; }
  .td-profile { grid-template-columns: 1fr; }
  .td-profile .span2 { grid-column: auto; }
}

/* 响应式 */
@media (max-width: 900px) {
  .admin-side { width: 64px; }
  .admin-side .brand { justify-content: center; padding: 14px 8px; }
  .admin-side .brand .bt, .admin-side .nav .grp, .admin-side .nav a .tx, .admin-side .foot { display: none; }
  .admin-side .nav a { justify-content: center; padding: 11px 8px; }
  .admin-content { padding: 14px; }
  .admin-top { padding: 0 14px; }
  .admin-top .quick { display: none; }
  .user-chip .uc-meta { display: none; }
}

/* ============================================================
 * 重构补充：共享布局原语（面板 / 分段 / 键值 / 空态 / 业务域入口）
 * 仅新增类，继承 base.css 结构、覆盖清爽教育风主题令牌。
 * ============================================================ */

/* 面板：列表页与看板的统一内容卡片（取代裸 .table / .toolbar 拼接的割裂感） */
.panel { background: var(--ed-card); border: 1px solid var(--ed-line); border-radius: var(--ed-radius); box-shadow: var(--ed-shadow); padding: 16px 18px; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head .t { font-size: 15px; font-weight: 700; color: var(--ed-text); display: flex; align-items: center; gap: 8px; }
.panel-head .t::before { content: ''; width: 4px; height: 15px; border-radius: 4px; background: linear-gradient(180deg, #4f83ff, #3b6cff); }
.panel-head .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* 面板内的工具栏去卡化（与面板融为一体，避免双层卡片） */
.panel > .toolbar { background: transparent; border: none; box-shadow: none; padding-left: 0; padding-right: 0; }

/* 列表卡 / 看板卡（独立使用，与 .students-split 内联样式保持一致） */
.list-card, .dash-card { background: var(--ed-card); border: 1px solid var(--ed-line); border-radius: var(--ed-radius); box-shadow: var(--ed-shadow); padding: 16px 18px; }

/* 页面操作区（右对齐按钮行） */
.page-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

/* 筛选行（面板内联筛选，区别于顶部 .toolbar 白卡） */
.frow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.frow .input, .frow .select { width: auto; min-width: 150px; }

/* 分段控件（胶囊式，用于页内视图切换 / 筛选） */
.seg { display: inline-flex; gap: 2px; background: #f1f4f9; border: 1px solid var(--ed-line); border-radius: 999px; padding: 3px; }
.seg button { border: none; background: none; padding: 6px 16px; font-size: 13px; border-radius: 999px; color: var(--ed-text-2); cursor: pointer; transition: .15s; font-weight: 600; }
.seg button.on { background: linear-gradient(135deg, #4f83ff, #3b6cff); color: #fff; box-shadow: 0 3px 8px rgba(59,108,255,.3); }

/* 键值对明细（详情页，主题化覆盖 base 的 H5 .kv） */
.kv { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--ed-line); }
.kv:last-child { border-bottom: none; }
.kv label { color: var(--ed-text-3); }
.kv b { color: var(--ed-text); font-weight: 600; }

/* 增强空态 */
.empty-box { text-align: center; padding: 48px 16px; color: var(--ed-text-3); }
.empty-box .ico { font-size: 40px; opacity: .35; display: block; margin-bottom: 10px; }
.empty-box .t { font-size: 14px; }
.empty-box .s { font-size: 12px; margin-top: 4px; }

/* 骨架屏（列表加载态占位） */
.sk-table { border: 1px solid var(--ed-line); border-radius: var(--ed-radius); padding: 6px 12px; overflow: hidden; }
.sk-row { display: flex; gap: 14px; padding: 11px 4px; border-bottom: 1px solid var(--ed-line); }
.sk-row:last-child { border-bottom: none; }
.sk-cell { flex: 1; height: 16px; border-radius: 6px; background: linear-gradient(90deg, #eef1f6 25%, #f7f9fd 37%, #eef1f6 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
.sk-cell.head { height: 12px; opacity: .6; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* 迷你统计（行内小数字） */
.mini-stat { display: inline-flex; align-items: baseline; gap: 6px; }
.mini-stat .v { font-size: 16px; font-weight: 700; color: var(--ed-text); }
.mini-stat .k { font-size: 12px; color: var(--ed-text-3); }

/* 看板小标题（卡片内分区） */
.dash-sub { font-size: 13px; font-weight: 700; color: var(--ed-text-2); margin: 4px 0 10px; display: flex; align-items: center; gap: 6px; }

/* 业务域快捷入口（数据看板） */
.domains { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 4px; }
.domain-card { position: relative; display: block; text-decoration: none; background: var(--ed-card); border: 1px solid var(--ed-line); border-radius: var(--ed-radius); padding: 16px 18px; box-shadow: var(--ed-shadow); transition: transform .18s, box-shadow .18s; cursor: pointer; overflow: hidden; }
.domain-card:hover { transform: translateY(-2px); box-shadow: var(--ed-shadow-hover); }
.domain-card .di { width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 10px; }
.domain-card .dt { font-size: 15px; font-weight: 700; color: var(--ed-text); }
.domain-card .ds { font-size: 12px; color: var(--ed-text-3); margin-top: 4px; line-height: 1.5; }
.domain-card .links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.domain-card .links a { font-size: 12px; color: var(--ed-primary); background: var(--ed-primary-soft); padding: 3px 10px; border-radius: 999px; text-decoration: none; cursor: pointer; }
.domain-card .links a:hover { background: #dbe6ff; }
