/* ================= 主题：教育管理平台（浅色 · 蓝色主调） ================= */
:root {
  --brand: #1a5fb4;
  --brand-dark: #13467f;
  --brand-light: #e8f1fb;
  --brand-2: #2b7cd3;
  --accent: #f2994a;
  --ok: #1f8f4e;
  --warn: #d98700;
  --danger: #d64545;
  --text: #1f2937;
  --text-2: #5b6b7f;
  --text-3: #93a1b1;
  --bg: #f2f5f9;
  --card: #ffffff;
  --line: #e3e9f0;
  --line-2: #eef2f7;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 42, 67, .06), 0 4px 14px rgba(16, 42, 67, .05);
  --shadow-lg: 0 8px 30px rgba(16, 42, 67, .14);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
input, select, textarea { font-family: inherit; }

/* ---------------- 顶部条 ---------------- */
.topbar {
  height: 62px;
  background: linear-gradient(90deg, #14417a 0%, #1a5fb4 55%, #2b7cd3 100%);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 2px 10px rgba(16, 42, 67, .18);
}
.topbar .logo {
  width: 36px; height: 36px; border-radius: 9px;
  background: rgba(255,255,255,.16);
  display: grid; place-items: center;
  font-size: 19px; font-weight: 700; letter-spacing: -1px;
  border: 1px solid rgba(255,255,255,.28);
  margin-right: 12px;
}
.topbar .titles h1 { font-size: 18px; letter-spacing: .5px; }
.topbar .titles p { margin: 0; font-size: 12px; opacity: .82; }
.topbar .spacer { flex: 1; }
.topbar .user {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  background: rgba(255,255,255,.12);
  padding: 6px 12px; border-radius: 20px;
}
.topbar .user b { font-weight: 600; }
.topbar a.link { color: #fff; opacity: .88; font-size: 13px; margin-left: 14px; }
.topbar a.link:hover { opacity: 1; text-decoration: underline; }

/* ---------------- 布局 ---------------- */
.layout { display: flex; min-height: calc(100vh - 62px); }
.sidebar {
  width: 196px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 10px 0 30px;
  flex: 0 0 196px;
  position: sticky;
  top: 62px;
  height: calc(100vh - 62px);
  overflow-y: auto;
}
.sidebar .group-title {
  font-size: 12px; color: var(--text-3);
  padding: 16px 20px 5px; letter-spacing: 2px; font-weight: 600;
}
.sidebar a.item {
  display: flex; align-items: center;
  padding: 9px 20px;
  color: var(--text-2);
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.sidebar a.item:hover { background: var(--brand-light); color: var(--brand); }
.sidebar a.item.active {
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 600;
  border-left-color: var(--brand);
}

/* 页签（合并后的多模块视图） */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs .tab {
  padding: 9px 18px; background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--text-2); font-size: 14px; cursor: pointer; font-family: inherit;
}
.tabs .tab:hover { color: var(--brand); }
.tabs .tab.on { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }
.main { flex: 1; padding: 20px 24px 60px; min-width: 0; }

/* 顶部导航（访问端） */
.navbar {
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; gap: 4px; padding: 0 24px;
  position: sticky; top: 62px; z-index: 50;
  overflow-x: auto;
}
.navbar a {
  padding: 13px 16px; color: var(--text-2); font-size: 14px;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.navbar a:hover { color: var(--brand); }
.navbar a.active { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }

/* ---------------- 卡片 / 区块 ---------------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.page-head h2 { font-size: 20px; }
.page-head .desc { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card > .hd {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
}
.card > .hd h3 { font-size: 15px; }
.card > .hd .sub { color: var(--text-3); font-size: 12px; font-weight: 400; margin-left: 8px; }
.card > .bd { padding: 16px 18px; }
.card > .bd.flush { padding: 0; }

/* ---------------- 表单控件 ---------------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 13px; color: var(--text-2); }
.field > label .req { color: var(--danger); }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 8px 11px;
  border: 1px solid #d5dee8; border-radius: 7px;
  background: #fff; color: var(--text);
  font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(43, 124, 211, .14);
}
textarea { resize: vertical; min-height: 78px; line-height: 1.65; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.grid-form .full { grid-column: 1 / -1; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: 7px;
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  font-size: 13.5px; cursor: pointer; transition: all .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: #fff; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-light); }
.btn.gray { background: #fff; color: var(--text-2); border-color: #d5dee8; }
.btn.gray:hover { background: #f2f5f9; }
.btn.danger { background: #fff; color: var(--danger); border-color: #efc2c2; }
.btn.danger:hover { background: #fdf1f1; }
.btn.ok { background: var(--ok); border-color: var(--ok); }
.btn.ok:hover { background: #27a35b; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 6px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar .grow { flex: 1; min-width: 160px; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  background: #f5f8fc; color: var(--text-2); font-weight: 600;
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0;
}
table.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); }
table.tbl tbody tr:hover { background: #f8fbfe; }
table.tbl tbody tr:nth-child(even) { background: #fcfdff; }
table.tbl tbody tr:nth-child(even):hover { background: #f8fbfe; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.center, table.tbl th.center { text-align: center; }
.empty { padding: 40px 16px; text-align: center; color: var(--text-3); font-size: 13.5px; }

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; line-height: 18px; background: #eef2f7; color: var(--text-2);
  border: 1px solid var(--line);
}
.tag.blue { background: #e8f1fb; color: var(--brand-dark); border-color: #cfe0f5; }
.tag.green { background: #e7f6ec; color: var(--ok); border-color: #c6e8d2; }
.tag.orange { background: #fdf3e3; color: var(--warn); border-color: #f6e0bd; }
.tag.red { background: #fdeeee; color: var(--danger); border-color: #f7d2d2; }
.tag.gray { background: #f1f4f8; color: var(--text-3); }

/* ---------------- 统计卡片 ---------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 15px 17px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px;
}
.stat .ico { display: none; }
.stat .v { font-size: 25px; font-weight: 700; line-height: 1.1; color: var(--text); }
.stat .k { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.stat .sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }

/* ---------------- 进度条 ---------------- */
.bar { height: 8px; background: #eef2f7; border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #2b7cd3, #1a5fb4); border-radius: 6px; }
.bar.g > i { background: linear-gradient(90deg, #34b877, #1f8f4e); }
.bar.o > i { background: linear-gradient(90deg, #f5b04e, #e08e1a); }
.bar.r > i { background: linear-gradient(90deg, #ef7a7a, #d64545); }

/* ================= 页面布局骨架 v2（政务风：白卡片 + 细边框 + 深蓝主色） =================
 * 只改「布局与层次」，不改配色与视觉语言。挂在 .page-head / .card / .tabs /
 * .table-wrap / .empty / .loading / .stat 这些全站共用类上，
 * 40+ 个视图一次性受益，不需要逐个改业务 JS。 */

/* 页头：白卡片 + 左侧蓝色竖条；标题/说明在左，操作区在右 */
.page-head {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 13px 18px;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.page-head h2 { font-size: 19px; letter-spacing: .3px; }
.page-head .desc { color: var(--text-3); font-size: 12.5px; margin-top: 3px; }
.page-head .toolbar { margin: 0; }

/* 卡片：头部做成浅底工具条；内容区裁剪圆角（表格边角不再溢出） */
.card > .hd { background: #fafbfd; padding: 11px 16px; }
.card > .bd.flush { overflow: hidden; }

/* 表格：更舒适的密度、明显 hover、数字等宽对齐 */
table.tbl td { padding: 10px 12px; }
table.tbl tbody tr:hover { background: #f3f8ff; }
table.tbl td.num, table.tbl th.num { font-variant-numeric: tabular-nums; }
table.tbl tbody tr:last-child td { border-bottom: none; }

/* 空状态：虚线圆占位 + 留白 */
.empty { padding: 44px 16px; color: var(--text-3); font-size: 13.5px; }
.empty::before {
  content: ''; display: block; width: 44px; height: 44px; margin: 0 auto 12px;
  border: 2px dashed #d9e2ec; border-radius: 50%;
}

/* 加载态：骨架条（仅卡片内容区；文字保留只是视觉隐藏，便于无障碍） */
.card > .bd > .loading { padding: 20px 0 24px; color: transparent; }
.card > .bd > .loading::before,
.card > .bd > .loading::after {
  content: ''; display: block; height: 12px; border-radius: 6px; margin: 0 auto 10px;
  background: linear-gradient(90deg, #eef2f7 25%, #e1e8f0 37%, #eef2f7 63%);
  background-size: 400% 100%; animation: sk 1.3s ease infinite;
}
.card > .bd > .loading::before { width: 62%; }
.card > .bd > .loading::after { width: 86%; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 统计卡：左侧色条 + 数值等宽 */
.stat { position: relative; overflow: hidden; }
.stat::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.stat .v { font-variant-numeric: tabular-nums; }

/* 页签条：白底卡片 + 底部轨道线（与下方卡片形成层次） */
.tabs {
  background: var(--card); border: 1px solid var(--line); border-bottom-color: var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0 16px; margin-bottom: 14px;
}
.tabs .tab { padding: 11px 2px; }

/* 统计卡图标：原来被 display:none 隐藏，却仍占着 14px 间隙，导致文字偏右。
   改成浅底色块显示，卡片信息层次更清楚（政务风用低饱和底色，不用彩色渐变）。 */
.stat .ico {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--brand-light); font-size: 20px; line-height: 1;
}
.stat .ico.g { background: #e7f6ec; }
.stat .ico.o { background: #fdf3e3; }
.stat .ico.p { background: #edf1fa; }

/* ---- 表单分区（UI.form 的 section 分组 + 字段说明） ---- */
.grid-form { gap: 14px 16px; }
.form-sec { margin-bottom: 18px; }
.form-sec:last-child { margin-bottom: 0; }
.form-sec .grid-form { margin-bottom: 0; }
.form-sec-t {
  font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3;
  padding-left: 9px; margin-bottom: 11px; border-left: 3px solid var(--brand);
}
.field .tip { font-size: 11.5px; color: var(--text-3); line-height: 1.5; margin-top: -1px; }

/* ---- 图表卡片：等高、内边距统一、与卡片头部呼应 ---- */
.chart-box { padding: 14px 16px 16px; }
.card > .bd.chart-box { padding: 14px 16px 16px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 16px; }
.dash-grid .card { margin-bottom: 0; }

/* ---------------- 登录页（2026 重设计：全幅深空渐变 + 玻璃拟态卡片） ---------------- */
/* 兼容性策略：所有效果先给低版本内核（如微信 X5）可用的实色兜底，
   再用 @supports 渐进增强毛玻璃等新特性，保证任何浏览器下可读可点。 */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex; padding: 40px 24px;
  box-sizing: border-box;
  overflow: hidden;
  /* 兜底实色在前，支持多背景的浏览器才应用渐变层 */
  background: #123a6d;
  background:
    radial-gradient(1100px 620px at 12% -10%, rgba(64,140,255,.32), transparent 60%),
    radial-gradient(900px 560px at 108% 112%, rgba(30,200,180,.16), transparent 55%),
    linear-gradient(135deg, #0b2748 0%, #123a6d 46%, #1a5fb4 100%);
}
/* 用 margin:auto 而非 justify-content:center 居中：
   内容超宽时 auto 边距归零、从起点排列，避免溢出侧不可滚动到 */
.login-shell {
  position: relative;
  margin: auto;
  width: 100%; max-width: 980px;
  display: grid; grid-template-columns: minmax(0, 370px) minmax(0, 1fr);
  /* 兜底：实色白卡（低版本内核没有 backdrop-filter 也完全可读） */
  background: #fff;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(4, 20, 45, .45);
  overflow: hidden;
}
/* 渐进增强：支持 backdrop-filter 才使用半透明玻璃卡 */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .login-shell {
    background: rgba(255,255,255,.93);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    box-shadow: 0 24px 70px rgba(4, 20, 45, .45), 0 2px 0 rgba(255,255,255,.4) inset;
  }
}

/* 品牌区后方的漂浮光斑（装饰，不响应交互） */
.login-deco { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
.login-deco i {
  position: absolute; border-radius: 50%; display: block;
  filter: blur(2px);
  animation: lgFloat 9s ease-in-out infinite alternate;
}
.login-deco i:nth-child(1) { width: 190px; height: 190px; left: -60px; top: -55px; background: rgba(120,190,255,.16); }
.login-deco i:nth-child(2) { width: 130px; height: 130px; right: 24%; bottom: -46px; background: rgba(46,220,190,.13); animation-delay: -3s; }
.login-deco i:nth-child(3) { width: 74px; height: 74px; left: 34%; top: 24%; background: rgba(255,255,255,.1); animation-delay: -6s; }
@keyframes lgFloat {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(14px, -18px, 0) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .login-deco i { animation: none; } }
/* 旧内核无 CSS 动画/无 filter 时自然降级为静态色块，无需处理 */

/* ---- 左侧品牌区（深蓝渐变面板，与卡片形成层次） ---- */
.login-side {
  position: relative; padding: 38px 30px 26px; color: #fff;
  background: #13427b;
  background: linear-gradient(160deg, rgba(13,50,96,.94), rgba(23,84,158,.9) 58%, rgba(38,120,208,.86));
  display: flex; flex-direction: column; gap: 14px;
  overflow: hidden;
}
/* 旧内核不支持 flex gap 的间距兜底（微信 X5 等 Chromium<84） */
@supports not (gap: 1px) {
  .login-side > * + * { margin-top: 14px; }
}
.login-side::after {
  content: ''; position: absolute; right: -80px; top: -80px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.login-side .side-mark {
  width: 64px; height: 64px; border-radius: 16px; overflow: hidden;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 6px 18px rgba(4,20,45,.3);
  display: grid; place-items: center; font-size: 28px; font-weight: 700;
}
.login-side .side-mark img { width: 64px; height: 64px; object-fit: cover; display: block; }
.login-side h2 { font-size: 20px; letter-spacing: 1.5px; line-height: 1.45; }
.login-side .side-sub { font-size: 12.5px; opacity: .88; letter-spacing: .5px; }
.login-side .side-org { font-size: 11.5px; opacity: .72; letter-spacing: 1px; }
.login-side .side-feats { display: flex; flex-wrap: wrap; gap: 6px; }
.login-side .side-feats span {
  font-size: 11.5px; padding: 4px 10px; border-radius: 20px;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.22);
}
.login-side .side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.18); }
.login-side .side-foot p { margin: 0 0 8px; font-size: 11.5px; opacity: .68; letter-spacing: 1px; }
.login-side .side-links { display: flex; flex-direction: column; gap: 8px; }
.login-side .side-links a {
  font-size: 12.5px; color: #fff; opacity: .92; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; margin: -6px -10px; border-radius: 8px;
  transition: background .15s, opacity .15s;
}
.login-side .side-links a:hover { opacity: 1; background: rgba(255,255,255,.12); }

/* ---- 右侧表单区 ---- */
.login-main { padding: 32px 36px 22px; display: flex; flex-direction: column; }
.login-main .lm-head h3 { font-size: 22px; color: var(--text); letter-spacing: .5px; }
.login-main .lm-head p { margin: 6px 0 0; font-size: 12.5px; color: var(--text-3); }
.login-main .field { margin-bottom: 14px; }
.login-main .btn.big {
  width: 100%; justify-content: center; padding: 12px; font-size: 15.5px; margin-top: 6px;
  border-radius: 11px; letter-spacing: 6px; text-indent: 6px;
  background: linear-gradient(135deg, #1a5fb4, #2b7cd3); border: none;
  box-shadow: 0 8px 20px rgba(26, 95, 180, .35);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.login-main .btn.big:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(26,95,180,.42); }
.login-main .btn.big:disabled { opacity: .7; transform: none; }
.lm-body { padding-top: 16px; }

/* 身份切换 → 分段控件 */
.role-switch {
  display: flex; gap: 4px; padding: 4px; margin: 18px 0 0;
  background: #eef2f8; border-radius: 12px;
}
.role-switch .role-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 4px; border: none; border-radius: 9px; background: transparent;
  cursor: pointer; font-size: 13px; color: var(--text-2); transition: all .16s;
}
.role-switch .role-btn i {
  font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: #e2eaf4; color: var(--brand); font-size: 12px; font-weight: 700;
}
.role-switch .role-btn:hover { color: var(--text); }
.role-switch .role-btn.on {
  background: #fff; color: var(--brand-dark); font-weight: 600;
  box-shadow: 0 2px 6px rgba(16, 42, 67, .14);
}
.role-switch .role-btn.on i { background: var(--brand); color: #fff; }

/* 登录方式 → 下划线页签（底色由 .tabs 提供细线轨道） */
.lg-tabs { display: flex; gap: 26px; padding: 14px 0 0; margin: 0; }
.lg-tabs .tab { flex: 0 0 auto; text-align: center; justify-content: center; }

/* ---- 输入框：前置图标 + 密码可见切换 ---- */
.lg-inp { position: relative; }
.lg-inp .lg-ico {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); display: flex; pointer-events: none;
}
.lg-inp input { padding-left: 36px; }
.lg-inp.has-eye input { padding-right: 44px; }
.lg-eye {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; cursor: pointer; color: var(--text-3);
  padding: 6px; display: flex; border-radius: 6px;
}
.lg-eye:hover { color: var(--brand); background: #f2f5f9; }

/* ---- 记住账号 / 行内错误 / 验证码 ---- */
.lg-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: -2px 0 12px; font-size: 12.5px; color: var(--text-2);
}
.lg-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.lg-row input[type=checkbox] { width: 14px; height: 14px; accent-color: var(--brand); }
.lg-err {
  display: none; margin: 10px 0 0; padding: 8px 11px; border-radius: 8px;
  background: #fdf1f1; border: 1px solid #f3c9c9; color: var(--danger); font-size: 12.5px;
}
.lg-err.on { display: block; }
.lg-cap { display: flex; gap: 9px; }
.lg-cap .lg-inp { flex: 1; min-width: 0; }
.lg-cap input { flex: 1; }
.lg-cap canvas {
  border: 1px solid #d5dee8; border-radius: 7px; cursor: pointer; background: #f7fafd;
}
.lg-cap-tip { margin-top: 6px; font-size: 11.5px; color: var(--text-3); }
.lg-cap-tip button { border: none; background: none; color: var(--brand); cursor: pointer; font-size: 11.5px; padding: 0; }
.lg-cap-tip button:hover { text-decoration: underline; }
.lg-link { color: var(--brand); text-decoration: none; white-space: nowrap; }
.lg-link:hover { text-decoration: underline; }
.login-foot { margin-top: auto; padding-top: 16px; font-size: 12px; color: var(--text-3); line-height: 1.7; }
.login-copy { margin-top: 8px; font-size: 11.5px; color: var(--text-3); }
/* 运行环境/技术支持说明（政务系统常见页脚信息） */
.login-support {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 11.5px; color: var(--text-3); line-height: 1.7;
}

/* ---- 响应式 ----
 * 断点 900px：覆盖 iPad 等平板（768/820 宽），避免桌面双栏在平板上拥挤；
 * 折叠为上下结构后，品牌区作为顶部条、表单在下方，所有身份统一生效。
 * 触控与 16px 字号对所有身份生效，根治 iOS Safari 聚焦自动缩放。 */
@media (max-width: 900px) {
  .login-page { padding: 24px 16px; }
  .login-shell { grid-template-columns: 1fr; max-width: 480px; }

  /* 品牌区折叠为紧凑顶条：图标 + 校名一行，说明/特性换行在下方 */
  .login-side {
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px;
    padding: 18px 20px 14px;
  }
  .login-side::after { display: none; }
  .login-side .side-mark { width: 46px; height: 46px; font-size: 21px; border-radius: 12px; }
  .login-side .side-mark img { width: 46px; height: 46px; }
  .login-side h2 { flex: 1; font-size: 17px; margin: 0; }
  .login-side .side-sub, .login-side .side-org, .login-side .side-feats { width: 100%; }
  .login-side .side-foot { display: none; }
  .login-main { padding: 22px 22px 18px; }

  /* 触控友好：输入框与按钮达到 44px 触控高度，表单字号 16px 防 iOS 自动缩放 */
  .lg-inp input, .lg-cap input { padding-top: 12px; padding-bottom: 12px; font-size: 16px; }
  .lg-cap canvas { height: 46px; }
  .lg-inp .lg-ico { transform: translateY(-50%) scale(1.05); }
  .btn.big { padding: 13px; font-size: 16px; }
  .lg-row { margin-bottom: 14px; }
}

/* 超窄屏（≤430px）：去外框铺满全屏，页脚技术支持行隐藏 */
@media (max-width: 430px) {
  .login-page { padding: 0; }
  .login-shell { max-width: none; border: none; border-radius: 0; box-shadow: none; min-height: 100dvh; }
  .login-main { padding: 20px 18px 24px; }
  .role-switch { margin-top: 14px; }
  .login-support { display: none; }
}

/* 手机访问（二维码只编码网址，与登录无关） */
.qr-wrap { padding: 4px 0 2px; text-align: center; }
.qr-box {
  position: relative; width: 228px; margin: 0 auto;
  padding: 10px; background: #fff; border: 1px solid #dde5ee; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(20, 40, 80, .06);
}
.qr-box canvas { display: block; width: 208px; height: 208px; image-rendering: pixelated; }
.qr-status { margin-top: 12px; font-size: 13px; color: var(--text-2); }
.qr-status.ok { color: var(--ok); }
.qr-status.err { color: var(--danger); }
.qr-url {
  margin: 8px auto 0; max-width: 320px; padding: 7px 10px;
  font: 11.5px/1.6 Consolas, "Courier New", monospace; color: var(--text-2);
  background: var(--bg-2, #f4f7fb); border: 1px dashed #cdd8e6; border-radius: 8px;
  word-break: break-all; user-select: all;
}
.qr-tip { margin-top: 12px; font-size: 12px; color: var(--text-3); line-height: 1.8; }
.qr-tip span { opacity: .75; font-size: 11.5px; }

/* ---------------- 门户首页 ---------------- */
.hero {
  background: linear-gradient(120deg, #14417a, #1a5fb4 60%, #3b8ee0);
  color: #fff; padding: 46px 0 54px;
}
.hero .inner { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.hero h1 { font-size: 30px; letter-spacing: 1px; }
.hero-school { margin: 0 0 4px !important; font-size: 17px !important; font-weight: 600; opacity: .96; letter-spacing: 2px; }
.hero p { margin: 12px 0 22px; opacity: .9; font-size: 14.5px; max-width: 640px; line-height: 1.9; }
.hero .btn { background: #fff; color: var(--brand-dark); border-color: #fff; font-size: 15px; padding: 11px 26px; }
.hero .btn:hover { background: #eef4fb; }
.hero .btn.ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); }
.hero-stats { display: flex; gap: 40px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats div b { display: block; font-size: 26px; }
.hero-stats div span { font-size: 12.5px; opacity: .85; }
/* 三端登录入口卡片 */
.hero-entries { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 22px; text-align: left; }
.hero-entry { display: flex; gap: 14px; align-items: flex-start; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); border-radius: 12px; padding: 16px; color: #fff; transition: transform .15s, background .15s; }
.hero-entry:hover { background: rgba(255,255,255,.2); transform: translateY(-2px); }
.hero-entry.ghost { background: transparent; }
.hero-entry .he-ico { flex: none; width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }
.hero-entry .he-body { min-width: 0; }
.hero-entry .he-body b { display: block; font-size: 16px; margin-bottom: 3px; }
.hero-entry .he-body span { display: block; font-size: 12.5px; opacity: .82; line-height: 1.7; }
.hero-entry .he-body code { display: inline-block; margin-top: 8px; font-size: 12px; background: rgba(0,0,0,.22); border-radius: 5px; padding: 2px 8px; opacity: .9; }
/* 课表早读/晚修行 */
.tt-extra { padding: 10px 14px; border-top: 1px dashed var(--line); display: flex; gap: 26px; flex-wrap: wrap; }
.tt-extra-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.tt-extra-tag { background: var(--primary-light, #e8eef7); color: var(--primary); border-radius: 5px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.tt-period { font-weight: 600; line-height: 1.35; }
.tt-time { display: block; font-size: 11px; font-weight: 400; color: var(--text-3); margin-top: 2px; }
.tt-cell.empty { background: repeating-linear-gradient(45deg, #fafbfc, #fafbfc 6px, #f2f4f7 6px, #f2f4f7 12px); }
.tt-cell b { font-size: 13.5px; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 26px 24px 60px; }
.cols { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--line-2);
}
.list-item:last-child { border-bottom: none; }
.list-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: 0 0 6px; }
.list-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.list-item .d { color: var(--text-3); font-size: 12.5px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.feature {
  background: #f8fafd; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px;
}
.feature h4 { font-size: 15px; margin-bottom: 6px; padding-left: 10px; border-left: 3px solid var(--brand); }
.feature p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.75; }
.footer {
  background: #101f33; color: #93a6bd; padding: 26px 24px; text-align: center; font-size: 12.5px;
}

/* ---------------- 课表网格 ---------------- */
.tt { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13px; }
.tt th, .tt td { border: 1px solid var(--line); padding: 6px; text-align: center; }

/* 学生 / 教师端课表：窄屏下整体横向滚动，避免撑破卡片 */
.tt-grid { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13px; }
.tt-grid th, .tt-grid td { border: 1px solid var(--line); padding: 6px 8px; text-align: center; }
.tt-grid th { background: #f5f8fc; font-weight: 600; color: var(--text-2); }
.tt-grid .tt-cell { vertical-align: middle; }
.tt th { background: #f5f8fc; font-weight: 600; color: var(--text-2); }
.tt td.slot { background: #fff; height: 58px; vertical-align: middle; cursor: pointer; position: relative; }
.tt td.slot:hover { background: #f0f7ff; }
.tt .cell {
  border-radius: 6px; padding: 5px 4px; font-size: 12px; line-height: 1.4;
  background: #e8f1fb; color: var(--brand-dark); border-left: 3px solid var(--brand);
}
.tt .cell small { display: block; color: var(--text-3); font-size: 11px; }
.tt .cell.empty { background: transparent; border: none; }
.tt .period-col { width: 66px; background: #fafbfd; color: var(--text-3); font-size: 12px; }

/* ---------------- 弹窗 ---------------- */
.mask {
  position: fixed; inset: 0; background: rgba(16, 32, 54, .45);
  display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.modal {
  background: #fff; border-radius: 12px; width: 100%; max-width: 640px;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: pop .16s ease-out;
}
.modal.wide { max-width: 900px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal .mh {
  padding: 15px 20px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between;
}
.modal .mh h3 { font-size: 16px; }
.modal .mb { padding: 18px 20px; overflow-y: auto; }
.modal .mf { padding: 13px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 9px; }
.close-x { background: none; border: none; font-size: 20px; color: var(--text-3); cursor: pointer; line-height: 1; }
.close-x:hover { color: var(--text); }

/* ---------------- 提示 ---------------- */
#toasts { position: fixed; top: 74px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: 8px; padding: 11px 16px; box-shadow: var(--shadow-lg);
  font-size: 13.5px; min-width: 220px; max-width: 380px;
  animation: slidein .18s ease-out;
}
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }

/* ---------------- 其他 ---------------- */
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; align-items: center; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; }
.loading { padding: 50px; text-align: center; color: var(--text-3); }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 12px 18px; }
.pager button {
  padding: 5px 11px; border: 1px solid var(--line); background: #fff;
  border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text-2);
}
.pager button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.demo-banner {
  background: #fff8e6; border: 1px solid #f6e0bd; color: #8a5b00;
  padding: 9px 18px; border-radius: 8px; font-size: 13px; margin-bottom: 14px;
}
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.scroll-y { max-height: 460px; overflow-y: auto; }
.notice-detail { line-height: 1.9; white-space: pre-wrap; font-size: 14px; }
/* ---------------- 移动端适配：仅学生端（portal）与成绩查询页（score-query.html） ----------------
 * 产品决策：管理端、教师端、登录页、充值页统一按桌面布局呈现（两列不折叠、侧边栏常驻）。
 * .menu-btn / .sidebar-mask 永久隐藏，抽屉式导航不再出现。
 * 学生端作用域由 portal.js 在 body 上写 data-role="student" 提供；
 * 成绩查询页的手机布局见 score-query.html 内自带的 @media (max-width:560px)。 */
.menu-btn { display: none; }
.sidebar-mask { display: none; }

/* ---- 学生端窄屏适配（≤760px） ---- */
@media (max-width: 760px) {
  body[data-role="student"] .main { padding: 14px 12px 40px; }
  body[data-role="student"] .topbar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  body[data-role="student"] .topbar .titles h1 { font-size: 16px; }
  body[data-role="student"] .topbar .spacer { display: none; }
  /* 导航横向滚动，避免多项功能挤成多行遮挡正文 */
  body[data-role="student"] .navbar {
    overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; padding: 0 12px;
  }
  body[data-role="student"] .navbar a { padding: 10px 12px; font-size: 14px; }
  body[data-role="student"] .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  body[data-role="student"] .page-head h2 { font-size: 18px; }
  body[data-role="student"] .toolbar { flex-wrap: wrap; width: 100%; }
  body[data-role="student"] .toolbar > * { flex: 1 1 auto; min-width: 120px; }
  /* 表单与统计卡单列 */
  body[data-role="student"] .grid-form { grid-template-columns: 1fr; }
  body[data-role="student"] .card .bd { padding: 12px; }
  /* 表格横向滚动 + 字号收紧 */
  body[data-role="student"] .table-wrap { overflow-x: auto; }
  body[data-role="student"] .tbl { font-size: 13px; }
  body[data-role="student"] .tbl th,
  body[data-role="student"] .tbl td { padding: 8px 10px; }
  /* 弹窗在窄屏铺满 */
  body[data-role="student"] .modal { width: calc(100vw - 24px); max-height: 86vh; }
  body[data-role="student"] .modal .mb { max-height: calc(86vh - 110px); overflow-y: auto; }
}
