/* ============================================================
   未来少年科学院 · 学员管理系统
   全新设计语言：极简 · 克制 · 现代
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --primary: #4f6ef7;
  --primary-dark: #3b56e0;
  --primary-soft: #eef1fe;
  --accent: #7c5cf5;
  --success: #16a34a;
  --success-soft: #e8f7ee;
  --warning: #d97706;
  --warning-soft: #fdf3e3;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --info: #2563eb;
  --info-soft: #e8f0fe;
  --text: #1f2430;
  --text-secondary: #5b6472;
  --text-muted: #9aa3b2;
  --border: #e6e9f0;
  --border-strong: #d5dae4;
  --shadow-sm: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.05);
  --shadow-md: 0 4px 16px rgba(16,24,40,0.08);
  --shadow-lg: 0 12px 40px rgba(16,24,40,0.14);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
}

html, body { height: 100%; }

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

/* ============================================================
   登录页
   ============================================================ */
.login-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #fafbfe;
}
.login-split {
  display: flex;
  min-height: 100vh;
  align-items: center;
  padding: 0 12%;
  gap: 0;
}

/* 左侧品牌区 */
.login-visual {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 0;
}
.lv-glow {
  position: absolute;
  width: 500px; height: 340px;
  top: 50%; left: 30%;
  transform: translate(-30%, -55%);
  background: radial-gradient(ellipse at center, rgba(124,92,245,0.18) 0%, rgba(236,72,153,0.1) 40%, transparent 70%);
  filter: blur(30px);
  animation: lvGlowPulse 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes lvGlowPulse {
  0%, 100% { opacity: 0.7; transform: translate(-30%, -55%) scale(1); }
  50% { opacity: 1; transform: translate(-30%, -55%) scale(1.08); }
}
.login-visual-content {
  position: relative; z-index: 1;
  max-width: 440px;
  width: 100%;
  text-align: left;
}
.login-visual-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 36px;
}
.lv-logo-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.lv-brand { font-size: 15px; font-weight: 600; color: #333; letter-spacing: 0.5px; }
.login-visual-title {
  font-size: 52px; font-weight: 800;
  line-height: 1.15;
  color: #1a1a2e;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.login-visual-sub {
  font-size: 13px;
  color: #999;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* 右侧登录表单区 */
.login-form-side {
  flex: 0 0 380px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.login-form-wrap {
  width: 100%;
}
.login-form-header { margin-bottom: 32px; }
.login-form-header h2 {
  font-size: 26px; font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 6px;
}
.login-form-header p {
  font-size: 14px;
  color: #999;
}
.login-form { margin-bottom: 6px; }
.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.login-input-icon {
  position: absolute;
  left: 16px;
  font-size: 14px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
}
.login-input {
  padding-left: 44px !important;
  height: 50px;
  font-size: 14px;
  background: #f3f4f8 !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  transition: all 0.2s;
}
.login-input:focus {
  background: #fff !important;
  border-color: #4f6ef7 !important;
  box-shadow: 0 0 0 3px rgba(79,110,247,0.1);
}
.login-btn {
  height: 50px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 4px;
  margin-top: 8px;
  background: linear-gradient(135deg, #4f6ef7, #6c5ce7);
  border: none;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(79,110,247,0.35);
  transition: all 0.2s;
}
.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(79,110,247,0.45);
}
.login-btn:active {
  transform: translateY(0);
}
.login-tip {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: #bbb;
}

/* 响应式 */
@media (max-width: 700px) {
  .login-split { flex-direction: column; padding: 40px 24px; gap: 32px; justify-content: center; }
  .login-visual { padding: 20px 0; text-align: center; justify-content: center; }
  .login-visual-content { text-align: center; }
  .login-visual-logo { justify-content: center; }
  .login-visual-title { font-size: 36px; }
  .lv-glow { width: 320px; height: 220px; left: 50%; transform: translate(-50%, -55%); }
  @keyframes lvGlowPulse {
    0%, 100% { opacity: 0.7; transform: translate(-50%, -55%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -55%) scale(1.08); }
  }
  .login-form-side { flex: none; width: 100%; max-width: 380px; justify-content: center; }
}

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

.sidebar {
  width: 228px;
  flex-shrink: 0;
  background: #1c1f2b;
  color: #cdd2de;
  display: flex; flex-direction: column;
  position: fixed; height: 100vh; left: 0; top: 0; z-index: 100;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-logo-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f6ef7, #7c5cf5);
  flex-shrink: 0;
}
.sidebar-logo-text { min-width: 0; }
.sidebar-logo { font-size: 15px; font-weight: 700; color: #fff; white-space: nowrap; }
.sidebar-logo-sub { font-size: 11px; color: #8b93a7; margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  margin-bottom: 2px;
  color: #9aa3b5;
  text-decoration: none; cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  transition: all 0.18s ease;
}
.nav-icon { width: 20px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #e7eaf2; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(79,110,247,0.95), rgba(124,92,245,0.85));
  color: #fff;
  box-shadow: 0 4px 14px rgba(79,110,247,0.35);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.org-switcher {
  width: 100%; padding: 8px 10px;
  margin-bottom: 12px;
  font-size: 12px;
  background: rgba(255,255,255,0.07);
  color: #e7eaf2;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  outline: none; cursor: pointer;
}
.org-switcher:focus { border-color: #4f6ef7; }
.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.user-avatar {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f6ef7, #7c5cf5);
  flex-shrink: 0;
}
.user-meta { min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role-line { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.user-role {
  font-size: 11px; color: #9aa3b5;
  background: rgba(255,255,255,0.08);
  padding: 1px 8px; border-radius: 10px;
  white-space: nowrap;
}
.user-org { font-size: 11px; color: #8b93a7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-logout { width: 100%; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); color: #cdd2de; }
.btn-logout:hover { background: rgba(220,38,38,0.15); border-color: rgba(220,38,38,0.3); color: #ffb4b4; }

.main-content {
  flex: 1;
  margin-left: 228px;
  padding: 30px 34px;
  min-width: 0;
}
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.28s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* 页面标题 */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.page-head h2 { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.page-sub { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.page-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   卡片
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.card-header h3 { font-size: 15px; font-weight: 600; color: var(--text); }
.card-body { min-width: 0; }

/* ============================================================
   统计卡片
   ============================================================ */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card {
  display: flex; align-items: center; gap: 14px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.stat-blue .stat-icon { background: var(--info-soft); }
.stat-green .stat-icon { background: var(--success-soft); }
.stat-orange .stat-icon { background: var(--warning-soft); }
.stat-purple .stat-icon { background: var(--primary-soft); }
.stat-blue .stat-num { color: var(--info); }
.stat-green .stat-num { color: var(--success); }
.stat-orange .stat-num { color: var(--warning); }
.stat-purple .stat-num { color: var(--primary); }
.stat-num { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.dashboard-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-bottom: 20px; }

/* 工作台 · 今日课次 */
.dashboard-lesson-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 12px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.15s;
}
.dashboard-lesson-item:hover { background: var(--surface-2); }
.dls-time { font-size: 15px; font-weight: 700; color: var(--primary); min-width: 48px; flex-shrink: 0; }
.dls-info { flex: 1; min-width: 0; }
.dls-name { font-weight: 600; font-size: 14px; color: var(--text); }
.dls-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dls-progress { height: 4px; background: var(--border); border-radius: 2px; margin-top: 7px; overflow: hidden; }
.dls-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 2px; transition: width 0.3s; }
.dls-count { font-size: 13px; font-weight: 600; color: var(--text-secondary); min-width: 46px; text-align: right; flex-shrink: 0; }

/* 工作台 · 出勤概况 */
.att-rate-circle { position: relative; width: 96px; height: 96px; margin: 0 auto 14px; }
.att-rate-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.att-rate-text span { font-size: 17px; font-weight: 700; color: var(--success); display: block; }
.att-rate-text small { font-size: 11px; color: var(--text-muted); }
.att-breakdown { display: flex; flex-direction: column; gap: 8px; }
.att-row { display: flex; align-items: center; font-size: 13px; color: var(--text-secondary); }
.att-dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.att-val { margin-left: auto; font-weight: 600; color: var(--text); }

/* 工作台 · 近期动态 */
.activity-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.activity-content { flex: 1; min-width: 0; }
.activity-content strong { font-size: 13px; color: var(--text); }
.activity-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.activity-time { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

/* 工作台 · 即将到来 */
.upcoming-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.15s;
}
.upcoming-item:hover { background: var(--surface-2); }
.upcoming-item:last-child { border-bottom: none; }
.upcoming-date {
  width: 44px; text-align: center; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 0;
}
.upcoming-date.today { background: linear-gradient(135deg, var(--primary), var(--accent)); border-color: transparent; }
.upcoming-date.today .upcoming-day, .upcoming-date.today .upcoming-month { color: #fff; }
.upcoming-day { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1; }
.upcoming-month { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.upcoming-info { flex: 1; min-width: 0; }
.upcoming-name { font-size: 13px; font-weight: 600; color: var(--text); }
.upcoming-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   表单
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px; outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  background: var(--surface);
  font-family: inherit;
  color: var(--text);
  box-sizing: border-box;
  min-height: 40px;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235b6472' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
select.form-select[size] {
  padding-right: 12px;
  background-image: none;
  -webkit-appearance: none;
  appearance: none;
}
input[type="date"].form-input {
  font-size: 14px;
  padding: 8px 14px;
  font-weight: 500;
}
input[type="date"]::-webkit-calendar-picker-indicator { width: 18px; height: 18px; cursor: pointer; opacity: 0.55; transition: opacity 0.2s; }
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,110,247,0.12);
}
.form-textarea { min-height: 80px; resize: vertical; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.form-tabs { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.form-tab {
  padding: 8px 18px; border-radius: var(--radius-sm); border: none;
  background: var(--surface-2); color: var(--text-secondary);
  font-size: 13px; cursor: pointer; transition: all 0.18s; font-family: inherit;
}
.form-tab:hover { background: var(--primary-soft); color: var(--primary); }
.form-tab.active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 3px 10px rgba(79,110,247,0.3); }

.weekday-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.weekday-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--surface-2); cursor: pointer;
  font-size: 14px; transition: all 0.18s; user-select: none;
  border: 1px solid var(--border);
}
.weekday-chip input { display: none; }
.weekday-chip:has(input:checked) {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 600; border-color: transparent;
  box-shadow: 0 3px 10px rgba(79,110,247,0.3);
}

.lesson-table-wrap { overflow-x: auto; }
.lesson-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lesson-table th { text-align: left; padding: 8px 10px; color: var(--text-muted); font-weight: 500; font-size: 12px; border-bottom: 1px solid var(--border); }
.lesson-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.lesson-table .form-input { width: 100%; margin: 0; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13px; font-weight: 500;
  transition: all 0.18s;
  text-decoration: none; font-family: inherit;
  white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent; color: #fff;
  box-shadow: 0 3px 10px rgba(79,110,247,0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; box-shadow: 0 5px 16px rgba(79,110,247,0.4); transform: translateY(-1px); }
.btn-danger { color: var(--danger); border-color: rgba(220,38,38,0.25); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  border-color: transparent; color: #fff;
  box-shadow: 0 3px 10px rgba(245,158,11,0.3);
}
.btn-warning:hover { background: linear-gradient(135deg, #d97706, #c2410c); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--border-strong); color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); transform: none; }
.btn-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-secondary); }
.btn-outline:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; padding: 11px; font-size: 15px; }

/* ============================================================
   表格
   ============================================================ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px; vertical-align: middle;
}
.data-table th {
  background: var(--surface-2);
  font-weight: 600; color: var(--text-secondary);
  font-size: 12px; white-space: nowrap;
}
.data-table tr:hover td { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: none; }
.student-no {
  font-family: "SF Mono", ui-monospace, Monaco, monospace;
  color: var(--primary); font-size: 12px;
  background: var(--primary-soft); padding: 2px 8px;
  border-radius: 6px; font-weight: 600; white-space: nowrap;
}
.cell-name { font-weight: 600; }

/* ============================================================
   工具栏 / 徽章 / 状态
   ============================================================ */
.toolbar { display: flex; gap: 10px; margin-bottom: 18px; align-items: center; flex-wrap: wrap; }
.toolbar .form-input { max-width: 300px; flex: 1; min-width: 180px; }
.toolbar .form-select { width: auto; min-width: 130px; }

.badge {
  display: inline-block; padding: 3px 10px;
  background: var(--primary-soft); color: var(--primary);
  border-radius: 12px; font-size: 12px; font-weight: 500;
}
.status-dot {
  display: inline-block; padding: 3px 10px;
  border-radius: 12px; font-size: 12px; font-weight: 500;
  white-space: nowrap;
}
.status-tag {
  display: inline-block; padding: 3px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
  flex-shrink: 0;
}
.status-present { background: var(--success-soft); color: var(--success); }
.status-late { background: var(--warning-soft); color: var(--warning); }
.status-leave { background: var(--primary-soft); color: var(--primary); }
.status-absent { background: var(--danger-soft); color: var(--danger); }

.row-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }

/* ============================================================
   下拉菜单
   ============================================================ */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  display: none; position: absolute; right: 0; top: 100%;
  min-width: 130px; z-index: 100;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 6px; margin-top: 4px;
}
.dropdown-menu.show { display: block; }
.dropdown-menu a {
  display: block; padding: 8px 12px;
  font-size: 13px; color: var(--text);
  text-decoration: none; border-radius: 6px;
  transition: background 0.15s;
}
.dropdown-menu a:hover { background: var(--primary-soft); color: var(--primary); }

/* ============================================================
   弹窗
   ============================================================ */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(20,25,40,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 560px; max-width: 100%; max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
  background: none; border: none; font-size: 22px;
  cursor: pointer; color: var(--text-muted);
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-body { padding: 22px; }
.modal-footer {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
  position: sticky; bottom: 0; background: var(--surface);
}

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed; top: 24px; left: 50%;
  transform: translateX(-50%);
  background: rgba(31,36,48,0.94);
  color: #fff;
  padding: 11px 24px; border-radius: var(--radius-sm);
  z-index: 2000; font-size: 14px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.toast-success { background: linear-gradient(135deg, #16a34a, #15803d); }
.toast-error { background: linear-gradient(135deg, #dc2626, #b91c1c); }

/* ============================================================
   空状态
   ============================================================ */
.empty { text-align: center; padding: 30px 20px; color: var(--text-muted); font-size: 13px; }

/* ============================================================
   日历
   ============================================================ */
.calendar-header { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.calendar-title { font-size: 15px; font-weight: 600; min-width: 100px; text-align: center; color: var(--text); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; width: 100%; overflow: hidden; }
.cal-weekday { text-align: center; padding: 6px 0; font-size: 11px; color: var(--text-muted); font-weight: 600; min-width: 0; }
.cal-cell {
  aspect-ratio: 1; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px 5px; cursor: pointer;
  position: relative; transition: all 0.15s;
  display: flex; flex-direction: column;
  font-size: 12px; line-height: 1.2;
  min-width: 0; overflow: hidden; box-sizing: border-box;
  background: var(--surface);
}
.cal-cell:hover { border-color: var(--primary); background: var(--primary-soft); }
.cal-cell.empty { border: none; cursor: default; background: none; }
.cal-cell.today { border-color: var(--primary); background: var(--primary-soft); font-weight: 700; }
.cal-cell.has-lesson { background: var(--success-soft); border-color: rgba(22,163,74,0.35); }
.cal-cell.today.has-lesson { background: var(--primary-soft); border-color: var(--primary); }
.cal-num { font-size: 13px; font-weight: 500; }
.cal-dot { font-size: 9px; color: var(--success); margin-top: auto; line-height: 1; }

/* ============================================================
   签到布局
   ============================================================ */
.checkin-layout { display: flex; gap: 16px; align-items: flex-start; }
.checkin-left { width: 330px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.checkin-left .card { padding: 14px; overflow: hidden; }
.checkin-left #dayLessonsCard { max-height: 420px; overflow-y: auto; }
.checkin-right { flex: 1; min-width: 0; }
.checkin-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.checkin-empty-icon { font-size: 46px; margin-bottom: 14px; }

/* 批量操作 */
.batch-toolbar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; padding: 10px 14px;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(79,110,247,0.18);
  flex-wrap: wrap;
}
.batch-toggle { background: none; border: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--primary); padding: 4px 8px; border-radius: 6px; display: flex; align-items: center; gap: 4px; transition: background 0.15s; font-family: inherit; }
.batch-toggle:hover { background: rgba(79,110,247,0.1); }
.batch-toggle-icon { font-size: 10px; transition: transform 0.2s; }
.batch-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; flex: 1; }
.batch-submit { margin-left: auto; }

/* 课次列表项 */
.lesson-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.18s;
  background: var(--surface);
}
.lesson-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.lesson-item-time { font-weight: 700; color: var(--primary); font-size: 15px; min-width: 52px; flex-shrink: 0; }
.lesson-item-body { flex: 1; min-width: 0; }
.lesson-item-title { font-weight: 600; font-size: 15px; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-item-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.lesson-meta-tag { font-size: 12px; color: var(--text-secondary); background: var(--surface-2); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.lesson-item-action { color: var(--primary); font-weight: 600; font-size: 14px; flex-shrink: 0; white-space: nowrap; }
.lesson-item-right { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 80px; }
.lesson-item-sub { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.lesson-item-loc { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* 签到行 */
.checkin-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
  transition: background 0.15s;
}
.checkin-row:hover { background: var(--surface-2); }
.checkin-no { font-family: "SF Mono", ui-monospace, monospace; color: var(--primary); font-size: 12px; min-width: 58px; font-weight: 600; flex-shrink: 0; }
.checkin-name { font-weight: 600; min-width: 60px; font-size: 14px; flex-shrink: 0; }
.checkin-time { font-size: 12px; color: var(--text-muted); min-width: 50px; flex-shrink: 0; }

.status-btns { display: flex; gap: 4px; }
.status-btn {
  padding: 5px 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 6px; cursor: pointer;
  font-size: 12px; transition: all 0.15s;
  font-family: inherit; white-space: nowrap;
}
.status-btn:hover { border-color: var(--primary); color: var(--primary); }
.status-btn.active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(79,110,247,0.3); }

.checkin-row.checked { background: var(--success-soft); border-left: 3px solid var(--success); padding-left: 11px; }
.checkin-row.checked .checkin-name { color: var(--success); }
.checkin-row.checked .checkin-time { color: var(--success); font-weight: 600; }
.checkin-row.is-temp { background: var(--warning-soft); }
.checkin-row .btn { flex-shrink: 0; white-space: nowrap; }
.checkin-note-input { width: 140px !important; min-width: 100px; font-size: 12px; padding: 5px 8px; flex-shrink: 0; }
.note-toggle-btn { flex-shrink: 0; min-width: 32px; padding: 5px 8px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; color: var(--text-secondary); transition: all 0.15s; }
.note-toggle-btn:hover { background: var(--border); color: var(--text); }
.note-toggle-btn.note-leave { background: var(--warning-soft); border-color: #fcd9a8; color: var(--warning); font-weight: 500; }

.att-upload-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary); font-size: 12px; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
  user-select: none; flex-shrink: 0; margin-left: auto;
}
.att-upload-btn:hover { background: rgba(79,110,247,0.16); }
.att-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--primary); color: #fff;
  border-radius: 9px; font-size: 11px; font-weight: 600;
}

/* 班次卡片 */
.class-item {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px;
  cursor: pointer; transition: all 0.18s;
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
}
.class-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.class-name { font-weight: 600; font-size: 15px; color: var(--text); }
.class-meta { color: var(--text-secondary); font-size: 13px; flex: 1; }
.class-status { flex-shrink: 0; }

/* ============================================================
   成长档案时间线
   ============================================================ */
.timeline-item { position: relative; padding: 14px 0 14px 28px; border-left: 2px solid rgba(79,110,247,0.18); margin-left: 8px; }
.timeline-item::before {
  content: ''; position: absolute; left: -7px; top: 22px;
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.timeline-date { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  transition: all 0.18s;
}
.timeline-content:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.timeline-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.timeline-title { font-size: 14px; font-weight: 600; color: var(--text); flex: 1; min-width: 0; }
.timeline-actions { display: flex; gap: 6px; margin-left: auto; }
.timeline-notes { font-size: 12px; color: var(--text-secondary); margin-top: 8px; padding: 6px 10px; background: var(--surface-2); border-radius: 6px; }
.timeline-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.att-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary); font-size: 12px;
  text-decoration: none; transition: all 0.15s;
}
.att-chip:hover { background: rgba(79,110,247,0.16); }

/* ============================================================
   分段选择器 / 图标按钮 / 家长行
   ============================================================ */
.segmented { display: inline-flex; background: var(--surface-2); border-radius: var(--radius-sm); padding: 3px; gap: 2px; width: 100%; border: 1px solid var(--border); }
.seg-btn { flex: 1; padding: 8px 16px; border: none; background: transparent; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-secondary); transition: all 0.18s; font-family: inherit; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: 0 1px 4px rgba(16,24,40,0.1); }

.icon-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0; font-family: inherit; line-height: 1;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

.parent-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.parent-row .form-input { flex: 1.2; min-width: 0; }
.parent-row .form-input:nth-child(2) { flex: 1.3; }
.parent-row .form-select { flex: 0.9; min-width: 0; }

/* ============================================================
   分页
   ============================================================ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 0; flex-wrap: wrap; }
.pagination-sm { padding: 8px 0; gap: 4px; }
.page-info { font-size: 13px; color: var(--text-muted); margin-right: 8px; }
.page-btn { padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); font-size: 13px; color: var(--text-secondary); cursor: pointer; transition: all 0.15s; }
.pagination-sm .page-btn { padding: 4px 9px; font-size: 12px; }
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-dots { color: var(--text-muted); padding: 0 2px; }
.page-size-wrap { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.page-size-select {
  padding: 4px 24px 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  font-size: 13px; color: var(--text-secondary);
  outline: none; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa3b2' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center;
}
.page-size-select:focus { border-color: var(--primary); }

/* ============================================================
   成长档案布局
   ============================================================ */
.archive-layout { display: flex; gap: 16px; align-items: flex-start; }
.archive-left { width: 440px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.archive-left .toolbar { margin-bottom: 0; }
.archive-list-card { max-height: calc(100vh - 220px); overflow-y: auto; padding: 0; }
.archive-table { font-size: 13px; table-layout: fixed; width: 100%; }
.archive-table th, .archive-table td { padding: 15px 12px; line-height: 1.5; }
.archive-table th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
#studentDetailTitle { display: none; }
.archive-table th:nth-child(1), .archive-table td:nth-child(1) { width: 90px; }
.archive-table th:nth-child(2), .archive-table td:nth-child(2) { width: 80px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-table th:nth-child(3), .archive-table td:nth-child(3) { width: 56px; white-space: nowrap; }
.archive-table th:nth-child(4), .archive-table td:nth-child(4) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-row:hover { background: var(--surface-2); cursor: pointer; }
.archive-row.active { background: var(--primary-soft); }
.archive-row.active td { font-weight: 600; }
.archive-right { flex: 1; min-width: 0; }
.archive-right .card { max-height: calc(100vh - 170px); overflow-y: auto; }
.archive-placeholder { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.archive-placeholder-icon { font-size: 46px; margin-bottom: 14px; }

/* 学员档案头部 */
.archive-profile {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 22px;
  background: linear-gradient(135deg, var(--primary-soft), rgba(124,92,245,0.05));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(79,110,247,0.16);
  margin-bottom: 16px;
}
.archive-avatar {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(79,110,247,0.3);
}
.archive-meta { flex: 1; min-width: 0; }
.archive-name-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.archive-name { font-size: 20px; font-weight: 700; color: var(--text); }
.student-no-badge {
  font-family: "SF Mono", ui-monospace, Monaco, monospace;
  font-size: 13px; font-weight: 600;
  color: var(--primary); background: var(--primary-soft);
  padding: 4px 12px; border-radius: 20px; letter-spacing: 0.5px;
}
.archive-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 20px; }
.info-item { display: flex; flex-direction: column; gap: 2px; }
.info-label { font-size: 12px; color: var(--text-muted); }
.info-value { font-size: 14px; color: var(--text); font-weight: 500; }

/* 档案统计 */
.archive-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.stat-mini {
  padding: 16px; border-radius: var(--radius);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.18s;
}
.stat-mini:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-mini-icon { font-size: 20px; margin-bottom: 6px; }
.stat-mini-num { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-mini-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-blue .stat-mini-num { color: var(--info); }
.stat-green .stat-mini-num { color: var(--success); }
.stat-orange .stat-mini-num { color: var(--warning); }
.stat-red .stat-mini-num { color: var(--danger); }

/* 学员附件 */
.archive-attachments { margin-top: 20px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.attachment-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  position: relative; transition: all 0.18s;
}
.attachment-card:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.att-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; cursor: pointer; flex-shrink: 0; }
.att-file-icon {
  width: 44px; height: 44px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-soft), #dbe3fd);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.att-info { flex: 1; min-width: 0; }
.att-name { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.att-del-btn {
  width: 24px; height: 24px; border: none;
  background: var(--danger-soft); color: var(--danger);
  border-radius: 6px; cursor: pointer; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s;
}
.att-del-btn:hover { background: var(--danger); color: #fff; }

/* 添加学员到班次 */
.add-stu-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.add-stu-toolbar .form-input { flex: 1; }
.add-stu-grade-filter { flex: 0 0 120px !important; min-width: 120px; }
.select-all-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); cursor: pointer; white-space: nowrap; user-select: none; }
.select-all-label input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
.add-stu-check { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); flex-shrink: 0; }
.manual-lesson-row td { vertical-align: middle; }
.manual-lesson-row .form-input { min-height: 34px; }
.add-stu-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.add-stu-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
.add-stu-item:last-child { border-bottom: none; }
.add-stu-item:hover { background: var(--surface-2); }
.add-stu-item.selected { background: var(--primary-soft); border-left: 3px solid var(--primary); padding-left: 11px; }
.add-stu-item input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); flex-shrink: 0; }
.add-stu-no { font-family: "SF Mono", ui-monospace, monospace; font-size: 12px; font-weight: 600; color: var(--primary); background: var(--primary-soft); padding: 2px 8px; border-radius: 6px; min-width: 60px; text-align: center; flex-shrink: 0; }
.add-stu-name { font-size: 14px; font-weight: 500; color: var(--text); flex: 1; }
.add-stu-grade { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

/* ============================================================
   自定义日期选择器
   ============================================================ */
.datepicker-popup {
  position: fixed; z-index: 3000; width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  animation: dpIn 0.18s ease;
}
@keyframes dpIn { from { opacity: 0; transform: translateY(-6px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.dp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dp-title { font-size: 16px; font-weight: 600; color: var(--text); }
.dp-nav-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 6px; cursor: pointer;
  font-size: 15px; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.dp-nav-btn:hover { background: var(--primary-soft); color: var(--primary); }
.dp-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.dp-weekday { text-align: center; font-size: 12px; color: var(--text-muted); font-weight: 600; padding: 6px 0; }
.dp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500;
  border-radius: 8px; cursor: pointer;
  color: var(--text); transition: all 0.15s;
  border: none; background: transparent; font-family: inherit;
}
.dp-day:hover { background: var(--primary-soft); color: var(--primary); }
.dp-day.other-month { color: var(--text-muted); opacity: 0.4; }
.dp-day.today { font-weight: 700; color: var(--primary); }
.dp-day.today::after { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); margin-top: 18px; }
.dp-day.selected { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff !important; font-weight: 600; box-shadow: 0 3px 8px rgba(79,110,247,0.35); }
.dp-day.selected:hover { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.dp-footer { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; }
.dp-today-btn { border: none; background: none; color: var(--primary); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.dp-clear-btn { border: none; background: none; color: var(--text-muted); font-size: 13px; cursor: pointer; font-family: inherit; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1080px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .archive-layout { flex-direction: column; }
  .archive-left { width: 100%; }
  .archive-list-card { max-height: 320px; }
  .archive-right .card { max-height: none; }
  .checkin-layout { flex-direction: column; }
  .checkin-left { width: 100%; }
}
@media (max-width: 700px) {
  .sidebar { width: 68px; }
  .sidebar-brand { justify-content: center; padding: 18px 8px; }
  .sidebar-logo-text, .sidebar-footer .user-meta, .btn-logout, .org-switcher { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .nav-icon { width: auto; }
  .nav-item span { display: none; }
  .sidebar-footer { padding: 12px 8px; }
  .user-info { justify-content: center; }
  .main-content { margin-left: 68px; padding: 20px 16px; }
  .form-row { flex-direction: column; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .archive-profile { flex-direction: column; align-items: center; text-align: center; }
  .archive-info-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   各分校数据对比
   ============================================================ */
.org-compare-table { width: 100%; }
.org-compare-row {
  display: grid;
  grid-template-columns: 1.6fr repeat(6, 1fr);
  gap: 8px;
  align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
}
.org-compare-row:last-child { border-bottom: none; }
.org-compare-head {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  padding-bottom: 10px; border-bottom: 1px solid var(--border-strong);
}
.org-compare-head .occ-cell { text-align: center; }
.occ-name {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--text); font-size: 14px;
  min-width: 0;
}
.occ-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  flex-shrink: 0;
}
.occ-org-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.occ-code {
  font-size: 11px; color: var(--text-muted);
  background: var(--surface-2); padding: 1px 7px; border-radius: 10px;
  flex-shrink: 0;
}
.occ-cell { text-align: center; font-size: 14px; color: var(--text); min-width: 0; }
.occ-cell.occ-num { font-weight: 600; }
.occ-num { font-weight: 700; font-size: 16px; color: var(--text); }
.occ-sub { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.occ-bar {
  height: 4px; background: var(--border); border-radius: 2px;
  margin-top: 5px; overflow: hidden; max-width: 80px; margin-left: auto; margin-right: auto;
}
.occ-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px; transition: width 0.4s ease;
}
.occ-rate {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 600;
}
.rate-good { background: var(--success-soft); color: var(--success); }
.rate-mid { background: var(--warning-soft); color: var(--warning); }
.rate-low { background: var(--danger-soft); color: var(--danger); }

@media (max-width: 900px) {
  .org-compare-row { grid-template-columns: 1.4fr repeat(3, 1fr); }
  .org-compare-row > .occ-cell:nth-child(n+5) { display: none; }
  .org-compare-head > .occ-cell:nth-child(n+5) { display: none; }
}
