:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --gold: #d97706;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --radius: 10px;
  --radius-sm: 6px;
  --sidebar-width: 230px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text); background: var(--bg);
}

/* ===== 登录/注册 ===== */
.auth-screen {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #0ea5e9 100%);
}
.auth-card {
  width: 380px; max-width: 92vw;
  background: #fff; border-radius: 16px; padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.auth-logo { font-size: 24px; font-weight: 800; text-align: center; color: var(--text); }
.auth-sub { text-align: center; color: var(--text-muted); font-size: 13px; margin: 6px 0 22px; }
.auth-form-title { font-size: 17px; font-weight: 700; text-align: center; color: var(--text); margin-bottom: 18px; }
.auth-tabs { display: flex; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; border: none; background: none; padding: 10px; border-radius: 7px;
  font-size: 15px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all .15s;
}
.auth-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.auth-form .form-group { margin-bottom: 14px; }
.auth-form label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.auth-form input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; outline: none; transition: border .15s;
}
.auth-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.auth-form textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; outline: none; transition: border .15s;
  font-family: inherit; resize: vertical;
}
.auth-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.btn-block { width: 100%; padding: 12px; font-size: 15px; margin-top: 6px; }
.auth-hint { font-size: 12px; color: var(--text-muted); background: var(--primary-light); padding: 8px 10px; border-radius: 6px; margin-bottom: 14px; line-height: 1.5; }
.auth-error { color: var(--danger); font-size: 13px; text-align: center; margin-top: 12px; min-height: 18px; }

/* ===== 布局 ===== */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: var(--sidebar-width); flex-shrink: 0;
  background: linear-gradient(180deg, #1e40af 0%, #2563eb 100%);
  color: #fff; display: flex; flex-direction: column;
  box-shadow: 2px 0 10px rgba(0,0,0,.08);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,.15); }
.logo { width: 42px; height: 42px; background: rgba(255,255,255,.2); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.brand-title { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.brand-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; color: rgba(255,255,255,.9); text-decoration: none; border-radius: var(--radius-sm); transition: all .2s; font-size: 15px; }
.nav-item:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.2); color: #fff; font-weight: 600; }
.nav-icon { font-size: 18px; width: 24px; text-align: center; }
.sidebar-footer { padding: 16px 20px; font-size: 12px; opacity: .8; border-top: 1px solid rgba(255,255,255,.1); }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.topbar { height: 64px; background: var(--card); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; flex-shrink: 0; }
.page-title { font-size: 20px; font-weight: 700; margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.user-badge { font-size: 13px; color: var(--text-secondary); }
.user-badge .role { color: var(--primary); font-weight: 600; background: var(--primary-light); padding: 2px 8px; border-radius: 10px; margin-left: 4px; }
.user-badge .role.campus { color: var(--cyan); background: #ecfeff; margin-left: 4px; }
.topbar-actions .select-inline { height: 34px; }
.page { display: none; flex: 1; overflow: auto; padding: 24px 28px; }
.page.active { display: block; }

/* ===== 工具栏 / 按钮 ===== */
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.toolbar-actions { display: flex; gap: 10px; }
.month-selector { display: flex; align-items: center; gap: 10px; background: var(--card); padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-weight: 600; }
.toolbar-filter { display: flex; align-items: center; gap: 8px; background: var(--card); padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.toolbar-filter label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.toolbar-filter select { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 14px; background: #fff; color: var(--text); outline: none; min-width: 120px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s; background: #fff; color: var(--text); border-color: var(--border); }
.btn:hover { background: var(--bg); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary-light); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-danger { color: var(--danger); border-color: var(--danger); background: #fff; }
.btn-danger:hover { background: #fef2f2; }
.btn-icon { padding: 6px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.select-inline { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; outline: none; background: #fff; }

/* ===== 面板 ===== */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 20px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.panel-title { font-size: 16px; font-weight: 700; margin: 0; }
.panel-body { padding: 22px; }

/* ===== 统计卡片 ===== */
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.stat-card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--border); border-left: 4px solid var(--primary); position: relative; }
.stat-card.cyan { border-left-color: var(--cyan); }
.stat-card.green { border-left-color: var(--success); }
.stat-card.orange { border-left-color: var(--warning); }
.stat-card.purple { border-left-color: var(--purple); }
.stat-card.gold { border-left-color: var(--gold); }
.stat-label { font-size: 14px; color: var(--text-secondary); margin-bottom: 10px; }
.stat-value { font-size: 32px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-value.small { font-size: 22px; color: var(--gold); }
.stat-note { position: absolute; right: 18px; bottom: 18px; font-size: 13px; color: var(--text-muted); }
.champion-amount { position: absolute; right: 18px; bottom: 18px; font-size: 24px; font-weight: 800; color: var(--gold); line-height: 1; }

/* ===== 柱状图 ===== */
.chart-container { height: 260px; display: flex; align-items: flex-end; gap: 6px; padding: 10px 0 30px 0; position: relative; overflow-x: auto; }
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 18px; position: relative; }
.chart-bar { width: 70%; background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%); border-radius: 4px 4px 0 0; min-height: 4px; transition: height .3s; position: relative; }
.chart-bar:hover { background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%); }
.chart-bar.zero { background: #e5e7eb; }
.chart-label { position: absolute; bottom: -22px; font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
.chart-tooltip { position: absolute; bottom: 100%; margin-bottom: 6px; background: var(--text); color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 10; }
.chart-bar-wrap:hover .chart-tooltip { opacity: 1; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table th { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; position: sticky; top: 0; }
.data-table tbody tr:hover { background: #f9fafb; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; background: #f3f4f6; color: var(--text-secondary); }
.status-badge.active { background: #d1fae5; color: #047857; }

/* ===== 老师分组 ===== */
.attendance-group { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 18px; overflow: hidden; }
.group-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: linear-gradient(90deg, var(--primary-light), #fff); border-bottom: 1px solid var(--border); }
.group-title { font-size: 15px; font-weight: 700; color: var(--primary-dark); }
.group-summary { font-size: 13px; color: var(--text-secondary); }
.group-summary strong { color: var(--gold); }
.attendance-scroll { overflow: auto; max-height: none; }
.attendance-table { border-collapse: separate; border-spacing: 0; font-size: 13px; width: 100%; }
.attendance-table th, .attendance-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); white-space: nowrap; text-align: center; background: var(--card); }
.attendance-table th { background: #f1f5f9; font-weight: 600; }
.attendance-table th.sticky-col, .attendance-table td.sticky-col { position: sticky; left: 0; z-index: 3; background: var(--card); min-width: 80px; }
.attendance-table th.sticky-col { z-index: 4; background: #f1f5f9; }
.attendance-table td.sticky-col:nth-child(2) { left: 80px; }
.attendance-table th.sticky-col:nth-child(2) { left: 80px; }
.attendance-table td.sticky-col:nth-child(3) { left: 160px; }
.attendance-table th.sticky-col:nth-child(3) { left: 160px; }
.attendance-table td.sticky-col:nth-child(4) { left: 240px; }
.attendance-table th.sticky-col:nth-child(4) { left: 240px; }
.attendance-table tbody tr:hover td { background: #f8fafc; }
.attendance-table tbody tr:hover td.sticky-col { background: #f8fafc; }
.attendance-table .student-name { font-weight: 600; text-align: left; }
.attendance-table .day-cell { width: 32px; min-width: 32px; cursor: pointer; user-select: none; transition: background .15s; }
.attendance-table .day-cell:hover { background: #eff6ff; }
.attendance-table .day-cell.checked { background: #dbeafe; color: var(--primary-dark); font-weight: 700; }
.attendance-table .day-cell.checked::after { content: "✓"; }
.attendance-table .day-cell.weekend { background: #fef9c3; }
.attendance-table .day-cell.checked.weekend { background: #bfdbfe; }
.attendance-table .day-cell.locked { cursor: not-allowed; color: var(--text-muted); }
.attendance-table .summary-cell { text-align: right; font-weight: 600; color: var(--primary-dark); min-width: 90px; }
.attendance-table .summary-cell.total { color: var(--danger); font-weight: 700; }
.attendance-table tfoot td { background: #fff7ed; font-weight: 700; }
.attendance-table tfoot .summary-cell.total { color: var(--danger); }
.attendance-table tfoot .summary-day { text-align: center; font-size: 11px; line-height: 1.3; padding: 6px 2px; }
.attendance-table tfoot .summary-day .day-count { color: var(--primary-dark); font-weight: 700; }
.attendance-table tfoot .summary-day .day-amount { color: var(--danger); font-weight: 600; font-size: 10px; margin-top: 2px; }
.attendance-table tfoot .summary-day.weekend { background: #fef9c3; }
.locked-banner { padding: 8px 20px; background: #fef2f2; color: var(--danger); font-size: 13px; border-bottom: 1px solid var(--border); }

/* 锁定月份：类似 Excel 的浅色斜线遮罩 */
.attendance-group.locked .attendance-scroll {
  position: relative;
}
.attendance-group.locked .attendance-scroll::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.025),
    rgba(0, 0, 0, 0.025) 8px,
    transparent 8px,
    transparent 16px
  );
  z-index: 10;
}

/* ===== 折线图 ===== */
.line-chart { width: 100%; overflow-x: auto; }
.line-chart svg { display: block; }
.line-dot { cursor: pointer; }
.line-dot:hover { r: 7; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; font-size: 13px; color: var(--text-secondary); }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; }

/* ===== 弹窗 ===== */
.modal { display: none; position: fixed; inset: 0; z-index: 100; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.modal-content { position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 560px; max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; z-index: 101; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 17px; }
.modal-close { background: none; border: none; font-size: 24px; color: var(--text-secondary); cursor: pointer; }
.modal-body { padding: 22px; overflow: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.form-group input, .form-group select, .form-group textarea { padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; outline: none; transition: border .15s; width: 100%; font-family: inherit; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-group textarea { resize: vertical; }
.required { color: var(--danger); }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-secondary); font-size: 15px; }
.empty-icon { font-size: 44px; margin-bottom: 12px; }

/* ===== 响应式 ===== */
@media (max-width: 1200px) { .dashboard-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; flex-direction: row; align-items: center; padding: 10px 16px; }
  .nav { flex-direction: row; padding: 0; overflow-x: auto; }
  .nav-item span:not(.nav-icon) { display: none; }
  .brand-text, .sidebar-footer { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: flex-start; }
  .page { padding: 16px; }
  .modal-content { width: 95vw; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ===== 学员姓名蓝色跳转链接 ===== */
.student-link { color: var(--primary); cursor: pointer; text-decoration: none; font-weight: 600; }
.student-link:hover { text-decoration: underline; }

/* ===== 科目管理 ===== */
.subjects-manager { display: flex; flex-direction: column; gap: 10px; }
.subjects-add { display: flex; gap: 8px; }
.subjects-add input { flex: 1; }
.subjects-list { display: flex; flex-wrap: wrap; gap: 8px; }
.subject-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-light); color: var(--primary-dark); border-radius: 14px; padding: 4px 10px; font-size: 13px; }
.subject-chip .chip-del { cursor: pointer; font-weight: 700; color: var(--primary); }
.subject-chip .chip-del:hover { color: var(--danger); }

/* ===== 学员详情页 ===== */
.detail-section { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 18px; }
.detail-section .panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.detail-section .panel-title { font-size: 15px; font-weight: 700; margin: 0; }
.detail-section .panel-body { padding: 18px 20px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px 20px; }
.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-item .info-label { font-size: 12px; color: var(--text-muted); }
.info-item .info-value { font-size: 15px; font-weight: 600; color: var(--text); word-break: break-all; }
.subjects-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.subjects-tags .tag { background: var(--primary-light); color: var(--primary-dark); border-radius: 12px; padding: 3px 10px; font-size: 13px; }
.detail-name { font-size: 20px; font-weight: 800; }
.detail-sub { font-size: 13px; color: var(--text-secondary); margin-left: 10px; }

/* ===== 课消统计 ===== */
.stats-section { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 18px; }
.stats-section .panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.stats-section .panel-title { font-size: 15px; font-weight: 700; margin: 0; }
.stats-section .panel-body { padding: 18px 20px; }
.stats-table { min-width: 800px; }
.stats-table th, .stats-table td { white-space: nowrap; text-align: center; }
.stats-table td:first-child, .stats-table th:first-child { text-align: left; }

/* ===== 课消统计 ===== */
.stats-section { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 18px; }
.stats-section .panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.stats-section .panel-title { font-size: 15px; font-weight: 700; margin: 0; }
.stats-section .chart-body { padding: 18px 20px; }
.stats-section .table-body { padding: 0; overflow: auto; }
.stats-table { min-width: 800px; width: 100%; border-collapse: collapse; font-size: 13px; }
.stats-table th, .stats-table td { white-space: nowrap; text-align: center; border: 1px solid #e2e8f0; padding: 10px 8px; }
.stats-table thead th { background: #eff6ff; color: #1d4ed8; font-weight: 700; }
.stats-table thead .teacher-col { background: #dbeafe; color: #1e40af; }
.stats-table tbody tr:nth-child(even) { background: #f8fafc; }
.stats-table tbody tr:hover { background: #f1f5f9; }
.stats-table td:first-child, .stats-table th:first-child { text-align: left; }
.stats-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.stats-table td.total { font-weight: 700; color: #1e40af; }
.stats-table tfoot td { background: #f1f5f9; font-weight: 700; }
.stats-table .month-cell { font-weight: 600; }
.manual-row { background: #fffbeb !important; }
.manual-cell { background: #fef3c7 !important; }
.manual-tag { display: inline-block; background: var(--warning); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 10px; margin-left: 5px; }

/* 月度补录编辑器 */
.monthly-stats-editor { min-width: 100%; font-size: 12px; }
.monthly-stats-editor th, .monthly-stats-editor td { padding: 6px 4px; text-align: center; border: 1px solid #e2e8f0; }
.monthly-stats-editor thead th { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.monthly-stats-editor thead th[colspan="2"] { border-bottom: none; }
.monthly-stats-editor tbody tr:nth-child(even) { background: #f8fafc; }
.monthly-stats-editor .teacher-name { font-weight: 600; text-align: left; white-space: nowrap; background: #fff; }
.ms-input { width: 70px; padding: 5px 6px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 12px; text-align: right; }
.ms-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.ms-input.count { color: #0f172a; }
.ms-input.amount { color: #1d4ed8; }

/* ===== 出勤日历 ===== */
.calendar-wrap { max-width: 520px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell { height: 38px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text-secondary); position: relative; }
.cal-cell.weekend { background: #fef9c3; }
.cal-cell.present { background: var(--primary); color: #fff; font-weight: 700; }
.cal-cell.empty { background: transparent; border: none; }
.cal-cell .cal-dow { position: absolute; top: 2px; left: 4px; font-size: 9px; opacity: .7; }
.cal-weekday-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.cal-weekday-head span { text-align: center; font-size: 11px; color: var(--text-muted); }
.cal-summary { font-size: 13px; color: var(--text-secondary); margin-top: 10px; }
.cal-summary strong { color: var(--gold); }

/* ===== 课包明细 ===== */
.package-table { min-width: 940px; font-size: 12.5px; }
.package-table th, .package-table td { padding: 8px 9px; text-align: center; }
.package-table th:first-child, .package-table td:first-child { text-align: left; }
.package-table th:nth-child(2), .package-table td:nth-child(2) { text-align: left; }
.package-table td .btn { margin: 0 2px; }
.package-table .pay-cell { line-height: 1.45; white-space: nowrap; }
.package-table .pay-cell .pay-date { display: block; font-variant-numeric: tabular-nums; }
.package-table .pay-cell .pay-method {
  display: inline-block; margin-top: 2px; font-size: 11.5px; padding: 1px 7px;
  border-radius: 999px; background: var(--primary-light); color: var(--primary-dark);
}
.package-table tr.pkg-row-locked { background: #fffdf7; }

/* ===== 课表 ===== */
.schedule-table-wrap { overflow-x: auto; }
.schedule-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; table-layout: fixed; }
.schedule-table th, .schedule-table td { border: 1px solid #d1d5db; padding: 0; text-align: center; vertical-align: middle; }
.schedule-table thead th { background: #f8fafc; font-weight: 600; color: #374151; }
/* 左上角「时段」跨两列，固定 */
.schedule-table .schedule-corner { width: 140px; min-width: 140px; background: #fff; position: sticky; left: 0; z-index: 5; border-right: 2px solid #d1d5db; }
.schedule-table .student-header { background: #f3f4f6; padding: 10px 6px; font-size: 14px; color: #374151; width: 16%; }
.schedule-table tbody tr.weekday { background: #fffbeb; }
.schedule-table tbody tr.saturday { background: #eff6ff; }
.schedule-table tbody tr.sunday { background: #fff1f2; }
/* 星期列：固定，跨行 */
.schedule-table .day-name { font-weight: 700; font-size: 15px; width: 70px; min-width: 70px; background: inherit; position: sticky; left: 0; z-index: 4; border-right: 1px solid #d1d5db; }
/* 时段列：固定 */
.schedule-table .time-slot { font-weight: 600; font-size: 13px; width: 70px; min-width: 70px; background: rgba(255,255,255,.55); position: sticky; left: 70px; z-index: 4; border-right: 2px solid #d1d5db; }
.schedule-table .schedule-cell { height: 46px; padding: 2px; }
.schedule-table .schedule-cell.active { background: rgba(255,255,255,.7); }
.schedule-table .schedule-input {
  width: 100%; height: 100%; border: none; border-radius: 3px; background: transparent;
  text-align: center; font-size: 14px; padding: 4px 2px; outline: none;
  color: #111827; font-weight: 500;
}
.schedule-table .schedule-input:focus { background: #fff; box-shadow: inset 0 0 0 2px var(--primary); }
.schedule-table .schedule-input::placeholder { color: #9ca3af; font-size: 12px; }

/* ===== 通用小字提示 ===== */
.form-hint { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; margin: 12px 0 0; }
.muted { color: var(--text-muted); font-size: 13px; }

/* ===== 首页：校区营收完成情况 ===== */
.panel-tools { display: flex; align-items: center; gap: 10px; }
.panel-sub { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-left: 8px; }
.lock-flag {
  font-size: 12.5px; font-weight: 600; color: #b45309;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 999px; padding: 3px 10px;
}
#revenueTable { min-width: 860px; }
#revenueTable th, #revenueTable td { text-align: center; white-space: nowrap; }
#revenueTable th:first-child, #revenueTable td:first-child { text-align: left; }
#revenueTable tr.total-row { background: #f8fafc; font-weight: 700; }
#revenueTable tr.total-row td { border-top: 2px solid var(--border); }
.rev-target {
  display: inline-block; min-width: 90px; padding: 3px 8px; border-radius: var(--radius-sm);
  border: 1px dashed transparent; cursor: pointer; font-variant-numeric: tabular-nums;
}
.rev-target:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.rev-target::after { content: ' ✎'; opacity: .45; font-size: 11px; }
.rev-target-input {
  width: 120px; padding: 4px 8px; font-size: 13px; text-align: right;
  border: 1px solid var(--primary); border-radius: var(--radius-sm); outline: none;
}
.rate-cell { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.rate-bar { flex: 1; height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; min-width: 56px; }
.rate-fill { height: 100%; border-radius: 999px; background: var(--primary); transition: width .3s ease; }
.rate-fill.ok { background: #10b981; }
.rate-fill.mid { background: #f59e0b; }
.rate-fill.low { background: #ef4444; }
.rate-text { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; }
.rate-text.ok { color: #047857; }
.rate-text.mid { color: #b45309; }
.rate-text.low { color: #b91c1c; }
.lock-badge {
  display: inline-block; font-size: 12px; border-radius: 999px; padding: 2px 10px;
  background: #f1f5f9; color: var(--text-secondary); border: 1px solid var(--border);
}
.lock-badge.locked { background: #fef2f2; color: #b91c1c; border-color: #fecaca; font-weight: 600; }
.pkg-locked-note { margin-top: 10px; font-size: 12.5px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-sm); padding: 8px 12px; }
