/* ========== 基础变量 ========== */
:root {
  --green: #2f8f6b;
  --green-dark: #247357;
  --green-soft: #e9f6f0;
  --green-soft-2: #d7eee3;
  --blue: #3b7fc0;
  --blue-dark: #2c659c;
  --blue-soft: #eaf3fb;
  --amber: #d99532;
  --amber-soft: #fdf3e2;
  --red: #d7645c;
  --red-soft: #fdecea;
  --purple: #7a6bc6;
  --purple-soft: #f0edfb;
  --ink: #203039;
  --ink-2: #3c4f59;
  --muted: #71848e;
  --muted-2: #9aabb2;
  --line: #e6edef;
  --line-2: #f0f4f5;
  --bg: #f4f8f7;
  --card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(31, 63, 55, .04), 0 2px 8px rgba(31, 63, 55, .04);
  --shadow-md: 0 10px 30px rgba(31, 63, 55, .10);
  --shadow-lg: 0 24px 60px rgba(23, 55, 47, .18);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 244px;
  --topbar-h: 76px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfdcd9; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ========== 布局 ========== */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 60;
}
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 6px 12px 16px; }
.brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line-2);
  flex: 0 0 auto;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(145deg, #38a37c, #2b8465);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 14px rgba(47, 143, 107, .25);
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-text strong { display: block; font-size: 15px; letter-spacing: .3px; }
.brand-text span { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.sidebar .sidebar-close { display: none; margin-left: auto; }

.nav-group { margin-top: 18px; }
.nav-group:first-child { margin-top: 10px; }
.nav-label {
  font-size: 11px; color: var(--muted-2); letter-spacing: 1.4px;
  padding: 0 12px; margin-bottom: 7px; font-weight: 600;
}
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 11px;
  border: 0; background: transparent; color: var(--ink-2);
  padding: 10px 12px; border-radius: 10px; text-align: left;
  font-weight: 500; margin-bottom: 3px; transition: .18s ease;
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 1.8; color: var(--muted); }
.nav-item:hover { background: var(--green-soft); color: var(--green-dark); }
.nav-item:hover svg { color: var(--green); }
.nav-item.active { background: var(--green-soft); color: var(--green-dark); font-weight: 650; }
.nav-item.active svg { color: var(--green); }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px;
  width: 3px; background: var(--green); border-radius: 0 3px 3px 0;
}
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--red-soft); color: var(--red);
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

.sidebar-foot { padding: 14px; border-top: 1px solid var(--line-2); }
.term-card { background: var(--green-soft); border-radius: 12px; padding: 12px 13px; }
.term-card-top { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--green-dark); }
.term-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px rgba(47,143,107,.15); }
.term-progress { height: 5px; background: rgba(47,143,107,.16); border-radius: 5px; margin: 10px 0 6px; overflow: hidden; }
.term-progress span { display: block; height: 100%; background: var(--green); border-radius: 5px; transition: width .5s; }
.term-card-bottom { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.term-card-bottom b { color: var(--green-dark); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); flex: 0 0 auto;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
  padding: 0 30px; position: sticky; top: 0; z-index: 40;
}
.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 19px; margin: 0; letter-spacing: .3px; }
.topbar-title p { margin: 1px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.class-picker {
  display: flex; align-items: center; gap: 7px; padding: 7px 11px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.class-picker-icon svg { width: 16px; height: 16px; color: var(--green); }
.class-picker select { border: 0; background: transparent; outline: none; font-weight: 600; font-size: 13px; cursor: pointer; max-width: 150px; }
.today-chip { font-size: 12px; color: var(--muted); white-space: nowrap; }
.avatar {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: linear-gradient(145deg, #6da9d8, #3b7fc0); color: #fff;
  font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(59,127,192,.25);
}
.icon-btn {
  border: 0; background: transparent; padding: 7px; border-radius: 9px;
  display: grid; place-items: center; color: var(--ink-2);
}
.icon-btn:hover { background: var(--line-2); }
.icon-btn svg { width: 19px; height: 19px; stroke-width: 1.8; }
.menu-btn { display: none; }

.content { flex: 1; padding: 26px 30px 48px; max-width: 1680px; width: 100%; margin: 0 auto; }
.bottom-nav { display: none; }

/* ========== 通用组件 ========== */
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { font-size: 20px; margin: 0; }
.page-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.page-head-actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-weight: 600; font-size: 13px;
  transition: .16s ease; white-space: nowrap; min-height: 38px;
}
.btn:hover { border-color: #c9dcd6; background: #fbfffd; }
.btn svg { width: 16px; height: 16px; stroke-width: 1.9; }
.btn-icon { display: grid; place-items: center; }
.btn-icon svg { width: 16px; height: 16px; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(47,143,107,.2); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--line-2); }
.btn-danger { color: var(--red); border-color: #f0cfcc; background: #fff8f7; }
.btn-danger:hover { background: var(--red-soft); border-color: #e8b7b3; }
.btn-sm { padding: 6px 10px; min-height: 30px; font-size: 12px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 17px 20px 0; }
.card-head h3 { margin: 0; font-size: 15px; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.card-head-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.card-body { padding: 16px 20px 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-dash { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* 统计卡 */
.stat-card { padding: 19px 20px; position: relative; overflow: hidden; }
.stat-card::after {
  content: ""; position: absolute; right: -28px; top: -34px;
  width: 100px; height: 100px; border-radius: 50%; background: var(--tint, var(--green-soft)); opacity: .7;
}
.stat-top { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.stat-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--tint, var(--green-soft)); color: var(--tone, var(--green)); }
.stat-ico svg { width: 18px; height: 18px; stroke-width: 1.9; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 750; letter-spacing: -.5px; margin-top: 9px; position: relative; z-index: 1; line-height: 1.15; }
.stat-value small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.stat-delta { margin-top: 7px; font-size: 11px; color: var(--muted); position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; }
.stat-delta b { color: var(--tone, var(--green)); font-weight: 650; }

/* 徽标 */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 650; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-soft); color: var(--green-dark); }
.badge.blue { background: var(--blue-soft); color: var(--blue-dark); }
.badge.amber { background: var(--amber-soft); color: #a96d16; }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.purple { background: var(--purple-soft); color: var(--purple); }
.badge.plain::before { display: none; }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th { text-align: left; font-size: 11px; font-weight: 650; color: var(--muted); letter-spacing: .4px; padding: 11px 14px; background: #fafcfa; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th:first-child { border-radius: 10px 0 0 0; }
.table th:last-child { border-radius: 0 10px 0 0; text-align: right; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); font-size: 13px; vertical-align: middle; }
.table td:last-child { text-align: right; white-space: nowrap; }
.table tbody tr:hover { background: #fbfdfc; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .row-actions { display: inline-flex; gap: 3px; }
.table-avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: 0 0 auto; }
.cell-person { display: flex; align-items: center; gap: 10px; }
.cell-person b { display: block; font-weight: 650; }
.cell-person small { display: block; color: var(--muted); font-size: 11px; }
.subtle { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.truncate { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 工具栏 */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.search-box { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; min-width: 230px; flex: 1; max-width: 340px; }
.search-box svg { width: 16px; height: 16px; color: var(--muted-2); }
.search-box input { border: 0; outline: 0; padding: 9px 0; width: 100%; background: transparent; }
.select-box { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; outline: none; min-height: 38px; }
.toolbar-right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.chip.active { background: var(--green-soft); color: var(--green-dark); border-color: #c6e5d7; }

/* 图表 */
.chart-box { width: 100%; }
.chart-box svg { width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-label { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-value { fill: var(--ink); font-size: 11px; font-weight: 650; font-family: var(--font); }
.legend { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 12px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; }
.legend-item b { margin-left: 2px; font-variant-numeric: tabular-nums; }
.donut-center { text-align: center; }
.donut-center b { display: block; font-size: 25px; line-height: 1.1; }
.donut-center span { font-size: 11px; color: var(--muted); }
.donut-layout { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-layout > .donut-chart { width: 168px; flex: 0 0 168px; }
.donut-layout > .legend { flex: 1; flex-direction: column; gap: 11px; margin: 0; min-width: 130px; }

/* 列表条目 */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.list-item:last-child { border-bottom: 0; }
.list-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.list-ico svg { width: 17px; height: 17px; stroke-width: 1.9; }
.list-main { min-width: 0; flex: 1; }
.list-main b { display: block; font-size: 13px; font-weight: 650; }
.list-main p { margin: 3px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.list-meta { font-size: 11px; color: var(--muted-2); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.list-side { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.todo-check { width: 19px; height: 19px; border: 1.8px solid #bfd0ca; border-radius: 6px; background: #fff; display: grid; place-items: center; flex: 0 0 auto; margin-top: 2px; }
.todo-check:hover { border-color: var(--green); }
.todo-check svg { width: 12px; height: 12px; opacity: 0; }
.todo-check.done { background: var(--green); border-color: var(--green); color: #fff; }
.todo-check.done svg { opacity: 1; }
.is-done .list-main b { text-decoration: line-through; color: var(--muted-2); }

/* 空状态 */
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-ico { width: 56px; height: 56px; border-radius: 18px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin: 0 auto 12px; }
.empty-ico svg { width: 26px; height: 26px; }
.empty b { display: block; color: var(--ink-2); font-size: 14px; }
.empty p { margin: 5px 0 14px; font-size: 12px; }

/* 考勤格 */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 12px; }
.att-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; background: #fff; }
.att-card-top { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.att-card-top b { font-size: 13px; }
.att-card-top small { display: block; color: var(--muted); font-size: 11px; }
.att-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.att-opt { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 6px 2px; font-size: 11px; font-weight: 600; color: var(--muted); }
.att-opt:hover { border-color: #bcd8ce; }
.att-opt.sel-present { background: var(--green-soft); border-color: #a9d9c4; color: var(--green-dark); }
.att-opt.sel-late { background: var(--amber-soft); border-color: #eed3a5; color: #a96d16; }
.att-opt.sel-leave { background: var(--blue-soft); border-color: #bcd7ee; color: var(--blue-dark); }
.att-opt.sel-absent { background: var(--red-soft); border-color: #f0bfbb; color: var(--red); }

/* 进度条 */
.bar-track { height: 6px; background: var(--line-2); border-radius: 6px; overflow: hidden; min-width: 60px; }
.bar-track span { display: block; height: 100%; border-radius: 6px; background: var(--green); }
.score-cell { display: flex; align-items: center; gap: 8px; }
.score-cell .bar-track { width: 56px; }

/* 弹窗 */
.modal-root { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(22, 45, 40, .38); backdrop-filter: blur(3px); }
.modal-root[hidden] { display: none; }
.modal { width: min(540px, 100%); max-height: min(88vh, 860px); display: flex; flex-direction: column; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s ease-out; }
.modal.wide { width: min(760px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; background: #fcfdfd; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 650; color: var(--ink-2); }
.field label .req { color: var(--red); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
  background: #fff; outline: none; transition: .15s; min-height: 38px;
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,143,107,.11); }
.field .hint { font-size: 11px; color: var(--muted-2); }
.form-section { grid-column: 1 / -1; font-size: 11px; font-weight: 700; color: var(--green-dark); letter-spacing: .6px; padding-top: 4px; border-top: 1px solid var(--line-2); margin-top: 2px; }
.form-section:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.radio-row { display: flex; gap: 8px; }
.radio-pill { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 9px; padding: 8px 4px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted); background: #fff; }
.radio-pill.on { background: var(--green-soft); border-color: #a9d9c4; color: var(--green-dark); }

/* 提示 */
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 500; display: flex; flex-direction: column; gap: 9px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 11px; padding: 11px 15px; box-shadow: var(--shadow-md); font-size: 13px; min-width: 200px; animation: slideIn .2s ease-out; }
.toast.error { border-left-color: var(--red); }
.toast svg { width: 17px; height: 17px; color: var(--green); }
.toast.error svg { color: var(--red); }
@keyframes slideIn { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 数据设置 */
.drop-zone { border: 1.5px dashed #bcd8ce; border-radius: 14px; background: #fbfefc; padding: 26px 18px; text-align: center; }
.drop-zone svg { width: 30px; height: 30px; color: var(--green); margin: 0 auto 9px; }
.drop-zone b { display: block; font-size: 14px; }
.drop-zone p { margin: 5px 0 14px; color: var(--muted); font-size: 12px; }
.step-num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--green-soft); color: var(--green-dark); font-size: 11px; font-weight: 700; margin-right: 5px; }
.note-box { background: var(--blue-soft); border-radius: 10px; padding: 11px 13px; color: var(--blue-dark); font-size: 12px; line-height: 1.6; }

/* 响应式 */
@media (max-width: 1180px) {
  .content { padding: 22px 20px 44px; }
  .topbar { padding: 0 20px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-dash { grid-template-columns: 1fr; }
  .today-chip { display: none; }
}
@media (max-width: 900px) {
  :root { --topbar-h: 64px; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .24s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar .sidebar-close, .menu-btn { display: grid; }
  .sidebar-overlay { position: fixed; inset: 0; background: rgba(20,45,38,.35); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar-overlay.open { opacity: 1; pointer-events: auto; }
  .topbar-title h1 { font-size: 17px; }
  .topbar-title p { display: none; }
  .top-add { display: none; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding-bottom: 90px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .bottom-nav button { flex: 1; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; color: var(--muted); font-size: 10px; border-radius: 9px; }
  .bottom-nav button svg { width: 20px; height: 20px; stroke-width: 1.8; }
  .bottom-nav button.active { color: var(--green); font-weight: 700; }
  .bottom-nav button.active svg { color: var(--green); }
  .toast-root { bottom: 84px; right: 14px; left: 14px; align-items: stretch; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 14px; gap: 9px; }
  .topbar-actions { gap: 7px; }
  .class-picker { padding: 6px 8px; }
  .class-picker select { max-width: 104px; font-size: 12px; }
  .avatar { width: 32px; height: 32px; font-size: 12px; }
  .content { padding: 18px 14px 90px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stat-card { padding: 15px 16px; }
  .stat-value { font-size: 23px; }
  .page-head h2 { font-size: 18px; }
  .page-head-actions { width: 100%; margin-left: 0; }
  .page-head-actions .btn { flex: 1; }
  .search-box { max-width: none; min-width: 0; }
  .toolbar-right { width: 100%; margin-left: 0; }
  .toolbar-right .btn { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-root { padding: 10px; align-items: flex-end; }
  .modal { max-height: 92vh; border-radius: 18px 18px 0 0; }
  .card-head { padding: 15px 15px 0; }
  .card-body { padding: 14px 15px 17px; }
  .att-grid { grid-template-columns: 1fr 1fr; }
  .donut-layout > .donut-chart { width: 140px; flex-basis: 140px; }
}
@media (max-width: 400px) {
  .att-grid { grid-template-columns: 1fr; }
  .today-chip { display: none; }
}
@media print {
  .sidebar, .topbar, .bottom-nav, .page-head-actions, .toolbar, .toast-root { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ========== 模块专属 ========== */
.hero {
  position: relative; overflow: hidden; border-radius: 18px; padding: 25px 28px;
  background: linear-gradient(115deg, #2e8d6a 0%, #359574 52%, #3f8fb3 130%);
  color: #fff; box-shadow: 0 10px 26px rgba(47,143,107,.2);
}
.hero-copy { position: relative; z-index: 2; max-width: 660px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; opacity: .88; letter-spacing: .4px; }
.hero-kicker svg { width: 15px; height: 15px; }
.hero h2 { margin: 7px 0 6px; font-size: 25px; letter-spacing: .5px; font-weight: 750; }
.hero p { margin: 0; font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.88); }
.hero p b { color: #fff; }
.hero-actions { display: flex; gap: 9px; margin-top: 17px; flex-wrap: wrap; }
.hero-btn { background: #fff; border-color: #fff; color: var(--green-dark); }
.hero-btn:hover { background: #f4fbf8; border-color: #f4fbf8; }
.hero-btn.ghost { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.42); color: #fff; }
.hero-btn.ghost:hover { background: rgba(255,255,255,.26); }
.hero-art { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: 190px; height: 190px; }
.hero-ring { position: absolute; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.hero-ring.r1 { inset: 0; }
.hero-ring.r2 { inset: 26px; border-style: dashed; }
.hero-leaf { position: absolute; inset: 58px; border-radius: 26px; background: rgba(255,255,255,.16); display: grid; place-items: center; transform: rotate(-8deg); }
.hero-leaf svg { width: 54px; height: 54px; stroke-width: 1.3; opacity: .95; }

.grid-5-mini { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.mini-stat { background: var(--b); border-radius: 11px; padding: 11px 12px; text-align: center; }
.mini-stat span { display: block; font-size: 11px; color: var(--muted); }
.mini-stat b { display: block; font-size: 21px; color: var(--c); margin-top: 2px; }

.date-badge { width: 42px; height: 46px; flex: 0 0 auto; border-radius: 10px; background: var(--green-soft); color: var(--green-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.date-badge b { font-size: 17px; }
.date-badge span { font-size: 10px; margin-top: 1px; }

.activity-card { padding: 0; overflow: hidden; }
.activity-top { display: flex; gap: 12px; align-items: center; padding: 16px 16px 0; }
.activity-top h4 { margin: 0 0 5px; font-size: 14px; }
.activity-desc { margin: 13px 16px; font-size: 12px; color: var(--muted); line-height: 1.65; min-height: 40px; }
.activity-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0 16px 14px; font-size: 11px; color: var(--muted); }
.activity-meta span { display: inline-flex; align-items: center; gap: 4px; }
.activity-meta svg { width: 13px; height: 13px; }
.activity-foot { display: flex; gap: 5px; padding: 11px 16px; border-top: 1px solid var(--line-2); background: #fcfdfd; }
.activity-foot .btn { flex: 1; padding: 6px 8px; }

.notice-card.pinned { border-left: 3px solid var(--green); }
.notice-top { display: flex; gap: 10px; align-items: flex-start; }
.notice-top h3 { margin: 0; font-size: 14px; }
.notice-top .row-actions { margin-left: auto; }
.notice-content { margin: 12px 0 0; font-size: 12px; color: var(--ink-2); line-height: 1.75; white-space: pre-wrap; }

.export-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 9px 8px 12px; font-size: 12px; font-weight: 600; }
.export-row > span:last-child { display: flex; gap: 2px; }
.overdue { color: var(--red) !important; font-weight: 650; }
.list-meta span { display: inline-flex; align-items: center; gap: 3px; }
.list-meta svg { width: 12px; height: 12px; }

@media (max-width: 1180px) { .grid-5-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hero-art { opacity: .55; right: -20px; } }
@media (max-width: 640px) {
  .hero { padding: 20px 18px; }
  .hero h2 { font-size: 21px; }
  .hero p { font-size: 12px; }
  .hero-art { display: none; }
  .hero-actions .btn { flex: 1; min-width: 110px; }
  .grid-5-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .activity-meta { gap: 6px 10px; }
}
