/* ===== 基础 ===== */
:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #ccfbf1;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --warn: #d97706;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 28px rgba(15, 23, 42, .12);
  /* 分类强调色（看板 KPI 分色） */
  --accent-blue: #2563eb;
  --accent-teal: #0d9488;
  --accent-red: #dc2626;
  --accent-violet: #7c3aed;
  --accent-amber: #d97706;
  --accent-green: #16a34a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* ===== 应用骨架：左侧导航 + 顶部栏 + 内容区 ===== */
.app { display: flex; min-height: 100vh; }

/* 侧边导航 */
.sidebar {
  width: 208px; flex: 0 0 208px; position: sticky; top: 0; height: 100vh; z-index: 60;
  background: linear-gradient(180deg, #0f766e, #0d9488 60%, #0f766e);
  color: #fff; display: flex; flex-direction: column; transition: margin-left .22s ease;
}
.sidebar.collapsed { margin-left: -208px; }
.sidebar-logo {
  display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px;
  font-size: 15px; font-weight: 700; letter-spacing: .5px; border-bottom: 1px solid rgba(255,255,255,.14);
}
.sidebar-logo .logo-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: rgba(255,255,255,.18); border-radius: 9px; flex: 0 0 auto; }
.sidebar-logo .logo-text { white-space: nowrap; }
.side-nav { flex: 1 1 auto; overflow-y: auto; padding: 10px 10px 16px; scrollbar-width: thin; }
.side-nav::-webkit-scrollbar { width: 4px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 4px; }
.nav-group { margin-bottom: 6px; }
.nav-group-title {
  font-size: 11px; color: rgba(255,255,255,.55); padding: 10px 10px 4px; letter-spacing: 1px; user-select: none;
}
.nav-item {
  display: flex; align-items: center; gap: 9px; width: 100%; border: none; cursor: pointer;
  background: transparent; color: rgba(255,255,255,.85); font-size: 13.5px; text-align: left;
  padding: 9px 10px; border-radius: 9px; transition: background .15s, color .15s; font-family: inherit;
}
.nav-item:hover { background: rgba(255,255,255,.14); color: #fff; }
.nav-item.active { background: #fff; color: var(--primary-dark); font-weight: 600; box-shadow: 0 2px 8px rgba(15,23,42,.18); }
.nav-ico { width: 18px; text-align: center; flex: 0 0 18px; font-size: 14px; }
.sidebar-foot { padding: 10px 16px; font-size: 11px; color: rgba(255,255,255,.5); border-top: 1px solid rgba(255,255,255,.14); }

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

/* 顶部栏 */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(15, 23, 42, .06);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 18px; min-height: 54px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-title { font-size: 16px; font-weight: 700; color: var(--text); white-space: nowrap; }
.sidebar-toggle {
  border: 1px solid var(--border); background: #fff; border-radius: 8px; width: 32px; height: 32px;
  font-size: 15px; cursor: pointer; color: var(--muted); flex: 0 0 auto;
}
.sidebar-toggle:hover { color: var(--primary); border-color: var(--primary); }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.user-name { font-size: 13px; color: var(--muted); white-space: nowrap; }
.btn.sm { padding: 5px 12px; font-size: 12.5px; }

/* 超管校区分组控制条 */
.campus-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #ecfdf5; border-bottom: 1px solid #a7f3d0; padding: 7px 18px; font-size: 13px;
}
.campus-label { color: var(--primary-dark); font-weight: 600; white-space: nowrap; }
.campus-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.campus-pill {
  border: 1px solid #99f6e4; background: #fff; color: var(--primary-dark);
  border-radius: 999px; padding: 3px 12px; font-size: 12.5px; cursor: pointer; transition: all .15s;
}
.campus-pill:hover { background: var(--primary-light); }
.campus-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.campus-group-toggle { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.campus-focus { color: var(--warn); font-size: 12.5px; }

/* ===== 布局 ===== */
.container { width: 100%; max-width: 1440px; margin: 18px auto 50px; padding: 0 18px; }
.tab-panel { display: none; animation: fadeIn .25s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 18px; overflow-x: auto;
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; color: var(--primary-dark); display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ""; width: 4px; height: 15px; border-radius: 4px; background: linear-gradient(180deg, var(--primary), var(--primary-dark)); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar.inner { margin: 0 0 14px; }
.search { max-width: 260px; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters .input { width: auto; min-width: 120px; }
.dash { color: var(--muted); }

/* ===== 表单控件 ===== */
.input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--text); transition: border .15s, box-shadow .15s;
  font-family: inherit;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,148,136,.14); }

/* 班级学员自动匹配下拉 */
.ac-wrap { position: relative; }
.ac-box {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 60; margin-top: 3px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .14); max-height: 230px; overflow: auto;
}
.ac-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; }
.ac-item:hover { background: var(--primary-light); }
.ac-name { flex: 1; font-size: 14px; color: var(--text); }
.ac-sub { font-size: 12px; color: var(--muted); }
.btn {
  border: none; border-radius: 8px; padding: 9px 18px; font-size: 14px; cursor: pointer;
  transition: all .18s; font-family: inherit; white-space: nowrap; box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.primary { background: var(--primary); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { background: var(--danger); color: #fff; font-weight: 600; }
.btn.danger:hover { background: #b91c1c; }
.btn.ghost { background: #fff; color: var(--primary-dark); border: 1px solid var(--primary); }
.btn.ghost:hover { background: var(--primary-light); }
.btn.ghost.danger-ghost { color: var(--danger); border-color: var(--danger); }
.btn.ghost.danger-ghost:hover { background: #fee2e2; }
.btn.link { background: none; color: var(--primary); padding: 4px 8px; }
.btn.link:hover { text-decoration: underline; }
.btn.link.danger { color: var(--danger); }

/* ===== 表格 ===== */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; background: #f8fafc; }
.table th:first-child { border-radius: 8px 0 0 8px; }
.table th:last-child { border-radius: 0 8px 8px 0; }
.table tbody tr:hover { background: #f0fdfa; }
.table tbody tr:last-child td { border-bottom: none; }
.empty { text-align: center; color: var(--muted); padding: 36px 0; }

/* ===== 学员表一屏化（全端）：隐藏次要列（出生年月/报名时间，详情中可见）+ 固定列宽 + 自动换行 =====
   列序（15 列）：1勾选 2姓名 3性别 4出生(隐) 5联系方式 6来源 7主带教练 8标签 9报名时间(隐)
                 10主修课程 11累计 12已消耗 13剩余 14备注 15操作
   注意：新增「标签」列后，nth-child 已整体顺延，改列序时务必同步这里。 */
#student-table .col-birth, #student-table .col-created { display: none; }
#student-table td:nth-child(4), #student-table td:nth-child(9) { display: none; }
#student-table { table-layout: fixed; width: 100%; }
#student-table th, #student-table td { white-space: normal; word-break: break-word; }
#student-table th { white-space: nowrap; }        /* 表头一律单行 */
/* 姓名列：名字一行、徽标/提示标一行，整体居中对齐 */
#student-table td:nth-child(2) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; }
#student-table td:nth-child(2) .name-link { white-space: nowrap; }
.name-age { font-size: 11px; color: #94a3b8; line-height: 1.2; }
#student-table td:nth-child(2) .dup-badge, #student-table td:nth-child(2) .warn-tag { margin-left: 0; }
#student-table td:nth-child(3) { white-space: nowrap; } /* 性别/未填 单行 */
/* 标签列：小徽标可换行，不挤压相邻列 */
.tag-chip {
  display: inline-block; margin: 1px 4px 1px 0; padding: 1px 8px;
  border-radius: 999px; font-size: 11px; font-weight: 500; white-space: nowrap;
  background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe;
}
#student-table th:nth-child(1) { width: 34px; }   /* 勾选 */
#student-table th:nth-child(3) { width: 48px; }   /* 性别 */
#student-table th:nth-child(5) { width: 108px; }  /* 联系方式 */
#student-table td:nth-child(5) { white-space: nowrap; word-break: keep-all; } /* 手机号 11 位保持一行，不拆断 */
#student-table th:nth-child(6) { width: 72px; }   /* 来源（徽标横版） */
#student-table th:nth-child(7) { width: 72px; }   /* 主带教练（徽标横版） */
#student-table th:nth-child(8) { width: 82px; }   /* 标签（可换行小徽标） */
#student-table th:nth-child(10) { width: 15%; }   /* 主修课程/有效期（徽标堆叠区，勿压过窄） */
#student-table th:nth-child(11) { width: 68px; }  /* 累计课时（表头单行） */
#student-table th:nth-child(12) { width: 56px; }  /* 已消耗（表头单行） */
#student-table th:nth-child(13) { width: 68px; }  /* 剩余课时（表头单行） */
#student-table th:nth-child(14) { width: 16%; }   /* 备注：超长自动换行（收窄，减少与操作列的空隙） */
#student-table th:nth-child(15) { width: 92px; }  /* 操作 */
.btn.link { padding: 4px 6px; font-size: 12px; }

/* ===== 平板适配（≤1280px）：学员表保住最小宽度，课程徽标不再溢出压到相邻列 ===== */
@media (max-width: 1280px) {
  #student-table { min-width: 1200px; } /* 卡片内横向滑动，列宽不被压缩 */
  #student-table th:nth-child(2) { width: 150px; } /* 姓名列固定宽：名字+徽标居中放下，与性别列留出间距 */
  /* 课程徽标：课程名+剩余课时一行，有效期自动换到第二行，避免单枚徽标超列宽 */
  #student-table td:nth-child(10) .mini-course { flex-wrap: wrap; white-space: normal; }
  #student-table td:nth-child(10) .mini-course small { flex-basis: 100%; margin-left: 0; }
  #student-table td:nth-child(8) .tag-chip { white-space: normal; }
}

/* ===== 徽章 ===== */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--primary-light); color: var(--primary-dark); }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.badge.gray { background: #f1f5f9; color: var(--muted); }
.badge.src { background: #dbeafe; color: #1d4ed8; }

/* ===== 收费管理 ===== */
.billing-cards { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.billing-card {
  flex: 1; min-width: 150px; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow);
  position: relative; overflow: hidden; transition: transform .18s, box-shadow .18s;
}
.billing-card::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
}
.billing-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.billing-card .sc-label { color: var(--muted); font-size: 13px; }
.billing-card .sc-value { font-size: 26px; font-weight: 800; margin-top: 6px; color: var(--primary-dark); letter-spacing: -.5px; }
.renew-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.renew-list li { background: #fef3c7; color: #92400e; padding: 4px 10px; border-radius: 8px; font-size: 13px; }
.renew-list li.muted { background: #f1f5f9; color: #64748b; }
.pkg-list { margin-bottom: 6px; }

/* ===== 上课登记表单 ===== */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.field.actions { display: flex; align-items: flex-end; gap: 10px; }

/* ===== 记录汇总行 ===== */
.summary { display: flex; gap: 22px; padding: 12px 4px 2px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.summary b { color: var(--primary-dark); font-size: 15px; }
.hint-line { color: var(--muted); font-size: 13px; margin-bottom: 12px; line-height: 1.6; }

/* ===== 场馆场地管理 ===== */
.venue-row { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.venue-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.venue-head b { font-size: 15px; color: var(--primary-dark); }
.venue-head .muted { color: var(--muted); font-size: 13px; }
.venue-head .spacer { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; background: #f0fdfa;
  border: 1px solid #99f6e4; color: var(--primary-dark); border-radius: 999px;
  padding: 3px 6px 3px 12px; font-size: 13px;
}
.chip button { border: none; background: rgba(13,148,136,.12); color: var(--primary-dark); width: 18px; height: 18px; border-radius: 50%; cursor: pointer; font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.chip button:hover { background: #fee2e2; color: var(--danger); }
.chip-add { display: inline-flex; gap: 6px; align-items: center; }
.chip-add input { border: 1px dashed var(--primary); border-radius: 999px; padding: 4px 12px; width: 110px; font-size: 13px; outline: none; background: transparent; }
.fee-rate-input { width: 110px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.fee-rate-input:focus { outline: none; border-color: var(--primary); }

/* ===== 学员主修课程多选 ===== */
.mf-course-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px;
  font-size: 13px; background: #fff; color: #334155; transition: all .15s;
}
.check-chip:hover { border-color: var(--primary); }
.check-chip input { margin: 0; accent-color: var(--primary); width: 15px; height: 15px; }
.check-chip:has(input:checked) {
  border-color: var(--primary); background: #f0fdfa; color: var(--primary-dark); font-weight: 500;
}
.check-chip.legacy { border-style: dashed; border-color: #f59e0b; background: #fffbeb; color: #b45309; }
.check-chip.legacy:has(input:checked) { border-color: #f59e0b; background: #fef3c7; color: #b45309; }
.course-hours-row { display: inline-flex; align-items: center; gap: 6px; }
.course-hours-row.legacy .chip-hours { border-style: dashed; border-color: #f59e0b; }
.chip-hours { width: 92px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.chip-hours:focus { outline: none; border-color: var(--primary); }
.chip-expiry { padding: 5px 6px; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; color: var(--muted); }
.chip-expiry:focus { outline: none; border-color: var(--primary); }
/* 上课时间（开始/结束）选择器 */
.time-pick { display: flex; gap: 6px; }
.time-pick select { flex: 1; min-width: 0; }
/* ===== 登录鉴权 ===== */
.user-area { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.user-name { font-size: 14px; color: #e2e8f0; white-space: nowrap; }
.login-mask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: #fff; border-radius: 16px; padding: 34px 30px 28px;
  width: min(360px, calc(100vw - 40px)); box-shadow: 0 20px 60px rgba(0,0,0,.25);
  text-align: center;
}
.login-card h2 { margin: 0 0 6px; font-size: 20px; color: #0f172a; }
.login-sub { margin: 0 0 18px; color: #64748b; font-size: 14px; }
.login-card .input { width: 100%; margin-bottom: 12px; }
.login-error { color: #ef4444; font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.login-alt { margin-top: 12px; font-size: 13px; }
.login-alt a { color: var(--primary-dark, #0d9488); text-decoration: none; cursor: pointer; }
.login-alt a:hover { text-decoration: underline; }
/* 同名学员徽标 */
.dup-badge {
  display: inline-block; margin-left: 6px; padding: 1px 8px;
  border-radius: 999px; font-size: 11px; font-weight: 500; vertical-align: 1px;
  background: #fef3c7; color: #b45309; border: 1px solid #fde68a; cursor: help; white-space: nowrap;
}
/* 编辑学员：主修课程锁定只读 */
.mf-course-checks.locked { background: #f8fafc; border: 1px dashed var(--border); border-radius: 10px; padding: 10px; }
.mf-course-checks.locked .check-chip { cursor: not-allowed; opacity: .85; }
.mf-course-checks.locked .chip-hours,
.mf-course-checks.locked .chip-expiry { background: #f1f5f9; color: #475569; cursor: not-allowed; }
/* 学员列表：分课程剩余课时徽标 */
.mini-course {
  display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px 0;
  background: #f0fdfa; border: 1px solid #99f6e4; color: var(--primary-dark);
  border-radius: 999px; padding: 2px 10px; font-size: 12px; white-space: nowrap;
}
.mini-course b { font-weight: 600; }
.mini-course small { font-size: 11px; opacity: .8; margin-left: 2px; }
.mini-course small.exp-expired { opacity: 1; font-weight: 600; }
.mini-course.low { background: #fefce8; border-color: #fde047; color: #a16207; }
.mini-course.over { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* ===== 统计 ===== */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; position: relative; overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .18s, box-shadow .18s;
}
.stat-card::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent, var(--primary)), transparent);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card .num { font-size: 28px; font-weight: 800; color: var(--accent, var(--primary-dark)); letter-spacing: -.5px; }
.stat-card .label { color: var(--muted); font-size: 13px; margin-top: 6px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.show { display: flex; animation: fadeIn .18s ease; }
.modal {
  background: #fff; border-radius: 14px; width: 480px; max-width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(15,23,42,.3);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff;
}
.modal-head h3 { font-size: 16px; color: var(--primary-dark); }
.modal-close { border: none; background: none; font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 10px 20px 4px; white-space: pre-line; line-height: 1.7; color: var(--text); font-size: 14px; }
.modal-body .input { margin-top: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px 18px; }
#modal-form { padding: 18px 20px; display: grid; gap: 13px; }
#modal-form .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
#modal-form .hint { font-size: 12px; color: var(--muted); }

/* ===== 学员详情卡 ===== */
.modal.wide { width: 720px; }
.sd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; }
.sd-item { display: flex; flex-direction: column; gap: 2px; }
.sd-label { font-size: 12px; color: var(--muted); }
.sd-value { font-size: 14px; display: flex; align-items: center; gap: 4px; }
.sd-metrics { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.sd-metric { width: 80px !important; padding: 4px 8px !important; font-size: 13px !important; margin: 0 !important; }
.sd-section h4 { font-size: 14px; color: var(--primary-dark); margin: 2px 0 8px; padding-left: 8px; border-left: 3px solid var(--primary); }
.sd-rec-table th, .sd-rec-table td { padding: 6px 8px; font-size: 13px; }
.sd-section .field { margin: 0; }
.sd-section textarea { font-size: 13px; line-height: 1.7; }
/* 学员姓名点击进入档案填写 */
.name-link { color: var(--primary); cursor: pointer; }
.name-link:hover { text-decoration: underline; }
/* 档案填写表单 */
.archive-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-start; }
.archive-form .field { margin: 0; }
.archive-form .field label { font-size: 12px; color: var(--muted); }
#modal-form .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
/* 成长档案按阶段分组 */
.sd-stage { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.sd-stage h5 { font-size: 13px; color: var(--primary-dark); margin: 0 0 8px; }
.sd-goals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.sd-goals p { margin: 2px 0 0; font-size: 13px; line-height: 1.7; white-space: pre-line; }

/* ===== Toast ===== */
#toast-wrap { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #0f172a; color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 14px; box-shadow: var(--shadow); animation: fadeIn .2s ease;
}
.toast.success { background: var(--primary-dark); }
.toast.error { background: var(--danger); }
.toast.warn { background: var(--warn); }
.toast.info { background: #1e40af; }

/* ===== 超管共享目录只读预览面板 ===== */
.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 4px;
}
.share-col {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.share-col h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.share-tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #c7d2fe;
  font-weight: 500;
  white-space: nowrap;
}
.share-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: #334155;
  line-height: 1.7;
}
.share-list li { margin: 2px 0; }

/* ===== 平板适配（≤1024px，单屏优先，减少横向操作） ===== */
@media (max-width: 1024px) {
  /* 顶栏更紧凑 */
  .topbar-inner { height: auto; padding: 6px 12px; }
  .logo { font-size: 15px; }
  .tabs button { padding: 7px 12px; font-size: 13px; }
  .user-area .btn { padding: 4px 10px; font-size: 13px; }

  /* 容器与卡片更紧凑，尽量塞进一屏 */
  .container { margin-top: 14px; padding: 0 12px; }
  .card { padding: 14px 14px; margin-bottom: 14px; }
  .card-title { font-size: 14px; margin-bottom: 10px; }

  /* 按钮略缩，工具栏一行能放下更多 */
  .btn { padding: 8px 12px; font-size: 13px; }

  /* 表格更紧凑，减少列宽溢出（表格在卡片内横向滚动，不撑破整页） */
  .table th, .table td { padding: 8px 8px; font-size: 13px; }
  .table th { font-size: 12px; }
  .filters .input { min-width: 96px; }
  .toolbar { gap: 8px; }

  /* 排班周/月视图更紧凑 */
  .schedule-table th, .schedule-table td { padding: 5px 4px; font-size: 12px; }
  .sch-chip { font-size: 11px; padding: 1px 4px; }
  .schedule-table.month-table td.month-cell { min-width: 56px; max-width: 92px; }

  /* 统计/看板网格更密 */
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .stat-cards { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }

  /* 弹窗在平板内自适应，不超出视口 */
  .modal, .modal.wide { width: auto; max-width: calc(100vw - 24px); }

  /* 学员详情 3 列 → 2 列，目标/指标单列 */
  .sd-grid { grid-template-columns: repeat(2, 1fr); }
  .sd-goals { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar { min-height: 48px; padding: 0 12px; }
  .page-title { font-size: 15px; }
  .container { padding: 0 12px; }
  .card { padding: 14px 12px; }
  .sd-grid { grid-template-columns: 1fr; }
  #student-table { min-width: 640px; } /* 窄屏保持列宽，表格在卡片内横向滑动 */
  /* 窄屏：侧边栏改为浮动抽屉，默认收起 */
  .sidebar { position: fixed; left: 0; top: 0; box-shadow: var(--shadow-lg); }
  .sidebar.collapsed { margin-left: -208px; }
  .campus-bar { padding: 7px 12px; }
}

/* ===== 校区分组（超管） ===== */
.campus-pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.campus-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; flex: none; }
.campus-group-header td { background: #f8fafc; font-size: 13px; color: #334155; padding: 7px 12px !important; border-top: 1px solid var(--border); }
.campus-group-header b { font-weight: 600; }
.campus-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.campus-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #475569; background: #f1f5f9; border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; }
.campus-chip i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* 聚焦校区时明细表的色标高亮 */
.card.campus-accent { border-left: 4px solid var(--campus-color, var(--primary)); }
.stat-card.campus-accent { border-left: 4px solid var(--campus-color, var(--primary)); }

/* 排班月视图：紧凑网格 */
#schedule-month-grid { overflow-x: auto; }
.schedule-table.month-table th, .schedule-table.month-table td { padding: 2px 3px; font-size: 11px; vertical-align: top; }
.schedule-table.month-table th { text-align: center; white-space: nowrap; }
.schedule-table.month-table th.sch-today { background: #eff6ff; }
.schedule-table.month-table th.sch-weekend { color: #b91c1c; }
.schedule-table.month-table td.month-cell { min-width: 72px; max-width: 110px; }
.schedule-table.month-table td.month-coach { white-space: nowrap; min-width: 64px; }
.schedule-table.month-table .sch-chip { display: block; font-size: 10px; padding: 1px 3px; margin-bottom: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-table.month-table .sch-attended { display: none; }
.card.campus-accent .card-title { display: flex; align-items: baseline; flex-wrap: wrap; }
.campus-accent-cap { font-size: 12px; font-weight: 600; margin-left: 8px; }

/* 顶部聚焦状态高亮（更醒目） */
.campus-focus { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; margin-left: 12px; }
.campus-focus .campus-dot { margin: 0; }
.campus-focus-clear { margin-left: 6px; border: none; background: rgba(255,255,255,.55); color: inherit; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-size: 12px; }
.campus-focus-clear:hover { background: rgba(255,255,255,.85); }

/* ===== 工作台 ===== */
.wb-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(120deg, #0f766e, #0d9488 55%, #14b8a6);
  border-radius: var(--radius); color: #fff; padding: 18px 22px; margin-bottom: 16px;
  box-shadow: 0 4px 18px rgba(13, 148, 136, .28);
}
.wb-greet h2 { font-size: 19px; margin-bottom: 4px; }
.wb-greet p { font-size: 13px; color: rgba(255,255,255,.85); }
.wb-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.wb-quick .btn.ghost { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.5); color: #fff; }
.wb-quick .btn.ghost:hover { background: rgba(255,255,255,.28); }
.wb-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.wb-kpi { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; border-left: 4px solid var(--primary); }
.wb-kpi .k { font-size: 12px; color: var(--muted); }
.wb-kpi .v { font-size: 22px; font-weight: 700; margin-top: 3px; }
.wb-kpi .s { font-size: 11px; color: var(--muted); margin-top: 2px; }
.wb-kpi.warn { border-left-color: var(--warn); }
.wb-kpi.danger { border-left-color: var(--danger); }
.wb-kpi.info { border-left-color: var(--accent-blue); }
.wb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.wb-grid .card { margin-bottom: 0; }
.wb-todo { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed var(--border); cursor: pointer; }
.wb-todo:last-child { border-bottom: none; }
.wb-todo:hover { background: #f0fdfa; }
.wb-todo .n { min-width: 26px; height: 26px; border-radius: 8px; background: var(--primary-light); color: var(--primary-dark);
  font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; padding: 0 7px; }
.wb-todo .n.zero { background: #f1f5f9; color: #94a3b8; }
.wb-todo .t { flex: 1; font-size: 13.5px; }
.wb-todo .go { font-size: 12px; color: var(--primary); }
.wb-row { display: flex; justify-content: space-between; padding: 7px 4px; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.wb-row:last-child { border-bottom: none; }
.wb-row b { font-weight: 700; }
@media (max-width: 900px) { .wb-grid { grid-template-columns: 1fr; } }

/* ===== 点名签到 ===== */
.att-group { margin-bottom: 14px; }
.att-group-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px 10px 0 0; padding: 10px 14px;
}
.att-group-head .g-title { font-weight: 700; font-size: 14px; }
.att-group-head .g-sub { font-size: 12px; color: var(--muted); }
.att-group-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.att-students { border: 1px solid var(--border); border-top: none; border-radius: 0 0 10px 10px; overflow: hidden; }
.att-stu { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: #fff; flex-wrap: wrap; }
.att-stu:last-child { border-bottom: none; }
.att-stu .s-name { font-weight: 600; min-width: 70px; }
.att-stu .s-sub { font-size: 12px; color: var(--muted); flex: 1; min-width: 100px; }
.att-mark { display: flex; gap: 6px; flex-wrap: wrap; }
.att-mark button {
  border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 4px 13px;
  font-size: 12.5px; cursor: pointer; color: var(--muted); transition: all .15s; font-family: inherit;
}
.att-mark button:hover { border-color: var(--primary); color: var(--primary); }
.att-mark button.on-present { background: #dcfce7; border-color: #86efac; color: #15803d; font-weight: 600; }
.att-mark button.on-late { background: #fef9c3; border-color: #fde047; color: #a16207; font-weight: 600; }
.att-mark button.on-leave { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; font-weight: 600; }
.att-mark button.on-absent { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; font-weight: 600; }
.att-mark button.on-rest { background: #f1f5f9; border-color: #cbd5e1; color: #475569; font-weight: 600; }
/* 已点名锁定徽标：与对应状态按钮同色系，附“已锁定”后缀 */
.att-lock { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; font-size: 13px; border: 1px solid transparent; font-weight: 600; }
.att-lock.on-present { background: #dcfce7; border-color: #86efac; color: #15803d; }
.att-lock.on-late { background: #fef9c3; border-color: #fde047; color: #a16207; }
.att-lock.on-leave { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
.att-lock.on-absent { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.att-lock.on-rest { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.att-done-flag { font-size: 12px; color: var(--primary); font-weight: 600; }
.att-save-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border); padding: 10px 0 2px; display: flex; gap: 10px; align-items: center; z-index: 20; }

/* ===== 请假补课 / 班级 ===== */
.lv-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border); }
.lv-badge.pending { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.lv-badge.approved { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.lv-badge.rejected { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.cls-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border); white-space: nowrap; }
.cls-status.pending { background: #f8fafc; color: #64748b; }
.cls-status.active { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.cls-status.full { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.cls-status.stopped { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.cls-status.ended { background: #f1f5f9; color: #475569; }
.cls-progress { min-width: 120px; }
.cls-progress .bar { height: 7px; border-radius: 4px; background: #e2e8f0; overflow: hidden; }
.cls-progress .bar > span { display: block; height: 100%; background: linear-gradient(90deg, #2dd4bf, #0d9488); }
.cls-progress .txt { font-size: 11px; color: var(--muted); margin-top: 2px; }
.cls-members { max-height: 300px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.cls-member { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.cls-member:last-child { border-bottom: none; }
.cls-member .m-phone { color: var(--muted); font-size: 12px; flex: 1; }
.member-add { display: flex; gap: 8px; margin-top: 10px; }

/* 班级状态行内下拉（保持徽标观感，可直接点击修改） */
.cls-status-select {
  border-radius: 999px; font-size: 12px; padding: 3px 10px; cursor: pointer; font-family: inherit;
  border: 1px solid var(--border); background: #f8fafc; color: #64748b; appearance: auto;
}
.cls-status-select:hover { border-color: var(--primary); }
.cls-status-select.pending { background: #f8fafc; color: #64748b; }
.cls-status-select.active { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.cls-status-select.full { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.cls-status-select.stopped { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.cls-status-select.ended { background: #f1f5f9; color: #475569; }

/* 工作台「写课后反思」待写清单 */
.wb-fb-list { margin: 2px 0 6px; border-left: 2px solid var(--primary-light); padding-left: 8px; }
.wb-fb-list .wb-todo { padding: 7px 4px; }

/* ===== 班级课后点评弹窗 ===== */
.cc-head { margin-bottom: 10px; }
.cc-head .hint { margin-top: 4px; }
.cc-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.cc-presets-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cc-preset {
  border: 1px solid var(--border); background: #f8fafc; border-radius: 999px;
  padding: 4px 12px; font-size: 12.5px; cursor: pointer; color: #334155; transition: all .15s; font-family: inherit;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cc-preset:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.cc-preset.sm { padding: 2px 9px; font-size: 12px; max-width: 150px; }
.cc-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.cc-toolbar .input { flex: 1; }
#cc-students { max-height: 46vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.cc-stu { padding: 10px 12px; border-bottom: 1px solid var(--border); background: #fff; }
.cc-stu:last-child { border-bottom: none; }
.cc-stu.cc-focus { background: #f0fdfa; box-shadow: inset 3px 0 0 var(--primary); }
.cc-stu-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.cc-stu-head .btn.link { margin-left: auto; }
.cc-ta { font-size: 13px; }
.cc-stu-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.cc-stu-foot .hint { flex: 1; min-width: 120px; }
.cc-preset-mini { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }

/* ============================================================
   移动端 / 平板适配（H5 + 安卓 WebView）
   - 手机（竖屏 < 768px）：侧边栏改为抽屉式浮层，内容全宽，表单单列
   - 平板（横屏 ≥ 769px）：保留侧栏导航，内容分栏利用横向空间
   ============================================================ */
.app { min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 50; background: #fff; }

/* 手机 / 小屏：侧边栏抽屉 */
@media (max-width: 768px) {
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    transform: translateX(-100%); z-index: 200;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .28);
    transition: transform .22s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    position: fixed; inset: 0; z-index: 190;
    background: rgba(15, 23, 42, .45); display: none;
  }
  .sidebar-backdrop.show { display: block; }
  .main-wrap { width: 100%; }
  .container { padding: 0 12px; margin: 12px auto 40px; }
  .topbar { padding: 10px 12px; }
  .page-title { font-size: 15px; }
  .card { padding: 14px; border-radius: 12px; overflow-x: auto; }
  .card-title { font-size: 14.5px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .toolbar .filters { width: 100%; }
  .filters { gap: 8px; }
  .filters .input, .filters select, .filters .btn { flex: 1 1 auto; width: 100%; min-width: 0; }
  .search { max-width: none; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .btn { padding: 10px 14px; }
  .btn.sm { padding: 7px 11px; }
  .billing-cards { gap: 10px; }
  .billing-cards .card { min-width: 0; flex: 1 1 100%; }
  .campus-bar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { width: 100%; }
  #student-table { min-width: 760px; } /* 窄屏内横向滑动查看列 */
  .modal { width: calc(100vw - 24px); max-height: 86vh; }
  .modal-card { padding: 16px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .login-card { width: calc(100vw - 32px); padding: 22px 18px; }
}

/* 平板横屏：侧栏常驻、内容分栏 */
@media (min-width: 769px) and (orientation: landscape) {
  .sidebar { position: sticky; transform: none; margin-left: 0; }
  .container { max-width: 1600px; }
  .stat-row, .hero-stats { grid-template-columns: repeat(4, 1fr); }
  .billing-cards { flex-wrap: nowrap; }
  .billing-cards .card { flex: 1; }
}

/* 手机横屏：仍用抽屉（避免侧栏挤压内容） */
@media (max-width: 900px) and (orientation: landscape) {
  .sidebar { position: fixed; transform: translateX(-100%); z-index: 200; }
  .sidebar.open { transform: translateX(0); }
  .container { margin-top: 12px; }
}

/* 平板竖屏：介于两者之间，侧栏收起为抽屉更省空间 */
@media (min-width: 600px) and (max-width: 1024px) and (orientation: portrait) {
  .sidebar { position: fixed; transform: translateX(-100%); z-index: 200; }
  .sidebar.open { transform: translateX(0); }
}

/* ============ 学员管理优化：快捷筛选 / 课时进度条 / 排序 ============ */
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.filter-chips .chip {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; user-select: none;
  transition: all .15s ease;
}
.filter-chips .chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chips .chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.hours-bar { height: 5px; border-radius: 3px; background: #eef2f7; margin-top: 5px; overflow: hidden; }
.hours-bar > i { display: block; height: 100%; border-radius: 3px; }
.hours-bar.ok > i { background: #22c55e; }
.hours-bar.low > i { background: #f59e0b; }
.hours-bar.over > i { background: #ef4444; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable::after { content: " \2195"; opacity: .4; font-size: 10px; }
th.sortable.asc::after { content: " \25B2"; opacity: 1; }
th.sortable.desc::after { content: " \25BC"; opacity: 1; }

/* ============ 统一学员档案（Tab 分栏） ============ */
.profile-tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 2px 0 14px; }
.profile-tabs button {
  border: none; background: none; padding: 9px 15px; font-size: 13.5px; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent;
}
.profile-tabs button:hover { color: var(--primary); }
.profile-tabs button.active { color: var(--primary-dark); border-bottom-color: var(--primary); font-weight: 600; }
.profile-panel { display: none; }
.profile-panel.active { display: block; animation: fadeIn .2s ease; }
.profile-stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.profile-stat .ps { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.profile-stat .ps b { display: block; font-size: 20px; color: var(--primary-dark); line-height: 1.2; }
.profile-stat .ps span { font-size: 12px; color: var(--muted); }
.form-section-title { font-size: 13px; font-weight: 600; color: var(--primary-dark); margin: 16px 0 8px; padding-left: 8px; border-left: 3px solid var(--primary); }

/* 成长档案：层级式阶段导航 */
.growth-stage-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.growth-chip {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: all .15s ease;
}
.growth-chip:hover { border-color: var(--primary); color: var(--primary); }
.growth-chip i { font-style: normal; background: #eef2f7; border-radius: 999px; padding: 0 7px; font-size: 11.5px; color: var(--primary-dark); }
.growth-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.growth-chip.active i { background: rgba(255, 255, 255, .25); color: #fff; }

/* 教案 / 训练计划库 */
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.lp-group { margin-bottom: 18px; }
.lp-group-title { font-size: 14px; font-weight: 600; color: var(--primary-dark); margin: 4px 0 10px; padding-left: 8px; border-left: 3px solid var(--primary); }
.lp-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.lp-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lp-day { font-weight: 700; color: var(--primary-dark); font-size: 13px; }
.lp-cat { font-size: 12px; color: var(--muted); background: #eef2f7; border-radius: 6px; padding: 1px 8px; }
.lp-rpe { font-size: 12px; color: #d97706; margin-left: auto; }
.lp-title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.lp-meta { font-size: 12px; color: var(--muted); }
.lp-actions { display: flex; gap: 4px; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--border); }
.lp-actions .btn.link { font-size: 13px; padding: 2px 8px; }
.lp-preview { display: flex; flex-direction: column; gap: 8px; }
.lp-block { display: flex; gap: 10px; }
.lp-block-k { flex: 0 0 92px; color: var(--primary-dark); font-weight: 600; font-size: 13px; padding-top: 2px; }
.lp-block-v { flex: 1; white-space: pre-wrap; line-height: 1.5; }
.badge.plan { display: inline-block; margin-top: 4px; background: #eaf2ff; color: var(--primary-dark); border: 1px solid #cfe0ff; border-radius: 6px; padding: 1px 6px; font-size: 11.5px; font-weight: 500; }
.lp-stu-list { max-height: 320px; overflow: auto; margin-top: 8px; border: 1px solid var(--border); border-radius: 10px; }
.lp-stu { padding: 9px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.lp-stu:last-child { border-bottom: none; }
.lp-stu:hover { background: #f1f5fb; }
.lp-stu .muted { color: var(--muted); font-size: 12px; margin-left: 6px; }
.lp-error { grid-column: 1 / -1; border: 1px dashed var(--border); border-radius: 10px; padding: 16px; line-height: 1.7; color: #b45309; background: #fffbeb; }
.lp-error b { color: #92400e; }
.lp-error code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; }

/* 手机端：学员列表卡片化（替代宽表） */
@media (max-width: 768px) {
  #student-table thead { display: none; }
  #student-table, #student-table tbody, #student-table tr, #student-table td { display: block; width: 100%; }
  #student-table tr { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; padding: 6px 10px; background: #fff; }
  #student-table td { border: none; padding: 4px 2px; display: flex; justify-content: space-between; gap: 10px; }
  #student-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; flex: 0 0 auto; }
  #student-table td.col-notes, #student-table td.tags-cell { white-space: normal; }
  .filter-chips { margin-left: 0; width: 100%; }
}
