/* ============================================================
   伟贤大学教务管理系统 v2 · 界面样式
   ============================================================ */
:root {
  --primary: #0f4c92;
  --primary-600: #0c417d;
  --primary-700: #0a3568;
  --primary-100: #e8f1fd;
  --primary-50: #f3f8ff;
  --accent: #c9a55c;
  --bg: #f2f6fb;
  --surface: #ffffff;
  --line: #e2e9f3;
  --line-strong: #cdd9e8;
  --text: #1d2a3a;
  --muted: #6b7a90;
  --green: #1f9d55;
  --green-bg: #e7f7ee;
  --orange: #d47c00;
  --orange-bg: #fdf2df;
  --red: #d64545;
  --red-bg: #fdecec;
  --purple: #6b4fbb;
  --purple-bg: #f0ecfb;
  --blue-bg: #e8f1fd;
  --gray-bg: #eef2f7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(16, 42, 80, .07);
  --shadow-lg: 0 24px 70px rgba(8, 30, 62, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; line-height: 1.55;
}
button, input, select, textarea { font-family: inherit; font-size: 14px; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; word-break: break-word; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* ---------------------------- 登录 ---------------------------- */
.login-page {
  min-height: 100vh; position: relative; overflow: hidden;
  background: radial-gradient(1200px 700px at 85% 10%, #1b6ec4 0%, transparent 55%),
              linear-gradient(135deg, #071f3f 0%, #0a3568 45%, #0f4c92 100%);
  color: #fff; display: flex; flex-direction: column;
}
.orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; pointer-events: none; }
.orb-a { width: 560px; height: 560px; right: -160px; top: -180px; background: radial-gradient(circle, rgba(79,160,255,.42), transparent 68%); }
.orb-b { width: 420px; height: 420px; left: -140px; bottom: -120px; background: radial-gradient(circle, rgba(201,165,92,.22), transparent 68%); }
.login-head {
  position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center;
  padding: 26px 54px; max-width: 1440px; width: 100%; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 24px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); backdrop-filter: blur(8px);
}
.brand-mark img { width: 32px; height: 32px; object-fit: contain; }
.brand h1 { font-size: 22px; letter-spacing: 1px; font-weight: 650; }
.brand p { font-size: 10px; letter-spacing: 2px; opacity: .62; margin-top: 2px; }
.brand.compact { gap: 10px; }
.brand.compact .brand-mark { width: 34px; height: 34px; font-size: 18px; border-radius: 10px; background: rgba(255,255,255,.14); }
.brand.compact h1 { font-size: 17px; letter-spacing: .5px; }
.login-head-note { font-size: 12px; letter-spacing: 4px; opacity: .55; }
.login-main {
  position: relative; z-index: 2; flex: 1; width: 100%; max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: center; padding: 20px 54px 40px;
}
.hero-kicker { font-size: 11px; letter-spacing: 4px; color: var(--accent); font-weight: 700; margin-bottom: 18px; }
.login-hero h2 { font-size: 40px; line-height: 1.25; font-weight: 700; letter-spacing: 1px; margin-bottom: 16px; }
.login-hero > p { font-size: 15px; line-height: 1.9; color: rgba(255,255,255,.74); max-width: 560px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 32px 0 26px; max-width: 580px; }
.hero-grid > div {
  padding: 15px 18px; border-radius: 11px; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(6px);
}
.hero-grid b { display: block; font-size: 14px; margin-bottom: 4px; }
.hero-grid span { font-size: 12px; color: rgba(255,255,255,.6); }
.hero-banner { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.82); min-height: 24px; }
.hero-banner .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(201,165,92,.14); flex: none; }
.login-card {
  width: 100%; max-width: 420px; justify-self: end; background: #fff; color: var(--text);
  border-radius: 18px; padding: 38px 36px 30px; box-shadow: var(--shadow-lg);
}
.login-card-head h2 { font-size: 24px; color: var(--primary-700); letter-spacing: 2px; }
.login-card-head p { font-size: 13px; color: var(--muted); margin: 6px 0 22px; }
.role-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); background: var(--gray-bg);
  border-radius: 9px; padding: 4px; margin-bottom: 22px; gap: 3px;
}
.role-tabs button {
  border: 0; background: transparent; padding: 9px 0; border-radius: 7px; color: var(--muted);
  font-size: 13px; transition: .18s;
}
.role-tabs button.active { background: #fff; color: var(--primary); font-weight: 650; box-shadow: 0 2px 8px rgba(15,76,146,.12); }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px;
  outline: none; background: #fbfdff; color: var(--text); transition: .16s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(15,76,146,.08); }
.field textarea { resize: vertical; min-height: 84px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.login-error { min-height: 20px; color: var(--red); font-size: 12.5px; margin: -4px 0 10px; }
.login-tip { margin-top: 20px; padding: 14px 15px; background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: 10px; }
.login-tip-title { font-size: 12px; color: var(--primary); font-weight: 650; margin-bottom: 8px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 11.5px; color: var(--muted); }
.demo-grid b { color: var(--text); font-weight: 600; }
.login-footer { position: relative; z-index: 2; text-align: center; padding: 16px; font-size: 11.5px; color: rgba(255,255,255,.5); }

/* ---------------------------- 顶栏 / 布局 ---------------------------- */
.app { min-height: 100vh; }
.topbar {
  height: 62px; background: linear-gradient(100deg, #0a3568, #0f4c92 62%, #1763b8);
  color: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 18px rgba(8,34,70,.22);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.semester-chip {
  font-size: 11.5px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
  padding: 3px 10px; border-radius: 20px; margin-left: 6px; white-space: nowrap;
}
.topbar-link {
  position: relative; border: 0; background: transparent; color: rgba(255,255,255,.86);
  padding: 6px 4px; font-size: 12.5px;
}
.topbar-link:hover { color: #fff; }
.dot-badge {
  position: absolute; top: -2px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 10px; background: #e5484d; color: #fff; font-size: 10px; line-height: 16px; text-align: center;
}
.user-chip { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: rgba(255,255,255,.92); padding-left: 6px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center;
  background: rgba(255,255,255,.18); color: #fff; font-size: 13px; font-weight: 700; flex: none;
}
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.icon-btn {
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff;
  border-radius: 8px; padding: 6px 10px; font-size: 12px; transition: .15s;
}
.icon-btn:hover { background: rgba(255,255,255,.2); }
.icon-btn.danger:hover { background: #b93a3a; border-color: #b93a3a; }
.icon-btn.menu-btn { display: none; font-size: 17px; padding: 5px 10px; }
.app-body { display: flex; min-height: calc(100vh - 62px); }
.sidebar {
  width: 228px; flex: none; background: #fff; border-right: 1px solid var(--line);
  padding: 14px 10px 30px; position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: #d5e0ee; border-radius: 4px; }
.sb-user { display: none; }
.menu-group { margin-bottom: 10px; }
.mg-title { font-size: 11px; color: #98a6ba; letter-spacing: 1px; padding: 10px 12px 5px; font-weight: 650; }
.menu-item {
  display: flex; align-items: center; gap: 9px; padding: 8.5px 12px; border-radius: 8px;
  color: #40506a; font-size: 13.2px; cursor: pointer; margin: 1px 0; transition: .14s; border: 0; background: transparent; width: 100%; text-align: left;
}
.menu-item::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #c8d4e3; flex: none; transition: .14s; }
.menu-item:hover { background: var(--primary-50); color: var(--primary); }
.menu-item.active { background: var(--primary-100); color: var(--primary); font-weight: 650; }
.menu-item.active::before { background: var(--primary); box-shadow: 0 0 0 3px rgba(15,76,146,.12); }
.menu-badge { margin-left: auto; background: #e5484d; color: #fff; border-radius: 9px; font-size: 10px; padding: 0 6px; line-height: 16px; }
.sidebar-foot { padding: 16px 12px 0; color: #a7b3c4; font-size: 11px; line-height: 1.8; border-top: 1px solid var(--line); margin-top: 12px; }
.main { flex: 1; min-width: 0; padding: 20px 24px 40px; }
.page-loading { color: var(--muted); padding: 40px; text-align: center; }
.sidebar-mask { display: none; }

/* ---------------------------- 页面 ---------------------------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 21px; font-weight: 700; color: #122c4e; letter-spacing: .3px; }
.page-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title { font-size: 14.5px; color: #17375f; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--primary); }
.card-sub { font-size: 12px; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
.section-gap { margin-top: 16px; }

.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -20px; top: -20px; width: 72px; height: 72px; border-radius: 50%; background: var(--primary-50); }
.stat-label { font-size: 12px; color: var(--muted); margin-bottom: 7px; position: relative; z-index: 1; }
.stat-value { font-size: 27px; font-weight: 700; color: #12345c; letter-spacing: .5px; position: relative; z-index: 1; }
.stat-value small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat-foot { font-size: 11.5px; color: var(--muted); margin-top: 6px; position: relative; z-index: 1; }
.stat.blue { background: linear-gradient(135deg, #0f4c92, #2a78cd); border-color: transparent; }
.stat.blue .stat-label, .stat.blue .stat-value small, .stat.blue .stat-foot { color: rgba(255,255,255,.75); }
.stat.blue .stat-value { color: #fff; }
.stat.blue::after { background: rgba(255,255,255,.08); }
.stat.green { background: linear-gradient(135deg, #157a49, #2aa76b); border-color: transparent; }
.stat.green .stat-label, .stat.green .stat-value small, .stat.green .stat-foot { color: rgba(255,255,255,.78); }
.stat.green .stat-value { color: #fff; }
.stat.green::after { background: rgba(255,255,255,.08); }
.stat.gold { background: linear-gradient(135deg, #8c6a25, #c9a55c); border-color: transparent; }
.stat.gold .stat-label, .stat.gold .stat-value small, .stat.gold .stat-foot { color: rgba(255,255,255,.8); }
.stat.gold .stat-value { color: #fff; }
.stat.gold::after { background: rgba(255,255,255,.08); }

/* ---------------------------- 按钮 ---------------------------- */
.btn {
  border: 1px solid var(--line-strong); background: #fff; color: #33445e; padding: 8px 15px;
  border-radius: 8px; font-size: 13px; transition: .15s; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.btn-gold { background: var(--accent); border-color: var(--accent); color: #2b2109; }
.btn-gold:hover { background: #b8944c; color: #2b2109; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #b93a3a; color: #fff; }
.btn-danger-line { color: var(--red); border-color: #f0c7c7; }
.btn-danger-line:hover { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--gray-bg); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-xs { padding: 2px 8px; font-size: 11.5px; border-radius: 5px; }
.btn-lg { padding: 12px 18px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
.btn-link { border: 0; background: none; color: var(--primary); padding: 2px 5px; font-size: 12.5px; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--red); }
.btn-group { display: inline-flex; gap: 5px; flex-wrap: wrap; }

/* ---------------------------- 表格 ---------------------------- */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; min-width: 620px; }
.tbl th {
  background: #f5f9ff; color: #37506f; font-weight: 650; font-size: 12.5px; text-align: left;
  padding: 11px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.tbl td { padding: 10px; border-bottom: 1px solid #edf2f8; font-size: 13px; vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #f8fbff; }
.tbl td.center, .tbl th.center { text-align: center; }
.tbl td.right, .tbl th.right { text-align: right; }
.tbl .cell-main { font-weight: 600; color: #213a5c; }
.tbl .cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tbl .row-actions { display: flex; gap: 3px; flex-wrap: nowrap; white-space: nowrap; }
.tbl input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); }
.empty { text-align: center; color: var(--muted); padding: 46px 20px; font-size: 13px; }
.empty b { display: block; color: #36506f; font-size: 15px; margin-bottom: 6px; }
.empty .empty-action { margin-top: 14px; }

/* ---------------------------- 徽章 / 进度 ---------------------------- */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; line-height: 1.6; white-space: nowrap; background: var(--gray-bg); color: #5a6b82; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.orange { background: var(--orange-bg); color: var(--orange); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.blue { background: var(--blue-bg); color: var(--primary); }
.badge.purple { background: var(--purple-bg); color: var(--purple); }
.badge.gray { background: var(--gray-bg); color: #6b7a90; }
.badge.gold { background: #faf3e3; color: #9a7628; }
.progress { background: #edf2f8; height: 8px; border-radius: 10px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--primary), #4a97e6); }
.progress.green > span { background: linear-gradient(90deg, #1f9d55, #51c184); }
.progress.orange > span { background: linear-gradient(90deg, #d47c00, #f0ab45); }
.progress-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.progress-row .label { width: 120px; text-align: right; color: var(--muted); font-size: 12.5px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.bar-grid .progress-row .label { width: 104px; font-size: 12px; }
.check-list { display: flex; flex-direction: column; gap: 9px; }
.check-item { display: flex; gap: 11px; padding: 10px 12px; border-radius: 9px; background: #f6f9fd; border: 1px solid #e5edf7; }
.check-item.ok { background: #f2fbf6; border-color: #d7f0e0; }
.check-item.warn { background: #fff9ee; border-color: #f5e5c4; }
.check-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; background: #1f9d55; color: #fff; }
.check-item.warn .check-icon { background: #d47c00; }
.check-title { font-size: 13px; font-weight: 700; color: #223a5a; }
.check-detail { font-size: 12px; color: #71839c; line-height: 1.6; margin-top: 2px; }
.progress-row .track { flex: 1; }
.progress-row .val { width: 66px; text-align: right; font-size: 12.5px; color: #435a78; flex: none; }

/* ---------------------------- 表单 / 弹窗 ---------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-1 { grid-column: span 1; }
.form-section { grid-column: span 2; font-size: 12px; color: var(--primary); font-weight: 650; border-bottom: 1px dashed var(--line); padding: 4px 0 8px; margin-bottom: 12px; }
.checkbox-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #3e516d; padding: 6px 0; }
.checkbox-line input { width: 15px; height: 15px; accent-color: var(--primary); }
.search-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search-bar input:not([type="checkbox"]):not([type="radio"]), .search-bar select { min-width: 140px; }
.tbl td.nowrap, .tbl th.nowrap { white-space: nowrap; }
.icon-btn { white-space: nowrap; }
input.control, select.control, textarea.control {
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 10px; background: #fff; outline: none; color: var(--text); transition: .15s;
}
input.control:focus, select.control:focus, textarea.control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,76,146,.07); }
.modal-mask { position: fixed; inset: 0; background: rgba(7,24,47,.48); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 22px; backdrop-filter: blur(3px); animation: fade .18s; }
.modal {
  background: #fff; border-radius: 14px; width: 560px; max-width: 100%; max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: pop .2s; overflow: hidden;
}
.modal.wide { width: 900px; }
.modal.xwide { width: 1080px; }
.modal-head { padding: 16px 20px; background: linear-gradient(100deg, #0d4079, #12559f); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h3 { font-size: 15.5px; font-weight: 650; letter-spacing: .4px; }
.modal-head .sub { font-size: 11.5px; opacity: .72; margin-top: 2px; }
.modal-close { border: 0; background: rgba(255,255,255,.12); color: #fff; width: 28px; height: 28px; border-radius: 7px; font-size: 17px; line-height: 1; }
.modal-close:hover { background: rgba(255,255,255,.24); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; background: #fbfdff; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.99) } to { opacity: 1; transform: none } }

/* ---------------------------- Toast ---------------------------- */
#toastRoot { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green); padding: 10px 20px;
  border-radius: 9px; box-shadow: 0 12px 32px rgba(10,35,70,.16); font-size: 13px; max-width: 80vw; animation: toastIn .2s;
}
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--primary); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }

/* ---------------------------- 标签页 ---------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 9px 16px; color: var(--muted); font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 650; }

/* ---------------------------- 描述列表 ---------------------------- */
.desc { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.desc > div { display: flex; border-bottom: 1px solid var(--line); min-width: 0; }
.desc > div.full { grid-column: span 2; }
.desc dt { width: 118px; flex: none; background: #f7faff; color: var(--muted); padding: 9px 12px; font-size: 12.5px; }
.desc dd { padding: 9px 12px; flex: 1; font-size: 13px; word-break: break-all; }
.desc > div:nth-last-child(-n+2) { border-bottom: 0; }

/* ---------------------------- 课表 ---------------------------- */
.timetable { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: 760px; }
.timetable th { background: #eef5ff; color: #2c4b72; font-size: 12px; font-weight: 650; padding: 9px 4px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.timetable th:first-child { width: 76px; }
.timetable td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); height: 70px; vertical-align: top; padding: 3px; background: #fff; }
.timetable td.sec { background: #f8fbff; text-align: center; vertical-align: middle; color: var(--muted); font-size: 11px; line-height: 1.5; }
.timetable td.sec b { display: block; color: #3a5578; font-size: 12px; }
.tt-item { border-radius: 6px; padding: 5px 6px; font-size: 11.5px; line-height: 1.45; margin-bottom: 3px; border-left: 3px solid var(--primary); background: var(--primary-50); color: #23466f; }
.tt-item b { display: block; font-weight: 650; font-size: 12px; }
.tt-item.c2 { border-left-color: #1f9d55; background: #f0fbf5; }
.tt-item.c3 { border-left-color: #d47c00; background: #fff9ef; }
.tt-item.c4 { border-left-color: #6b4fbb; background: #f7f4ff; }
.tt-item.c5 { border-left-color: #c9a55c; background: #fffaf0; }
.week-picker { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------- 登录 / 内容细节 ---------------------------- */
.tool-card { background: linear-gradient(135deg, #f7fbff, #eef6ff); border: 1px solid #dbe9fa; border-radius: 12px; padding: 18px; }
.notice-list { display: flex; flex-direction: column; }
.notice-item { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px dashed var(--line); cursor: pointer; }
.notice-item:last-child { border-bottom: 0; }
.notice-item:hover .notice-title { color: var(--primary); }
.notice-title { font-size: 13.5px; color: #2d4160; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-date { font-size: 11.5px; color: var(--muted); flex: none; }
.notice-detail { line-height: 2; font-size: 14px; }
.pill { display: inline-block; background: var(--primary-50); color: var(--primary); border-radius: 20px; padding: 1px 8px; font-size: 11px; }
.info-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.info-row:last-child { border-bottom: 0; }
.info-row .k { color: var(--muted); }
.info-row .v { color: #2b405f; text-align: right; word-break: break-all; }
.hero-name { font-size: 22px; font-weight: 700; color: #17375f; }
.hero-meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.section-title { font-size: 14px; font-weight: 650; color: #1d3d64; margin: 20px 0 10px; padding-left: 9px; border-left: 3px solid var(--accent); }
.alert { border-radius: 9px; padding: 11px 14px; font-size: 12.5px; margin-bottom: 14px; border: 1px solid; }
.alert.info { background: var(--primary-50); border-color: #d6e6fb; color: #2b527f; }
.alert.warn { background: var(--orange-bg); border-color: #f4dfb8; color: #8a5a00; }
.alert.danger { background: var(--red-bg); border-color: #f4cccc; color: #a83232; }
.alert.success { background: var(--green-bg); border-color: #c8ead7; color: #146c3d; }
.alert b { font-weight: 650; }
.code-block { background: #0e2542; color: #d9e7f8; padding: 14px 16px; border-radius: 9px; font-size: 12.5px; overflow-x: auto; font-family: Consolas, monospace; line-height: 1.7; }
.list-clean { list-style: none; }
.list-clean li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.list-clean li:last-child { border-bottom: 0; }
.kv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.kv-pair .k { color: var(--muted); font-size: 12px; }
.kv-pair .v { font-size: 13px; margin-bottom: 6px; }
.ticket { border: 1px dashed #b9cce4; border-radius: 10px; padding: 16px; background: #fbfdff; }
.ticket h4 { color: var(--primary-700); font-size: 15px; margin-bottom: 10px; }
.ticket-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 12.5px; }
.ticket-grid span { color: var(--muted); }
.ticket-grid b { color: #203c5e; }
.print-only { display: none; }

/* ---------------------------- 分页 ---------------------------- */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.pager .info { font-size: 12px; color: var(--muted); }
.pager .pages { display: flex; gap: 4px; align-items: center; }
.pager button { min-width: 31px; height: 31px; border: 1px solid var(--line); background: #fff; border-radius: 7px; font-size: 12px; color: #4c5f79; }
.pager button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------------------- 响应式 ---------------------------- */
@media (max-width: 1100px) {
  .grid-6 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .login-main { gap: 40px; }
  .login-hero h2 { font-size: 32px; }
}
@media (max-width: 900px) {
  .login-main { grid-template-columns: 1fr; padding: 10px 24px 30px; gap: 28px; }
  .login-hero { display: none; }
  .login-card { justify-self: center; max-width: 440px; }
  .login-head { padding: 20px 24px; }
  .login-head-note { display: none; }
  .icon-btn.menu-btn { display: inline-flex; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar {
    position: fixed; left: 0; top: 62px; bottom: 0; z-index: 200; transform: translateX(-105%);
    transition: .24s; height: auto; box-shadow: 0 20px 50px rgba(5,25,50,.22);
  }
  .sidebar.open { transform: none; }
  .sidebar-mask.show { display: block; position: fixed; inset: 62px 0 0; background: rgba(6,24,45,.35); z-index: 150; }
  .main { padding: 16px 14px 34px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .topbar-right { gap: 7px; }
  .topbar-link { display: none; }
  .user-chip { padding-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .span-1, .form-section { grid-column: span 1; }
  .desc { grid-template-columns: 1fr; }
  .desc > div.full { grid-column: span 1; }
  .desc > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .desc > div:last-child { border-bottom: 0; }
  .topbar { padding: 0 12px; }
  .brand.compact h1 { font-size: 14px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .semester-chip { display: none; }
  .topbar-link { font-size: 0; width: 30px; }
  .topbar-link::before { content: "•"; font-size: 16px; }
  .user-chip .u-name { display: none; }
  .icon-btn { padding: 6px 8px; }
  .modal.wide, .modal.xwide { width: 100%; }
  .kv-pair, .ticket-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .login-card { padding: 26px 20px 22px; border-radius: 15px; }
  .login-head .brand h1 { font-size: 17px; }
  .demo-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 18px; }
  .stat { padding: 14px 15px; }
  .stat-value { font-size: 22px; }
  .user-chip { display: none; }
  .topbar { padding: 0 9px; }
  .brand.compact { gap: 7px; }
  .brand.compact h1 { max-width: 132px; font-size: 13px; }
  .brand.compact .brand-mark { width: 30px; height: 30px; font-size: 16px; }
  .icon-btn { padding: 6px 7px; font-size: 11.5px; }
}

@media print {
  body > * { display: none !important; }
  .print-only { display: block !important; }
}