/* ============================================
   校长管理后台 — 专业桌面端主题
   参考 golden-arrow 简洁专业风格
   ============================================ */

:root {
  /* 主色系 — 专业深蓝 */
  --primary: #1A56DB;
  --primary-light: #3B82F6;
  --primary-dark: #1E40AF;
  --primary-bg: #EFF6FF;

  /* 辅助色 */
  --teal: #0D9488;
  --teal-bg: #CCFBF1;
  --amber: #D97706;
  --amber-bg: #FEF3C7;
  --rose: #E11D48;
  --rose-bg: #FFE4E6;
  --violet: #7C3AED;
  --violet-bg: #EDE9FE;

  /* 功能色 */
  --success: #059669;
  --warning: #D97706;
  --danger: #DC2626;

  /* 文字 */
  --text-1: #111827;
  --text-2: #4B5563;
  --text-3: #9CA3AF;
  --text-inv: #F9FAFB;

  /* 边框背景 */
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --bg: #F9FAFB;
  --card: #FFFFFF;

  /* 侧边栏 */
  --sidebar-bg: #1E293B;
  --sidebar-bg-hover: #334155;
  --sidebar-active: #1A56DB;
  --sidebar-text: #CBD5E1;
  --sidebar-text-active: #FFFFFF;

  /* 圆角阴影 */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);

  /* 布局 */
  --sidebar-w: 240px;
  --topbar-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ===== 布局 ===== */
#app {
  display: flex;
  min-height: 100vh;
}

/* ===== 侧边栏 ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-brand-text .sidebar-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.sidebar-brand-text .sidebar-subtitle {
  font-size: 11px;
  color: var(--sidebar-text);
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--sidebar-bg-hover);
  color: #fff;
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
}

.nav-item .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-icp {
  margin-top: 8px;
  text-align: center;
  font-size: 10px;
  line-height: 1.6;
  color: rgba(255,255,255,0.38);
}

.sidebar-icp a {
  color: inherit;
  text-decoration: none;
}

.sidebar-icp a:hover { color: rgba(255,255,255,0.7); }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-xs);
  transition: background 0.15s;
}

.sidebar-user:hover { background: var(--sidebar-bg-hover); }

.sidebar-user .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user .user-info .name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.sidebar-user .user-info .role {
  font-size: 11px;
  color: var(--sidebar-text);
}

/* ===== 主内容区 ===== */
.main-area {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-date {
  font-size: 13px;
  color: var(--text-3);
}

.content {
  padding: 24px;
  flex: 1;
  max-width: 1200px;
  width: 100%;
}

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

.card-link {
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
}

.card-link:hover { text-decoration: underline; }

/* ===== 统计卡片网格 ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-bg); }
.stat-icon.teal { background: var(--teal-bg); }
.stat-icon.amber { background: var(--amber-bg); }
.stat-icon.rose { background: var(--rose-bg); }
.stat-icon.violet { background: var(--violet-bg); }

.stat-info .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1.2;
}

.stat-info .stat-label {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ===== 双栏布局 ===== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* ===== 排行榜 ===== */
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.rank-row:last-child { border-bottom: none; }

.rank-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--border-light);
  color: var(--text-2);
}

.rank-num.top1 { background: #FEF3C7; color: #92400E; }
.rank-num.top2 { background: #E5E7EB; color: #4B5563; }
.rank-num.top3 { background: #FED7AA; color: #9A3412; }

.avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar-xs { width: 26px; height: 26px; font-size: 11px; }

/* ===== 照片头像 / 头像上传 ===== */
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avp { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.avp-preview {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--primary-bg); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.avp-char { font-size: 28px; }
.avp-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.avp .form-tip { width: 100%; margin: 0; }

.rank-info { flex: 1; min-width: 0; }

.rank-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.rank-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 1px;
}

.rank-bar {
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}

.rank-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.rank-score {
  text-align: right;
  flex-shrink: 0;
}

.rank-score-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-1);
}

.rank-score-count {
  font-size: 12px;
  color: var(--text-3);
}

/* ===== 表格 ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-1);
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: var(--bg); }

/* ===== 徽章 ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success { background: var(--teal-bg); color: var(--success); }
.badge-warning { background: var(--amber-bg); color: var(--warning); }
.badge-danger { background: var(--rose-bg); color: var(--danger); }
.badge-blue { background: var(--primary-bg); color: var(--primary); }
.badge-gray { background: var(--border-light); color: var(--text-2); }
.badge-info { background: rgba(59, 130, 246, 0.12); color: #2563eb; }

/* ===== 签到概览 ===== */
.ci-overview {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.ci-stat-box {
  flex: 1;
  text-align: center;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border-light);
}

.ci-stat-num {
  font-size: 24px;
  font-weight: 800;
}

.ci-stat-num.done { color: var(--success); }
.ci-stat-num.partial { color: var(--warning); }
.ci-stat-num.none { color: var(--danger); }

.ci-stat-label {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

/* ===== 柱状图 ===== */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  padding-top: 20px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 4px;
}

.bar-fill {
  width: 100%;
  max-width: 40px;
  border-radius: 6px 6px 0 0;
  min-height: 4px;
  position: relative;
  transition: height 0.3s ease;
}

.bar-val {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  white-space: nowrap;
}

.bar-label {
  font-size: 11px;
  color: var(--text-3);
  text-align: center;
}

/* ===== 维度条 ===== */
.dim-bar-item {
  margin-bottom: 14px;
}

.dim-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.dim-bar-head .label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.dim-bar-head .val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}

.dim-bar-track {
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.dim-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.dim-bar-fill.high { background: var(--success); }
.dim-bar-fill.mid { background: var(--primary); }
.dim-bar-fill.low { background: var(--danger); }
.time-bar-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}
/* 「上课 N 天」点击展开明细 */
.days-toggle {
  cursor: pointer;
  color: var(--primary);
  border-bottom: 1px dashed currentColor;
  user-select: none;
  white-space: nowrap;
}
.days-toggle .dd-arrow {
  display: inline-block;
  font-size: 10px;
  transition: transform .15s;
}
.days-toggle.open .dd-arrow { transform: rotate(180deg); }
.days-toggle:hover { opacity: .8; }
.days-detail {
  margin: 6px 0 2px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 8px;
}
.dd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-2);
  padding: 4px 0;
}
.dd-row + .dd-row { border-top: 1px dashed var(--border-light, #F3F4F6); }
.dd-date { font-weight: 600; }
.dd-meta { color: var(--text-3); }

/* ===== 评价卡片 ===== */
.eval-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
}

.eval-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.eval-card-name {
  flex: 1;
}

.eval-card-name .n {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.eval-card-name .s {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 1px;
}

.score-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.score-badge.high { background: var(--teal-bg); color: var(--success); }
.score-badge.mid { background: var(--primary-bg); color: var(--primary); }
.score-badge.low { background: var(--rose-bg); color: var(--danger); }

.eval-comment {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius-xs);
  margin-top: 8px;
}

.dim-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.dim-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

/* ===== 教师评价卡片 ===== */
.te-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
}

.te-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.te-card-info { flex: 1; }

.te-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.te-card-meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.te-card-badge {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--violet-bg);
  color: var(--violet);
}

.te-card-content {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius-xs);
  margin-top: 8px;
}

.te-card-images {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.te-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-xs);
  cursor: pointer;
  border: 1px solid var(--border-light);
}

/* ===== 筛选标签 ===== */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-tab {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  transition: all 0.15s;
}

.filter-tab:hover { border-color: var(--primary-light); }

.filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== 星星 ===== */
.stars {
  display: inline-flex;
  gap: 2px;
}

.star {
  color: var(--border);
  font-size: 14px;
}

.star.active { color: #F59E0B; }
.star.half { color: #F59E0B; opacity: 0.5; }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.empty-text {
  color: var(--text-3);
  font-size: 14px;
}

/* ===== 登录页 ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1E293B 0%, #1A3A5C 50%, #1E40AF 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
}

.login-page::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,252,0.1) 0%, transparent 70%);
}

.login-card {
  width: 420px;
  max-width: 90vw;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  padding: 40px;
  position: relative;
  z-index: 1;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 16px;
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-3);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.login-input {
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0 14px;
  font-size: 14px;
  color: var(--text-1);
  outline: none;
  transition: border-color 0.15s;
  background: var(--bg);
}

.login-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

.login-submit {
  height: 44px;
  border: none;
  border-radius: var(--radius-xs);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 4px;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,86,219,0.3);
}

.login-submit:active { transform: translateY(0); }

.login-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 4px;
}

.login-options {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.login-opt-btn {
  flex: 1;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--card);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.login-opt-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

/* ===== 表单 ===== */
.form-row {
  margin-bottom: 16px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  display: block;
}

.form-input, .form-select {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  background: var(--card);
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

.form-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.form-tip {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}
.form-tip-inline {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 400;
}

/* 服务时长 · 类型卡片（成长陪伴 / 课业提升） */
.hours-type-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hours-type-card {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  background: var(--surface);
  transition: all .15s;
}
.hours-type-card input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}
.hours-type-card:has(input[type="radio"]:checked) {
  border-color: var(--primary);
  background: rgba(64,158,255,.06);
}
.hours-type-body { flex: 1; }
.hours-type-title { font-size: 14px; font-weight: 700; color: var(--text-1); }
.hours-type-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.hours-chip-bonus {
  background: rgba(82,196,26,.08);
  color: #237804;
  border-color: rgba(82,196,26,.25);
}
.hours-mute { color: var(--text-3); font-size: 12px; }

/* 服务时长 */
.hours-chip {
  display: inline-block;
  padding: 6px 12px;
  background: #F0F7FF;
  border: 1px solid #D6E9FF;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
}
.hours-chip b { color: var(--primary); font-size: 14px; }
.hours-chip b.hours-warn, .hours-warn { color: #E11D48 !important; font-weight: 700; }

.btn {
  padding: 8px 20px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: var(--card);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--bg); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 4px;
}

/* ===== 课表 ===== */
.sched-table {
  width: 100%;
  border-collapse: collapse;
}

.sched-table th {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-align: left;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
}

.sched-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.sched-table tr:hover td { background: var(--bg); }

/* ===== Chip 选择器 ===== */
.chip-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  transition: all 0.15s;
  user-select: none;
}

.chip:hover { border-color: var(--primary-light); }

.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== 人员管理 ===== */
.manage-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.manage-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.manage-tab:hover { color: var(--text-1); }

.manage-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.manage-tab-count {
  background: var(--border-light);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

.person-row:last-child { border-bottom: none; }

.person-info { flex: 1; }

.person-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.person-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 1px;
}

.person-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.icon-btn:hover { background: var(--bg); }
.icon-btn.danger:hover { background: var(--rose-bg); border-color: var(--rose); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-overlay.show { display: flex; }

.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  width: 420px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ===== 图片查看器 ===== */
.img-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.img-viewer.show { display: flex; }

.img-viewer img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-sm);
}

.img-viewer-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.img-viewer-prev, .img-viewer-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  opacity: 0.7;
  user-select: none;
}

.img-viewer-prev { left: 20px; }
.img-viewer-next { right: 20px; }
.img-viewer-prev:hover, .img-viewer-next:hover { opacity: 1; }

.img-viewer-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  opacity: 0.7;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #1E293B;
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  z-index: 999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-icon {
  margin-right: 6px;
  font-weight: bold;
}

/* ===== 工具类 ===== */
.mb-0 { margin-bottom: 0 !important; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .stat-grid { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .te-card-images { grid-template-columns: repeat(3, 1fr); }
}

/* ===== 成长顾问管理 ===== */
.advisor-stats-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  margin-bottom: 16px;
}
.advisor-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.advisor-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}
.advisor-stat-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.advisor-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-1);
}
.advisor-stat-label {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
}
.advisor-stat-sep {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* 可点击的 stat 卡片 */
.advisor-stat-item-clickable {
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: background 0.15s, transform 0.1s;
  user-select: none;
}
.advisor-stat-item-clickable:hover {
  background: #FFF7ED;
}
.advisor-stat-item-clickable:active {
  transform: scale(0.97);
  background: #FED7AA;
}

/* 未分配学员名册弹窗 */
.unassigned-list {
  max-height: 60vh;
  overflow-y: auto;
}
.unassigned-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
}
.unassigned-row:last-child {
  border-bottom: none;
}
.unassigned-row:hover {
  background: #FAFAFA;
}
.unassigned-info {
  flex: 1;
  min-width: 0;
}
.unassigned-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}
.unassigned-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}
.unassigned-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.unassigned-select {
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text-1);
  min-width: 110px;
  cursor: pointer;
}
.unassigned-select:focus {
  outline: 2px solid #FED7AA;
  outline-offset: -1px;
}
.unassigned-actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 数据体检弹窗 */
.health-dup-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}
.health-dup-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 12px;
  border-bottom: 1px solid #F3F4F6;
  background: #fff;
}
.health-dup-row:last-child {
  border-bottom: none;
}
.health-dup-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
}
.health-dup-sub {
  font-size: 11px;
  color: var(--text-3);
}

.btn-sm {
  font-size: 13px;
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: #FEE2E2; color: var(--danger); }
.btn-danger:hover { background: #FECACA; }
.form-input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}
.form-input:focus { border-color: var(--primary); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 8px 10px;
  background: var(--border-light);
  color: var(--text-3);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-1);
}
.data-table td svg { vertical-align: middle; }

.dim-bar-list { display: flex; flex-direction: column; gap: 6px; }
.dim-bar-item {}
.dim-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 2px;
}
.dim-bar-head .label { color: var(--text-2); }
.dim-bar-head .val { font-weight: 600; color: var(--text-1); }
.dim-bar-track {
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}
.dim-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.dim-bar-fill.high { background: var(--success); }
.dim-bar-fill.mid { background: var(--primary); }
.dim-bar-fill.low { background: var(--danger); }

/* ============ 排课视图切换器 ============ */
.sched-view-switcher {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sched-view-tab {
  padding: 8px 16px;
  background: #f3f4f6;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #4b5563;
  transition: all 0.2s;
  user-select: none;
}
.sched-view-tab:hover {
  background: #e5e7eb;
  color: #1f2937;
}
.sched-view-tab.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(124,92,252,0.3);
}

/* ============ 排课日历视图 ============ */
.cal-toolbar {
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.cal-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.cal-school {
  font-size: 18px;
  font-weight: 700;
  color: #1e40af;
}
.cal-range {
  font-size: 17px;
  font-weight: 600;
  color: #1e3a8a;
}
.cal-year {
  font-size: 13px;
  color: #6b7280;
}
.cal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cal-room-filter {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #c7d2fe;
  background: white;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  outline: none;
}
.cal-room-filter:focus {
  border-color: var(--primary);
}
.cal-week-btn {
  padding: 6px 14px;
  border-radius: 6px;
  background: white;
  border: 1px solid #c7d2fe;
  color: #4338ca;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.cal-week-btn:hover {
  background: #eef2ff;
  border-color: var(--primary);
  color: var(--primary);
}

.cal-wrap {
  overflow-x: auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.cal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  table-layout: fixed;
}
.cal-th-room {
  width: 130px;
  background: #f9fafb;
  padding: 12px;
  text-align: center;
  font-weight: 600;
  color: #6b7280;
  font-size: 13px;
  border-right: 1px solid #e5e7eb;
  border-bottom: 2px solid #c7d2fe;
}
.cal-th-day {
  background: #f9fafb;
  padding: 8px 4px;
  text-align: center;
  border-bottom: 2px solid #c7d2fe;
  font-weight: 500;
}
.cal-th-weekend {
  background: #fef2f2;
}
.cal-th-today {
  background: #fef3c7 !important;
}
.cal-th-dayname {
  font-size: 13px;
  color: #4b5563;
  font-weight: 600;
}
.cal-th-daydate {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}
.cal-td {
  background: #fefce8;
  border: 1px solid #fde68a;
  padding: 6px;
  vertical-align: top;
  height: 110px;
  position: relative;
}
.cal-td-today {
  background: #fef9c3 !important;
}
.cal-td-weekend {
  background: #fefce8;
}
.cal-empty-cell {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 空白格可点击的"添加课程"入口（校长/顾问端 onAddSession 提供时启用） */
.cal-add-cell {
  height: 90px;
  margin: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px dashed #c8d2dc;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.cal-add-cell:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
  border-style: solid;
}
.cal-add-cell-plus {
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}
.cal-td-room {
  background: #fff7ed;
  padding: 12px;
  text-align: center;
  font-weight: 700;
  color: #9a3412;
  font-size: 14px;
  border-right: 2px solid #fed7aa;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}
.cal-card {
  background: white;
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 6px;
  border-left: 3px solid #f59e0b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  font-size: 12px;
  line-height: 1.4;
}
.cal-card:last-child {
  margin-bottom: 0;
}
.cal-card-line1 {
  font-weight: 700;
  color: #92400e;
  font-size: 12px;
}
.cal-card-line2 {
  color: #6b7280;
  font-size: 12px;
}
.cal-card-line3 {
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}
.cal-card-type {
  display: inline-block;
  margin-top: 3px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}
.cal-card-type-class {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}
.cal-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
  font-size: 14px;
}
.cal-legend {
  margin-top: 12px;
  padding: 10px 14px;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 12px;
  color: #6b7280;
  border-left: 3px solid #c7d2fe;
}

/* ===== 取消课程样式 ===== */
.cancelled-row td {
  text-decoration: line-through;
  color: #9ca3af !important;
  opacity: 0.7;
}
.btn-warning {
  background: #f59e0b;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  margin-right: 4px;
}
.btn-warning:hover {
  background: #d97706;
}
.cal-card-cancelled {
  opacity: 0.55;
  text-decoration: line-through;
}
.cal-card-cancel-badge {
  display: inline-block;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-bottom: 2px;
}

/* ===== 课程卡片编辑（共享日历组件） ===== */
.cal-card-edit { position: relative; cursor: pointer; }
.cal-card-edit .cal-card-line1 { padding-right: 46px; }
.cal-card-edit-icon {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 11px;
  opacity: 0.55;
  transition: opacity 0.15s ease;
  cursor: pointer;
  user-select: none;
}
.cal-card-add-icon {
  position: absolute;
  top: 4px;
  right: 24px;
  font-size: 12px;
  opacity: 0.55;
  transition: opacity 0.15s ease;
  cursor: pointer;
  user-select: none;
  color: #389e0d;
  font-weight: bold;
}
.cal-card-edit:hover .cal-card-edit-icon { opacity: 1; }
.cal-card-edit:hover .cal-card-add-icon { opacity: 1; }
.cal-card-edit-icon:hover { opacity: 1 !important; }
.cal-card-add-icon:hover { opacity: 1 !important; color: #237804; }
/* 合并卡片：多学生（班课/workshop）的人数徽章 */
.cal-card-group-badge {
  display: inline-block;
  background: #fff3e0;
  color: #d46b08;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 4px;
  font-weight: 500;
}

/* 班课学生管理弹窗 */
.sched-edit-group-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.sched-edit-group-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.sched-edit-group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: var(--bg-soft, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 10px;
}
.sched-edit-group-name { font-weight: 600; }
.sched-edit-tip {
  font-size: 12px;
  color: var(--text-2, #64748b);
  background: var(--primary-bg, #eff6ff);
  border-radius: 8px;
  padding: 8px 12px;
  line-height: 1.6;
}

/* ===== 课程编辑弹窗 ===== */
.sched-edit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}
.sched-edit-modal {
  background: #fff;
  border-radius: 14px;
  width: 580px;
  max-width: 94vw;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  animation: schedEditIn 0.18s ease;
}
@keyframes schedEditIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.sched-edit-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eef0f3;
}
.sched-edit-title { font-size: 16px; font-weight: 700; }
.sched-edit-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #9aa3af;
  padding: 4px 6px;
}
.sched-edit-close:hover { color: #e11d48; }
.sched-edit-body { padding: 18px 20px; }
.sched-edit-field { margin-bottom: 16px; }
.sched-edit-field:last-child { margin-bottom: 4px; }
.sched-edit-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  display: block;
}
.sched-edit-hint {
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
  margin-left: 8px;
}
.sched-edit-hint b {
  color: #2563eb;
  font-weight: 700;
  font-size: 13px;
}
.sched-edit-body .chip-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.sched-edit-body .chip em {
  font-style: normal;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
  margin-left: 4px;
}
.sched-edit-foot {
  padding: 14px 20px;
  border-top: 1px solid #eef0f3;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ===== 添加账号弹窗（角色选择） ===== */
.aa-modal { width: 560px; }
.aa-role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.aa-role-card {
  border: 1.5px solid #e5e9f0;
  border-radius: 12px;
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #fbfcfe;
}
.aa-role-card:hover {
  border-color: var(--primary, #1a56db);
  background: #f0f5ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 86, 219, 0.12);
}
.aa-role-icon { font-size: 30px; margin-bottom: 8px; }
.aa-role-label { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.aa-role-desc { font-size: 12px; color: var(--text-3, #6b7280); }
.aa-form { display: none; }


/* ============================================
   服务续费提醒（成长陪伴到期 / 课时不足）
   ============================================ */
.svc-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #FFF7ED 0%, #FEF3E7 100%);
  border: 1px solid #FCD9A8;
  border-left: 4px solid #F59E0B;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: box-shadow .18s ease, transform .18s ease;
}
.svc-alert:hover {
  box-shadow: 0 6px 18px rgba(245, 158, 11, .18);
  transform: translateY(-1px);
}
.svc-alert-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.svc-alert-main { flex: 1; min-width: 0; }
.svc-alert-title { font-size: 14.5px; font-weight: 700; color: #92400E; margin-bottom: 3px; }
.svc-alert-sub { font-size: 12.5px; color: #B45309; }
.svc-alert-more { font-size: 13px; font-weight: 600; color: #D97706; white-space: nowrap; flex-shrink: 0; }

.svc-alert-list { max-height: 62vh; overflow-y: auto; }
.svc-alert-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-light, #E5E7EB);
}
.svc-alert-row:last-child { border-bottom: none; }
.svc-alert-row:hover { background: #FAFAFA; }
.svc-alert-info { flex: 1; min-width: 0; }
.svc-alert-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1, #111827);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}
.svc-alert-detail {
  font-size: 12.5px;
  color: var(--text-3, #6B7280);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.svc-alert-detail b { color: var(--text-2, #4B5563); font-weight: 600; }
.svc-alert-meta { color: var(--text-3, #9CA3AF); font-size: 12px; }
.svc-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.svc-tag-expiry { background: #FEF3C7; color: #B45309; }
.svc-tag-hours { background: #FFE4E6; color: #BE123C; }

/* 生日提醒卡（粉色，与服务续费的琥珀色区分） */
.bd-alert {
  background: linear-gradient(135deg, #FFF5F8 0%, #FFEFF4 100%);
  border-color: #F9C6D8;
  border-left-color: #EC4899;
}
.bd-alert:hover { box-shadow: 0 6px 18px rgba(236, 72, 153, .16); }
.bd-alert .svc-alert-title { color: #9D174D; }
.bd-alert .svc-alert-sub { color: #BE185D; }
.bd-alert .svc-alert-more { color: #DB2777; }
.bd-row { background: #FFF8FA; }
.svc-tag.bd-tag { background: #FCE7F3; color: #BE185D; }

/* 顶栏提醒铃铛 */
.topbar-bell {
  position: relative;
  background: transparent;
  border: none;
  font-size: 18px;
  line-height: 1;
  padding: 6px 8px;
  margin-left: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
}
.topbar-bell:hover { background: var(--primary-bg, #EFF6FF); }
.topbar-bell.has-alert { animation: bell-shake 2.6s ease-in-out infinite; }
.bell-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: #DC2626;
  color: #fff;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
@keyframes bell-shake {
  0%, 88%, 100% { transform: rotate(0); }
  90% { transform: rotate(9deg); }
  92% { transform: rotate(-9deg); }
  94% { transform: rotate(7deg); }
  96% { transform: rotate(-5deg); }
  98% { transform: rotate(0); }
}

.svc-row-badge { background: #FEF3C7; color: #B45309; border: 1px solid #FCD9A8; }

/* ===== 统计看板 · 月份选择 ===== */
.stats-month-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  flex-wrap: wrap;
}
.stats-month-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1, #1F2937);
  padding: 0 4px;
}
.stats-month-hint {
  font-size: 12px;
  color: var(--text-3, #6B7280);
  margin-left: auto;
}

/* ===== 学生档案 ===== */
.avatar-md { width: 44px; height: 44px; font-size: 17px; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.overall-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--primary-bg, #EEF2FF);
  color: var(--primary, #1A56DB);
  font-size: 12px;
  font-weight: 700;
}
.profile-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.profile-search { max-width: 320px; }
.profile-count { font-size: 13px; color: var(--text-3, #6B7280); }
/* 顾问档案：角色筛选 + 双身份标记 */
.ap-filters { display: flex; gap: 8px; }
.ap-dual {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px;
  background: #FEF3C7; color: #B45309; font-size: 11px; font-weight: 600; vertical-align: middle;
}
.ap-hint { margin-top: 14px; font-size: 12px; color: var(--text-3, #6B7280); }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.profile-card { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.profile-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.10); transform: translateY(-2px); }
.profile-card-head { display: flex; align-items: center; gap: 12px; }
.profile-card-name { flex: 1; min-width: 0; }
.profile-card-name .name { font-size: 16px; font-weight: 700; color: var(--text-1, #1F2937); }
.profile-card-name .sub { font-size: 12px; color: var(--text-3, #6B7280); margin-top: 2px; }
.profile-card-stats { display: flex; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border, #E5E7EB); }
.pcs-item { flex: 1; text-align: center; min-width: 0; }
.pcs-item .v { font-size: 14px; font-weight: 700; color: var(--text-1, #1F2937); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcs-item .k { font-size: 11px; color: var(--text-3, #6B7280); margin-top: 2px; }
/* 顾问档案：指标点击展开明细 */
.pcs-click { cursor: pointer; border-radius: 6px; padding: 2px 0; user-select: none; }
.pcs-click:hover { background: var(--bg, #F9FAFB); }
.pcs-click.open .v { color: var(--primary); }
.apx-arrow { font-size: 9px; margin-left: 2px; color: var(--primary); }
.apx-detail {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bg, #F9FAFB);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.apx-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2, #4B5563);
  padding: 4px 0;
}
.apx-row + .apx-row { border-top: 1px dashed var(--border-light, #F3F4F6); }
.apx-date { font-weight: 600; color: var(--text-1, #1F2937); width: 88px; flex-shrink: 0; }
.apx-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apx-meta { color: var(--text-3, #6B7280); flex-shrink: 0; }
.apx-empty { text-align: center; font-size: 12px; color: var(--text-3, #6B7280); padding: 6px 0; }
.profile-back { margin-bottom: 16px; }
.profile-detail-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pdh-main { flex: 1; min-width: 180px; }
.pdh-name { font-size: 22px; font-weight: 800; color: var(--text-1, #1F2937); }
.pdh-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pdh-tag {
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--bg-2, #F3F4F6);
  color: var(--text-2, #4B5563);
  font-size: 12px;
}
.pdh-hours { min-width: 220px; text-align: right; }
.pdh-hours-num { font-size: 30px; font-weight: 800; color: var(--primary, #1A56DB); line-height: 1.1; }
.pdh-hours-num span { font-size: 14px; font-weight: 600; margin-left: 2px; }
.pdh-hours-label { font-size: 11px; color: var(--text-3, #6B7280); margin: 2px 0 6px; }
.pdh-hours-bar { height: 6px; }
.pdh-dims { display: flex; flex-direction: column; gap: 8px; }
.pdh-dim { display: flex; align-items: center; gap: 10px; }
.pdh-dim .label { width: 64px; font-size: 13px; color: var(--text-2, #4B5563); flex-shrink: 0; }
.pdh-dim .val { width: 32px; text-align: right; font-size: 13px; font-weight: 700; color: var(--text-1, #1F2937); }
.pc-course { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--border, #E5E7EB); }
.pc-course:first-child { border-top: none; padding-top: 0; }
.pc-course-main { flex: 1; min-width: 0; }
.pc-course-time { display: block; font-size: 14px; font-weight: 600; color: var(--text-1, #1F2937); }
.pc-course-sub { display: block; font-size: 12px; color: var(--text-3, #6B7280); margin-top: 2px; }
.pc-course-cancelled .pc-course-time, .pc-course-cancelled .pc-course-sub { text-decoration: line-through; opacity: .55; }
.pc-report { padding: 14px 0; border-top: 1px dashed var(--border, #E5E7EB); }
.pc-report:first-child { border-top: none; padding-top: 0; }
.pc-report-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pc-report-month { font-size: 14px; font-weight: 700; color: var(--text-1, #1F2937); }
.pc-report-adv { font-size: 13px; color: var(--text-3, #6B7280); }
.pc-report-content {
  font-size: 13px;
  color: var(--text-2, #4B5563);
  line-height: 1.7;
  background: var(--bg-2, #F9FAFB);
  border-radius: 8px;
  padding: 10px 12px;
}
.pc-report-dims { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; }

/* ===== 签到明细 · 按老师分组折叠 ===== */
.ck-group { border-top: 1px solid var(--border, #E5E7EB); }
.ck-group:first-of-type { border-top: none; }
.ck-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background .12s;
}
.ck-head:hover { background: var(--bg-2, #F9FAFB); }
.ck-name { font-size: 15px; font-weight: 700; color: var(--text-1, #1F2937); }
.ck-subject { font-size: 12px; color: var(--text-3, #6B7280); }
.ck-head-right { display: flex; align-items: center; gap: 10px; }
.ck-count { font-size: 13px; color: var(--text-3, #6B7280); }
.ck-chevron { font-size: 13px; color: var(--text-3, #6B7280); width: 14px; text-align: center; }
.ck-body { padding: 4px 16px 14px 48px; }
.ck-week-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2, #4B5563);
  margin: 10px 0 4px;
  padding: 4px 10px;
  background: var(--bg-2, #F3F4F6);
  border-radius: 6px;
  display: inline-block;
}
.ck-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border, #E5E7EB);
  flex-wrap: wrap;
}
.ck-row:last-child { border-bottom: none; }
.ck-date { font-size: 13px; font-weight: 600; color: var(--text-1, #1F2937); width: 88px; flex-shrink: 0; }
.ck-time { font-size: 13px; color: var(--text-2, #4B5563); width: 100px; flex-shrink: 0; }
.ck-student { font-size: 13px; color: var(--text-1, #1F2937); min-width: 90px; }
.ck-room { font-size: 12px; color: var(--text-3, #6B7280); }
.ck-row-cancelled .ck-date, .ck-row-cancelled .ck-time, .ck-row-cancelled .ck-student { text-decoration: line-through; opacity: .55; }
