/* ═══════════════════════════════════════════
   贵以专教育培训 · 统一设计系统 v2
   墨蓝 #1F3A5F / 朱砂 #B8493A / 宣纸米 #F5F1E8
   竹青 #5D7A6B / 墨黑 #2C2C2A
   思源宋体（标题）+ 思源黑体（正文）
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@500;700;900&family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
  /* 主色板 */
  --primary: #1F3A5F;        /* 墨蓝 */
  --primary-light: #335A86;  /* 亮墨蓝 - 链接/聚焦 */
  --primary-deep: #16293F;   /* 深墨蓝 - 侧边栏渐变 */
  --accent: #B8493A;         /* 朱砂 - 主行动按钮 */
  --accent-dark: #9C3A2D;    /* 朱砂深 */
  --success: #5D7A6B;        /* 竹青 */
  --success-light: #7C9788;
  --warning: #C8772E;        /* 赭石橙 */
  --danger: #B23A2E;         /* 警示红 */

  /* 纸面与文字 */
  --bg: #F5F1E8;             /* 宣纸米 */
  --bg-soft: #EFE9DC;
  --card: rgba(255, 255, 255, 0.82);
  --card-solid: #FFFFFF;
  --text: #2C2C2A;           /* 墨黑 */
  --text-light: #8A8276;     /* 暖灰 */
  --border: #E5DECF;         /* 暖边线 */
  --border-strong: #D8CFB8;

  /* 阴影与圆角 */
  --shadow-sm: 0 1px 3px rgba(31, 58, 95, 0.06);
  --shadow: 0 4px 16px rgba(31, 58, 95, 0.08), 0 1px 4px rgba(31, 58, 95, 0.04);
  --shadow-lg: 0 12px 40px rgba(31, 58, 95, 0.12), 0 2px 8px rgba(31, 58, 95, 0.05);
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --nav-width: 220px;
  --transition: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);

  /* 字体 */
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .brand, .logo, .card-header, .page-header h1, .modal-box h2, .login-card h2 {
  font-family: var(--font-serif);
  letter-spacing: 0.2px;
}

/* ═══ 首页 / 后台外壳 ═══ */
.home-body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(31,58,95,0.05), transparent),
    linear-gradient(180deg, #F7F3EA 0%, var(--bg) 60%);
  min-height: 100vh;
}

/* 顶部导航 */
.home-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(245, 241, 232, 0.78);
  border-bottom: 1px solid var(--border);
}

.home-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--primary);
  text-decoration: none;
}

.home-nav .brand-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.home-nav .brand span {
  color: var(--primary);
}

.home-nav .nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.home-nav .nav-links a {
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  opacity: 0.78;
  transition: opacity 0.2s, color 0.2s;
}

.home-nav .nav-links a:hover {
  opacity: 1;
  color: var(--accent);
}

.home-nav .nav-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.home-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.home-hero { text-align: center; margin-bottom: 64px; }

.home-hero .hero-badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 20px;
  background: rgba(31, 58, 95, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.home-hero h1 {
  font-size: 48px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -1px;
  margin-bottom: 12px;
  line-height: 1.15;
}

.home-hero h1 .accent {
  color: var(--accent);
}

.home-hero p {
  font-size: 18px;
  color: var(--text-light);
  font-weight: 400;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 学生卡片网格 */
.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.student-card {
  background: var(--card-solid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}

.student-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(31, 58, 95, 0.05), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.student-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.student-card:hover::after { opacity: 1; }

.student-card .card-top { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }

.student-card .avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(31, 58, 95, 0.25);
  overflow: hidden;
}

.student-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.student-card .name { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.student-card .grade { font-size: 13px; color: var(--text-light); margin-top: 2px; }
.student-card .card-stats { display: flex; gap: 16px; margin-bottom: 14px; }
.student-card .card-stats .mini-stat { font-size: 12px; color: var(--text-light); display: flex; align-items: center; gap: 4px; }

.student-card .stage {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.stage-trial { background: rgba(200, 119, 46, 0.12); color: var(--warning); }
.stage-formal { background: rgba(93, 122, 107, 0.14); color: var(--success); }
.stage-grad { background: rgba(138, 130, 118, 0.16); color: var(--text-light); }

.card-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; z-index: 5; }

.mini-btn {
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--primary);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.mini-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.fab {
  position: fixed; right: 28px; bottom: 28px;
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; font-size: 28px; line-height: 1;
  cursor: pointer; box-shadow: 0 8px 24px rgba(184, 73, 58, 0.4);
  z-index: 100; transition: transform 0.2s;
}
.fab:hover { transform: scale(1.08); }

.student-card .meta { margin-top: 14px; font-size: 12px; color: var(--text-light); padding-top: 14px; border-top: 1px solid var(--border); }

.student-card-wrapper { position: relative; }

.delete-btn {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.05); color: var(--text-light);
  font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; z-index: 5;
}
.delete-btn:hover { background: var(--danger); color: #fff; }

.student-card.add-new {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1.5px dashed var(--border-strong);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; min-height: 220px;
}
.student-card.add-new:hover { border-color: var(--accent); background: rgba(184, 73, 58, 0.03); }
.student-card.add-new .add-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(31, 58, 95, 0.08); display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--primary); margin-bottom: 14px; transition: all var(--transition);
}
.student-card.add-new:hover .add-icon { background: var(--accent); color: #fff; transform: scale(1.08); }
.student-card.add-new .add-title { font-size: 16px; font-weight: 600; color: var(--text); }
.student-card.add-new .add-sub { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* ═══ 弹窗 ═══ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(31, 58, 95, 0.32);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-box {
  background: var(--card-solid);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(31, 58, 95, 0.22);
  padding: 36px; width: 440px; max-width: 90vw;
  animation: slideUp 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.modal-box h2 { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.modal-box .modal-sub { font-size: 14px; color: var(--text-light); margin-bottom: 24px; }
.modal-box .form-group { margin-bottom: 18px; }
.modal-box label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.modal-box input, .modal-box select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: 15px; font-family: inherit;
  outline: none; transition: border-color 0.2s; background: var(--bg); color: var(--text);
}
.modal-box input:focus, .modal-box select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.1);
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* ═══ 控制台布局 ═══ */
.dashboard-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--nav-width);
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff; position: fixed; top: 0; left: 0; bottom: 0;
  padding: 24px 0; z-index: 100; display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.06);
  box-shadow: 4px 0 24px rgba(31, 58, 95, 0.18);
}
.sidebar-header { padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 12px; }
.sidebar-header .logo { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.3px; display: flex; align-items: center; gap: 8px; }
.sidebar-header .logo svg { width: 22px; height: 22px; flex-shrink: 0; }
.sidebar-header .sub { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 4px; }

.sidebar-nav { flex: 1; list-style: none; padding: 0 12px; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  color: rgba(255,255,255,0.62); text-decoration: none; font-size: 14px;
  transition: all 0.2s; margin-bottom: 2px;
}
.sidebar-nav li a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-nav li a.active { background: rgba(255,255,255,0.16); color: #fff; font-weight: 600; }
.sidebar-nav li a .icon { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-nav li a .icon svg { width: 18px; height: 18px; }
.sidebar-divider { border-top: 1px solid rgba(255,255,255,0.1); margin: 12px 20px; }

/* 汉堡菜单按钮（移动端） */
.sidebar-toggle {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 200;
  width: 40px; height: 40px; border-radius: 10px; border: none;
  background: var(--primary); color: #fff; font-size: 20px;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  align-items: center; justify-content: center;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 99;
}

.main-content { margin-left: var(--nav-width); flex: 1; padding: 32px 36px; min-height: 100vh; }

.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.page-header .subtitle { font-size: 14px; color: var(--text-light); }

/* 学生信息条 */
.student-info-bar {
  display: flex; align-items: center; gap: 16px;
  background: var(--card-solid); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 16px 24px; margin-bottom: 28px;
  border: 1px solid var(--border);
}
.parent-banner {
  background: linear-gradient(135deg, rgba(93,122,107,0.14), rgba(31,58,95,0.08));
  border: 1px solid rgba(93,122,107,0.32); color: var(--success);
  border-radius: var(--radius); padding: 12px 16px; margin: 18px 0 8px; font-size: 14px; font-weight: 600;
}
.student-info-bar .avatar-sm {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
}
.student-info-bar .info-text { flex: 1; }
.student-info-bar .info-text .sname { font-size: 17px; font-weight: 700; color: var(--text); font-family: var(--font-serif); }
.student-info-bar .info-text .sdetail { font-size: 12px; color: var(--text-light); }
.student-info-bar .stage-badge { padding: 5px 14px; border-radius: 16px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.student-info-bar .stage-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ═══ 卡片 ═══ */
.card {
  background: var(--card-solid); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 24px; margin-bottom: 20px;
  border: 1px solid var(--border); transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 18px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; letter-spacing: -0.2px;
}

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--card-solid); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 22px; text-align: center;
  border: 1px solid var(--border); transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card .stat-icon { margin-bottom: 10px; color: var(--primary); display: flex; align-items: center; justify-content: center; }
.stat-card .stat-icon svg { width: 34px; height: 34px; }
.stat-card .stat-value { font-size: 30px; font-weight: 700; color: var(--primary); letter-spacing: -0.5px; font-family: var(--font-serif); }
.stat-card .stat-label { font-size: 13px; color: var(--text); margin-top: 4px; font-weight: 500; }
.stat-card .stat-sub { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* 进度条 */
.progress-bar { background: var(--bg-soft); border-radius: 10px; height: 8px; overflow: hidden; margin: 8px 0; }
.progress-fill { height: 100%; border-radius: 10px; transition: width 0.8s cubic-bezier(0.25, 0.1, 0.25, 1); }
.progress-fill.blue { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.progress-fill.green { background: linear-gradient(90deg, var(--success), var(--success-light)); }
.progress-fill.orange { background: linear-gradient(90deg, var(--warning), #D99348); }
.progress-fill.red { background: linear-gradient(90deg, var(--danger), #C85544); }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* 时间轴 */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 24px; }
.timeline-item[onclick] { cursor: pointer; }
.timeline-item[onclick]:hover .timeline-content { box-shadow: 0 4px 20px rgba(31,58,95,0.12); border-color: rgba(31,58,95,0.2); }

.session-checkbox {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-right: 8px; border: 2px solid var(--border-strong);
  border-radius: 4px; background: #fff; font-size: 12px; font-weight: 700;
  color: transparent; vertical-align: middle; cursor: pointer; transition: all 0.15s ease;
}
.session-checkbox.checked { background: var(--success); border-color: var(--success); color: #fff; }
.session-checkbox.checked::after { content: '✓'; }
.timeline-item[onclick]:hover .session-checkbox { border-color: var(--primary); transform: scale(1.1); }

.system-clock { animation: clockPulse 2s ease-in-out infinite; }
@keyframes clockPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 119, 46, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(200, 119, 46, 0); }
}

.timeline-dot { position: absolute; left: -25px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--border); border: 3px solid var(--bg); }
.timeline-dot.active { background: var(--primary); box-shadow: 0 0 0 6px rgba(31,58,95,0.15); }
.timeline-dot.done { background: var(--success); }
.timeline-content {
  background: var(--card-solid); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 18px 22px; border: 1px solid var(--border);
}
.timeline-content .t-date { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.timeline-content .t-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; font-family: var(--font-serif); }
.timeline-content .t-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; font-size: 13px; }
.timeline-content .t-details span { display: flex; align-items: center; gap: 4px; }
.timeline-content .t-aha { margin-top: 10px; padding: 10px 14px; background: rgba(31,58,95,0.05); border-radius: var(--radius-sm); font-size: 13px; color: var(--primary); border-left: 3px solid var(--accent); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
table th {
  background: rgba(31, 58, 95, 0.06); color: var(--text);
  padding: 12px 14px; text-align: left; font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.3px; border-bottom: 1.5px solid var(--border);
}
table td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
table tr:hover td { background: rgba(31,58,95,0.03); }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.tab-btn {
  padding: 10px 24px; border: none; background: none; cursor: pointer;
  font-size: 14px; color: var(--text-light); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.2s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--accent); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.tag { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.tag-red { background: rgba(178,58,46,0.1); color: var(--danger); }
.tag-orange { background: rgba(200,119,46,0.12); color: var(--warning); }
.tag-green { background: rgba(93,122,107,0.14); color: var(--success); }
.tag-blue { background: rgba(31,58,95,0.08); color: var(--primary); }
.tag-gray { background: rgba(138,130,118,0.14); color: var(--text-light); }

.feedback-card {
  background: var(--card-solid); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 22px 26px; margin-bottom: 16px; border-left: 3px solid var(--accent); border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.feedback-card .fb-date { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.feedback-card .fb-section { margin-bottom: 6px; font-size: 14px; }
.feedback-card .fb-section strong { color: var(--primary); }

/* ═══ 按钮 ═══ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px; border-radius: 24px;
  font-size: 15px; font-weight: 600; cursor: pointer; border: none;
  transition: all 0.2s; text-decoration: none; letter-spacing: -0.1px;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(184,73,58,0.3); }
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 4px 14px rgba(184,73,58,0.4); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 7px 16px; font-size: 13px; border-radius: 20px; }
.btn-ghost { background: rgba(31,58,95,0.06); color: var(--text); }
.btn-ghost:hover { background: rgba(31,58,95,0.12); }

/* ═══ 登录页 ═══ */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(184,73,58,0.06), transparent),
    radial-gradient(700px 500px at 0% 110%, rgba(31,58,95,0.08), transparent),
    var(--bg);
  position: relative; overflow: hidden;
}
.login-bg { position: absolute; inset: 0; z-index: 0; }
.login-bg .orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.32; animation: orbFloat 20s ease-in-out infinite; }
.login-bg .orb:nth-child(1) { width: 500px; height: 500px; background: radial-gradient(circle, var(--accent), transparent); top: -100px; right: -100px; animation-delay: 0s; }
.login-bg .orb:nth-child(2) { width: 400px; height: 400px; background: radial-gradient(circle, var(--primary), transparent); bottom: -100px; left: -80px; animation-delay: -7s; }
.login-bg .orb:nth-child(3) { width: 300px; height: 300px; background: radial-gradient(circle, var(--success), transparent); top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -14s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-15px, 25px) scale(0.95); }
  75% { transform: translate(-25px, -15px) scale(1.02); }
}

.login-card {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 24px; box-shadow: 0 2px 40px rgba(31,58,95,0.1), 0 0 0 1px rgba(31,58,95,0.06);
  padding: 44px 40px; width: 380px; text-align: center;
}
.login-card .login-logo {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  display: flex; align-items: center; justify-content: center;
  color: #fff; margin: 0 auto 20px; box-shadow: 0 8px 24px rgba(31,58,95,0.25);
}
.login-card .login-logo svg { width: 34px; height: 34px; }
.login-card h2 { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.login-card .login-sub { font-size: 14px; color: var(--text-light); margin-bottom: 28px; }
.login-card .input-wrap { position: relative; margin-bottom: 18px; }
.login-card input {
  width: 100%; padding: 14px 16px; border: 1px solid var(--border-strong);
  border-radius: 14px; font-size: 16px; font-family: inherit; outline: none;
  background: rgba(255,255,255,0.7); color: var(--text); transition: all 0.2s;
}
.login-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(31,58,95,0.08); background: #fff; }
.login-card .btn { width: 100%; justify-content: center; padding: 14px; font-size: 16px; border-radius: 14px; margin-top: 6px; }
.login-card .login-footer { margin-top: 20px; font-size: 13px; color: var(--text-light); }
.login-card .login-footer a { color: var(--primary); text-decoration: none; font-weight: 500; }

/* ═══ 响应式 ═══ */
@media (max-width: 768px) {
  .home-hero h1 { font-size: 32px; }
  .sidebar-toggle { display: flex; }
  .sidebar {
    width: var(--nav-width); transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .dashboard-layout { flex-direction: column; }
  .main-content { margin-left: 0; padding: 60px 16px 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { width: 90vw; padding: 32px 24px; }
  .page-header h1 { font-size: 22px; }
}

/* ═══ Toast 提示 ═══ */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff;
  padding: 12px 24px; border-radius: 24px;
  font-size: 14px; font-weight: 500; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 2000; animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(16px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }
