/* =========================================================
   教务助手 · 样式表
   ========================================================= */
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f5f7fb;
  --card: #ffffff;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --violet: #8b5cf6;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 12px 30px -18px rgba(15, 23, 42, .35);
  --shadow-lg: 0 30px 70px -30px rgba(15, 23, 42, .45);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, dt { margin: 0; }
button { font-family: inherit; cursor: pointer; }
svg { vertical-align: -3px; flex: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

/* ------------------------------ 顶栏 ------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark {
  width: 36px; height: 36px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .8);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; letter-spacing: .3px; }
.brand-text small { color: var(--muted); font-size: 11px; }

.nav { display: flex; gap: 4px; margin-left: 8px; }

.nav-link {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 500;
  transition: background .18s, color .18s;
}
.nav-link:hover { background: #f1f5f9; color: var(--ink); }
.nav-link.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }

.user { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  color: var(--brand-dark);
  font-weight: 700;
}

.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-meta strong { font-size: 13px; }
.user-meta small { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.logout {
  margin-left: 4px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--muted);
  transition: background .18s, color .18s;
}
.logout:hover { background: #fef2f2; color: var(--red); }

/* ------------------------------ Flash ------------------------------ */
.flash-wrap {
  max-width: 1180px;
  margin: 16px auto 0;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flash {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid transparent;
}
.flash button { border: 0; background: none; font-size: 18px; line-height: 1; color: inherit; opacity: .55; }
.flash-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.flash-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.flash-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.flash-info { background: var(--brand-soft); color: var(--brand-dark); border-color: #bfdbfe; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ------------------------------ 概览 Hero ------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 32px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(900px 300px at 85% -30%, rgba(255, 255, 255, .28), transparent 60%),
    linear-gradient(120deg, #1e40af 0%, #2563eb 45%, #4f46e5 100%);
  box-shadow: 0 26px 50px -30px rgba(30, 64, 175, .9);
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px; top: -110px;
  width: 300px; height: 300px;
  border-radius: 50%;
  border: 40px solid rgba(255, 255, 255, .07);
}

.hero-hello { font-size: 13px; opacity: .85; letter-spacing: .4px; }

.hero h1 { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: .3px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.chip {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(4px);
  color: #fff;
}
.chips-center { justify-content: center; }

.hero-term {
  position: relative;
  z-index: 1;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 2px;
}
.hero-term-label { font-size: 11px; opacity: .75; letter-spacing: 2px; }
.hero-term strong { font-size: 17px; font-weight: 600; }
.hero-term small { font-size: 11px; opacity: .7; }

/* ------------------------------ 统计卡 ------------------------------ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.stats-4 { grid-template-columns: repeat(4, 1fr); }

.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
}
.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-violet { background: #f5f3ff; color: #7c3aed; }
.icon-amber { background: #fffbeb; color: #d97706; }
.icon-green { background: #ecfdf5; color: #059669; }

.stat-body { display: flex; flex-direction: column; line-height: 1.2; }
.stat-body strong { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-body strong em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat-body span { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ------------------------------ 面板 ------------------------------ */
.columns {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-head h2 { font-size: 16px; font-weight: 650; letter-spacing: .2px; }
.panel-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }

.link { color: var(--brand); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.link:hover { text-decoration: underline; }

/* ------------------------------ 课程列表 ------------------------------ */
.course-list { display: flex; flex-direction: column; gap: 10px; }

.course-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--c-bg);
  border-left: 3px solid var(--c-line);
  transition: transform .16s;
}
.course-row:hover { transform: translateX(2px); }

.course-slot {
  display: flex;
  flex-direction: column;
  min-width: 74px;
  line-height: 1.35;
}
.course-slot strong { font-size: 13.5px; color: var(--c-ink); }
.course-slot span { font-size: 11px; color: var(--muted); }

.course-body h3 { font-size: 14.5px; font-weight: 600; }
.course-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 3px; font-size: 12px; color: var(--muted); }

/* 课程色板 */
.c0 { --c-bg: #eff6ff; --c-line: #3b82f6; --c-ink: #1d4ed8; }
.c1 { --c-bg: #f5f3ff; --c-line: #8b5cf6; --c-ink: #6d28d9; }
.c2 { --c-bg: #ecfdf5; --c-line: #10b981; --c-ink: #047857; }
.c3 { --c-bg: #fff7ed; --c-line: #f97316; --c-ink: #c2410c; }
.c4 { --c-bg: #fdf2f8; --c-line: #ec4899; --c-ink: #be185d; }
.c5 { --c-bg: #ecfeff; --c-line: #06b6d4; --c-ink: #0e7490; }
.c6 { --c-bg: #fefce8; --c-line: #eab308; --c-ink: #a16207; }
.c7 { --c-bg: #f8fafc; --c-line: #64748b; --c-ink: #334155; }

/* ------------------------------ 本周概览 ------------------------------ */
.week-list { display: flex; flex-direction: column; }

.week-row {
  display: grid;
  grid-template-columns: 66px 48px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.week-row:last-child { border-bottom: 0; }
.week-row.is-today { background: #f8fafc; border-radius: 10px; }

.week-day { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); }
.week-day em { font-style: normal; font-size: 10px; padding: 1px 6px; border-radius: 999px; background: var(--brand); color: #fff; }
.week-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.week-names { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------ 空状态 ------------------------------ */
.empty { text-align: center; padding: 26px 10px 18px; color: var(--muted); }
.empty-emoji { font-size: 34px; display: block; margin-bottom: 8px; }
.empty p { font-size: 14px; color: var(--ink-2); }
.empty small { font-size: 12px; }

.empty-panel { text-align: center; padding: 54px 24px; margin-top: 18px; }
.empty-panel h2 { font-size: 18px; margin-bottom: 6px; }
.empty-panel p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }

/* ------------------------------ 提示条 ------------------------------ */
.tips {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.tips strong { color: var(--ink-2); flex: none; }

/* ------------------------------ 页头 ------------------------------ */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: .3px; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }

.week-filter, .filter-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 8px;
  box-shadow: var(--shadow-sm);
}
.week-filter label { font-size: 12px; color: var(--muted); padding-left: 4px; }

select {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border-radius: 9px;
  padding: 7px 30px 7px 11px;
  font-size: 13px;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
}
select:hover { border-color: #cbd5e1; }
select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  transition: all .18s;
}
.btn-ghost:hover { border-color: #cbd5e1; background: #f8fafc; color: var(--ink); }

/* ------------------------------ 课表网格 ------------------------------ */
.schedule-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  -webkit-overflow-scrolling: touch;
}

.schedule {
  display: grid;
  grid-template-columns: 66px repeat(7, minmax(124px, 1fr));
  grid-template-rows: 38px repeat(6, minmax(96px, auto));
  gap: 6px;
  min-width: 960px;
}

.sched-corner, .sched-day {
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: #f8fafc;
  border-radius: 9px;
}
.sched-day { background: linear-gradient(180deg, #f8fafc, #f1f5f9); letter-spacing: 1px; }

.sched-slot {
  display: grid;
  place-items: center;
  font-size: 11.5px;
  color: var(--muted);
  background: #f8fafc;
  border-radius: 9px;
  padding: 6px 2px;
  text-align: center;
  line-height: 1.3;
}

.sched-cell { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.sched-course {
  flex: 1;
  min-height: 66px;
  background: var(--c-bg);
  border-left: 3px solid var(--c-line);
  border-radius: 10px;
  padding: 8px 9px;
  overflow: hidden;
  transition: transform .16s, box-shadow .16s;
}
.sched-course:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(15, 23, 42, .5); }

.sched-course h3 {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sched-line {
  font-size: 11px;
  color: var(--ink-2);
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.55;
}
.sched-weeks { font-size: 10.5px; color: var(--c-ink); opacity: .85; margin-top: 3px; }

.schedule-note { color: var(--muted); font-size: 12px; margin-top: 10px; text-align: right; }

/* ------------------------------ 成绩表 ------------------------------ */
.table-panel { padding: 6px 0 0; overflow: hidden; margin-top: 18px; }

.data-table { width: 100%; border-collapse: collapse; }

.data-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 18px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13.5px;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafcff; }

.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-strong { font-weight: 600; }
.muted { color: var(--muted); }

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--ink-2);
  font-size: 11.5px;
}

.score {
  display: inline-block;
  min-width: 42px;
  padding: 2px 9px;
  border-radius: 8px;
  font-weight: 650;
  font-size: 13px;
  text-align: center;
}
.score-great { background: #ecfdf5; color: #047857; }
.score-good { background: #eff6ff; color: #1d4ed8; }
.score-pass { background: #fffbeb; color: #b45309; }
.score-fail { background: #fef2f2; color: #b91c1c; }
.score-none { background: #f1f5f9; color: var(--ink-2); font-weight: 500; }

/* ------------------------------ 个人信息 ------------------------------ */
.profile-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  align-items: start;
}

.profile-card { text-align: center; padding: 32px 24px; }

.profile-avatar {
  width: 78px; height: 78px;
  margin: 0 auto 14px;
  border-radius: 24px;
  display: grid; place-items: center;
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 16px 30px -16px rgba(37, 99, 235, .9);
}

.profile-card h2 { font-size: 20px; }
.profile-sub { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; margin-bottom: 14px; }

.profile-mini {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.profile-mini dt { font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.profile-mini dd { font-size: 13.5px; font-weight: 550; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--line);
}
.info-grid > div { background: #fff; padding: 14px 16px; }
.info-grid dt { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.info-grid dd { font-size: 14px; font-weight: 550; }

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--brand-soft);
  border: 1px solid #dbeafe;
}
.notice strong { font-size: 12.5px; color: var(--brand-dark); }
.notice p { font-size: 12.5px; color: #1e40af; opacity: .9; margin-top: 4px; }

/* ------------------------------ 错误页 ------------------------------ */
.error-page { display: grid; place-items: center; min-height: 70vh; }
.error-card { text-align: center; }
.error-code {
  font-size: 92px;
  font-weight: 800;
  letter-spacing: -4px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.error-card h1 { font-size: 20px; margin: 6px 0 8px; }
.error-card p { color: var(--muted); font-size: 13px; }
.error-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }

/* =========================================================
   登录页
   ========================================================= */
.login-body {
  background: #725f49;
  min-height: 100vh;
  overflow-x: hidden;
}

.login-bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; }

.login-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(120deg, rgba(45, 37, 27, .48), rgba(103, 76, 48, .24) 48%, rgba(32, 43, 38, .48)), var(--login-background);
  background-position: center;
  background-size: cover;
}

.blob { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .36; border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(5px); }
.blob-1 { width: 360px; height: 360px; background: linear-gradient(135deg, rgba(242,190,121,.34), rgba(212,132,89,.15)); top: -120px; left: -90px; }
.blob-2 { width: 320px; height: 320px; background: linear-gradient(135deg, rgba(154,187,151,.34), rgba(227,207,158,.12)); bottom: -130px; right: -70px; }
.blob-3 { width: 210px; height: 210px; background: linear-gradient(135deg, rgba(255,244,214,.24), rgba(224,168,127,.12)); top: 40%; left: 42%; }

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: minmax(320px, 440px);
  justify-content: center;
  gap: 0;
  align-items: center;
}

.login-intro { color: #e2e8f0; }

.intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12px;
  color: #c7d6ff;
  background: rgba(96, 165, 250, .12);
  border: 1px solid rgba(96, 165, 250, .3);
  letter-spacing: .3px;
}

.login-intro h1 {
  margin-top: 22px;
  font-size: 42px;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: .5px;
}
.login-intro h1 span {
  background: linear-gradient(120deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro-desc { margin-top: 18px; color: #94a3b8; font-size: 14px; max-width: 460px; line-height: 1.9; }

.intro-list { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 12px; }
.intro-list li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #cbd5e1; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 0 4px rgba(96, 165, 250, .16); flex: none; }

.intro-meta { display: flex; gap: 8px; margin-top: 32px; }
.pill {
  font-size: 11.5px;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, .3);
  padding: 4px 11px;
  border-radius: 999px;
}

.login-card {
  background: rgba(255, 251, 242, .82);
  backdrop-filter: blur(18px) saturate(120%);
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 24px;
  padding: 34px 32px 26px;
  box-shadow: 0 40px 90px -40px rgba(2, 6, 23, .9);
}

.card-head { text-align: center; margin-bottom: 22px; }

.card-logo {
  width: 52px; height: 52px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: grid; place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #bd8650, #7d9a76);
  box-shadow: 0 14px 26px -14px rgba(112, 103, 70, .65);
}
.card-logo-image {
  display: block;
  width: min(100%, 224px);
  height: 66px;
  margin: 0 auto 14px;
  padding: 7px 12px;
  object-fit: contain;
  border-radius: 14px;
  background: linear-gradient(135deg, #87916f, #6f805f);
}

.card-head h2 { font-size: 20px; letter-spacing: .3px; }
.card-head p { font-size: 12px; color: var(--muted); margin-top: 4px; }

.alert {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.alert-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.alert-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }

.field { display: block; margin-bottom: 15px; }
.field-label { display: block; font-size: 12px; color: var(--ink-2); font-weight: 550; margin-bottom: 6px; }

.field-box {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.field-box:focus-within {
  background: #fff;
  border-color: #ad8055;
  box-shadow: 0 0 0 4px rgba(173, 128, 85, .14);
}

.field-icon { color: #94a3b8; display: grid; place-items: center; }
.field-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
  letter-spacing: .3px;
}
.field-box input::placeholder { color: #94a3b8; letter-spacing: 0; }

.eye {
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 12px;
  padding: 4px;
}

.btn-primary {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 4px;
  background: linear-gradient(110deg, #aa754b, #8c9b72 58%, #bd8e61);
  box-shadow: 0 16px 26px -16px rgba(115, 103, 72, .8);
  transition: transform .16s, box-shadow .16s, filter .16s;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 20px 30px -16px rgba(115, 103, 72, .8); }
.btn-primary:active { transform: translateY(0); }

.btn-inline { width: auto; padding: 0 22px; letter-spacing: 1px; display: inline-flex; align-items: center; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--muted);
}

.remember-row { margin: -7px 0 15px; color: #655847; font-size: 13px; }
.remember-row .form-check-input:checked { background-color: #8b946a; border-color: #8b946a; }
.feed-columns { margin-bottom: 30px; }
.feed-list { display: flex; flex-direction: column; }
.feed-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.feed-row:last-child { border-bottom: 0; }
.feed-row:hover strong { color: #9a7048; }
.feed-row span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.feed-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.feed-row small { color: var(--muted); font-size: 11px; }
.feed-row em { font-style: normal; color: #9a7048; font-size: 12px; white-space: nowrap; }
.feed-empty { color: var(--muted); padding: 16px 4px; font-size: 13px; }

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 1024px) {
  .login-shell { grid-template-columns: 1fr; gap: 36px; max-width: 520px; padding: 40px 20px; }
  .login-intro { text-align: center; }
  .login-intro h1 { font-size: 32px; }
  .intro-desc { margin: 14px auto 0; }
  .intro-list { display: none; }
  .intro-meta { justify-content: center; margin-top: 20px; }
  .columns { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .topbar-inner { gap: 14px; padding: 0 16px; }
  .brand-text small { display: none; }
  .nav { gap: 0; }
  .nav-link { padding: 8px 10px; font-size: 13px; }
  .user-meta { display: none; }
  .container { padding: 20px 16px 56px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 24px; }
  .hero-term { text-align: left; }
  .stats, .stats-4 { grid-template-columns: repeat(2, 1fr); }
  .page-head { flex-direction: column; align-items: flex-start; }
  .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  /* 小屏把主导航变成底部标签栏，避免顶栏塞不下 */
  .topbar { backdrop-filter: none; background: #fff; } /* 否则会成为 fixed 子元素的包含块 */
  .nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    margin: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line);
    justify-content: space-around;
  }
  .nav-link { flex: 1; text-align: center; padding: 9px 4px; font-size: 12.5px; }
  .container { padding-bottom: 88px; }
  .hero h1 { font-size: 21px; }
  .stat { padding: 14px; gap: 10px; }
  .stat-body strong { font-size: 20px; }
  .panel { padding: 18px; }
  .week-filter, .filter-form { width: 100%; flex-wrap: wrap; }
  .filter-form select { flex: 1; }
  .data-table thead th, .data-table td { padding: 10px 12px; }
  .login-card { padding: 26px 20px 20px; }
}
