/* ===== 护卡小象培训中心 - 超级站长班管理平台 v1.0 样式 ===== */

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #dbeafe;
  --success: #22c55e;
  --success-light: #dcfce7;
  --warning: #eab308;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #06b6d4;
  --info-light: #cffafe;
  --purple: #8b5cf6;
  --purple-light: #ede9fe;
  --orange: #f97316;
  --orange-light: #ffedd5;
  --gray: #6b7280;
  --gray-light: #f3f4f6;
  --dark: #1e293b;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --sidebar-w: 240px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
}

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

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

.hidden { display: none !important; }

/* ===== 登录页 ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  /* margin:auto 让「矮卡片」垂直居中；「高卡片」（申请表单）自动贴顶、随页面滚动，
     不会被 align-items:center 把顶部推到视口外 */
  margin: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo i {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 12px;
}
.login-logo h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
}
.login-logo p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.login-input-wrap i {
  position: absolute;
  left: 16px;
  color: var(--gray);
  font-size: 16px;
}
.login-input-wrap input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: border-color var(--transition);
  outline: none;
}
.login-input-wrap input:focus { border-color: var(--primary); }
.login-btn {
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.login-btn:hover { background: var(--primary-dark); }
.login-roles {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.role-quick {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.role-quick:hover { border-color: var(--primary); background: var(--primary-light); }
.role-quick i { font-size: 20px; color: var(--primary); margin-bottom: 4px; display: block; }
.role-quick span { font-size: 12px; color: var(--text-secondary); }

/* ===== 主应用布局 ===== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar-header {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-header i { font-size: 28px; color: var(--primary); }
.sidebar-title { font-size: 16px; font-weight: 700; }
.sidebar-subtitle { font-size: 12px; color: rgba(255,255,255,0.5); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.nav-group-title {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  padding: 12px 12px 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.nav-group-toggle:hover { color: rgba(255,255,255,0.85) !important; }
.nav-group-body { max-height: 1000px; overflow: hidden; transition: max-height 0.3s ease; }
.nav-group-body.collapsed { max-height: 0 !important; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  transition: all var(--transition);
  margin-bottom: 2px;
  font-size: 14px;
}
.nav-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item i { width: 20px; text-align: center; font-size: 15px; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}
.logout-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.logout-btn:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
}
.topbar h2 { font-size: 18px; font-weight: 600; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-date { font-size: 13px; color: var(--text-secondary); }

.page-container {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.page-container > * { margin-left: 0 !important; margin-right: 0 !important; }

/* ===== 统计卡片 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--orange-light); color: var(--orange); }
.stat-icon.purple { background: var(--purple-light); color: var(--purple); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.cyan { background: var(--info-light); color: var(--info); }
.stat-value { font-size: 28px; font-weight: 700; }
.stat-label { font-size: 13px; color: var(--text-secondary); }

/* ===== 人员卡片 ===== */
.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title i { color: var(--primary); }

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  transition: all var(--transition);
}
.filter-chip:hover { border-color: var(--primary); }
.filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.sort-bar {
  display:flex; align-items:center; flex-wrap:wrap; gap:8px;
  margin: 0 0 16px 0; padding: 10px 14px; background: #f8fafc;
  border-radius: 10px; border: 1px solid var(--border);
}
.sort-bar-label { font-size:13px; color: var(--text-secondary); display:inline-flex; align-items:center; gap:6px; }
.sort-chip {
  display:inline-flex; align-items:center; gap:5px;
  padding: 5px 12px; background: #fff;
  border: 1px solid var(--border); border-radius: 18px;
  font-size: 12px; cursor: pointer; transition: all 0.15s;
  color: var(--text-secondary);
}
.sort-chip:hover { border-color: var(--primary); color: var(--primary); }
.sort-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.person-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.person-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.person-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.person-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.person-name { font-size: 16px; font-weight: 600; }
.person-meta { font-size: 12px; color: var(--text-secondary); }
.person-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.tag-blue { background: var(--primary-light); color: var(--primary-dark); }
.tag-green { background: var(--success-light); color: #15803d; }
.tag-orange { background: var(--orange-light); color: #c2410c; }
.tag-purple { background: var(--purple-light); color: #6d28d9; }
.tag-red { background: var(--danger-light); color: #b91c1c; }
.tag-gray { background: var(--gray-light); color: var(--gray); }
.tag-cyan { background: var(--info-light); color: #0e7490; }

.progress-bar {
  height: 8px;
  background: var(--gray-light);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.view-detail-btn {
  color: var(--orange);
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
  transition: transform var(--transition);
}
.view-detail-btn:hover { transform: translateX(2px); }

/* 学员卡片 - 状态修改按钮（常驻右上） */
.person-status-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  cursor: pointer;
  background: rgba(59,130,246,0.1);
  color: var(--primary);
  transition: all 0.15s;
  margin-left: 6px;
}
.person-status-edit:hover {
  background: var(--primary);
  color: #fff;
}

/* 状态选择器弹窗 */
.status-picker {
  position: fixed;
  z-index: 1000;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  padding: 6px;
  min-width: 140px;
  border: 1px solid var(--border);
}
.status-picker-item {
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.1s;
}
.status-picker-item:hover { background: var(--gray-light); }
.status-picker-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.status-picker-item .dot {
  width: 8px; height: 8px; border-radius: 50%;
}

/* 接待记录卡片增强 */
.reception-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: start;
}
.reception-card .person-avatar {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 600;
}
.reception-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
  font-size: 13px;
  margin-top: 8px;
}
.reception-info-grid .label { color: var(--text-secondary); font-size: 12px; }
.reception-info-grid .value { color: var(--text); font-weight: 500; margin-top: 2px; }
.reception-fee-summary {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
}
.reception-fee-summary .fee-item {
  display: flex; align-items: center; gap: 4px;
}
.reception-fee-summary .fee-label { color: var(--text-secondary); }
.reception-fee-summary .fee-value { font-weight: 700; color: var(--text); }
.reception-fee-summary .fee-pending { color: var(--danger); }
.reception-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

/* 课程规划编辑 */
.phase-card .phase-edit-btn {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(255,255,255,0.25);
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.phase-card { position: relative; }

/* 通用行内小图标按钮 */
.row-icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  width: 24px; height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 4px;
  transition: all 0.15s;
}
.row-icon-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.row-icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); background: rgba(239,68,68,0.1); }

.add-icon-btn {
  background: transparent;
  border: 1px dashed var(--primary);
  color: var(--primary);
  width: 24px; height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
  transition: all 0.15s;
}
.add-icon-btn:hover { background: var(--primary); color: #fff; }

.course-delete-link {
  position: absolute;
  bottom: 10px; right: 14px;
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  text-decoration: underline;
  text-decoration-style: dotted;
  opacity: 0.6;
}
.course-delete-link:hover { opacity: 1; }

.add-course-btn {
  margin-top: 10px;
  padding: 8px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  text-align: center;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}
.add-course-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ===== 阶段内容模块（新） ===== */
.phase-modules-block { margin-top: 12px; }
.phase-courses-block { margin-top: 14px; }
.phase-modules-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-secondary); font-weight: 600;
  margin-bottom: 8px;
}
.phase-module-list { display: flex; flex-direction: column; gap: 6px; }
.phase-module-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--gray-light);
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.15s;
  flex-wrap: nowrap;
}
.phase-module-row:hover { background: rgba(59,130,246,0.06); }
.phase-module-row > .pmr-name {
  flex: 0 1 auto; min-width: 0;
  word-break: break-word;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phase-module-row > .pmr-actions {
  display: inline-flex; align-items: center; gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.phase-module-hours {
  display: inline-block;
  padding: 1px 6px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
}

/* ===== 课程行 + 学员列表 ===== */
.course-row {
  background: var(--gray-light);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.course-row-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.course-row-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.course-id-badge {
  display: inline-block;
  padding: 2px 7px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.course-name-text { font-weight: 600; font-size: 13px; }
.course-hours-tag {
  display: inline-block;
  padding: 1px 6px;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
}
.course-row-meta {
  display: flex; gap: 12px;
  font-size: 11px; color: var(--text-secondary);
  margin-top: 4px;
}
.course-row-meta i { opacity: 0.7; margin-right: 2px; }

/* 学员进度列表 */
.course-students { padding: 8px 12px 10px; }
.course-students-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--text-secondary); font-weight: 600;
  margin-bottom: 6px;
}
.course-students-empty {
  text-align: center;
  padding: 12px;
  color: var(--text-secondary);
  font-size: 12px;
  background: rgba(0,0,0,0.02);
  border-radius: 6px;
}
.course-students-list { display: flex; flex-direction: column; gap: 4px; }
.course-student-row {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  transition: all 0.15s;
}
.course-student-row:hover { border-color: var(--primary); background: var(--primary-light); }

.avatar-circle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.csr-name {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.csr-name:hover { color: var(--primary); }
.csr-status-select {
  padding: 3px 6px;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.csr-score-input {
  width: 52px;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  text-align: center;
  outline: none;
}
.csr-score-input:focus { border-color: var(--primary); }
.csr-grade {
  font-size: 11px;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}
.csr-date-input {
  width: 70px;
  padding: 3px 4px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: none;
  color: var(--text-secondary);
}
.csr-date-input:focus { border-color: var(--primary); }
.csr-retake-input {
  width: 42px;
  padding: 3px 4px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: none;
  text-align: center;
}
.csr-retake-input:focus { border-color: var(--primary); }

/* 考试通过审核流徽章 */
.exam-pass-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.exam-pass-badge.pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.exam-pass-badge.approved {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

/* 选学员弹窗 */
.student-pick-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}
.student-pick-row:last-child { border-bottom: none; }
.student-pick-row:hover { background: var(--primary-light); }
.student-pick-row input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

/* 课程详情行内编辑 */
.phase-course-row { display: flex; align-items: center; justify-content: space-between; }

/* 工具栏 - 新建按钮 */
.page-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.page-toolbar h2 { font-size: 18px; font-weight: 700; }

/* 头部按钮组 */
.header-actions { display: flex; gap: 8px; }

/* ===== 弹窗 ===== */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-content {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.student-modal-content { width: 900px; max-width: 95vw; }
.exam-modal-content { width: 720px; max-width: 95vw; }
.confirm-modal-content { width: 400px; max-width: 95vw; padding: 32px; text-align: center; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--gray);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.modal-close:hover { background: var(--gray-light); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1 1 auto; min-height: 0; max-height: calc(90vh - 120px); }

/* ===== 学员详情 ===== */
.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--gray-light);
  border-radius: var(--radius);
}
.detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}
.detail-name { font-size: 22px; font-weight: 700; }
.detail-meta { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

.detail-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}
.detail-tab {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all var(--transition);
}
.detail-tab:hover { color: var(--primary); }
.detail-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.info-label { font-size: 12px; color: var(--text-secondary); }
.info-value { font-size: 14px; font-weight: 500; }

/* ===== 成长计划表 ===== */
.gplan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.gplan-table th {
  background: var(--gray-light);
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  position: sticky;
  top: 0;
}
.gplan-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}
.gplan-table tr:hover { background: var(--gray-light); }
.gplan-status-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.gplan-action-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  transition: all var(--transition);
  margin-right: 4px;
}
.gplan-action-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.gplan-action-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.gplan-action-btn.success { background: var(--success); color: #fff; border-color: var(--success); }
.gplan-action-btn.warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.gplan-score-btn {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
}

/* ===== 流程任务树 ===== */
.flow-tree { display: flex; flex-direction: column; gap: 20px; }
.flow-phase {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.flow-phase-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background var(--transition);
}
.flow-phase-header:hover { background: var(--gray-light); }
.flow-phase-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}
.flow-phase-info { flex: 1 1 auto; min-width: 0; }
.flow-phase-name { font-size: 16px; font-weight: 600; }
.flow-phase-desc { font-size: 12px; color: var(--text-secondary); }
.flow-phase-progress {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.flow-progress-ring {
  width: 32px;
  height: 32px;
  position: relative;
}
.flow-phase-body { padding: 0 20px 16px; }
.flow-group { margin-bottom: 16px; }
.flow-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.flow-task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  cursor: pointer;
}
.flow-task:hover { background: var(--gray-light); }
.flow-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.flow-check.done {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.flow-check.pending {
  border-color: var(--warning);
  background: var(--warning-light);
}
.flow-task-name { flex: 1; font-size: 14px; }
.flow-task-name.done { text-decoration: line-through; color: var(--gray); }
.flow-task-meta { display: flex; gap: 8px; font-size: 12px; color: var(--text-secondary); }
.flow-task-owner {
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 4px;
  font-size: 11px;
}
.flow-task-deadline { color: var(--orange); font-size: 11px; }
.flow-task-verify { color: var(--purple); font-size: 11px; }

/* ===== 课程规划 ===== */
.phase-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== 项目卡片（多个阶段归到同一项目） ===== */
.project-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #7dd3fc;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.project-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
}
.project-card-header.project-color-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.project-card-header.project-color-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.project-card-header.project-color-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.project-card-header.project-color-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.project-card-header.project-color-red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.project-card-header.project-color-teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.project-card-header.project-color-yellow { background: linear-gradient(135deg, #eab308, #ca8a04); color: #1e293b; }
.project-card-header.project-color-pink { background: linear-gradient(135deg, #ec4899, #db2777); }
.project-card-header i { font-size: 16px; }
.project-title { font-size: 16px; font-weight: 800; letter-spacing: 0.5px; }
.project-meta {
  font-size: 12px;
  font-weight: 600;
  opacity: .95;
  background: rgba(255,255,255,.22);
  padding: 3px 12px;
  border-radius: 12px;
}
.project-card-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  max-height: 50000px;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
  opacity: 1;
}
.project-card.collapsed .project-card-body { max-height: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; opacity: 0; }
.project-card-header:hover { filter: brightness(1.05); }
.project-card-body .phase-card { width: 100%; margin: 0; }
body.display-mode .project-card { background: #0f172a; border-color: #155e75; }
.phase-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  width: 100%;
}
.phase-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.phase-card-header {
  padding: 16px 20px;
  color: #fff;
}
.phase-card-header.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.phase-card-header.orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.phase-card-header.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.phase-card-header.red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.phase-card-header.green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.phase-card-header.teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.phase-card-name { font-size: 18px; font-weight: 700; }
.phase-card-duration { font-size: 12px; opacity: 0.9; margin-top: 2px; }
.phase-card-body { padding: 16px 20px; }
.phase-card-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.phase-card-modules { display: flex; flex-direction: column; gap: 6px; }
.phase-module {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 8px;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
}

/* ===== 班规 ===== */
.rules-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.rules-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--primary-dark);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}
.rule-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.rule-item:last-child { border-bottom: none; }
.rule-item-title { font-weight: 600; min-width: 120px; font-size: 13px; }
.rule-item-detail { color: var(--text-secondary); font-size: 13px; flex: 1; }

/* ===== 讲课记录 ===== */
.lecture-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.lecture-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}
.lecture-date {
  background: var(--primary);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}
.lecture-title { font-size: 16px; font-weight: 600; }
.lecture-records { display: flex; flex-direction: column; gap: 8px; }
.lecture-record {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  gap: 12px;
  padding: 10px 12px;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  align-items: center;
}
.lecture-record .lr-student { font-weight: 600; }
.lecture-record .lr-topic { color: var(--primary-dark); }
.lecture-record .lr-homework { color: var(--text-secondary); }

/* ===== 物资管理 ===== */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.material-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
}
.material-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* ===== 待办 ===== */
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.todo-check {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.todo-check.done { background: var(--success); border-color: var(--success); color: #fff; }
.todo-text { flex: 1; font-size: 14px; }
.todo-text.done { text-decoration: line-through; color: var(--gray); }
.todo-priority { font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.todo-priority.high { background: var(--danger-light); color: var(--danger); }
.todo-priority.medium { background: var(--warning-light); color: #b45309; }
.todo-priority.low { background: var(--gray-light); color: var(--gray); }
.todo-due { font-size: 12px; color: var(--text-secondary); }

/* ===== 接待 ===== */
.reception-list { display: flex; flex-direction: column; gap: 12px; }
.reception-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

/* ===== 展示看板（暗色） ===== */
body.display-mode {
  background: #0f172a;
  color: #e2e8f0;
}
body.display-mode .sidebar { background: #1e293b; }
body.display-mode .topbar { background: #1e293b; border-color: #334155; }
body.display-mode .topbar h2 { color: #f1f5f9; }
body.display-mode .stat-card { background: #1e293b; }
body.display-mode .stat-label { color: #94a3b8; }
body.display-mode .person-card { background: #1e293b; }
body.display-mode .person-name { color: #f1f5f9; }
body.display-mode .person-meta { color: #94a3b8; }
body.display-mode .phase-card { background: #1e293b; }
body.display-mode .flow-phase { background: #1e293b; }
body.display-mode .modal-content { background: #1e293b; color: #e2e8f0; }
body.display-mode .modal-header { border-color: #334155; }
body.display-mode .info-value { color: #f1f5f9; }
body.display-mode .info-label { color: #94a3b8; }

.display-hero {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 24px;
}
.display-hero h1 {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.display-hero p { font-size: 16px; color: #94a3b8; }

/* ===== 技能雷达 ===== */
.radar-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.radar-canvas-wrap {
  max-width: 400px;
  margin: 0 auto;
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  /* 基础：防止 iOS 字体异常缩放 + 禁止横向溢出 */
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  html, body { overflow-x: hidden; max-width: 100%; }
  body { font-size: 15px; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .page-container { padding: 12px; max-width: 100%; width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .people-grid { grid-template-columns: 1fr; gap: 12px; }
  .student-modal-content { width: 96vw; max-height: calc(100dvh - 24px); border-radius: 12px; }
  .gplan-table { font-size: 12px; }
  .gplan-table th, .gplan-table td { padding: 6px 4px; }
  .lecture-record { grid-template-columns: 1fr; gap: 4px; }
  /* ===== 管理端移动端适配 ===== */
  /* 顶栏：紧凑但不挤压 */
  .topbar { height: auto; min-height: 50px; padding: 8px 10px; gap: 8px; flex-wrap: wrap; }
  .topbar h2, #pageTitle { font-size: 16px; }
  .topbar-right { gap: 6px; }
  .topbar-date { font-size: 11px; }
  /* 页面标题栏 */
  .page-toolbar h2 { font-size: 17px; }
  .page-toolbar { flex-wrap: wrap; gap: 8px; padding: 12px 0; }
  .page-toolbar .btn { padding: 9px 14px; font-size: 13px; min-height: 40px; }
  /* 大课卡片 */
  .project-card-header { padding: 12px 14px; gap: 6px; flex-wrap: wrap; }
  .project-card-header .project-title { font-size: 15px; }
  .project-card-header .project-meta { font-size: 11px; }
  .project-card-header button { padding: 7px 10px !important; font-size: 12px !important; min-height: 34px; }
  .project-card-header > div[style*="margin-left:auto"] { flex-wrap: wrap; gap: 5px; }
  .project-card-body { padding: 10px; }
  /* 阶段卡片 */
  .phase-card-header { padding: 11px 12px !important; flex-wrap: wrap; gap: 6px; min-height: 46px; }
  .phase-card-name { font-size: 15px !important; }
  .phase-card-duration { font-size: 12px !important; }
  .phase-card-body { padding: 10px !important; }
  /* 课程内容行：加大触摸区 */
  .phase-module-row { flex-wrap: wrap; padding: 10px 10px; gap: 8px; }
  .phase-module-row .pmr-name { flex: 1 1 100%; order: 2; font-size: 14px; }
  .phase-module-row .pmr-actions { order: 3; width: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
  .phase-module-row .pmr-actions button,
  .phase-module-row .pmr-actions i { min-height: 34px; padding: 6px 10px; font-size: 13px; }
  /* 矩阵表格横滚（只有它需要） */
  .completion-matrix-wrap, .hw-matrix-wrap, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .completion-matrix-wrap table, .hw-matrix-wrap table { min-width: 800px; }
  .stats-grid .stat-card { padding: 12px; }
  .stat-card .stat-value { font-size: 24px; }
  .nav-group-title { font-size: 12px; padding: 8px 12px 2px; }
  .nav-item { padding: 12px 14px; font-size: 15px; min-height: 46px; }
  /* 弹窗 */
  .modal-content { width: 96vw !important; max-height: 92vh !important; border-radius: 12px !important; }
  .exam-modal-content { width: 96vw; }
  .modal-header { padding: 14px 16px; }
  .modal-header h3 { font-size: 17px; }
  .modal-body { padding: 16px; }
  .form-input, .form-select, select.form-input { font-size: 16px; padding: 11px 12px; min-height: 44px; }
  .form-label { font-size: 13px; }
  .form-row { flex-direction: column; gap: 10px; }
  .form-row > .form-group { flex: 1 1 auto; min-width: 0; }
  /* 各块间距 */
  .phase-modules-block, .phase-courses-block, .phase-homework-block { margin-top: 10px; }
  /* 所有按钮触摸目标 */
  .btn { min-height: 40px; font-size: 14px; }
  /* ===== 流程任务树：防止阶段名被压成竖排 ===== */
  .flow-phase-header { flex-wrap: wrap; padding: 12px 14px; gap: 8px; }
  .flow-phase-info { flex: 1 1 150px; min-width: 0; }
  .flow-phase-name { font-size: 15px; word-break: break-word; }
  .flow-phase-desc { font-size: 12px; word-break: break-word; }
  .flow-phase-progress { margin-left: auto; font-size: 12px; }
  .flow-phase-actions { order: 10; width: 100%; justify-content: flex-end; margin-left: 0; }
  .flow-phase-icon { width: 32px; height: 32px; font-size: 14px; }
  /* 分组标题：允许按钮换行，名称不被压扁 */
  .flow-group-title { flex-wrap: wrap; gap: 6px; padding: 10px 12px; font-size: 14px; }
  .flow-group-actions { margin-left: auto; }
  /* 任务表：手机上精简列（隐藏同步/分类/负责人/截止/确认），只保留核心信息 */
  .flow-tasks-head { display: none; }
  .flow-task-row { grid-template-columns: 26px 26px 1fr 56px 56px; padding: 10px 8px; min-height: 46px; }
  .flow-task-row .row-sync, .flow-task-row .row-cat, .flow-task-row .row-owner,
  .flow-task-row .row-deadline, .flow-task-row .row-verify { display: none; }
  .flow-task-row > div { font-size: 14px; }
  .btn-add-task, .btn-add-group { min-height: 40px; font-size: 14px; }
  .flow-phase { margin-bottom: 10px; }
  /* sidebar 抽屉遮罩 */
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
  .sidebar.open ~ .sidebar-overlay { display: block; }
}
/* ===== 手机超小屏（微信内置浏览器等） ===== */
@media (max-width: 480px) {
  .page-container { padding: 8px; }
  .page-toolbar h2 { font-size: 16px; }
  .page-toolbar .btn { padding: 9px 12px; font-size: 13px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card .stat-value { font-size: 20px; }
  .stat-card .stat-label { font-size: 12px; }
  .project-card-header { padding: 10px 12px; }
  .project-card-header .project-title { font-size: 14px; }
  .project-card-header .project-meta { font-size: 10px; }
  .project-card-header button { font-size: 11px !important; padding: 6px 8px !important; }
  .phase-card-header { padding: 10px !important; }
  .phase-card-name { font-size: 14px !important; }
  .phase-module-row .pmr-actions button { padding: 6px 8px; font-size: 12px; }
  /* 弹窗：用动态视口高度，避免手机地址栏挤压导致顶部关闭按钮被顶出屏幕 */
  .modal { align-items: flex-start !important; padding: 8px; }
  .modal-content {
    width: 96vw !important;
    max-width: 96vw !important;
    height: auto !important;
    max-height: calc(100vh - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 12px !important;
    margin: 0 auto;
  }
  .modal-header { padding: 12px 14px; flex-shrink: 0; position: sticky; top: 0; z-index: 6; background: #fff; }
  .modal-body { padding: 14px; flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .modal-close { min-width: 44px; min-height: 44px; font-size: 24px; line-height: 1; }
  .exam-modal-content, .student-modal-content { width: 96vw !important; max-width: 96vw !important; }
  .topbar h2 { font-size: 15px; }
  .topbar-date { display: none; }
}

/* ===== 颜色辅助 ===== */
.bg-blue { background: var(--primary); }
.bg-green { background: var(--success); }
.bg-orange { background: var(--orange); }
.bg-purple { background: var(--purple); }
.bg-red { background: var(--danger); }
.bg-cyan { background: var(--info); }
.bg-gray { background: var(--gray); }
.bg-teal { background: #14b8a6; }

.text-blue { color: var(--primary); }
.text-green { color: var(--success); }
.text-orange { color: var(--orange); }
.text-red { color: var(--danger); }
.text-gray { color: var(--gray); }

/* ===== 按钮 ===== */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-size: 14px; }

/* ===== 考试录入表单 ===== */
.exam-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.form-input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}
.form-input:focus { border-color: var(--primary); }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > .form-group { flex: 1 1 220px; min-width: 220px; }

/* ===== 折叠/展开 ===== */
.collapse-toggle { cursor: pointer; user-select: none; transition: background 0.2s; border-radius: 4px; }
.collapse-toggle:hover { background: var(--gray-light); }
.collapse-toggle .chevron { display: inline-block; transition: transform 0.3s ease; font-size: 11px; margin-right: 4px; }
.collapse-toggle.collapsed .chevron { transform: rotate(-90deg); }
.collapsible { max-height: 5000px; overflow: hidden; transition: max-height 0.35s ease, opacity 0.25s ease; opacity: 1; }
.collapsible.collapsed { max-height: 0 !important; opacity: 0; }

/* 阶段卡片体折叠（点击阶段头部切换） */
.phase-card-body-collapsible { max-height: 6000px; overflow: hidden; transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease; opacity: 1; }
.phase-card-body-collapsible.collapsed { max-height: 0 !important; opacity: 0; padding-top: 0 !important; padding-bottom: 0 !important; }

/* ===== 考试文件夹徽章 ===== */
.exam-folder-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 12px; font-size: 12px;
  background: var(--gray-light); color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s; border: 1px solid transparent;
}
.exam-folder-badge:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.exam-folder-badge.has-files { background: #fef3c7; color: #92400e; }
.exam-folder-badge.has-files:hover { background: #fde68a; }

/* ===== 文件夹模态框 ===== */
.exam-folder-modal { display: flex; flex-direction: column; gap: 16px; }
.folder-info-bar { display: flex; gap: 16px; padding: 12px; background: var(--gray-light); border-radius: 8px; }
.folder-info-item { display: flex; flex-direction: column; gap: 2px; }
.folder-info-label { font-size: 11px; color: var(--text-secondary); }
.folder-info-value { font-size: 14px; font-weight: 600; }
.folder-create-box { padding: 16px; border: 2px dashed var(--border); border-radius: 8px; text-align: center; }
.empty-folder-hint { text-align: center; padding: 20px; color: var(--text-secondary); font-size: 14px; }
.folder-rename-row { display: flex; gap: 8px; }
.folder-files-section { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.folder-files-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--gray-light); font-size: 13px; font-weight: 600; }
.folder-files-list { max-height: 300px; overflow-y: auto; }
.folder-empty-files { padding: 24px; text-align: center; color: var(--text-secondary); font-size: 13px; }
.folder-file-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.folder-file-row:last-child { border-bottom: none; }
.folder-file-icon { font-size: 20px; color: var(--primary); flex-shrink: 0; width: 24px; text-align: center; }
.folder-file-info { flex: 1; min-width: 0; }
.folder-file-name { font-size: 14px; font-weight: 600; word-break: break-all; }
.folder-file-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; font-size: 12px; }
.file-type-tag { padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.file-type-tag.theory { background: #dbeafe; color: #1e40af; }
.file-type-tag.practical { background: #dcfce7; color: #166534; }
.file-type-tag.video { background: #fce7f3; color: #9f1239; }
.file-type-tag.doc { background: #fef3c7; color: #92400e; }
.file-type-tag.other { background: var(--gray-light); color: var(--text-secondary); }
.file-link-btn { color: var(--primary); text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.file-link-btn:hover { text-decoration: underline; }
.add-file-form { padding: 16px; background: var(--gray-light); border-radius: 8px; display: flex; flex-direction: column; gap: 12px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.form-row > * { flex: 1; }

/* ===== 任务分类标签 ===== */
.task-cat-tag { padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.task-cat-tag.物资发放 { background:#fef3c7; color:#92400e; }
.task-cat-tag.信息登记 { background:#dbeafe; color:#1e40af; }
.task-cat-tag.课程学习 { background:#dcfce7; color:#166534; }
.task-cat-tag.其他 { background:#f1f5f9; color:#64748b; }
.flow-task { gap: 6px; flex-wrap: wrap; }
.flow-task-name { flex: 1; min-width: 120px; }

/* ===== 审核按钮 ===== */
.btn-approve { background:var(--success); color:#fff; border:none; padding:6px 12px; border-radius:6px; font-size:12px; font-weight:600; cursor:pointer; flex:1; display:flex; align-items:center; justify-content:center; gap:4px; }
.btn-approve:active { opacity:0.8; }
.btn-reject { background:var(--danger); color:#fff; border:none; padding:6px 12px; border-radius:6px; font-size:12px; font-weight:600; cursor:pointer; flex:1; display:flex; align-items:center; justify-content:center; gap:4px; }
.btn-reject:active { opacity:0.8; }

/* ===== 流程任务树管理（双端口）===== */
.flow-phase-actions { display:flex; gap:4px; margin-left:8px; }
.flow-group-actions { display:inline-flex; gap:4px; margin-left:8px; }
.btn-icon { border:none; background:transparent; cursor:pointer; padding:4px 6px; border-radius:4px; font-size:13px; color:var(--text-secondary); display:inline-flex; align-items:center; transition:all 0.15s; }
.btn-icon:hover { background:var(--gray-light); }
.btn-icon.btn-edit:hover { color:var(--primary); background:#dbeafe; }
.btn-icon.btn-del:hover { color:var(--danger); background:#fee2e2; }

.btn-add-task, .btn-add-group { border:1px dashed var(--border); background:transparent; color:var(--text-secondary); padding:8px 16px; border-radius:8px; font-size:12px; cursor:pointer; display:flex; align-items:center; gap:4px; margin-top:8px; width:100%; justify-content:center; transition:all 0.15s; }
.btn-add-task:hover, .btn-add-group:hover { border-color:var(--primary); color:var(--primary); background:#eff6ff; }

.flow-task-admin { display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:8px; flex-wrap:wrap; }
.flow-task-admin .flow-task-left { display:flex; align-items:center; gap:8px; flex:1; min-width:200px; }
.flow-task-admin .flow-task-right { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.flow-task-admin .flow-task-name { flex:0 1 auto; min-width:80px; }

.sync-toggle { display:inline-flex; align-items:center; gap:4px; cursor:pointer; white-space:nowrap; }
.sync-toggle input { width:16px; height:16px; cursor:pointer; accent-color:var(--primary); margin:0; }
.sync-label { font-size:11px; color:var(--text-secondary); }
.sync-toggle input:checked + .sync-label { color:var(--primary); font-weight:600; }

.dept-input { border:1px solid var(--border); border-radius:6px; padding:3px 8px; font-size:12px; width:80px; background:var(--bg); color:var(--text); }
.dept-input:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 2px rgba(59,130,246,0.1); }
.flow-task-dept { font-size:11px; padding:2px 8px; background:#f0fdf4; color:#166534; border-radius:10px; white-space:nowrap; }

.color-picker { display:flex; gap:8px; flex-wrap:wrap; }
.color-dot { width:28px; height:28px; border-radius:50%; cursor:pointer; border:3px solid transparent; transition:all 0.15s; }
.color-dot:hover { transform:scale(1.1); }
.color-dot.selected { border-color:var(--text); box-shadow:0 0 0 2px var(--bg), 0 0 0 4px var(--text); }

.sync-checkbox-row { display:flex; align-items:center; gap:8px; cursor:pointer; font-size:14px; }
.sync-checkbox-row input { width:18px; height:18px; cursor:pointer; accent-color:var(--primary); }

.flow-phase-header { position:relative; }
@media (max-width:768px) {
  .flow-task-admin { flex-direction:column; align-items:flex-start; }
  .flow-task-admin .flow-task-left { width:100%; }
  .flow-task-admin .flow-task-right { width:100%; }
  .dept-input { width:100%; }
}

/* ===== 拖拽排序 + 表格化任务行 ===== */
.drag-handle { color:var(--text-secondary); cursor:grab; padding:4px; font-size:14px; display:inline-flex; align-items:center; opacity:0.5; transition:opacity 0.15s; flex-shrink:0; }
.drag-handle:hover { opacity:1; color:var(--primary); }
.drag-handle:active { cursor:grabbing; }
[draggable="true"]:hover .drag-handle { opacity:0.85; }
.dragging { opacity:0.4; background:var(--gray-light) !important; }
.drag-over { border-top:2px solid var(--primary) !important; }
.drag-over * { pointer-events:none; }

.flow-group-num { display:inline-flex; align-items:center; justify-content:center; min-width:22px; height:22px; padding:0 6px; background:var(--bg); color:var(--text-secondary); border-radius:11px; font-size:11px; font-weight:600; margin-right:6px; border:1px solid var(--border); }

.empty-task { padding:16px; color:var(--text-secondary); font-size:13px; text-align:center; }
.muted { color:var(--text-secondary); opacity:0.5; }

.flow-tasks-table { margin-top:6px; background:var(--bg); border-radius:8px; border:1px solid var(--border); overflow:hidden; --col-drag:28px; --col-num:36px; --col-sync:80px; --col-name:1fr; --col-cat:78px; --col-dept:96px; --col-owner:80px; --col-deadline:80px; --col-verify:90px; --col-actions:70px; }

.flow-tasks-head, .flow-task-row {
  display:grid;
  grid-template-columns: var(--col-drag) var(--col-num) var(--col-sync) var(--col-name) var(--col-cat) var(--col-dept) var(--col-owner) var(--col-deadline) var(--col-verify) var(--col-actions);
  align-items:center;
  gap:6px;
  padding:8px 10px;
}

.flow-tasks-head { background:linear-gradient(180deg, #f8fafc, #f1f5f9); border-bottom:1px solid var(--border); font-size:11px; font-weight:600; color:var(--text-secondary); }
.flow-tasks-head > div { padding:2px 4px; }
.flow-tasks-head .th-name { padding-left:8px; }

.flow-task-row { border-bottom:1px solid var(--border); transition:background 0.15s; }
.flow-task-row:last-child { border-bottom:none; }
.flow-task-row:hover { background:#f8fafc; }
.flow-task-row > div { padding:2px 4px; font-size:13px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.row-num { display:flex; align-items:center; justify-content:center; min-width:28px; height:22px; background:#eff6ff; color:#1d4ed8; border-radius:11px; font-size:11px; font-weight:600; }
.row-sync { display:flex; align-items:center; }
.row-name { font-weight:500; padding-left:8px; }
.row-cat { display:flex; align-items:center; }
.row-dept { display:flex; align-items:center; }
.row-actions { display:flex; gap:2px; justify-content:flex-end; }

.sync-label { font-size:11px; padding:1px 6px; border-radius:8px; background:#f1f5f9; color:var(--text-secondary); white-space:nowrap; }
.sync-toggle input:checked + .sync-label { background:#dcfce7; color:#15803d; font-weight:600; }

@media (max-width:1024px) {
  .flow-tasks-table { --col-deadline:60px; --col-verify:60px; --col-owner:70px; --col-sync:64px; }
  .flow-tasks-head .th-deadline, .flow-tasks-head .th-verify, .flow-task-row .row-deadline, .flow-task-row .row-verify { font-size:10px; }
}
@media (max-width:768px) {
  .flow-tasks-head { display:none; }
  .flow-task-row { grid-template-columns: 28px 28px 1fr 60px 60px; padding:10px; }
  .flow-task-row .row-sync, .flow-task-row .row-cat, .flow-task-row .row-owner, .flow-task-row .row-deadline, .flow-task-row .row-verify { display:none; }
  .flow-task-row .row-dept { width:100%; }
  .row-actions { flex-direction:row; }
}

/* ===== 物资领取统计 ===== */
.mc-form-card {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  border: 1px solid var(--border);
}
.mc-form-header {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
}
.mc-form-header .mc-form-tip {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
}
.mc-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.mc-form-row { display:flex; flex-direction:column; gap:4px; }
.mc-form-row label { font-size:12px; color: var(--text-secondary); }
.mc-form-row label .req { color: #ef4444; }
.mc-form-row input, .mc-form-row select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: var(--text);
  outline: none;
}
.mc-form-row input:focus, .mc-form-row select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59,130,246,.15); }
.mc-form-row-full { grid-column: 1 / -1; }
.mc-form-actions { margin-top: 14px; display:flex; gap:8px; }

.mc-section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 8px 0 12px;
  color: var(--text);
  display:flex; align-items:center; gap:8px;
}
.mc-section-sub { font-size: 12px; font-weight: 400; color: var(--text-secondary); }

.mc-issue-list { display:flex; flex-direction:column; gap:12px; }
.mc-issue-card {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-left: 4px solid #94a3b8;
}
.mc-issue-card.mc-borrow { border-left-color: #f59e0b; background: linear-gradient(90deg, #fffbeb 0%, #fff 60%); }

.mc-issue-head { display:flex; flex-direction:column; gap:6px; }
.mc-issue-title { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size: 14px; }
.mc-issue-title strong { font-size: 15px; }
.mc-issue-type {
  display:inline-block; font-size:11px; padding:2px 8px; border-radius:10px;
  background:#e2e8f0; color:#475569; font-weight:600;
}
.mc-issue-type.教具 { background:#fef3c7; color:#b45309; }
.mc-issue-type.书籍 { background:#dbeafe; color:#1d4ed8; }
.mc-issue-type.服装 { background:#fce7f3; color:#be185d; }
.mc-issue-type.证件 { background:#e0e7ff; color:#4338ca; }
.mc-issue-qty { font-weight:700; color:var(--primary); }
.mc-issue-spec { font-size:12px; color:var(--text-secondary); background:#f1f5f9; padding:1px 6px; border-radius:4px; }
.mc-sync-tag { font-size:11px; padding:2px 6px; border-radius:8px; background:#dcfce7; color:#15803d; }
.mc-nosync-tag { font-size:11px; padding:2px 6px; border-radius:8px; background:#f1f5f9; color:#64748b; }
.mc-issue-meta { display:flex; gap:14px; font-size:12px; color:var(--text-secondary); flex-wrap:wrap; }
.mc-issue-meta i { margin-right:4px; }
.mc-issue-note {
  font-size:12px; color: var(--text-secondary);
  background: var(--bg-secondary, #f8fafc);
  padding: 6px 10px; border-radius: 6px;
  display:flex; align-items:center; gap:6px;
}

.mc-collectors { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.mc-coll-head {
  display:flex; justify-content:space-between; align-items:center;
  font-size: 13px; color: var(--text-secondary); margin-bottom: 8px;
}
.mc-coll-empty {
  font-size: 12px; color: var(--text-secondary);
  background: var(--bg-secondary, #f8fafc);
  padding: 12px; border-radius: 6px; text-align:center;
}
.mc-coll-grid {
  display:grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.mc-coll-card {
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.mc-coll-card.mc-returned { opacity: 0.7; background: #f0fdf4; }
.mc-coll-card.mc-overdue { border-color: #ef4444; background: #fef2f2; }
.mc-coll-line1 { display:flex; align-items:center; gap:6px; font-weight:600; }
.mc-coll-line2 { color: var(--text-secondary); font-size:11px; }
.mc-coll-name { flex:1; }

.mc-issue-foot { display:flex; gap:6px; margin-top: 10px; padding-top:10px; border-top: 1px dashed var(--border); }

.btn-mini {
  height: 26px; padding: 0 10px; border-radius: 6px;
  border: none; cursor:pointer; font-size: 12px;
  display:inline-flex; align-items:center; gap:4px;
  transition: all .15s;
}
.btn-mini:hover { transform: translateY(-1px); filter: brightness(0.95); }
.btn-mini.btn-primary { background: var(--primary); color:#fff; }
.btn-mini.btn-success { background: #22c55e; color:#fff; }
.btn-mini.btn-danger { background: #ef4444; color:#fff; }
.btn-mini.btn-ghost { background: var(--bg-secondary); color: var(--text); }

@media (max-width:1024px) {
  .mc-form-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width:640px) {
  .mc-form-grid { grid-template-columns: 1fr; }
  .mc-issue-meta { gap: 6px; }
  .mc-coll-grid { grid-template-columns: 1fr; }
}

/* 自定义弹窗（避免与 .modal-overlay 冲突） */
.mc-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px;
}
.mc-modal-card {
  background: #fff; border-radius: 12px;
  width: 100%; max-width: 480px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  display: flex; flex-direction: column;
  max-height: 90vh; overflow: hidden;
  animation: mcModalIn .2s ease;
}
@keyframes mcModalIn { from { opacity: 0; transform: translateY(-20px); } to { opacity:1; transform: translateY(0); } }
.mc-modal-header {
  padding: 14px 18px;
  display:flex; align-items:center; justify-content:space-between;
  border-bottom: 1px solid var(--border);
}
.mc-modal-header h3 { margin: 0; font-size: 16px; display:flex; align-items:center; gap:8px; }
.mc-modal-close {
  background: none; border:none; font-size: 24px; cursor:pointer;
  color: var(--text-secondary); line-height: 1;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.mc-modal-close:hover { background: var(--bg-secondary); }
.mc-modal-body { padding: 16px 18px; display:flex; flex-direction: column; gap: 10px; overflow:auto; }
.mc-modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display:flex; justify-content:flex-end; gap: 8px;
}

/* ===== 物资领取多选弹窗 ===== */
.cd-toolbar { display:flex; gap:6px; align-items:center; margin-bottom:8px; flex-wrap:wrap; }
.cd-filter { flex:1; min-width:140px; padding:6px 10px; border:1px solid var(--border); border-radius:6px; font-size:13px; }
.cd-filter:focus { outline:none; border-color:var(--primary); }
.cd-list { max-height:280px; overflow-y:auto; border:1px solid var(--border); border-radius:8px; padding:4px; background:var(--bg-secondary,#fafafa); }
.cd-item { display:flex; align-items:center; gap:8px; padding:6px 10px; border-radius:6px; cursor:pointer; transition:background .12s; }
.cd-item:hover { background:#e0e7ff; }
.cd-item input[type=checkbox] { cursor:pointer; width:16px; height:16px; }
.cd-name { flex:1; font-size:13px; }
.cd-id { font-size:11px; color:var(--text-secondary); font-family:ui-monospace,monospace; }
.cd-borrow-box { margin-top:8px; padding:10px; background:var(--bg-secondary,#fffbeb); border-radius:8px; border:1px solid #fcd34d; }
.cd-borrow-title { font-size:12px; font-weight:600; color:#a16207; margin-bottom:6px; }
.cd-borrow-box input { padding:6px 10px; border:1px solid var(--border); border-radius:6px; font-size:13px; }
.cd-count { margin-right:auto; font-size:12px; color:var(--text-secondary); align-self:center; }

/* ===== Block Card（可折叠大块） ===== */
.block-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  overflow: hidden;
}
.block-card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: background .12s;
}
.block-card-header:hover { background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%); }
.block-card-header .chevron { transition: transform .2s; font-size: 12px; color: var(--text-secondary); }
.block-card-header.collapsed .chevron { transform: rotate(-90deg); }
.block-card-title { font-size: 15px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.block-card-tip { font-size: 12px; color: var(--text-secondary); font-weight: 400; margin-left: auto; }
.block-card-body { padding: 16px 18px; }
.block-card-body.collapsible.collapsed { padding: 0; }
.block-card-body.collapsible.collapsed > * { display: none; }

/* 阶段同步按钮区在动作组里更紧凑 */

/* ===== 课程规划 - 同步 & 已学学员 ===== */
.sync-phase-btn {
  display:inline-flex; align-items:center; gap:4px;
  padding:3px 8px; font-size:11px; font-weight:600;
  background:#dcfce7; color:#15803d; border:1px solid #86efac;
  border-radius:6px; cursor:pointer; white-space:nowrap;
  transition: all .15s;
}
.sync-phase-btn:hover { background:#bbf7d0; }
.unsync-phase-btn {
  display:inline-flex; align-items:center; gap:4px;
  padding:3px 6px; font-size:11px; font-weight:600;
  background:#fef3c7; color:#a16207; border:1px solid #fcd34d;
  border-radius:6px; cursor:pointer; white-space:nowrap;
  transition: all .15s;
}
.unsync-phase-btn:hover { background:#fde68a; }
.sync-tag-sm {
  display:inline-flex; align-items:center; gap:2px;
  font-size:10px; padding:1px 5px; border-radius:8px;
  background:#dcfce7; color:#15803d; white-space:nowrap;
}
.done-count-badge {
  display:inline-flex; align-items:center; gap:3px;
  font-size:11px; padding:2px 7px; border-radius:10px;
  background:var(--bg-secondary, #eff6ff); color:var(--text-secondary);
  cursor:pointer; white-space:nowrap; transition: all .15s;
  border:1px solid transparent;
}
.done-count-badge:hover { background:#dbeafe; color:#1d4ed8; border-color:#93c5fd; }
.done-count-badge.has-done { background:#dcfce7; color:#16a34a; border-color:#86efac; }
.done-count-badge.has-done:hover { background:#bbf7d0; }
.module-student-panel { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
.enrolled-count-badge {
  display:inline-flex; align-items:center; gap:3px;
  font-size:11px; padding:2px 7px; border-radius:10px;
  background:#fef3c7; color:#a16207;
  cursor:pointer; white-space:nowrap; transition: all .15s;
  border:1px solid #fcd34d;
}
.enrolled-count-badge:hover { background:#fde68a; }
.course-date-tag {
  display:inline-flex; align-items:center; gap:3px;
  font-size:10px; padding:1px 6px; border-radius:6px;
  background:#ede9fe; color:#6d28d9; white-space:nowrap;
}
.module-enroll-form { padding: 4px 2px; }

/* ===== 考试文件管理 ===== */
.exam-files-section {
  margin: 8px 0;
  padding: 10px;
  background: var(--bg-secondary, #f8fafc);
  border-radius: 8px;
  border: 1px dashed var(--border);
}
.exam-files-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
}
.exam-files-list { display: flex; flex-direction: column; gap: 4px; }
.exam-file-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: var(--card-bg, #fff);
  border-radius: 6px; border: 1px solid var(--border);
  font-size: 12px;
}
.exam-file-row .fa-file-lines { color: #6366f1; flex-shrink: 0; }
.exam-file-row .ef-icon { flex-shrink: 0; font-size: 14px; color: #6366f1; }
.exam-file-row .ef-info { flex: 1; min-width: 0; }
.exam-file-row .ef-name {
  font-weight: 500; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.exam-file-row .ef-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 2px; font-size: 11px;
}
.exam-file-row .ef-link {
  color: var(--primary, #3b82f6); text-decoration: none;
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 500;
}
.exam-file-row .ef-link:hover { text-decoration: underline; }
.exam-file-row .ef-path {
  display: inline-block;
  padding: 2px 6px; background: var(--bg-secondary, #f1f5f9);
  border-radius: 4px; color: var(--text-secondary);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 10.5px; max-width: 240px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: middle;
}
.exam-file-form { padding: 4px 2px; }

/* ===== 折叠 chevron 旋转动画 ===== */
.collapse-toggle .chevron { transition: transform .2s; }
.collapse-toggle:not(.collapsed) .chevron { transform: rotate(-90deg); }

.flow-phase-actions .btn-icon { margin-left: 2px; }

/* ===== 矩阵单元格内日期小按钮 ===== */
.cm-date-btn {
  transition: transform .15s, box-shadow .15s, background .15s !important;
}
.cm-date-btn:hover {
  background: #fff !important;
  box-shadow: 0 1px 4px rgba(15,23,42,.18) !important;
  transform: translateY(-1px);
}
.cm-date-btn:active { transform: translateY(0); }
.cm-date-readonly { font-size: 9px; line-height: 1; color: #1e293b; opacity: .75; font-weight: 600; }

/* ===== 矩阵全屏模式（原生 Fullscreen API） ===== */
.completion-matrix-wrap:fullscreen,
.completion-matrix-wrap:-webkit-full-screen {
  background: linear-gradient(135deg,#eff6ff 0%,#dbeafe 100%) !important;
  display: flex !important; flex-direction: column !important;
  width: 100vw !important; height: 100vh !important; margin: 0 !important;
  border: none !important; border-radius: 0 !important; padding: 0 !important;
}
.completion-matrix-wrap:fullscreen .cm-body,
.completion-matrix-wrap:-webkit-full-screen .cm-body {
  display: flex !important; flex-direction: column !important;
  flex: 1 !important; padding: 14px 26px 22px !important;
  overflow: hidden !important;
}
.completion-matrix-wrap:fullscreen .matrix-scroll,
.completion-matrix-wrap:-webkit-full-screen .matrix-scroll {
  flex: 1 !important; max-height: none !important; min-height: 0 !important;
}
.completion-matrix-wrap:fullscreen .cm-th,
.completion-matrix-wrap:-webkit-full-screen .cm-th { font-size: 13px !important; }
.completion-matrix-wrap:fullscreen .cm-name,
.completion-matrix-wrap:-webkit-full-screen .cm-name { font-size: 13px !important; }

/* 全屏按钮hover态 */
.cm-fullscreen-btn:hover { background: #1e40af !important; color: #fff !important; }

/* ===== 课程名列拖拽调宽手柄 ===== */
.cm-col-resizer {
  position: absolute;
  right: -4px;
  top: 0;
  bottom: 0;
  width: 7px;
  cursor: col-resize;
  z-index: 31;
  background: transparent;
  transition: background .15s;
}
.cm-col-resizer:hover,
.cm-col-resizer:active {
  background: rgba(59, 130, 246, 0.35);
}

/* ===== 作业矩阵 ===== */
.phase-homework-block { margin-top: 10px; }
.hw-matrix-wrap { margin: 8px 0; }

.hw-fullscreen-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 700;
  background: #fff; border: 1px solid #93c5fd; color: #1e40af; cursor: pointer;
  transition: background .12s, box-shadow .12s;
}
.hw-fullscreen-btn:hover { background: #eff6ff; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.hw-matrix-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.hw-matrix-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.hw-matrix-scroll::-webkit-scrollbar-track { background: #f1f5f9; }

.hw-matrix-table { border-collapse: separate; border-spacing: 0; }

.hw-cell { transition: background .12s, color .12s; }
.hw-cell:hover { filter: brightness(0.92); }

/* ===== 阶段内容项拖拽 ===== */
.phase-module-row[draggable="true"] {
  transition: background .12s, border-color .12s, transform .12s;
}
.phase-module-row[draggable="true"]:active {
  cursor: grabbing;
}
.phase-module-row[draggable="true"]:hover {
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1);
}

.hw-del-btn {
  background: none; border: none; color: #ef4444; cursor: pointer;
  font-size: 12px; padding: 2px 4px; border-radius: 4px; flex-shrink: 0;
  transition: background .12s;
}
.hw-del-btn:hover { background: #fee2e2; }

.hw-edit-btn {
  background: none; border: none; color: #3b82f6; cursor: pointer;
  font-size: 11px; padding: 2px 4px; border-radius: 4px; flex-shrink: 0;
  transition: background .12s;
}
.hw-edit-btn:hover { background: #dbeafe; }

/* ===== 考试大纲：理论/实操目录 + 考核成绩表 ===== */
.exam-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.exam-catalog {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-top: 4px solid var(--primary);
}
.exam-catalog.theory { border-top-color: #3b82f6; }
.exam-catalog.practice { border-top-color: #f97316; }
.exam-catalog-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.exam-catalog.theory .exam-catalog-head { color: #1d4ed8; }
.exam-catalog.practice .exam-catalog-head { color: #c2410c; }
.exam-catalog-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--gray-light);
  padding: 2px 10px;
  border-radius: 10px;
}
.exam-catalog-body { padding: 8px 12px 12px; }
.exam-catalog-empty {
  padding: 18px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}
.exam-catalog-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-light);
  margin-bottom: 8px;
}
.exam-catalog-item:last-child { margin-bottom: 0; }
.eci-left { flex: 1; min-width: 0; }
.eci-name { font-size: 14px; font-weight: 600; }
.eci-meta { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }
.eci-avg {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-secondary);
  background: #fff;
  padding: 4px 10px;
  border-radius: 8px;
}
.eci-avg b { font-size: 15px; color: var(--primary-dark); }
.eci-none { font-size: 11.5px; color: var(--text-tertiary); flex-shrink: 0; }

/* 考核成绩表 */
.exam-score-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.exam-score-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.exam-score-sub { font-size: 12px; font-weight: 400; opacity: .9; }
.exam-score-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.exam-score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}
.exam-score-table thead th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  text-align: center;
}
.exam-score-table thead th .th-name { font-size: 13px; color: var(--text); }
.exam-score-table thead th .th-type {
  font-size: 10px;
  font-weight: 600;
  border-radius: 6px;
  padding: 1px 6px;
  margin-top: 3px;
  display: inline-block;
}
.th-type.type-theory { background: #dbeafe; color: #1d4ed8; }
.th-type.type-practice { background: #ffedd5; color: #c2410c; }
.exam-score-table tbody td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  font-variant-numeric: tabular-nums;
}
.exam-score-table tbody tr:hover { background: #f8fafc; }
.exam-score-table tbody tr:nth-child(even) { background: #fcfdff; }
.exam-score-table .col-idx { width: 46px; color: var(--text-tertiary); font-size: 12.5px; }
.exam-score-table .col-name { text-align: left; padding-left: 14px; min-width: 90px; }
.exam-score-table .col-avg { background: #eff6ff; font-weight: 700; color: #1d4ed8; }
.exam-score-table .col-rank { width: 68px; }
.score-fail { color: #dc2626; font-weight: 700; }
.score-high { color: #16a34a; font-weight: 700; }
.score-none { color: #cbd5e1; }
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
}
.rank-badge.rank-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.rank-badge.rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); }
.rank-badge.rank-3 { background: linear-gradient(135deg, #fb923c, #ea580c); }
.exam-score-note {
  padding: 10px 18px;
  font-size: 12px;
  color: var(--text-secondary);
  background: #f8fafc;
  border-top: 1px solid var(--border);
}
.exam-score-note i { color: var(--primary); margin-right: 4px; }

/* ===== 管理看板：双列布局（移动端改为单列堆叠） ===== */
.dash-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.todo-text { min-width: 0; }

/* ===== 移动端修复（看板 + 课程规划溢出） ===== */
@media (max-width: 900px) {
  /* 看板：单列上下堆叠，"待办提醒"移到"最新入学"下方 */
  .dash-2col { grid-template-columns: 1fr; gap: 14px; }
  .todo-item { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .todo-text { flex: 1 1 auto; min-width: 0; font-size: 14px; word-break: break-word; }
  .todo-due { flex-shrink: 0; font-size: 12px; }
  .todo-priority { flex-shrink: 0; }

  /* 课程规划：大课头部内容强制换行，避免右侧被裁切 */
  .project-card-header { flex-wrap: wrap !important; }
  .project-card-header .project-title { flex: 1 1 auto; min-width: 0; }
  .project-card-header .project-meta {
    flex: 1 1 100%;
    order: 4;
    margin-top: 2px;
  }
  .project-card-header > div[style*="margin-left:auto"] {
    flex: 1 1 100% !important;
    margin-left: 0 !important;
    order: 10;
    justify-content: flex-start !important;
    flex-wrap: wrap;
    gap: 6px;
  }
  /* 卡片与内部容器不超出视口 */
  .project-card, .phase-card, .exam-score-card, .exam-catalog { max-width: 100%; box-sizing: border-box; }
  .project-card-body, .phase-card-body { overflow-x: hidden; }
  /* 考试目录栅格在窄屏单列 */
  .exam-catalog-grid { grid-template-columns: 1fr; gap: 12px; }
  /* 大课头部按钮在老手机上更紧凑 */
  .project-card-header .project-title { font-size: 15px; }
}

@media (max-width: 480px) {
  .dash-2col { gap: 12px; }
  .project-card-header > div[style*="margin-left:auto"] button {
    flex: 0 1 auto;
  }
}

/* ===== 课程规划：全屏幕自适应加固（PC 窄窗口 + 手机通吃） ===== */
/* 大课头部：内容可换行，按钮不被挤压变形 */
.project-card-header {
  row-gap: 8px;
  overflow: visible;
}
.project-card-header .project-title { min-width: 0; flex: 0 1 auto; }
.project-card-header .project-meta { min-width: 0; flex: 0 1 auto; }
.project-card-header > div[style*="margin-left:auto"] {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 6px;
  min-width: 0;
}
.project-card-header > div[style*="margin-left:auto"] > button {
  flex-shrink: 0;      /* 按钮本身不变形、不被裁切 */
}
/* 卡片永不超出容器 */
.project-card, .phase-card { max-width: 100%; box-sizing: border-box; }
/* 页面容器兜底：不产生横向滚动（内部大表自身可横滑） */
.page-container { overflow-x: hidden; }
/* 指标栏文字过长时允许换行 */
.page-toolbar { flex-wrap: wrap; row-gap: 8px; }

@media (max-width: 1100px) {
  /* 中等宽度：统计信息换到第二行，按钮独占第三行，确保全部可见 */
  .project-card-header .project-meta { flex: 1 1 100%; order: 4; }
  .project-card-header > div[style*="margin-left:auto"] {
    flex: 1 1 100%;
    margin-left: 0 !important;
    justify-content: flex-start;
    order: 10;
  }
}

/* ===== 根治横向溢出：矩阵/宽表格不再撑宽页面 ===== */
/* 1) 页面任何层级都不产生横向滚动条 */
html, body { overflow-x: hidden; max-width: 100%; }
.main-content { min-width: 0; overflow-x: hidden; }

/* 2) flex 容器子项允许收缩（原先 min-width:auto 会被宽内容撑开，导致整页横滑） */
.project-card-body > *,
.phase-card-body > *,
.page-container > * { min-width: 0; }
.phase-card, .project-card { min-width: 0; max-width: 100%; box-sizing: border-box; }

/* 3) 矩阵表格：只在自己的框内横向滑动，绝不撑宽外层 */
.completion-matrix-wrap,
.hw-matrix-wrap,
.table-wrap {
  overflow-x: auto !important;
  max-width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}
.completion-matrix,
.hw-matrix-table {
  max-width: none;   /* 表格自身可超过容器，由父级滚动承载 */
}

/* ===== 手机端弹窗修正：顶部关闭按钮始终可见 + 内容可滚动 ===== */
/* 关键：手机地址栏会让 100vh 大于可视高度，导致居中弹窗的顶部（含关闭按钮）被顶出屏幕且无法滚回 */
@media (max-width: 900px) {
  .modal {
    align-items: flex-start !important;   /* 从顶部开始，不再垂直居中 */
    justify-content: center;
    padding: 8px;
    overflow-y: auto;                      /* 弹窗整体超高时，点击遮罩区也能滚 */
    -webkit-overflow-scrolling: touch;
  }
  .modal-content,
  .exam-modal-content,
  .student-modal-content,
  .confirm-modal-content {
    width: 96vw !important;
    max-width: 96vw !important;
    height: auto !important;
    max-height: calc(100vh - 16px) !important;
    max-height: calc(100dvh - 16px) !important;  /* 动态视口高度，支持时优先生效 */
    border-radius: 12px !important;
    margin: 0 auto !important;
    display: flex;
    flex-direction: column;
  }
  .modal-header {
    flex: 0 0 auto;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 6;
    background: #fff;
    border-radius: 12px 12px 0 0;
  }
  .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .modal-close {
    min-width: 44px;
    min-height: 44px;
    font-size: 26px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
/* 超小屏：留一点边距，避免贴边不好点 */
@media (max-width: 480px) {
  .modal { padding: 6px; }
  .modal-content { max-height: calc(100dvh - 12px) !important; }
}

/* ===== 弹窗滚动加固（手机/微信内置浏览器） ===== */
.modal {
  height: 100vh;
  height: 100dvh;              /* 动态视口，支持时生效 */
  overflow: hidden;            /* 由内部 .modal-body 承担滚动 */
  touch-action: manipulation;
}
.modal-overlay { position: fixed; }   /* 遮罩固定，不随内容滚动 */

@media (max-width: 900px) {
  .modal { overflow-y: auto; }         /* 弹窗整体超过屏幕时仍可上下拖动 */
  .modal-content { overscroll-behavior: contain; }
  /* 表单中的多选/长列表区域也允许滚动，避免"点不动"的错觉 */
  .modal-body .checkbox-list,
  .modal-body .multi-select-list,
  .modal-body .student-picker-list { max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
}

/* ===== 考核成绩：批次可折叠卡片 ===== */
.exam-batch {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.exam-batch-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff;
  cursor: pointer;
  user-select: none;
}
.exam-batch-header:hover { filter: brightness(1.06); }
.exam-batch-chevron { font-size: 13px; opacity: .85; flex-shrink: 0; }
.exam-batch-title {
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.exam-batch-meta {
  margin-left: auto;
  font-size: 12px;
  background: rgba(255,255,255,.22);
  padding: 3px 12px;
  border-radius: 12px;
  white-space: nowrap;
}
.exam-batch-hint {
  font-size: 11px;
  opacity: .75;
  flex-shrink: 0;
}
.exam-batch-body { padding: 16px; background: var(--bg); }
.exam-batch-body .exam-catalog-grid { margin-bottom: 14px; }
.exam-batch-body .exam-score-card { box-shadow: none; border: 1px solid var(--border); }

@media (max-width: 900px) {
  .exam-batch-header { padding: 12px 14px; row-gap: 6px; }
  .exam-batch-title { font-size: 14px; flex: 1 1 auto; }
  .exam-batch-meta { margin-left: 0; flex: 1 1 100%; order: 5; text-align: left; }
  .exam-batch-hint { order: 6; }
  .exam-batch-body { padding: 10px; }
  .exam-batch-body .exam-catalog-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* ===== 课程同步：范围选择组件（所有学员 / 指定学员） ===== */
.sd-toggle { display:flex; align-items:center; gap:6px; cursor:pointer; font-size:13px; }
.sd-toggle input { width:16px; height:16px; cursor:pointer; }
.sd-scope-box { margin-top:8px; padding:10px; background:var(--gray-light); border-radius:8px; }
.sd-radio { display:flex; align-items:flex-start; gap:7px; cursor:pointer; font-size:13px; margin-bottom:7px; line-height:1.5; }
.sd-radio input { margin-top:3px; width:15px; height:15px; cursor:pointer; flex-shrink:0; }
.sd-quick { background:#eff6ff; border:1px solid #bfdbfe; border-radius:8px; padding:8px 10px; margin-bottom:8px; }
.sd-quick-title { font-size:12px; font-weight:700; color:#1d4ed8; display:flex; align-items:center; gap:6px; }
.sd-quick-sub { font-size:11.5px; color:#1e40af; opacity:.85; margin:3px 0 7px; }
.sd-quick-btns { display:flex; gap:6px; flex-wrap:wrap; }
.sd-count { font-size:12px; color:var(--text-secondary); margin:7px 0 6px; font-weight:600; }
.sd-prev-tag { font-size:10px; padding:1px 6px; border-radius:8px; flex-shrink:0; white-space:nowrap; }
.sd-prev-tag.ok { background:#dcfce7; color:#15803d; }
.sd-prev-tag.no { background:#fee2e2; color:#b91c1c; }
.sd-left { font-size:10px; color:var(--text-tertiary); background:#e2e8f0; padding:0 5px; border-radius:6px; }
.sd-hint { font-size:11.5px; color:#92400e; background:#fffbeb; border:1px solid #fde68a; border-radius:6px; padding:6px 8px; margin-top:8px; line-height:1.5; }
.sd-head { padding:10px 12px; background:linear-gradient(135deg,#1e40af,#2563eb); color:#fff; border-radius:8px; margin-bottom:12px; }
.sd-head-title { font-size:14.5px; font-weight:700; display:flex; align-items:center; gap:7px; }
.sd-head-sub { font-size:12px; opacity:.85; margin-top:3px; }
.sd-apply-all { display:flex; align-items:center; gap:7px; cursor:pointer; font-size:13px; padding:9px 10px; background:#f0fdf4; border:1px solid #bbf7d0; border-radius:8px; margin-top:10px; }
.sd-apply-all input { width:16px; height:16px; cursor:pointer; }

/* 列表行内的同步状态按钮 */
.row-sync-btn {
  border:1px solid transparent; border-radius:8px; font-size:11px; font-weight:700;
  padding:3px 8px; cursor:pointer; display:inline-flex; align-items:center; gap:4px;
  flex-shrink:0; white-space:nowrap; line-height:1.4;
}
.row-sync-btn.all { background:#dcfce7; color:#15803d; border-color:#86efac; }
.row-sync-btn.all:hover { background:#bbf7d0; }
.row-sync-btn.some { background:#fef3c7; color:#b45309; border-color:#fcd34d; }
.row-sync-btn.some:hover { background:#fde68a; }
.row-sync-btn.off { background:#f1f5f9; color:#64748b; border-color:#e2e8f0; }
.row-sync-btn.off:hover { background:#e2e8f0; }

@media (max-width: 900px) {
  .sd-quick-btns .btn-mini { flex:1 1 auto; justify-content:center; }
  .cd-list { max-height:42vh; }
  .sd-radio { font-size:13.5px; }
  .row-sync-btn { padding:4px 8px; font-size:11px; }
}

/* ===== 学员论坛（管理端） ===== */
.forum-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.forum-tabs { display:flex; gap:6px; flex-wrap:wrap; }
.forum-tab {
  border:1px solid var(--border); background:#fff; color:var(--text-secondary);
  border-radius:20px; padding:5px 12px; font-size:12.5px; font-weight:600; cursor:pointer;
  display:inline-flex; align-items:center; gap:5px;
}
.forum-tab:hover { border-color:var(--primary); color:var(--primary); }
.forum-tab.active { background:var(--primary); border-color:var(--primary); color:#fff; }
.forum-tab-num { font-size:11px; background:rgba(0,0,0,.08); border-radius:9px; padding:0 5px; }
.forum-tab.active .forum-tab-num { background:rgba(255,255,255,.28); }
.forum-anon-toggle { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; cursor:pointer; color:var(--text-secondary); }
.forum-hint {
  font-size:12px; line-height:1.7; color:#92400e; background:#fffbeb;
  border:1px solid #fde68a; border-radius:8px; padding:9px 12px; margin-bottom:12px;
}
.forum-card {
  background:#fff; border-radius:var(--radius); box-shadow:var(--shadow);
  padding:14px 16px; margin-bottom:12px; border-left:4px solid #cbd5e1;
}
.forum-card.is-hidden { opacity:.62; border-left-color:#94a3b8; background:#f8fafc; }
.forum-card-head { display:flex; align-items:flex-start; gap:10px; flex-wrap:wrap; }
.forum-avatar {
  width:36px; height:36px; border-radius:50%; color:#fff; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0;
}
.forum-author { font-size:14px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.forum-realname { font-size:12px; color:var(--text-tertiary); }
.forum-meta { display:flex; align-items:center; gap:10px; font-size:11.5px; color:var(--text-tertiary); margin-top:3px; flex-wrap:wrap; }
.forum-cat { background:#e0e7ff; color:#3730a3; border-radius:8px; padding:1px 7px; font-weight:600; }
.forum-tag { font-size:11.5px; font-weight:700; border-radius:9px; padding:2px 9px; flex-shrink:0; }
.forum-tag.pending { background:#fef3c7; color:#92400e; }
.forum-tag.published { background:#dcfce7; color:#15803d; }
.forum-tag.hidden { background:#e2e8f0; color:#475569; }
.forum-content { margin:10px 0 0; font-size:14px; line-height:1.75; word-break:break-word; }
.forum-reply {
  margin-top:10px; padding:10px 12px; background:#eff6ff; border:1px solid #bfdbfe; border-radius:8px;
}
.forum-reply-head { font-size:11.5px; font-weight:700; color:#1d4ed8; margin-bottom:4px; }
.forum-reply-body { font-size:13.5px; line-height:1.7; word-break:break-word; }
.forum-actions { margin-top:12px; padding-top:12px; border-top:1px dashed var(--border); }
.forum-reply-input {
  width:100%; padding:8px 10px; border:1px solid var(--border); border-radius:8px;
  font-size:13.5px; font-family:inherit; resize:vertical; box-sizing:border-box;
}
.forum-reply-input:focus { outline:none; border-color:var(--primary); }
.forum-btns { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; align-items:center; }
.btn-sm { padding:5px 11px !important; font-size:12px !important; }

@media (max-width: 900px) {
  .forum-card { padding:12px; }
  .forum-btns .btn-sm { flex:1 1 auto; justify-content:center; }
  .forum-toolbar { gap:6px; }
  .forum-anon-toggle { flex:1 1 100%; }
}

/* ===== 删除学员 / 整理学号 弹窗 ===== */
.del-warn {
  background:#fef2f2; border:1px solid #fecaca; border-left:4px solid #ef4444;
  color:#b91c1c; border-radius:8px; padding:11px 13px; margin-bottom:10px;
}
.del-list {
  background:#f8fafc; border:1px solid var(--border); border-left:4px solid #cbd5e1;
  border-radius:8px; padding:11px 13px; margin-bottom:10px;
}
.del-renumber {
  display:flex; align-items:flex-start; gap:8px; background:#f0fdf4;
  border:1px solid #bbf7d0; border-radius:8px; padding:11px 13px; margin-bottom:10px;
  cursor:pointer; font-size:13px; line-height:1.6;
}
.del-renumber input { width:16px; height:16px; margin-top:2px; flex-shrink:0; cursor:pointer; }

/* ===== 论坛：待推进项目区 + 学员互相回复 ===== */
.forum-card.is-pinned { border-left-color: #f59e0b; background: #fffdf7; }
.forum-pin-tag {
  display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:700;
  background:linear-gradient(135deg,#f59e0b,#d97706); color:#fff; border-radius:9px; padding:2px 9px;
}
.forum-pinned-section {
  background:#fffdf5; border:1px solid #fde68a; border-radius:var(--radius);
  padding:12px 14px; margin-bottom:16px;
}
.forum-pinned-head {
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  font-size:14.5px; font-weight:800; color:#b45309; margin-bottom:10px;
}
.forum-pinned-num {
  background:#f59e0b; color:#fff; border-radius:10px; font-size:11.5px; font-weight:700; padding:1px 9px;
}
.forum-pinned-sub { font-size:11.5px; font-weight:400; color:#a16207; }
.forum-pinned-body .forum-card { margin-bottom:10px; box-shadow:none; border:1px solid #fde68a; }
.forum-pinned-body .forum-card:last-child { margin-bottom:0; }
.forum-list-title {
  font-size:13.5px; font-weight:700; color:var(--text-secondary);
  margin:14px 4px 8px; display:flex; align-items:center; gap:6px;
}

/* 学员之间的回复 */
.forum-thread { margin-top:12px; border-top:1px dashed var(--border); padding-top:10px; }
.forum-thread-head {
  font-size:12.5px; font-weight:700; color:var(--text-secondary);
  display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:8px;
}
.forum-r-item { background:#f8fafc; border-radius:9px; padding:8px 10px; margin-bottom:6px; }
.forum-r-item.anon { background:#f1f5f9; }
.forum-r-head {
  display:flex; align-items:center; gap:7px; flex-wrap:wrap; font-size:12.5px;
}
.forum-r-tag {
  font-size:10.5px; font-weight:700; background:#e2e8f0; color:#475569;
  border-radius:8px; padding:1px 7px;
}
.forum-r-time { font-size:11px; color:var(--text-tertiary); }
.forum-r-del {
  margin-left:auto; border:none; background:transparent; color:#cbd5e1;
  cursor:pointer; font-size:13px; padding:2px 5px; border-radius:6px;
}
.forum-r-del:hover { color:#dc2626; background:#fee2e2; }
.forum-r-body { font-size:13.5px; line-height:1.7; margin-top:4px; word-break:break-word; }

@media (max-width: 900px) {
  .forum-pinned-section { padding:10px; }
  .forum-pinned-head { font-size:13.5px; }
  .forum-pinned-sub { flex:1 1 100%; }
  .forum-r-item { padding:7px 9px; }
}

/* ===== 论坛二期：管理员公告帖 + 引用回复 ===== */
.forum-card.is-admin-post { border-left-color: #1d4ed8; background: #f8faff; }
.forum-admin-tag {
  display:inline-flex; align-items:center; gap:4px; font-size:10.5px; font-weight:700;
  background:#1d4ed8; color:#fff; border-radius:8px; padding:1px 8px;
}
.forum-r-item.admin { background:#eef2ff; border:1px solid #c7d2fe; }
.forum-r-tag.admin { background:#1d4ed8; color:#fff; }
.forum-r-to {
  font-size:11px; font-weight:600; color:#1d4ed8; background:#dbeafe;
  border-radius:8px; padding:1px 7px;
}

/* ===== 考试内容（独立栏目：课程规划 ⇄ 考核成绩 之间） ===== */
.ec-toolbar {
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  background:#fff; border-radius:12px; padding:12px 16px; margin-bottom:14px;
  box-shadow:0 1px 3px rgba(15,23,42,.08); border-left:4px solid #0ea5e9;
}
.ec-toolbar-info { font-size:13.5px; color:#334155; }
.ec-toolbar-info i { color:#0ea5e9; margin-right:6px; }
.ec-toolbar-info b { color:#0f172a; }
.ec-toolbar-info .ec-filled { color:#15803d; }
.ec-toolbar-info .ec-todo { color:#b45309; }
.ec-toolbar-btns { margin-left:auto; display:flex; gap:8px; flex-wrap:wrap; }
.ec-btn {
  background:#f1f5f9; color:#334155; border:1px solid #e2e8f0; border-radius:7px;
  padding:6px 12px; font-size:12.5px; font-weight:600; cursor:pointer;
  display:inline-flex; align-items:center; gap:5px; font-family:inherit;
}
.ec-btn:hover { background:#e2e8f0; }
.ec-btn-primary { background:#0ea5e9; color:#fff; border-color:#0ea5e9; }
.ec-btn-primary:hover { background:#0284c7; }
.ec-btn-sm { padding:4px 10px; font-size:12px; }

/* 大课分组 */
.ec-proj { background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 1px 4px rgba(15,23,42,.09); margin-bottom:14px; }
.ec-proj-head {
  display:flex; align-items:center; gap:9px; padding:12px 16px; color:#fff;
  cursor:pointer; user-select:none; flex-wrap:wrap;
}
.ec-proj-name { font-size:15.5px; font-weight:700; }
.ec-proj-meta { font-size:12px; opacity:.92; }
.ec-chev { font-size:12.5px; transition:transform .2s; }
.ec-proj.fold .ec-proj-head .ec-chev { transform:rotate(-90deg); }
.ec-proj.fold .ec-proj-body { display:none; }
.ec-proj-body { padding:12px; background:#f8fafc; }

/* 阶段分组 */
.ec-stage { background:#fff; border:1px solid #e2e8f0; border-radius:10px; margin-bottom:10px; overflow:hidden; }
.ec-stage:last-child { margin-bottom:0; }
.ec-stage-head {
  display:flex; align-items:center; gap:9px; padding:10px 14px;
  background:#f8fafc; cursor:pointer; user-select:none; border-bottom:1px solid #eef2f7;
}
.ec-stage-name { font-size:14px; font-weight:700; color:#0f172a; }
.ec-stage-count {
  margin-left:auto; font-size:11.5px; font-weight:600; color:#475569;
  background:#e2e8f0; border-radius:9px; padding:2px 9px;
}
.ec-stage.fold .ec-stage-head { border-bottom:none; }
.ec-stage.fold .ec-stage-head .ec-chev { transform:rotate(-90deg); }
.ec-stage.fold .ec-stage-body { display:none; }
.ec-stage-body { padding:6px 10px 10px; }

/* 单项（理论/实操/演讲） */
.ec-item { padding:11px 8px; border-bottom:1px solid #f1f5f9; }
.ec-item:last-child { border-bottom:none; }
.ec-item-head { display:flex; align-items:center; gap:9px; flex-wrap:wrap; margin-bottom:7px; }
.ec-item-tag {
  font-size:13px; font-weight:700; border-radius:8px; padding:3px 11px;
  display:inline-flex; align-items:center; gap:6px;
}
.ec-badge {
  font-size:11px; font-weight:700; border-radius:9px; padding:2px 9px;
  background:#f1f5f9; color:#94a3b8;
}
.ec-badge.on { background:#dcfce7; color:#15803d; }
.ec-updated { font-size:11px; color:#94a3b8; }
.ec-item-head .ec-btn { margin-left:auto; }
.ec-view {
  font-size:13.5px; line-height:1.75; color:#334155; white-space:pre-wrap;
  word-break:break-word; background:#f8fafc; border-radius:8px; padding:9px 12px;
  border-left:3px solid #e2e8f0;
}
.ec-empty { color:#cbd5e1; font-style:italic; }
.ec-edit { margin-top:8px; }
.ec-input {
  width:100%; box-sizing:border-box; padding:9px 11px; border:1px solid #e2e8f0;
  border-radius:8px; font-size:13.5px; line-height:1.7; font-family:inherit;
  resize:vertical; outline:none; background:#fff; color:#0f172a;
}
.ec-input:focus { border-color:#0ea5e9; }
.ec-input-sm { width:auto; min-width:150px; padding:6px 10px; font-size:13px; }
.ec-edit-btns { display:flex; align-items:center; gap:8px; margin-top:8px; flex-wrap:wrap; }
.ec-edit-hint { font-size:11.5px; color:#94a3b8; }

/* 新增分组表单 */
.ec-addform {
  background:#fff; border:1px dashed #7dd3fc; border-radius:12px;
  padding:14px 16px; margin-bottom:14px;
}
.ec-addform-title { font-size:13.5px; font-weight:700; color:#0369a1; margin-bottom:10px; }
.ec-addform-row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.ec-addform-hint { font-size:11.5px; color:#94a3b8; margin-top:8px; }

@media (max-width: 768px) {
  .ec-toolbar-btns { margin-left:0; width:100%; }
  .ec-input-sm { width:100%; min-width:0; }
  .ec-item-head .ec-btn { margin-left:0; }
}
.ec-more {
  background:transparent; border:none; color:#0ea5e9; font-size:12.5px; font-weight:700;
  cursor:pointer; padding:2px 4px; font-family:inherit;
}
.ec-more:hover { text-decoration:underline; }

/* ===== 考试内容 · 附件文档 ===== */
.ec-files { margin-top: 10px; border-top: 1px dashed #e2e8f0; padding-top: 9px; }
.ec-files-head { display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:700; color:#475569; flex-wrap:wrap; }
.ec-files-head > i { color:#0ea5e9; }
.ec-files-count {
  min-width:20px; height:18px; line-height:18px; text-align:center; padding:0 6px;
  background:#e2e8f0; color:#475569; border-radius:9px; font-size:11px;
}
.ec-files-head .ec-btn { margin-left:auto; }
.ec-file-list { margin-top: 7px; }
.ec-file {
  display:flex; align-items:center; gap:8px; padding:6px 9px; margin-bottom:5px;
  background:#f8fafc; border:1px solid #eef2f7; border-radius:8px; font-size:12.5px;
}
.ec-file:last-child { margin-bottom:0; }
.ec-file-icon {
  width:22px; height:22px; flex-shrink:0; border-radius:6px; color:#fff;
  display:inline-flex; align-items:center; justify-content:center; font-size:11px;
}
.ec-file-name { flex:1; min-width:0; color:#0f172a; font-weight:600; text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ec-file-name:hover { color:#0ea5e9; text-decoration:underline; }
.ec-file-size { flex-shrink:0; color:#94a3b8; font-size:11.5px; }
.ec-file-btn {
  flex-shrink:0; width:24px; height:24px; border-radius:6px; border:1px solid #e2e8f0;
  background:#fff; color:#64748b; display:inline-flex; align-items:center; justify-content:center;
  font-size:11.5px; cursor:pointer; text-decoration:none;
}
.ec-file-btn:hover { background:#e0f2fe; color:#0369a1; border-color:#7dd3fc; }
.ec-file-btn.del:hover { background:#fee2e2; color:#b91c1c; border-color:#fca5a5; }
.ec-files-empty { font-size:12px; color:#cbd5e1; padding:4px 2px; }
.ec-files-tip { font-size:11px; color:#cbd5e1; margin-top:4px; }
.ec-uploading { font-size:12.5px; color:#0ea5e9; font-weight:600; padding:5px 2px; }

/* ===== 考试内容 · 编辑区（改名 / 删除栏目） ===== */
.ec-btn-danger { background:#fff; color:#b91c1c; border-color:#fca5a5; }
.ec-btn-danger:hover { background:#fee2e2; border-color:#f87171; }
.ec-edit-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; flex-wrap:wrap; }
.ec-edit-label { font-size:12.5px; font-weight:700; color:#475569; flex-shrink:0; }
.ec-input-name { width:auto; min-width:190px; max-width:280px; padding:6px 10px; font-size:13.5px; }
.ec-edit .ec-input[type="text"], .ec-edit textarea.ec-input { min-height:130px; }
.ec-stage-head .ec-btn { flex-shrink:0; }
.ec-stage-head .ec-btn-danger { padding:4px 9px; }
@media (max-width: 768px) {
  .ec-input-name { width:100%; max-width:none; }
  .ec-edit-btns .ec-btn-danger { margin-left:0 !important; width:100%; justify-content:center; }
}

/* ===== 考试内容 · 栏目卡片重排（配色 + 折叠 + 文件操作） ===== */
.ec-stage-body { padding: 10px; }
.ec-item {
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--ec-c, #2563eb);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 10px;
  overflow: hidden;
}
.ec-item:last-child { margin-bottom: 0; }
.ec-item-head {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 10px 14px; background: var(--ec-bg, #eff6ff);
  cursor: pointer; user-select: none;
}
.ec-item-head:hover { filter: brightness(0.985); }
.ec-item-chev { color: var(--ec-c, #2563eb); font-size: 12.5px; transition: transform .2s; flex-shrink: 0; }
.ec-item.fold .ec-item-chev { transform: rotate(-90deg); }
.ec-item-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 700; color: var(--ec-c, #2563eb);
  background: #fff; border: 1px solid var(--ec-c, #2563eb);
  border-radius: 8px; padding: 3px 11px;
}
.ec-item-tag i { opacity: .9; }
.ec-item-sum { font-size: 12px; color: #64748b; }
.ec-item-head .ec-btn { margin-left: auto; flex-shrink: 0; }
.ec-item-body { padding: 10px 12px 12px; }
.ec-item.fold .ec-item-body { display: none; }
.ec-item.fold .ec-item-head { border-bottom: none; }
.ec-item .ec-badge { flex-shrink: 0; }
.ec-item .ec-updated { flex-shrink: 0; }

/* 颜色选择 */
.ec-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.ec-sw {
  width: 24px; height: 24px; border-radius: 7px; border: 2px solid transparent;
  cursor: pointer; padding: 0; position: relative;
}
.ec-sw:hover { transform: scale(1.08); }
.ec-sw.on { border-color: #0f172a; box-shadow: 0 0 0 2px #fff inset; }
.ec-sw.on::after {
  content: '\2713'; position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700;
}

/* 文件行：标签 + 操作按钮 */
.ec-file-tag { flex-shrink: 0; font-size: 10.5px; font-weight: 700; border-radius: 8px; padding: 2px 8px; background: #f1f5f9; color: #94a3b8; }
.ec-file-tag.ok { background: #dcfce7; color: #15803d; }
.ec-file-tag.warn { background: #fef3c7; color: #b45309; }
.ec-file-name { cursor: pointer; }
.ec-share-panel { flex-basis: 100%; margin-top: 6px; }
.ec-share-box {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 9px; padding: 9px 11px;
}
.ec-share-tip { font-size: 12px; color: #0369a1; font-weight: 600; flex-basis: 100%; }
.ec-share-url {
  flex: 1; min-width: 200px; padding: 7px 10px; border: 1px solid #bae6fd; border-radius: 7px;
  font-size: 12.5px; background: #fff; color: #0f172a; font-family: inherit;
}
.ec-share-err { font-size: 12.5px; color: #b91c1c; }

/* ============================================================================
   管理端移动端 · 课程规划可用性修复（2026-09-28）
   实测环境：390px 宽（iPhone / 微信内置浏览器）
   修复四类问题：
   ① 折叠容器有 max-height 上限（.collapsible 5000px / .phase-card-body-collapsible 6000px），
      展开后超高的阶段内容被整段裁掉 —— 实测最多一处丢 7319px（≈22 节课），学员/老师完全看不到
   ② .pmr-name 是 white-space:nowrap + 省略号 → 实测 19 条课程名显示不全
   ③ .phase-card-header 实际是 display:block（移动端那些 flex-wrap/gap 全是死规则）
      → 阶段名 / 时长 / 折叠箭头 / 编辑按钮各占一行，箭头被孤立在第三行
   ④ 行内徽章与图标按钮被撑到 44px+，且 .row-icon-btn 被压成 24×34（图标变形）
      → 一行课程高达 168px，401 行 = 6.7 万像素，又长又乱
   ========================================================================= */
@media (max-width: 900px) {

  /* ---------- ① 展开态取消高度上限（折叠仍有效：.collapsed 带 !important 且特异性更高）---------- */
  .project-card-body,
  .phase-card-body-collapsible,
  .collapsible {
    max-height: none !important;
  }
  .project-card.collapsed > .project-card-body,
  .phase-card-body-collapsible.collapsed,
  .collapsible.collapsed {
    max-height: 0 !important;
    overflow: hidden;
  }

  /* ---------- ③ 阶段卡头部：收成整齐的两行 ---------- */
  .phase-card-header {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 11px 14px !important;
    min-height: 0 !important;
  }
  .phase-card-header .phase-card-name {
    order: 1;
    flex: 1 1 100%;
    min-width: 0;
    font-size: 15px !important;
    line-height: 1.35;
    word-break: break-word;
  }
  .phase-card-header .phase-card-duration {
    order: 2;
    flex: 0 0 auto;
    margin-top: 0 !important;
    font-size: 12px !important;
  }
  /* 编辑按钮不再绝对定位，改成跟时长同一行的右侧 */
  .phase-card-header .phase-edit-btn {
    order: 3;
    position: static !important;
    margin-left: auto;
    padding: 6px 10px !important;
    min-height: 32px;
    border-radius: 8px;
  }
  .phase-card-header .phase-card-chevron {
    order: 4;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* ---------- ② + ④ 课程内容行：紧凑三行，课程名完整显示 ---------- */
  .phase-module-row {
    flex-wrap: wrap !important;
    align-items: flex-start;
    padding: 9px 10px !important;
    gap: 6px 8px;
    font-size: 13.5px;
  }
  .phase-module-row > .pmr-name,
  .phase-module-row .pmr-name {
    order: 2;
    flex: 1 1 0 !important;
    min-width: 0;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.45;
    font-size: 13.5px !important;
  }
  /* 序号徽章与对勾跟课程名同处第一行，不要它们独占一行 */
  .phase-module-row > span:first-child { align-self: flex-start; margin-top: 1px; }
  .phase-module-row > i.fa-check-circle { align-self: flex-start; margin-top: 4px; }

  /* 操作区：独占一行、与课程名左对齐 */
  .phase-module-row .pmr-actions {
    order: 3;
    flex: 1 1 100% !important;
    width: auto !important;
    margin-left: 0 !important;
    padding-left: 32px;
    justify-content: flex-start !important;
    flex-wrap: wrap;
    gap: 6px;
  }
  /* 统一 30px 触控高度，别再撑到 44px */
  .phase-module-row .pmr-actions button,
  .phase-module-row .pmr-actions i {
    min-height: 0;
    padding: 0;
    font-size: 13px;
  }
  /* 图标按钮：正方形，图标不再被压扁（原先 24×34） */
  .phase-module-row .pmr-actions .row-icon-btn {
    width: 30px !important;
    min-width: 30px;
    height: 30px !important;
    margin-left: 0;
    font-size: 12px;
  }
  /* 徽章类：统一成 30px 高的小胶囊 */
  .phase-module-row .pmr-actions .row-sync-btn,
  .phase-module-row .pmr-actions .enrolled-count-badge,
  .phase-module-row .pmr-actions .done-count-badge,
  .phase-module-row .pmr-actions .phase-module-hours,
  .phase-module-row .pmr-actions .course-date-tag {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 9px;
    font-size: 11.5px;
    border-radius: 8px;
  }

  /* ---------- ⑤ 「阶段内容」标题栏：标题独占一行，按钮排下一行右侧 ---------- */
  .phase-modules-header {
    flex-wrap: wrap;
    row-gap: 8px;
    align-items: center;
  }
  .phase-modules-header > span:first-child {
    flex: 1 1 100%;
    min-width: 0;
    line-height: 1.4;
  }
  .phase-modules-header .btn,
  .phase-modules-header .sync-phase-btn,
  .phase-modules-header .unsync-phase-btn {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  /* ---------- ⑥ 完成情况总览：头部按钮换行，不挤压标题 ---------- */
  .completion-matrix-wrap > .cm-head {
    flex-wrap: wrap !important;
    row-gap: 8px;
    padding: 11px 13px !important;
  }
  .completion-matrix-wrap > .cm-head > .cm-head-left {
    flex: 1 1 100%;
    min-width: 0;
  }
  .completion-matrix-wrap > .cm-head > .cm-head-right {
    flex: 1 1 100%;
    justify-content: flex-end;
  }
  .completion-matrix-wrap > .cm-head .cm-fullscreen-btn {
    min-height: 34px;
    padding: 6px 12px !important;
  }
}

/* ===== 超窄屏（≤480px）：再挤一点横向空间 ===== */
@media (max-width: 480px) {
  .phase-module-row { padding: 8px 9px !important; gap: 5px 7px; }
  .phase-module-row > .pmr-name,
  .phase-module-row .pmr-name { font-size: 13px !important; }
  /* 超窄屏取消操作区缩进，把宽度让给按钮 */
  .phase-module-row .pmr-actions { padding-left: 0; }
  .phase-card-header .phase-card-name { font-size: 14.5px !important; }
  .phase-modules-header .btn,
  .phase-modules-header .sync-phase-btn,
  .phase-modules-header .unsync-phase-btn { padding: 6px 10px; font-size: 12px; }
}

/* ============================================================================
   管理端移动端 · 流程任务「任务名看不全」修复（2026-09-28）
   实测 390px：.row-name 只有 112px 宽，而任务名最长需要 164px
   → 「按时作息（22:30就寝）」「C01 维修安全与工具使用」等 15 条被省略号截断
   原因：一行硬塞 5 列（拖拽/序号/任务名/部门/操作），任务名只分到 1fr≈112px，还是 nowrap+ellipsis
   ========================================================================= */
@media (max-width: 768px) {
  /* 拆成两行：① 拖拽柄 + 序号 + 任务名（可换行、完整显示）  ② 部门 + 操作按钮 */
  .flow-task-row {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    min-height: 0 !important;
    padding: 10px !important;
  }
  .flow-task-row .drag-handle { order: 1; flex: 0 0 auto; }
  .flow-task-row .row-num     { order: 2; flex: 0 0 auto; }
  .flow-task-row .row-name {
    order: 3;
    flex: 1 1 0;
    min-width: 0;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.45;
    font-size: 13.5px;
    padding-left: 4px !important;
  }
  .flow-task-row .row-dept {
    order: 5;
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
  }
  .flow-task-row .dept-input { width: 100% !important; min-height: 32px; }
  .flow-task-row .row-actions {
    order: 6;
    flex: 0 0 auto;
    margin-left: auto;
  }
  .flow-task-row .row-actions .btn-icon { min-width: 32px; min-height: 32px; }
}

/* ===== 900–1200px（平板 / 小笔记本）：流程任务表也把任务名放全 ===== */
/* 实测 1024px：main 区约 780px，任务名列只能分到 ~118px，而名字最长要 164px → 88 处被省略号截断 */
@media (max-width: 1200px) {
  .flow-task-row .row-name {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.4;
  }
}

/* ============================================================================
   考勤打卡（2026-10-02）
   三个页签：今日看板 / 月度统计 / 设置与请假
   ========================================================================= */
.at-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }
.at-tab { padding:9px 16px; border-radius:10px; border:1px solid #e2e8f0; background:#fff; color:#475569;
  font-size:13px; font-weight:600; cursor:pointer; font-family:inherit; display:inline-flex; align-items:center; gap:6px; }
.at-tab.on { background:#2563eb; border-color:#2563eb; color:#fff; }
.at-tab .cnt { background:#ef4444; color:#fff; border-radius:999px; font-size:10px; padding:1px 6px; font-weight:700; }

.at-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.at-toolbar .sp { flex:1; }
.at-input, .at-select { padding:8px 11px; border:1px solid #e2e8f0; border-radius:9px; font-size:13px;
  font-family:inherit; color:#0f172a; background:#fff; box-sizing:border-box; }
.at-input:focus, .at-select:focus { outline:none; border-color:#3b82f6; }
.at-input.w60 { width:70px; text-align:center; }

.at-code { display:inline-flex; align-items:center; gap:8px; background:#eff6ff; border:1px solid #bfdbfe;
  color:#1d4ed8; border-radius:10px; padding:8px 12px; font-size:13px; font-weight:700; }
.at-code b { font-size:19px; letter-spacing:3px; font-family:Menlo,Consolas,monospace; }

.at-sum { display:grid; grid-template-columns:repeat(auto-fit,minmax(112px,1fr)); gap:10px; margin-bottom:16px; }
.at-stat { background:#fff; border:1px solid #eef2f7; border-radius:11px; padding:12px 14px; }
.at-stat b { display:block; font-size:21px; font-weight:800; line-height:1.2; }
.at-stat span { font-size:11.5px; color:#64748b; display:block; margin-top:3px; }
.at-stat.ok b { color:#16a34a; } .at-stat.late b { color:#d97706; }
.at-stat.miss b { color:#dc2626; } .at-stat.leave b { color:#7c3aed; }
.at-stat.info b { color:#2563eb; } .at-stat.study b { color:#0891b2; }

.at-card { background:#fff; border-radius:12px; box-shadow:0 1px 3px rgba(15,23,42,.08); margin-bottom:16px; overflow:hidden; }
.at-card > h3 { margin:0; padding:13px 16px; font-size:14px; font-weight:700; border-bottom:1px solid #eef2f7;
  display:flex; align-items:center; gap:8px; flex-wrap:wrap; background:#f8fafc; }
.at-card > h3 .sp { flex:1; }
.at-body { padding:14px 16px; }

.at-row { display:flex; align-items:center; gap:10px; padding:10px 16px; border-bottom:1px solid #f1f5f9; flex-wrap:wrap; }
.at-row:last-child { border-bottom:none; }
.at-row.abn { background:#fffbeb; }
.at-row .who { min-width:132px; }
.at-row .who b { font-size:13.5px; }
.at-row .who small { color:#94a3b8; font-size:11px; margin-left:4px; }
.at-cells { display:flex; gap:6px; flex-wrap:wrap; flex:1; }
.at-ops { display:flex; gap:6px; flex-wrap:wrap; }

.at-cell { display:inline-flex; align-items:center; gap:5px; border-radius:8px; padding:4px 9px; font-size:11.5px;
  font-weight:700; border:1px solid transparent; white-space:nowrap; }
.at-cell i { font-size:11px; }
.at-cell.normal, .at-cell.ok { background:#f0fdf4; color:#15803d; border-color:#bbf7d0; }
.at-cell.late { background:#fffbeb; color:#b45309; border-color:#fde68a; }
.at-cell.absent { background:#fef2f2; color:#b91c1c; border-color:#fecaca; }
.at-cell.leave { background:#f5f3ff; color:#6d28d9; border-color:#ddd6fe; }
.at-cell.pending { background:#f8fafc; color:#94a3b8; border-color:#e2e8f0; }
.at-cell.future { background:#fff; color:#cbd5e1; border-color:#f1f5f9; }
.at-cell.off { background:#fff; color:#cbd5e1; border-color:#f1f5f9; }
.at-cell.click { cursor:pointer; }

.at-photo { width:30px; height:30px; border-radius:7px; object-fit:cover; border:1px solid #e2e8f0; cursor:pointer; background:#f8fafc; }

.at-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.at-matrix { border-collapse:separate; border-spacing:0; font-size:11.5px; }
.at-matrix th, .at-matrix td { border-bottom:1px solid #f1f5f9; padding:4px 5px; text-align:center; white-space:nowrap; }
.at-matrix thead th { position:sticky; top:0; background:#f8fafc; font-size:11px; color:#475569; font-weight:700; z-index:2; }
.at-matrix .name-col { position:sticky; left:0; background:#fff; text-align:left; min-width:118px; z-index:1;
  box-shadow:1px 0 0 #eef2f7; font-weight:600; }
.at-matrix thead .name-col { background:#f8fafc; z-index:3; }
/* 汇总列固定在右侧：横向滚到后面的日期时，打卡/迟到/缺卡/请假/补卡/学习时长始终可见。
   首列学员姓名已用 position:sticky left 固在左边，这里是右边的对称做法。
   宽度必须写死（56px），否则 right 偏移量对不上会互相盖住。 */
.at-matrix .sum-col { background:#f8fafc; font-weight:700; position:sticky;
  width:56px; min-width:56px; box-sizing:border-box; }
.at-matrix .sum-col:nth-last-child(1) { right:0; }
.at-matrix .sum-col:nth-last-child(2) { right:56px; }
.at-matrix .sum-col:nth-last-child(3) { right:112px; }
.at-matrix .sum-col:nth-last-child(4) { right:168px; }
.at-matrix .sum-col:nth-last-child(5) { right:224px; }
.at-matrix .sum-col:nth-last-child(6) { right:280px; }
.at-matrix thead .sum-col { z-index:4; }
.at-matrix tbody .sum-col { z-index:3; }
.at-matrix tr:hover .sum-col { background:#f1f5f9; }
.at-matrix td.weekend { background:#fbfcfe; }
.at-matrix .name-col.weekend { background:#fbfcfe; }
.at-matrix tr:hover .name-col { background:#f1f5f9; }

.at-tri { display:flex; gap:1.5px; justify-content:center; }
.at-tri span { width:9px; height:15px; border-radius:2px; display:block; background:#f1f5f9; }
.at-tri span.normal, .at-tri span.ok { background:#22c55e; }
.at-tri span.late { background:#f59e0b; }
.at-tri span.absent { background:#ef4444; }
.at-tri span.leave { background:#8b5cf6; }
.at-tri span.pending { background:#e2e8f0; }
.at-tri span.future { background:#f8fafc; }
.at-tri span.admin { outline:1.5px solid #0ea5e9; outline-offset:-1.5px; }

.at-legend { display:flex; gap:14px; flex-wrap:wrap; font-size:11.5px; color:#64748b; padding:10px 16px; background:#f8fafc; border-top:1px solid #eef2f7; }
.at-legend i { display:inline-block; width:9px; height:9px; border-radius:2px; margin-right:4px; }

.at-grid2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:12px; }
.at-field label { display:block; font-size:12px; font-weight:700; color:#475569; margin-bottom:5px; }
.at-field input { width:100%; padding:8px 10px; border:1px solid #e2e8f0; border-radius:9px; font-size:13px; font-family:inherit; box-sizing:border-box; }
.at-sw { display:flex; align-items:center; gap:9px; padding:9px 11px; border:1px solid #eef2f7; border-radius:10px; background:#fff; }
.at-sw input { width:17px; height:17px; accent-color:#2563eb; }
.at-sw .t { font-size:13px; font-weight:600; }
.at-sw .d { font-size:11px; color:#94a3b8; margin-top:2px; }

.at-leave { display:flex; align-items:center; gap:10px; padding:10px 16px; border-bottom:1px solid #f1f5f9; flex-wrap:wrap; }
.at-leave:last-child { border-bottom:none; }
.at-badge { font-size:11px; padding:2px 8px; border-radius:999px; font-weight:700; }
.at-badge.pending { background:#fef3c7; color:#b45309; }
.at-badge.approved { background:#dcfce7; color:#15803d; }
.at-badge.rejected { background:#fee2e2; color:#b91c1c; }
.at-badge.cancelled { background:#f1f5f9; color:#64748b; }

.at-modal { position:fixed; inset:0; z-index:3000; display:flex; align-items:center; justify-content:center; padding:16px; }
.at-modal-mask { position:absolute; inset:0; background:rgba(15,23,42,.5); }
.at-modal-box { position:relative; background:#fff; border-radius:14px; width:100%; max-width:560px;
  max-height:86vh; overflow-y:auto; box-shadow:0 20px 50px rgba(15,23,42,.3); }
.at-modal-box > h3 { margin:0; padding:14px 18px; font-size:15px; font-weight:700; border-bottom:1px solid #eef2f7; display:flex; align-items:center; }
.at-modal-box > h3 .sp { flex:1; }
.at-modal-box > h3 button { background:none; border:none; font-size:17px; color:#94a3b8; cursor:pointer; font-family:inherit; }
.at-modal-body { padding:16px 18px 20px; }
/* 请假：日期 + 时间段（2026-10-08） */
.at-field select { width:100%; padding:8px 10px; border:1px solid #e2e8f0; border-radius:9px; font-size:13px; font-family:inherit; box-sizing:border-box; background:#fff; }
.at-tag { display:inline-block; margin-left:6px; padding:1px 6px; border-radius:5px; background:#eff6ff; color:#1d4ed8; font-size:10.5px; font-weight:700; vertical-align:1px; }
.at-lv-sub { color:#64748b; font-size:11.5px; margin-top:2px; }
.at-lv-free { margin-top:12px; padding:9px 11px; border-radius:9px; background:#f5f3ff; border:1px solid #ddd6fe; color:#6d28d9; font-size:12.5px; line-height:1.5; }
.at-lv-free.warn { background:#fffbeb; border-color:#fde68a; color:#b45309; }
.at-lv-pre { display:flex; gap:6px; }
.at-lv-pre button { flex:1; padding:8px 4px; border:1.5px solid #e2e8f0; background:#fff; border-radius:9px; font-size:12.5px; font-family:inherit; color:#475569; cursor:pointer; }
.at-lv-pre button.on { border-color:#8b5cf6; background:#f5f3ff; color:#6d28d9; font-weight:700; }
.at-note-mini { margin-top:8px; font-size:11.5px; color:#94a3b8; line-height:1.5; }
/* 审批结果提醒（2026-10-08）：老师一眼看出这条结果学员看过没有 */
.at-seen { display:inline-block; margin-left:6px; padding:1px 6px; border-radius:5px; background:#f1f5f9; color:#64748b; font-size:10.5px; font-weight:700; vertical-align:1px; }
.at-seen.un { background:#fef3c7; color:#b45309; }

/* ===== 报饭管理（2026-10-08）===== */
.ml-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:12px; padding:14px 16px; }
.ml-field label { display:block; font-size:11.5px; color:#64748b; font-weight:700; margin-bottom:5px; }
.ml-field .at-input, .ml-field select { width:100%; box-sizing:border-box; }
.ml-field .hint { font-size:11px; color:#94a3b8; margin-top:5px; line-height:1.5; }
.at-badge.meal-ok { background:#dcfce7; color:#15803d; }
.at-badge.meal-ord { background:#fff7ed; color:#c2410c; }
.at-badge.meal-none { background:#f1f5f9; color:#94a3b8; }
.at-row.ml-not { opacity:.62; }
.at-row.ml-not:hover { opacity:1; }
.at-matrix td.ml-ok { background:#16a34a; color:#fff; font-weight:700; }
.at-matrix td.ml-ord { background:#fff7ed; color:#c2410c; font-weight:700; }
.at-matrix td.ml-closed { background:#f1f5f9; color:#cbd5e1; }
.at-matrix td.ml-today { box-shadow:inset 0 0 0 2px #0ea5e9; }
.ml-hi { color:#ea580c; font-weight:800; }
.ml-tip { padding:10px 16px; font-size:12.5px; line-height:1.6; color:#64748b; background:#f8fafc; border-bottom:1px solid #eef2f7; }
.ml-tip b { color:#475569; }
.ml-ph { font-size:11.5px; font-weight:700; padding:2px 8px; border-radius:999px; }
.ml-ph.open { background:#dcfce7; color:#15803d; }
.ml-ph.wait { background:#fef3c7; color:#b45309; }
.ml-ph.over { background:#fee2e2; color:#b91c1c; }
.ml-ph.closed, .ml-ph.off { background:#f1f5f9; color:#64748b; }

@media (max-width: 768px) {
  .at-row { padding:10px 12px; }
  .at-row .who { min-width:auto; flex:1 1 100%; }
  .at-cells { flex:1 1 100%; }
  .at-ops { flex:1 1 100%; }
  .at-tab { padding:8px 12px; font-size:12.5px; }
  .at-sum { grid-template-columns:repeat(auto-fit,minmax(96px,1fr)); gap:8px; }
  .at-stat { padding:10px 11px; }
  .at-stat b { font-size:18px; }
  .at-body { padding:12px; }
}

/* ============================================================
   阶段解锁开关（2026-10-03）
   老师在课程规划里手动放行某个阶段：学员不必学完上一阶段也能学。
   桌面端：与「编辑」按钮并排贴在阶段卡右上角（编辑占 right:12px）。
   移动端：改成静态按钮参与 flex 排序，见文件末尾媒体查询。
   ============================================================ */
.phase-card .phase-unlock-btn {
  position: absolute;
  top: 12px;
  right: 52px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.phase-card .phase-unlock-btn:hover { background: rgba(255, 255, 255, 0.34); }
/* 已解锁：白底绿字，一眼能区分「开」和「关」 */
.phase-card .phase-unlock-btn.on {
  background: #fff;
  color: #15803d;
  border-color: #fff;
  font-weight: 700;
}
.phase-card .phase-unlock-btn:disabled { cursor: default; }

/* 大课头部「解锁全部」按钮的文字与图标间距（图标由 CSS gap 控制，文字为独立文本节点） */
.project-unlock-btn { white-space: nowrap; }

/* ---------- 移动端：解锁按钮参与 flex 排序 ---------- */
@media (max-width: 900px) {
  .phase-card-header .phase-unlock-btn {
    order: 3;
    position: static !important;
    margin-left: auto;
    padding: 6px 12px !important;
    min-height: 32px;
    border-radius: 8px;
    font-size: 12.5px !important;
  }
  /* 编辑按钮往后退一位，让「解锁」在本行最右侧先出现 */
  .phase-card-header .phase-edit-btn {
    order: 4;
    margin-left: 0 !important;
  }
  .phase-card-header .phase-card-chevron { order: 5; }
  .project-unlock-btn { padding: 7px 10px !important; font-size: 12px !important; min-height: 34px; }
}

/* ---------- 顺带修掉：阶段卡「删除此阶段」压住彩色头部 ---------- */
/* 原来 .course-delete-link 是 position:absolute + bottom:10px 贴卡片右下角。
   但阶段默认是折叠的，卡片只剩头部高度 → 红字直接压在彩色头部上，
   几乎看不见，远看像一块污渍。改成正常文档流的右对齐元素，永远落在白底区域。 */
.course-delete-link {
  position: static;
  display: block;
  margin: 0 14px 10px auto;
}

/* ============================================================
   考勤打卡 · 统计卡点开看名单（2026-10-05）
   点「已打卡 / 迟到 / 缺卡 / 请假人数 / 待你复核」→ 弹窗列出具体学员。
   卡片本体结构没动（<b>数字</b><span>标题</span>），只加箭头和可点样式。
   ============================================================ */
.at-stat { position: relative; }
.at-stat.click { cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; }
.at-stat.click:hover { border-color: #c7d2fe; box-shadow: 0 4px 14px rgba(37, 99, 235, .13); transform: translateY(-1px); }
.at-stat.click:active { transform: translateY(0); }
.at-stat .at-stat-go { position: absolute; right: 10px; top: 13px; font-size: 10px; color: #cbd5e1; transition: color .15s; }
.at-stat.click:hover .at-stat-go { color: #2563eb; }

.at-detail-note { font-size: 12.5px; color: #475569; margin-bottom: 12px; line-height: 1.7; }
.at-detail-note b { color: #0f172a; font-size: 14.5px; }
.at-detail-note span { color: #94a3b8; }

.at-statlist { display: flex; flex-direction: column; }
.at-prow { padding: 10px 0; border-top: 1px solid #f1f5f9; }
.at-prow:first-child { border-top: none; padding-top: 2px; }
.at-prow-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.at-prow-head .sp { flex: 1; }
.at-prow-name { font-size: 13.5px; font-weight: 700; color: #0f172a; cursor: pointer; }
.at-prow-name:hover { color: #2563eb; text-decoration: underline; }
.at-prow-head small { font-size: 11px; color: #94a3b8; }
.at-prow-cnt { font-size: 11.5px; font-weight: 700; color: #64748b; background: #f1f5f9; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.at-prow-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }

.at-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; line-height: 1.5;
  border-radius: 7px; padding: 3px 8px; border: 1px solid; white-space: nowrap; }
.at-chip.normal { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.at-chip.late { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.at-chip.absent { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.at-chip.leave { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.at-chip.click { cursor: pointer; }
.at-chip.click:hover { border-color: #b91c1c; box-shadow: 0 2px 8px rgba(185, 28, 28, .18); }

@media (max-width: 768px) {
  .at-stat .at-stat-go { display: none; }
  .at-prow-head { gap: 5px; }
  .at-prow-head small { flex: 1 1 100%; order: 3; }
  .at-prow-head .sp { display: none; }
  .at-prow-cnt { order: 2; }
}

/* ============================================================
   考勤打卡 · 免打卡开关（2026-10-05）
   名单里每个人后面有「免打卡」按钮；关掉的进底部「免打卡名单」卡片，
   不算应到/缺卡，学员端也不显示打卡卡片。
   ============================================================ */
.at-row .who .at-left-tag {
  display: inline-block; margin-left: 5px; font-size: 10px; font-weight: 700;
  color: #94a3b8; background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: 5px; padding: 1px 5px; vertical-align: 1px;
}

.at-excard { margin-top: 0; }
.at-exrow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid #f1f5f9;
}
.at-exrow:last-of-type { border-bottom: none; }
.at-exname { font-size: 13.5px; font-weight: 700; color: #475569; }
.at-exrow small { font-size: 11px; color: #94a3b8; }
.at-exrow .sp { flex: 1; }
.at-expill {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: 11.5px; line-height: 1.5; border-radius: 7px; padding: 3px 8px;
  background: #f8fafc; color: #94a3b8; border: 1px solid #e2e8f0;
}
/* 关掉打卡的行淡出（只在有动画时生效，不影响静态渲染） */
.at-row.at-row-out { opacity: 0; transform: translateX(14px); transition: opacity .22s, transform .22s; }

@media (max-width: 768px) {
  .at-exrow { gap: 6px; }
  .at-exrow small { flex: 1 1 100%; order: 3; }
  .at-exrow .sp { display: none; }
  .at-expill { order: 2; }
}

/* ============================================================
   班级区分（2026-10-05）
   站长班（长期系统班，学号 P0xx）/ 全科班（只学 3 个月，学号 Q0xx）。
   人员看板顶部班级切换、学员卡片班级标签、添加学员的班级选择、换班弹窗。
   ============================================================ */

/* 人员看板 · 顶部班级切换 */
.class-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 4px; padding: 0 2px;
}
.class-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 8px 14px; transition: all .15s; user-select: none;
}
.class-chip:hover { border-color: #93c5fd; box-shadow: 0 3px 10px rgba(37, 99, 235, .10); }
.class-chip i { font-size: 13px; color: #94a3b8; }
.class-chip b { font-size: 14px; font-weight: 700; color: #334155; }
.class-chip small { font-size: 11px; color: #94a3b8; }
.class-chip em {
  font-style: normal; font-size: 11.5px; font-weight: 700; color: #64748b;
  background: #f1f5f9; border-radius: 999px; padding: 2px 9px;
}
.class-chip.active { border-color: #2563eb; background: #eff6ff; box-shadow: 0 3px 12px rgba(37, 99, 235, .16); }
.class-chip.active i { color: #2563eb; }
.class-chip.active b { color: #1d4ed8; }
.class-chip.active em { background: #2563eb; color: #fff; }

/* 学员卡片上的班级标签：站长班低调一点，全科班高亮区分 */
.pc-class-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; line-height: 1.5;
  border-radius: 6px; padding: 2px 8px; border: 1px solid;
}
.pc-class-tag.base  { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.pc-class-tag.other { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }

/* 换班弹窗里的说明行 */
.status-picker-note { font-size: 11.5px; color: #94a3b8; padding: 6px 12px 4px; line-height: 1.55; }

/* 添加学员弹窗里的班级选择卡片 */
.cls-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.cls-pick-item {
  flex: 1 1 150px; cursor: pointer; user-select: none;
  background: #fff; border: 2px solid #e2e8f0; border-radius: 10px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; transition: all .15s;
}
.cls-pick-item i { font-size: 15px; color: #94a3b8; }
.cls-pick-item b { font-size: 14px; font-weight: 700; color: #334155; }
.cls-pick-item small { font-size: 11px; color: #94a3b8; }
.cls-pick-item:hover { border-color: #93c5fd; }
.cls-pick-item.active { border-color: #2563eb; background: #eff6ff; }
.cls-pick-item.active i { color: #2563eb; }
.cls-pick-item.active b { color: #1d4ed8; }

@media (max-width: 768px) {
  .class-bar { gap: 8px; }
  .class-chip { padding: 7px 11px; gap: 5px; }
  .class-chip small { display: none; }
  .class-chip b { font-size: 13px; }
  .cls-pick-item { flex: 1 1 100%; }
}

/* ============================================================
   管理端账号体系（2026-10-05）
   ① 顶栏「只读」标记   ② 登录页「申请查看账号」   ③ 账号审批页
   ============================================================ */

/* ---- ① 顶栏只读标记（访客管理员 / 展示看板）---- */
.readonly-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--warning-light); color: #92400e;
  border: 1px solid #fcd34d; border-radius: 999px;
  padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.readonly-pill i { font-size: 11px; }

/* 侧边栏底部用户名带只读后缀时略收紧 */
#userNameDisplay { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- ② 登录页：错误提示 / 申请入口 / 申请表单 ---- */
.login-err {
  margin-top: 12px; padding: 10px 12px;
  background: var(--danger-light); color: #b91c1c;
  border: 1px solid #fecaca; border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.5; display: flex; align-items: flex-start; gap: 8px;
}
.login-err i { margin-top: 3px; flex-shrink: 0; }

.login-apply {
  margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border);
  text-align: center; font-size: 13px; color: var(--primary-dark);
  cursor: pointer; user-select: none; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: color var(--transition);
}
.login-apply:hover { color: var(--primary); }
.login-apply em { color: var(--text-secondary); font-style: normal; font-size: 12px; }

.login-btn-ghost {
  margin-top: 10px; background: transparent !important;
  color: var(--text-secondary) !important; border: 1px solid var(--border) !important;
  box-shadow: none !important;
}
.login-btn-ghost:hover { background: var(--gray-light) !important; }

.login-card.apply-card { padding: 32px 36px; }
.apply-form { display: flex; flex-direction: column; }
.apply-label {
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  margin: 10px 0 5px; display: flex; align-items: baseline; gap: 6px;
}
.apply-label:first-child { margin-top: 0; }
.apply-label span { font-weight: 400; color: #94a3b8; font-size: 11px; }
.apply-form input,
.apply-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; font-family: inherit;
  color: var(--text); background: #fff; outline: none; transition: border-color var(--transition);
}
.apply-form textarea { resize: vertical; }
.apply-form input:focus, .apply-form textarea:focus { border-color: var(--primary); }
.apply-msg {
  margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.5; display: flex; align-items: flex-start; gap: 8px;
}
.apply-msg i { margin-top: 3px; flex-shrink: 0; }
.apply-msg.ok  { background: var(--success-light); color: #15803d; border: 1px solid #bbf7d0; }
.apply-msg.err { background: var(--danger-light);  color: #b91c1c; border: 1px solid #fecaca; }

/* ---- 侧边栏「待审批」红点 ---- */
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--danger); color: #fff; border-radius: 9px;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* ---- ③ 账号审批页 ---- */
.acct-intro {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--primary-light); border: 1px solid #bfdbfe;
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px;
}
.acct-intro > i { font-size: 18px; color: var(--primary-dark); margin-top: 2px; flex-shrink: 0; }
.acct-intro strong { display: block; font-size: 14px; color: var(--primary-dark); margin-bottom: 3px; }
.acct-intro span { font-size: 12.5px; color: #1e40af; line-height: 1.65; }

.acct-stats { margin-bottom: 22px; }

.acct-section { margin-bottom: 26px; }
.acct-h {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.acct-h i { color: var(--text-secondary); font-size: 13px; }
.acct-h-count {
  background: var(--orange-light); color: #c2410c; border-radius: 999px;
  padding: 1px 8px; font-size: 12px; font-weight: 700;
}

.acct-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px; transition: box-shadow var(--transition);
}
.acct-card:hover { box-shadow: var(--shadow); }
.acct-card.pending { border-left: 3px solid var(--orange); }
.acct-card.approved { border-left: 3px solid var(--success); }
.acct-card.other { border-left: 3px solid #cbd5e1; }

.acct-avatar { width: 40px; height: 40px; font-size: 16px; flex-shrink: 0; }
.acct-body { flex: 1; min-width: 0; }
.acct-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.acct-title strong { font-size: 15px; }
.acct-title code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; background: var(--gray-light); color: #475569;
  padding: 1px 7px; border-radius: 5px;
}
.acct-meta { font-size: 12px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 4px; }
.acct-meta i { font-size: 11px; margin-right: 2px; }
.acct-sep { color: #cbd5e1; margin: 0 2px; }
.acct-purpose {
  margin-top: 7px; font-size: 12.5px; color: #475569; line-height: 1.6;
  background: var(--gray-light); border-radius: var(--radius-sm); padding: 7px 10px;
}
.acct-purpose i { color: #94a3b8; margin-right: 4px; }
.acct-note { margin-top: 6px; font-size: 12px; color: #b91c1c; }

.acct-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; flex-shrink: 0; }
.acct-actions .btn { white-space: nowrap; }
.acct-actions .acct-del { color: var(--danger); border-color: #fecaca; }
.acct-actions .acct-del:hover { background: var(--danger-light); }
.acct-builtin { font-size: 12px; color: #94a3b8; white-space: nowrap; }
.acct-builtin i { margin-right: 3px; }

.acct-empty { padding: 26px 0; }
.acct-empty i { font-size: 26px; color: #cbd5e1; }
.acct-empty p { color: var(--text-secondary); margin-top: 6px; }

@media (max-width: 768px) {
  .login-card { padding: 32px 22px; }
  .login-card.apply-card { padding: 26px 20px; }
  .acct-card { flex-wrap: wrap; }
  .acct-body { flex: 1 1 100%; order: 2; }
  .acct-avatar { order: 1; }
  .acct-actions { order: 3; flex: 1 1 100%; justify-content: flex-start; }
  .acct-actions .btn { flex: 1 1 auto; }
  .acct-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.stat-icon.gray { background: var(--gray-light); color: var(--gray); }

/* ===== 报饭「谁报了 / 谁没报」弹窗（2026-10-09）===== */
.ml-stat-hint { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #94a3b8; margin: -6px 0 14px; }
.ml-stat-hint i { color: #cbd5e1; }
.ml-stat-hint b { color: #475569; }

.mlwho-sum { font-size: 12.5px; color: #475569; margin-bottom: 10px; line-height: 1.7; }
.mlwho-sum b { font-size: 14.5px; }
.mlwho-warn { background: #fff7ed; color: #b45309; font-size: 12.5px; line-height: 1.6;
  border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }

.mlwho-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 11px; }
.mlwho-tab { font-size: 12.5px; font-weight: 600; color: #475569; background: #f1f5f9;
  border: 1px solid #e2e8f0; border-radius: 999px; padding: 5px 13px; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s; }
.mlwho-tab:hover { border-color: #c7d2fe; color: #2563eb; }
.mlwho-tab.on { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; font-weight: 700; }

.mlwho-sec { border: 1px solid #eef2f7; border-radius: 11px; margin-bottom: 11px; overflow: hidden; }
.mlwho-sec > h4 { margin: 0; padding: 9px 12px; font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; gap: 7px; background: #f8fafc; border-bottom: 1px solid #eef2f7; }
.mlwho-sec > h4 .sp { flex: 1; }
.mlwho-sec.mlwho-yes > h4 { background: #f0fdf4; color: #15803d; border-bottom-color: #dcfce7; }
.mlwho-sec.mlwho-no > h4 { background: #fef2f2; color: #b91c1c; border-bottom-color: #fee2e2; }

.mlwho-list { max-height: 34vh; overflow: auto; }
.mlwho-item { display: flex; align-items: center; gap: 9px; padding: 8px 12px;
  border-bottom: 1px solid #f8fafc; flex-wrap: wrap; }
.mlwho-item:last-child { border-bottom: none; }
.mlwho-item .who { min-width: 118px; }
.mlwho-item .who b { font-size: 13px; }
.mlwho-item .who small { display: block; font-size: 10.5px; color: #94a3b8; margin-top: 1px; }
.mlwho-item .meta { flex: 1; min-width: 104px; font-size: 11.5px; color: #64748b; }

.mlwho-sub { border-top: 1px solid #f1f5f9; }
.mlwho-sub:first-child { border-top: none; }
.mlwho-sub-h { padding: 7px 12px; font-size: 11.5px; font-weight: 700; color: #64748b;
  background: #fafcff; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mlwho-sub-tip { font-weight: 400; color: #94a3b8; }
.mlwho-sub.hi { background: #f0f9ff; box-shadow: inset 3px 0 0 #60a5fa; }

.mlwho-mini { font-size: 11.5px; font-weight: 600; color: #2563eb; background: #fff;
  border: 1px solid #bfdbfe; border-radius: 7px; padding: 3px 10px; cursor: pointer;
  white-space: nowrap; transition: background .15s; }
.mlwho-mini:hover { background: #eff6ff; }
.mlwho-mini.ok { color: #16a34a; border-color: #86efac; }
.mlwho-mini.ok:hover { background: #f0fdf4; }
.mlwho-mini:disabled { color: #94a3b8; border-color: #e2e8f0; cursor: default; background: #f8fafc; }
.mlwho-empty { padding: 13px 12px; font-size: 12.5px; color: #94a3b8; }

@media (max-width: 480px) {
  .mlwho-item { padding: 8px 10px; gap: 7px; }
  .mlwho-item .who { min-width: 92px; }
  .mlwho-item .meta { min-width: 84px; }
  .mlwho-list { max-height: 30vh; }
  .mlwho-tab { padding: 5px 11px; font-size: 12px; }
}

/* ==========================================================================
   报饭核销 · 手机端可用性（2026-10-09）
   场景：老师把「中午发饭时标记谁已领到」派给了访客管理员 —— 他们站在饭窗口，
        一只手拿手机、另一只手递饭，点错一下餐费就结错。
   目标：① 拇指够得着（按钮 ≥ 38px 高）② 一行一个动作，不和「删」挨着
        ③ 姓名 / 状态一眼看清，报饭时间这类次要信息折到第二行。
   ⚠️ atBtn() 的 padding / font-size 是**内联样式**，这里只能靠 !important 覆盖
      （样式表的 !important 优先于内联普通声明）。.mlwho-mini 是 CSS 类，正常覆盖。
   ⚠️ 用 #mlPane 限定在报饭页，别扩散到考勤等其它也用 .at-row 的页面。
   ========================================================================== */
@media (max-width: 768px) {
  #mlPane .at-toolbar { gap: 8px; }
  #mlPane .at-toolbar .at-btn { min-height: 38px; padding: 8px 12px !important; font-size: 13px !important; }

  /* 今日名单行：操作按钮独占一行并放大，跟上面的姓名/状态拉开距离，减少误点 */
  #mlPane .at-row .at-ops { flex: 1 1 100%; gap: 8px; margin-top: 3px; }
  #mlPane .at-row .at-ops .at-btn { min-height: 36px; padding: 8px 13px !important; font-size: 13px !important; }
  #mlPane .at-row .at-ops .mlwho-mini { min-height: 34px; padding: 8px 12px; font-size: 13px; }
}

@media (max-width: 480px) {
  /* 弹窗名单：一行 = 姓名 + 状态 + 一个大按钮；时间信息折到第二行 */
  .mlwho-item { padding: 10px 12px; gap: 8px; }
  .mlwho-item .who { min-width: auto; flex: 1 1 auto; }
  .mlwho-item .who b { font-size: 14px; }
  .mlwho-item .meta { order: 3; flex: 1 1 100%; min-width: auto; font-size: 11.5px; }
  .mlwho-item .mlwho-mini { font-size: 13.5px; padding: 9px 15px; min-height: 40px; border-radius: 9px; }
  .mlwho-list { max-height: 40vh; }
  .mlwho-tab { padding: 7px 13px; font-size: 12.5px; }
  .mlwho-sec > h4 { padding: 10px 12px; }
  .mlwho-sub-h { padding: 8px 12px; }
  .mlwho-sub-h .mlwho-mini { min-height: 32px; padding: 6px 11px; font-size: 12px; }
}

/* ================= 人员看板 · 搜索 + 待审核置顶（2026-10-10） =================
   搜索框 / 待审核提醒条 / 待审核卡片强调。
   全部用专用类名前缀（.people-search / .ps- / .pend-banner / .pb- / .pc-new），
   不碰 .person-card 原有规则，也不影响其它页面。 */

/* ---- 搜索框 ---- */
.people-search { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.ps-box {
  position: relative; flex: 1 1 340px; max-width: 480px;
  display: flex; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 0 10px; height: 42px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ps-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.13); }
.ps-box > i { color: var(--text-tertiary); font-size: 13px; flex: 0 0 auto; }
.ps-box input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  padding: 0 8px; font-size: 14px; color: var(--text-primary);
}
.ps-box input::-webkit-search-cancel-button { display: none; }
.ps-box .ps-clear { cursor: pointer; color: var(--text-tertiary); padding: 7px; flex: 0 0 auto; }
.ps-box .ps-clear:hover { color: #ef4444; }
.ps-box .ps-clear.hidden { display: none; }
.ps-hit { font-size: 12.5px; color: var(--text-secondary); }
.ps-hit:empty { display: none; }
.ps-hit b { color: var(--primary); }
.ps-hit .ps-num { font-size: 14px; }
.ps-hit .ps-pend { color: #d97706; }

/* ---- 待审核提醒条 ---- */
.pend-banner {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: linear-gradient(90deg, #fff7ed, #fffbeb);
  border: 1px solid #fed7aa; border-left: 4px solid #f59e0b;
  border-radius: 10px; padding: 11px 14px; margin-bottom: 14px;
  font-size: 13.5px; color: #92400e;
  transition: background var(--transition);
}
.pend-banner:hover { background: linear-gradient(90deg, #ffedd5, #fef3c7); }
.pend-banner .pb-ico {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: #f59e0b; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  animation: pbPulse 1.9s ease-in-out infinite;
}
@keyframes pbPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,.45); }
  50%      { box-shadow: 0 0 0 7px rgba(245,158,11,0); }
}
.pend-banner .pb-text b { font-size: 16px; color: #b45309; margin: 0 1px; }
.pend-banner .pb-sub { color: #b0885a; margin-left: 8px; font-size: 12px; }
.pend-banner .pb-go { margin-left: auto; font-weight: 600; color: #d97706; white-space: nowrap; }

/* ---- 待审核卡片强调 ---- */
.person-card.is-pending {
  position: relative; overflow: hidden;
  border-color: #fbbf24;
  box-shadow: 0 3px 12px rgba(245,158,11,.16);
}
.person-card.is-pending:hover { border-color: #f59e0b; box-shadow: 0 6px 18px rgba(245,158,11,.24); }
.person-card.is-pending::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: #f59e0b;
}
.person-card .pc-new {
  position: absolute; top: 0; right: 0;
  background: #f59e0b; color: #fff;
  font-size: 10.5px; font-weight: 600; letter-spacing: .3px;
  padding: 2px 8px; border-bottom-left-radius: 9px;
}
/* 只读角色（访客管理员 / 展示看板）：只提示"等待老师审核"，不给审核按钮 */
.person-card .pc-pending-ro {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 7px 0; border-radius: 8px;
  background: #fff7ed; border: 1px dashed #fdba74;
  color: #c2410c; font-size: 12.5px; font-weight: 500;
}

/* ---- 手机端（管理端 ≤900px / ≤480px）---- */
@media (max-width: 900px) {
  .people-search { gap: 8px; margin-bottom: 12px; }
  .ps-box { flex: 1 1 100%; max-width: none; height: 44px; }
  .ps-box input { font-size: 15px; }
  .ps-hit { font-size: 12px; }
  .pend-banner { padding: 10px 12px; font-size: 13px; gap: 8px; }
  .pend-banner .pb-sub { display: none; }
  .pend-banner .pb-ico { width: 24px; height: 24px; font-size: 11px; }
}
@media (max-width: 480px) {
  .ps-box { height: 42px; }
  .pend-banner { font-size: 12.5px; }
  .pend-banner .pb-text b { font-size: 15px; }
  .person-card .pc-new { font-size: 10px; padding: 2px 7px; }
}

/* ============================================================
   待办备忘录 · 便签墙（2026-10-10）
   - 管理员：统计卡点击筛选 + 两栏便签（未完成 / 已完成）
   - 访客管理员（只读）：只有「派给我的」那几条，且只渲染「勾完成」一个写入口
   - 前缀统一 td-，不动上面老的 .todo-list / .todo-item（看板「待办提醒」还在用）
   ============================================================ */
.td-wrap { display: flex; flex-direction: column; gap: 16px; }

/* ---- 顶部说明条 ---- */
.td-hero { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.td-hero-left { display: flex; gap: 12px; align-items: flex-start; flex: 1 1 320px; min-width: 0; }
.td-hero-left > i { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #fde68a, #fbbf24); color: #92400e;
  display: flex; align-items: center; justify-content: center; font-size: 17px; }
.td-hero-left strong { display: block; font-size: 16px; color: var(--text); }
.td-hero-left span { font-size: 12.5px; color: var(--text-secondary); line-height: 1.65; }
.td-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- 统计卡（可点筛选）---- */
.td-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.td-stat { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 8px; text-align: center; cursor: pointer; transition: all var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.td-stat i { color: #94a3b8; font-size: 14px; }
.td-stat b { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.2; }
.td-stat span { font-size: 12px; color: var(--text-secondary); }
.td-stat:hover { border-color: var(--primary); transform: translateY(-2px); }
.td-stat.active { border-color: var(--primary); background: var(--primary-light); }
.td-stat.active i, .td-stat.active b { color: var(--primary-dark); }

/* ---- 搜索条 ---- */
.td-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.td-search { flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 12px; height: 42px; }
.td-search i { color: #94a3b8; font-size: 13px; }
.td-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 14px; height: 100%; color: var(--text); }
.td-count { font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; }

/* ---- 两栏便签墙 ---- */
.td-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.td-col { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; min-width: 0; }
.td-col.is-done-col { background: #fbfbfd; }
.td-col-head { font-size: 13px; font-weight: 700; color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.td-col-head b { background: #fff; border: 1px solid var(--border); border-radius: 20px;
  padding: 1px 9px; font-size: 12px; color: var(--text); }
.td-col-body { display: flex; flex-direction: column; gap: 10px; }
.td-col-empty { text-align: center; color: #94a3b8; font-size: 12.5px; padding: 18px 0; }

/* ---- 一条便签 ---- */
.td-note { position: relative; border-radius: 12px; padding: 12px 13px; min-width: 0;
  border: 1px solid rgba(15, 23, 42, .07); box-shadow: 0 2px 6px rgba(15, 23, 42, .06);
  transition: transform .15s ease, box-shadow .15s ease; }
.td-note:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15, 23, 42, .1); }
.td-note.c-yellow { background: #fffbeb; border-color: #fde68a; }
.td-note.c-blue   { background: #eff6ff; border-color: #bfdbfe; }
.td-note.c-green  { background: #f0fdf4; border-color: #bbf7d0; }
.td-note.c-pink   { background: #fdf2f8; border-color: #fbcfe8; }
.td-note.c-purple { background: #f5f3ff; border-color: #ddd6fe; }
.td-note.c-orange { background: #fff7ed; border-color: #fed7aa; }
.td-note.c-gray   { background: #f8fafc; border-color: #e2e8f0; }
.td-note.is-done { opacity: .72; }
.td-note.is-done .td-note-title { text-decoration: line-through; color: #94a3b8; }
.td-note-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.td-note-ops { display: flex; gap: 4px; opacity: .45; transition: opacity .15s ease; }
.td-note:hover .td-note-ops { opacity: 1; }
.td-op { width: 26px; height: 26px; border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(255, 255, 255, .72); color: #475569; font-size: 11.5px;
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s ease; }
.td-op:hover { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.td-op-del:hover { color: var(--danger); }
.td-prio { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.td-prio.p-high   { background: var(--danger-light); color: #b91c1c; }
.td-prio.p-medium { background: var(--warning-light); color: #b45309; }
.td-prio.p-low    { background: #e2e8f0; color: #475569; }
.td-note-title { font-size: 14.5px; font-weight: 600; color: var(--text); margin-top: 8px; line-height: 1.5; word-break: break-word; }
.td-note-body { font-size: 12.5px; color: #475569; line-height: 1.7; margin-top: 6px;
  white-space: pre-wrap; word-break: break-word; }
.td-note-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.td-owner { font-size: 11.5px; font-weight: 600; color: #1d4ed8; background: rgba(59, 130, 246, .1);
  border-radius: 20px; padding: 2px 9px; display: inline-flex; align-items: center; gap: 4px; }
.td-owner.muted { color: #94a3b8; background: rgba(148, 163, 184, .14); font-weight: 500; }
.td-due { font-size: 11.5px; color: #b45309; background: rgba(245, 158, 11, .14);
  border-radius: 20px; padding: 2px 9px; display: inline-flex; align-items: center; gap: 4px; }
.td-note-done { font-size: 11.5px; color: #15803d; margin-top: 8px; display: flex; align-items: center; gap: 5px; }
.td-note-meta { font-size: 11px; color: #94a3b8; margin-top: 6px; }

/* ---- 新增 / 编辑弹窗 ---- */
.td-textarea { resize: vertical; min-height: 92px; line-height: 1.7; font-family: inherit; }
.td-hint { font-size: 11.5px; color: #94a3b8; margin-top: 6px; }
.td-color-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.td-color-dot { width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2px solid rgba(15, 23, 42, .12); transition: transform .15s ease; }
.td-color-dot:hover { transform: scale(1.12); }
.td-color-dot.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, .18); }
.td-color-dot.c-yellow { background: #fcd34d; }
.td-color-dot.c-blue   { background: #93c5fd; }
.td-color-dot.c-green  { background: #86efac; }
.td-color-dot.c-pink   { background: #f9a8d4; }
.td-color-dot.c-purple { background: #c4b5fd; }
.td-color-dot.c-orange { background: #fdba74; }
.td-color-dot.c-gray   { background: #cbd5e1; }
.td-form-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.td-btn-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; margin-right: auto; }
.td-btn-danger:hover { background: var(--danger-light); }

/* ---- 人员名单弹窗 ---- */
.td-mem { display: flex; flex-direction: column; gap: 14px; }
.td-mem-tip { font-size: 12.5px; color: #475569; background: #f1f5f9; border-radius: 10px;
  padding: 10px 12px; line-height: 1.7; display: flex; gap: 8px; }
.td-mem-tip i { color: var(--primary); margin-top: 2px; flex-shrink: 0; }
.td-mem-add { display: flex; gap: 8px; flex-wrap: wrap; }
.td-mem-add .form-input { flex: 1 1 130px; min-width: 110px; }
.td-mem-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.td-mem-row { display: flex; align-items: center; gap: 10px; background: #f8fafc;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.td-mem-row.is-off { opacity: .55; }
.td-mem-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.td-mem-role { font-size: 11.5px; color: #64748b; background: #e2e8f0; border-radius: 20px; padding: 2px 8px; }
.td-mem-row .td-op { margin-left: 0; }
.td-mem-row .td-op:first-of-type { margin-left: auto; }
.td-mem-empty { text-align: center; color: #94a3b8; font-size: 12.5px; padding: 16px 0; }

/* ---- 看板「待办提醒」里的小补充 ---- */
.dash-more { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--primary); cursor: pointer; }
.dash-more:hover { text-decoration: underline; }
.todo-owner { font-size: 11px; color: #1d4ed8; background: rgba(59, 130, 246, .1);
  border-radius: 20px; padding: 2px 8px; white-space: nowrap; }

@media (max-width: 900px) {
  .td-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-board { grid-template-columns: minmax(0, 1fr); }
  .td-hero-actions { width: 100%; }
  .td-hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 480px) {
  .td-hero { padding: 13px 14px; }
  .td-hero-left > i { width: 34px; height: 34px; font-size: 15px; }
  .td-stat b { font-size: 18px; }
  .td-note-title { font-size: 14px; }
  .td-note-ops { opacity: 1; }
  .td-mem-add .form-input { flex: 1 1 100%; }
}
