/* ============================================================
   班主任工作台 · 主题样式
   配色：主蓝 #2563EB / 粉橙 #F59E0B / 绿 #10B981 / 黄 #FBBF24
   设计：教育场景、稳重温暖、卡片式、柔和圆角
   ============================================================ */

:root {
  --brand: #2563EB;
  --brand-dark: #1D4ED8;
  --brand-soft: #EFF6FF;
  --amber: #F59E0B;
  --amber-soft: #FFFBEB;
  --mint: #10B981;
  --mint-soft: #ECFDF5;
  --sun: #FBBF24;
  --rose: #F43F5E;
  --rose-soft: #FFF1F2;
  --violet: #8B5CF6;
  --ink: #1E293B;
  --ink-2: #475569;
  --muted: #94A3B8;
  --line: #E2E8F0;
  --bg: #F6F8FC;
  --card: #FFFFFF;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(37, 99, 235, .06);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, .16);
  --radius: 16px;
  --sidebar-w: 252px;
  --sidebar-w-mini: 74px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; font-size: 14px; }
body.font-large { font-size: 16px; }
button, input, select, textarea { font-family: inherit; font-size: inherit; outline: none; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
.mobile-only { display: none !important; }

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: #FFFFFF; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 60;
  transition: width .25s ease, transform .25s ease;
}
.sidebar.mini { width: var(--sidebar-w-mini); }
.sidebar-head { height: 72px; flex: 0 0 72px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.brand-mark {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; color: #fff; font-size: 18px;
  display: grid; place-items: center; background: linear-gradient(140deg, #3B82F6, #2563EB 60%, #1D4ED8);
  box-shadow: 0 6px 14px rgba(37, 99, 235, .28);
}
.brand-text { min-width: 0; flex: 1; }
.brand-title { font-weight: 800; font-size: 15px; color: var(--ink); white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collapse-btn {
  width: 28px; height: 28px; border-radius: 8px; border: 0; background: #F1F5F9; color: var(--ink-2);
  display: grid; place-items: center; flex: 0 0 28px;
}
.collapse-btn:hover { background: var(--brand-soft); color: var(--brand); }
.sidebar.mini .collapse-btn i { transform: rotate(180deg); }
.sidebar.mini .brand-text, .sidebar.mini .nav-label, .sidebar.mini .nav-group-title, .sidebar.mini .sidebar-foot-text { display: none; }
.sidebar.mini .sidebar-head { padding: 0 17px; }
.sidebar.mini .nav-item { justify-content: center; padding: 10px 0; }
.sidebar.mini .nav-item i { margin: 0; }
.sidebar.mini .sidebar-foot { justify-content: center; }

.nav-list { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.nav-group-title {
  font-size: 11px; letter-spacing: .06em; color: var(--muted); font-weight: 700;
  padding: 14px 12px 6px; text-transform: uppercase;
}
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 11px; border: 0; background: transparent;
  padding: 10px 12px; border-radius: 11px; color: var(--ink-2); text-align: left;
  margin-bottom: 2px; transition: background .16s, color .16s; position: relative;
}
.nav-item i { width: 18px; text-align: center; font-size: 15px; flex: 0 0 18px; }
.nav-item .nav-label { font-size: 13px; font-weight: 600; white-space: nowrap; }
.nav-item:hover { background: #F1F5F9; color: var(--brand); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); }
.nav-item.active::before {
  content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px;
  background: var(--brand); border-radius: 0 3px 3px 0;
}
.nav-badge { margin-left: auto; background: var(--rose); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 10px; }
.sidebar-foot {
  border-top: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; gap: 10px;
}
.sidebar-foot-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--mint-soft); color: var(--mint); display: grid; place-items: center; flex: 0 0 34px; }
.sidebar-foot-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.sidebar-foot-text strong { font-size: 12px; color: var(--ink); }
.sidebar-foot-text span { font-size: 10px; color: var(--muted); }
.sidebar-overlay { display: none; }

/* ---------------- 主区域 ---------------- */
.app-shell { margin-left: var(--sidebar-w); min-height: 100vh; transition: margin-left .25s ease; display: flex; flex-direction: column; }
.app-shell.mini { margin-left: var(--sidebar-w-mini); }
.topbar {
  height: 72px; position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 26px; gap: 12px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-title { font-size: 18px; font-weight: 800; margin: 0; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-subtitle { font-size: 11px; color: var(--muted); margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.top-date { font-size: 12px; color: var(--ink-2); background: #F8FAFC; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line); }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  display: grid; place-items: center;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.avatar {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #F59E0B, #FBBF24); box-shadow: 0 4px 10px rgba(245,158,11,.28);
}
.main-content { flex: 1; padding: 22px 26px 30px; outline: none; max-width: 1680px; width: 100%; margin: 0 auto; }
.app-footer { padding: 14px 26px 20px; color: var(--muted); font-size: 11px; display: flex; justify-content: space-between; gap: 10px; }

/* ---------------- 通用卡片与组件 ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.section-title { font-size: 15px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.section-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 8px 13px; border-radius: 10px; font-weight: 600; font-size: 12px; transition: .15s;
  white-space: nowrap;
}
.btn:hover { border-color: #CBD5E1; background: #F8FAFC; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 10px rgba(37,99,235,.22); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-mint { background: var(--mint); border-color: var(--mint); color: #fff; }
.btn-mint:hover { background: #059669; border-color: #059669; }
.btn-amber { background: var(--amber); border-color: var(--amber); color: #fff; }
.btn-amber:hover { background: #D97706; border-color: #D97706; }
.btn-rose { background: var(--rose); border-color: var(--rose); color: #fff; }
.btn-rose:hover { background: #E11D48; border-color: #E11D48; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { padding: 5px 9px; font-size: 11px; border-radius: 8px; }
.btn-block { width: 100%; }

.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 10px; padding: 8px 11px; font-size: 13px; transition: .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.textarea { min-height: 78px; resize: vertical; }
.search-input { max-width: 290px; }
.label { font-size: 12px; font-weight: 700; color: var(--ink-2); display: block; margin-bottom: 5px; }
.hint { font-size: 11px; color: var(--muted); }
.empty { text-align: center; padding: 38px 14px; color: var(--muted); }
.empty i { font-size: 30px; display: block; margin-bottom: 10px; color: #CBD5E1; }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.7; }
.tag-blue { background: var(--brand-soft); color: var(--brand); }
.tag-mint { background: var(--mint-soft); color: #059669; }
.tag-amber { background: var(--amber-soft); color: #D97706; }
.tag-rose { background: var(--rose-soft); color: #E11D48; }
.tag-violet { background: #F5F3FF; color: #7C3AED; }
.tag-slate { background: #F1F5F9; color: #64748B; }

/* 统计卡 */
.stat-card { padding: 16px 17px; display: flex; align-items: center; gap: 13px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; display: grid; place-items: center; font-size: 18px; }
.stat-icon.blue { background: var(--brand-soft); color: var(--brand); }
.stat-icon.mint { background: var(--mint-soft); color: var(--mint); }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber); }
.stat-icon.rose { background: var(--rose-soft); color: var(--rose); }
.stat-icon.violet { background: #F5F3FF; color: var(--violet); }
.stat-num { font-size: 22px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 620px; }
.data-table thead th { background: #F8FAFC; color: var(--ink-2); font-weight: 700; text-align: left; padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.data-table tbody td { padding: 10px 12px; border-bottom: 1px solid #F1F5F9; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #FAFCFF; }
.data-table .actions { white-space: nowrap; }
.data-table .actions button { border: 0; background: transparent; color: var(--brand); padding: 4px 6px; border-radius: 6px; font-size: 12px; }
.data-table .actions button:hover { background: var(--brand-soft); }
.data-table .actions button.danger { color: var(--rose); }
.data-table .actions button.danger:hover { background: var(--rose-soft); }
.cell-strong { font-weight: 700; color: var(--ink); }
.cell-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 140px; }
.toolbar-count { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* 页签 */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; padding-bottom: 0; }
.tab { border: 0; background: transparent; padding: 10px 14px; color: var(--ink-2); font-weight: 700; font-size: 13px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* 弹窗 */
.modal-root { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 18px; }
.modal-root.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.42); backdrop-filter: blur(3px); }
.modal-box {
  position: relative; width: min(680px, 100%); max-height: min(88vh, 900px); overflow: hidden;
  background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  animation: modalIn .2s ease;
}
.modal-box.small { width: min(440px, 100%); }
.modal-box.wide { width: min(940px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.checkbox-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip { position: relative; }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 12px; font-weight: 600; cursor: pointer;
}
.check-chip input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

/* Toast */
.toast-root { position: fixed; right: 20px; top: 84px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--mint); border-radius: 11px;
  padding: 11px 15px; box-shadow: var(--shadow-lg); font-size: 12px; font-weight: 600; min-width: 210px;
  animation: toastIn .2s ease;
}
.toast.error { border-left-color: var(--rose); }
.toast.info { border-left-color: var(--brand); }
@keyframes toastIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* ---------------- 仪表盘 ---------------- */
.hero {
  background: linear-gradient(120deg, #2563EB 0%, #3B82F6 55%, #60A5FA 100%);
  color: #fff; border-radius: 20px; padding: 20px 24px; position: relative; overflow: hidden;
  box-shadow: 0 10px 26px rgba(37,99,235,.22);
}
.hero::after { content: ''; position: absolute; right: -40px; top: -70px; width: 210px; height: 210px; border-radius: 50%; background: rgba(255,255,255,.1); }
.hero h2 { margin: 0 0 5px; font-size: 20px; font-weight: 800; }
.hero p { margin: 0; font-size: 12px; opacity: .92; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; position: relative; z-index: 1; }
.hero-chip { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.28); padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.alert-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.alert-item:last-child { border-bottom: 0; }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: 0 0 8px; }
.quick-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px 8px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 700; color: var(--ink-2); transition: .18s; }
.quick-btn i { font-size: 19px; color: var(--brand); }
.quick-btn:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow); color: var(--brand); }
.timeline-item { display: flex; gap: 10px; padding: 8px 0; }
.timeline-time { font-size: 11px; color: var(--brand); font-weight: 800; min-width: 44px; }
.timeline-body { font-size: 12px; }

/* ---------------- 座位表 ---------------- */
.seat-stage {
  background: linear-gradient(180deg, #F8FAFF, #FFFFFF 60%); border: 2px solid #DBEAFE;
  border-radius: 28px; padding: 22px 18px 18px; box-shadow: inset 0 3px 14px rgba(37,99,235,.07);
  overflow-x: auto;
}
.podium-wrap { display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; }
.podium {
  background: linear-gradient(120deg, #4F46E5, #7C3AED 55%, #2563EB); color: #fff;
  border-radius: 0 0 60px 60px / 0 0 26px 26px; padding: 14px 64px 18px; font-weight: 800; letter-spacing: .18em;
  box-shadow: 0 15px 28px rgba(99,102,241,.3); font-size: 14px;
}
.podium-shadow { width: 190px; height: 12px; border-radius: 50%; background: rgba(99,102,241,.2); filter: blur(7px); margin-top: 7px; }
.seat-grid { display: grid; gap: 9px; min-width: 620px; align-items: center; }
.seat {
  border-radius: 11px; border: 1.5px solid transparent; min-height: 52px; padding: 7px 4px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: .16s; cursor: pointer; font-size: 12px; font-weight: 700; color: #1E293B;
}
.seat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.seat.selected { outline: 3px solid var(--brand); outline-offset: 1px; }
.seat.empty { background: #F8FAFC; border-style: dashed; border-color: #CBD5E1; color: var(--muted); font-weight: 500; }
.seat.g0 { background: #DBEAFE; border-color: #93C5FD; }
.seat.g1 { background: #D1FAE5; border-color: #6EE7B7; }
.seat.g2 { background: #FEF3C7; border-color: #FCD34D; }
.seat.g3 { background: #FFE4E6; border-color: #FDA4AF; }
.seat.g4 { background: #E0E7FF; border-color: #A5B4FC; }
.seat small { font-size: 10px; color: #64748B; font-weight: 500; }
.aisle { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #94A3B8; border-left: 2px dashed #CBD5E1; border-right: 2px dashed #CBD5E1; background: rgba(241,245,249,.55); border-radius: 8px; min-height: 52px; }
.aisle span { writing-mode: vertical-rl; letter-spacing: .35em; font-size: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }

/* ---------------- 课程表 ---------------- */
.schedule-table { width: 100%; border-collapse: separate; border-spacing: 4px; min-width: 760px; }
.schedule-table th { background: #F1F5F9; color: var(--ink-2); font-size: 11px; font-weight: 800; padding: 8px 6px; border-radius: 9px; white-space: nowrap; }
.schedule-table td { padding: 0; }
.schedule-table .period-cell { background: #F8FAFC; border-radius: 9px; padding: 8px 6px; text-align: center; font-size: 11px; min-width: 84px; }
.schedule-table .period-cell b { display: block; color: var(--ink); }
.schedule-table .period-cell small { color: var(--muted); }
.schedule-table .group-row td { background: transparent; padding: 8px 2px 2px; text-align: left; font-size: 11px; font-weight: 800; color: var(--brand); }
.course-cell { width: 100%; min-height: 58px; border: 1px solid transparent; border-radius: 10px; padding: 7px 5px; text-align: center; font-size: 11px; font-weight: 700; color: #1E293B; cursor: pointer; }
.course-cell.empty { background: #F8FAFC; border-style: dashed; border-color: #CBD5E1; color: #94A3B8; font-weight: 500; }
.course-cell:hover { filter: brightness(.97); }
.course-cell small { display: block; font-size: 9px; opacity: .72; font-weight: 500; margin-top: 3px; }

/* ---------------- 彩色卡片（班委 / 值日） ---------------- */
.color-card { border-radius: 15px; padding: 16px; border: 1px solid rgba(0,0,0,.04); position: relative; min-height: 132px; }
.color-card .cc-top { display: flex; align-items: center; gap: 10px; }
.color-card .cc-emoji { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: rgba(255,255,255,.65); }
.color-card .cc-name { font-weight: 800; font-size: 14px; }
.color-card .cc-role { font-size: 11px; font-weight: 700; opacity: .75; margin-top: 2px; }
.color-card .cc-desc { font-size: 11px; line-height: 1.65; margin-top: 12px; opacity: .85; }
.color-card .cc-actions { position: absolute; right: 10px; top: 10px; display: flex; gap: 4px; opacity: 0; transition: .15s; }
.color-card:hover .cc-actions { opacity: 1; }
.color-card .cc-actions button { border: 0; width: 25px; height: 25px; border-radius: 8px; background: rgba(255,255,255,.8); color: #334155; }
.macaron-0 { background: #DBEAFE; color: #1E40AF; }
.macaron-1 { background: #D1FAE5; color: #065F46; }
.macaron-2 { background: #FEF3C7; color: #92400E; }
.macaron-3 { background: #FFE4E6; color: #9F1239; }
.macaron-4 { background: #EDE9FE; color: #5B21B6; }
.macaron-5 { background: #FFEDD5; color: #9A3412; }
.banner-tip { border-radius: 13px; padding: 12px 16px; display: flex; align-items: flex-start; gap: 10px; font-size: 12px; line-height: 1.7; }
.banner-tip.blue { background: var(--brand-soft); color: #1E40AF; border: 1px solid #DBEAFE; }
.banner-tip.amber { background: var(--amber-soft); color: #92400E; border: 1px solid #FDE68A; }

/* 宿舍卡片 */
.dorm-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #fff; box-shadow: var(--shadow); }
.dorm-card .dorm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dorm-card .dorm-no { font-size: 17px; font-weight: 800; color: var(--brand); }
.dorm-card .dorm-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.dorm-members { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0; min-height: 26px; }
.dorm-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; padding: 10px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.dorm-stats div { text-align: center; }
.dorm-stats b { display: block; font-size: 15px; }
.dorm-stats span { font-size: 10px; color: var(--muted); }

/* 图表容器 */
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 300px; }

/* 提示条 */
.notice { padding: 11px 14px; border-radius: 11px; font-size: 12px; display: flex; gap: 9px; align-items: flex-start; }
.notice.warn { background: var(--rose-soft); color: #BE123C; border: 1px solid #FECDD3; }
.notice.ok { background: var(--mint-soft); color: #047857; border: 1px solid #A7F3D0; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .g5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .main-content { padding: 18px; }
  .topbar { padding: 0 18px; }
}
@media (max-width: 760px) {
  .mobile-only { display: grid !important; }
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar.mini { width: var(--sidebar-w); }
  .sidebar.mini .brand-text, .sidebar.mini .nav-label, .sidebar.mini .nav-group-title, .sidebar.mini .sidebar-foot-text { display: initial; }
  .sidebar.mini .sidebar-foot-text { display: flex; }
  .sidebar.mini .nav-item { justify-content: flex-start; padding: 10px 12px; }
  .sidebar.mini .nav-item i { margin: 0; }
  .sidebar.mini .collapse-btn i { transform: none; }
  .sidebar-overlay.show { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 55; }
  .app-shell, .app-shell.mini { margin-left: 0; }
  .g2, .g3, .g4, .g5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .top-date { display: none; }
  .main-content { padding: 14px 12px 24px; }
  .topbar { height: 62px; padding: 0 12px; }
  .page-title { font-size: 15px; }
  .page-subtitle { font-size: 10px; }
  .app-footer { padding: 10px 12px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .search-input { max-width: none; }
  .hero { padding: 17px; }
  .hero h2 { font-size: 17px; }
  .modal-root { padding: 8px; }
  .modal-body { padding: 15px; }
  .stat-num { font-size: 19px; }
  .stat-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .toast-root { right: 10px; left: 10px; top: 70px; }
}
@media (max-width: 480px) {
  .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; }
  .g2.keep-two, .g4.keep-two { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat-card { padding: 12px; }
  .app-footer span:last-child { display: none; }
}
@media print {
  .sidebar, .topbar, .app-footer, .no-print, .toolbar, .btn { display: none !important; }
  .app-shell { margin: 0; }
  .main-content { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}
