/* ============================================================
   皙昂大学教务综合管理服务平台 · 全新 UI v3
   设计基准：/stu 蚌小e 风格
   沉稳商务蓝 · 扁平卡片 · 小圆角
   ============================================================ */
:root {
  --pri: #3b5bdb;
  --pri-d: #2c47b8;
  --pri-l: #4f6ef7;
  --pri-soft: #eef1fd;
  --pri-ink: #16204a;
  --ink: #1a2233;
  --sub: #5b6478;
  --line: #e6e9f2;
  --bg: #f5f7fb;
  --card: #ffffff;
  --topbar-bg: #ffffff;
  --sidebar-bg: #ffffff;
  --page-bg: #f5f7fb;
  --panel-bg: #ffffff;
  --text: #2a3242;
  --muted: #7b8494;
  --blue: #3b5bdb;
  --green: #12a150;
  --red: #e5484d;
  --orange: #f97316;
  --coral-grad: linear-gradient(135deg, #4f6ef7, #3b5bdb);
  --pri-grad: linear-gradient(135deg, #4f6ef7, #3b5bdb);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px; color: var(--text);
  background: var(--page-bg);
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--pri); text-decoration: none; }
a:hover { text-decoration: none; opacity: .85; }
button { font-family: inherit; }
h1, h2, h3 { font-weight: 800; color: var(--ink); }

/* ============ 布局框架 ============ */
.frame { display: flex; flex-direction: column; min-height: 100vh; }
.frame-body { display: flex; flex: 1; min-height: 0; }

/* 顶部导航：白底 + 底部渐变细线，品牌徽章紫渐变 */
.topbar {
  height: 58px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); color: var(--ink);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: flex-start;
  padding: 0 18px; position: sticky; top: 0; z-index: 50; flex-shrink: 0;
  overflow: hidden; min-width: 0; max-width: 100%;
}
.tb-left { display: flex; align-items: center; gap: 12px; flex: none; }
.tb-logo {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  border: 2.5px solid #fff; background: #fff;
  box-shadow: 0 4px 12px rgba(47,84,201,.25);
}
.tb-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tb-name { display: flex; flex-direction: column; line-height: 1.25; }
.tb-cn { font-size: 17px; font-weight: 900; letter-spacing: 1px; color: var(--ink); }
.tb-full { font-size: 11px; color: var(--sub); }
.tb-nav { display: flex; align-items: center; gap: 4px; margin-left: 24px; flex: 1; min-width: 0; }
.tb-item {
  display: inline-flex; align-items: center; gap: 5px; color: var(--sub); padding: 8px 14px;
  border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; background: none; border: 0;
  transition: background .15s, color .15s;
}
.tb-item:hover { background: var(--pri-soft); color: var(--pri); text-decoration: none; }
.tb-item.on { background: var(--pri-grad); color: #fff; box-shadow: 0 4px 12px rgba(47,84,201,.25); }
.tb-ic { width: 15px; height: 15px; display: inline-flex; }
.tb-ic svg { width: 15px; height: 15px; fill: currentColor; }
.tb-user { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.tb-ava {
  width: 30px; height: 30px; border-radius: 50%; background: var(--pri-grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
  box-shadow: 0 3px 8px rgba(11,87,208,.28);
}
.tb-uname { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.tb-role {
  font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: var(--pri-soft); color: var(--pri);
}
.tb-logout { display: inline; }

/* 侧边栏：浅底白卡式，激活项紫渐变圆角胶囊 */
.sidebar {
  width: 212px; background: transparent; color: var(--sub);
  overflow-y: auto; flex-shrink: 0; padding: 12px 10px 30px;
}
.sb-scroll { padding: 0; }
.sb-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin: 2px 0;
  color: var(--sub); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none;
  border-radius: 12px; transition: background .15s, color .15s;
}
.sb-item:hover { background: var(--pri-soft); color: var(--pri); text-decoration: none; }
.sb-item.on { background: var(--pri-grad); color: #fff; box-shadow: 0 4px 12px rgba(47,84,201,.22); }
.sb-ic { width: 16px; height: 16px; display: inline-flex; flex-shrink: 0; }
.sb-ic svg { width: 16px; height: 16px; fill: currentColor; }
.sb-ar { margin-left: auto; font-style: normal; font-size: 11px; transition: transform .15s; }
.sb-group.open .sb-ar { transform: rotate(180deg); }
.sb-group.open { background: rgba(255,255,255,.65); box-shadow: inset 0 0 0 1px var(--line); }
.sb-sub { display: none; }
.sb-group.open .sb-sub { display: block; }
.sb-sub-item {
  display: block; padding: 9px 14px 9px 40px; margin: 1px 4px; color: var(--sub); font-size: 13px;
  border-left: 2.5px solid transparent; border-radius: 0 10px 10px 0;
}
.sb-sub-item:hover { background: var(--pri-soft); color: var(--pri); text-decoration: none; }
.sb-sub-item.on { background: #e8edf8; color: var(--pri-d); border-left-color: var(--coral-grad) #ff4d6d; border-left-color: #ff4d6d; font-weight: 700; }

/* 内容区 */
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.crumb {
  padding: 13px 22px; font-size: 13px; color: var(--muted);
  background: rgba(255,255,255,.7); border-bottom: 1px dashed var(--line);
}
.crumb .on { color: var(--ink); font-weight: 700; }
.crumb-sep { margin: 0 7px; color: #c9c2e0; }
.page { padding: 20px 22px 46px; flex: 1; }

/* 底部状态栏 */
.statusbar {
  min-height: 36px; background: rgba(255,255,255,.85); color: var(--sub); display: flex; align-items: center;
  justify-content: space-between; padding: 4px 18px; font-size: 12px; flex-shrink: 0;
  position: sticky; bottom: 0; z-index: 40; border-top: 1px dashed var(--line); backdrop-filter: blur(8px);
}
.st-term { color: var(--pri); font-weight: 700; }

/* ============ 通用组件 ============ */
.page-h { margin-bottom: 16px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.page-h b { font-size: 20px; font-weight: 900; color: var(--ink); letter-spacing: 1px; }
.page-h span { color: var(--muted); font-size: 13px; }

.panel {
  background: var(--panel-bg); border-radius: 18px; border: 1px solid rgba(230,226,246,.9);
  margin-bottom: 18px; padding: 16px 20px 20px; box-shadow: var(--shadow);
}
.panel-h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 15.5px; font-weight: 800; color: var(--ink); padding: 4px 0 12px;
  border-bottom: 1px dashed var(--line); margin-bottom: 14px; flex-wrap: wrap;
}
.ph-more { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.panel-h .bd { margin-left: 8px; }

.home-grid { display: flex; flex-direction: column; }

/* 首页双列布局 */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid2 > .panel { margin-bottom: 0; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } .grid2 > .panel { margin-bottom: 0; } }

/* 首页日程条：贴纸胶囊 */
.sched-chip {
  display: inline-block; background: var(--pri-soft); border: 1px solid #d0d5dd; border-radius: 999px;
  padding: 4px 12px; margin: 2px 4px 2px 0; font-size: 12.5px; color: var(--text); font-weight: 600;
}
.sched-chip b { color: var(--pri-d); font-weight: 700; }
.tbl tr.today td { background: #fff6ec; }

/* 未读消息高亮 */
.notice-row.unread b { color: var(--pri-d); font-weight: 700; }
.notice-row.unread .dot { background: var(--red); }

/* 顶栏：搜索 / 主题 / 更多 */
.tb-search {
  display: inline-flex; align-items: center; gap: 6px; background: #f4f1fc;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; color: var(--sub); font-size: 13px;
}
.tb-search input {
  background: transparent; border: 0; outline: 0; color: var(--ink); width: 200px; font-size: 13px; font-family: inherit;
}
.tb-search input::placeholder { color: #98a2b3; }
.tb-search svg { width: 14px; height: 14px; fill: #98a2b3; flex-shrink: 0; }
.tb-more { position: relative; }
.tb-more-ar { font-size: 11px; opacity: .85; }
.tb-more-pop {
  display: none; position: absolute; right: 0; top: 44px; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; width: 300px;
  box-shadow: 0 16px 44px rgba(16,24,40,.18); padding: 6px 0; color: var(--text); text-align: left;
}
.tb-more-pop.open { display: block; }
.tb-pop-sec {
  font-size: 12px; color: var(--muted); padding: 10px 14px 4px; border-top: 1px dashed var(--line);
}
.tb-pop-list { padding: 4px 0 10px; }
.tb-pop-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 14px; font-size: 13.5px; color: var(--text); cursor: pointer;
}
.tb-pop-item:hover { background: var(--pri-soft); color: var(--pri-d); text-decoration: none; }
.tb-pop-item i {
  font-style: normal; width: 26px; height: 26px; border-radius: 8px; background: var(--pri-soft); color: var(--pri);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0;
}
.tb-pop-item em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 11.5px; }
.tb-pop-item.star i { cursor: pointer; user-select: none; }
.tb-pop-item.star i.on { background: #ffedcc; color: #d97706; }
.tb-pop-empty { font-size: 12.5px; color: var(--muted); padding: 4px 14px; }
.tb-pop-foot { border-top: 1px dashed var(--line); padding: 8px 14px; font-size: 12px; color: var(--muted); }

/* 主题：深色（深紫夜空） */
body.theme-dark {
  --page-bg: #141a2e; --panel-bg: #23204a; --line: #3b3768; --text: #dcd9f2; --muted: #9d97c4;
  --ink: #dfe5f2; --sub: #98a2b3; --pri-soft: #1c2740;
  background:
    radial-gradient(circle, #101828 1.3px, transparent 1.3px) 0 0 / 20px 20px,
    linear-gradient(180deg, #141a2e 0%, #182036 100%);
  background-attachment: fixed;
}
body.theme-dark .topbar { background: rgba(30,27,60,.92); border-bottom-color: var(--line); }
body.theme-dark .tb-cn, body.theme-dark .tb-uname { color: var(--ink); }
body.theme-dark .tb-item { color: var(--sub); }
body.theme-dark .tb-item:hover { background: var(--pri-soft); color: #cfd8ea; }
body.theme-dark .tb-search { background: #2a2650; border-color: var(--line); }
body.theme-dark .tb-search input { color: var(--ink); }
body.theme-dark .tb-more-pop { background: #262249; border-color: var(--line); }
body.theme-dark .crumb, body.theme-dark .statusbar { background: rgba(23,20,48,.85); color: var(--sub); border-color: var(--line); }
body.theme-dark .crumb a { color: #98a2b3; }
body.theme-dark .panel, body.theme-dark .quick, body.theme-dark .stat, body.theme-dark .empty, body.theme-dark .hint { background: var(--panel-bg); }
body.theme-dark .panel { color: var(--text); }
body.theme-dark .tbl thead th { background: #2c2856; color: #b3aed8; }
body.theme-dark .tbl td { border-color: var(--line); }
body.theme-dark .tbl tbody tr:hover { background: #2c2856; }
body.theme-dark .flash { background: #2c2856; }
body.theme-dark .irs .k { color: var(--muted); }
body.theme-dark .ir { border-bottom-color: var(--line); }
body.theme-dark .notice-row { border-bottom-color: var(--line); }
body.theme-dark .sheet { background: #262249; color: var(--text); }
body.theme-dark .sheet-h { color: var(--ink); border-bottom-color: var(--line); }
body.theme-dark .sub-panel { background: #28244e; border-color: var(--line); }
body.theme-dark .warn-box { background: #28244e; border-color: var(--line); }
body.theme-dark .term-h { background: #2c2856; }
body.theme-dark .term-h b { color: var(--ink); }
body.theme-dark .bar { background: #2c3a4a; }
body.theme-dark .stat { border-color: var(--line); }
body.theme-dark .quick { border-color: var(--line); }

/* 欢迎横幅：紫渐变 + 贴纸 + 点阵纹理 */
.hero {
  background:
    radial-gradient(circle at 86% 22%, rgba(255,255,255,.16), transparent 42%),
    var(--pri-grad);
  color: #fff; border: 0; padding: 24px 26px; border-radius: 18px !important;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  box-shadow: 0 14px 34px rgba(11,87,208,.32); margin-bottom: 18px;
}
.hero-l { display: flex; align-items: center; gap: 16px; }
.hero-ava {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.22);
  border: 2.5px solid rgba(255,255,255,.7); display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800;
}
.hero-name { font-size: 20px; font-weight: 900; display: flex; align-items: center; gap: 10px; letter-spacing: 1px; }
.hero-xh { font-size: 13px; font-weight: 500; opacity: .9; }
.hero-sub { font-size: 13px; opacity: .92; margin-top: 4px; }
.hero-r { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-term { background: rgba(255,255,255,.18); border: 1.5px solid rgba(255,255,255,.5); padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.hero-week { font-size: 22px; font-weight: 900; }
.hero-day { font-size: 13px; opacity: .92; }

/* 快捷入口：卡片悬浮上移 */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.quick {
  border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: #fff;
  display: flex; flex-direction: column; gap: 5px; transition: all .18s; color: var(--text);
}
.quick:hover { border-color: #d0d5dd; box-shadow: 0 10px 24px rgba(11,87,208,.14); text-decoration: none; transform: translateY(-2px); }
.quick b { color: var(--pri-d); font-size: 14.5px; font-weight: 800; }
.quick span { color: var(--muted); font-size: 12.5px; }

/* 统计卡 */
.stat4, .stat3 { display: flex; gap: 14px; flex-wrap: wrap; }
.stat {
  flex: 1; min-width: 130px; background: #ffffff; border: 1px solid var(--line);
  border-radius: 16px; text-align: center; padding: 16px 10px;
}
.stat b { display: block; font-size: 26px; font-weight: 900; color: var(--pri); margin-bottom: 4px; }
.stat span { font-size: 12.5px; color: var(--muted); }

/* 表格：圆角包裹感 + 柔和斑马纹 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: middle; }
.tbl thead th { background: #f4f2fb; color: var(--ink); font-weight: 700; white-space: nowrap; }
.tbl thead th:first-child { border-radius: 10px 0 0 10px; }
.tbl thead th:last-child { border-radius: 0 10px 10px 0; }
.tbl tbody tr:hover { background: #f7f4ff; }
.tbl tbody tr:nth-child(even) { background: #ffffff; }
.tbl tbody tr:nth-child(even):hover { background: #f7f4ff; }
.tbl tr.sum td { background: #fff6ec; font-weight: 700; }
.tbl .sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.t-ok { color: var(--green); }
.t-no { color: var(--red); }
.muted { color: var(--muted); }

/* 徽章：贴纸胶囊 */
.bd {
  display: inline-block; font-size: 11.5px; padding: 2.5px 10px; border-radius: 999px;
  font-weight: 700; font-style: normal; white-space: nowrap;
}
.bd.g { background: #e2f8ec; color: #0f9a56; }
.bd.o { background: #fff1dc; color: #d97706; }
.bd.r { background: #ffe4ea; color: #e6355f; }
.bd.b { background: #e8edf8; color: #2f54c9; }
.bd.m { background: #f1eff8; color: #7a75a0; }

/* 按钮：主按钮珊瑚渐变胶囊（stu CTA 同款） */
.btn {
  display: inline-block; padding: 8px 20px; border-radius: 999px; border: 1px solid #d0d5dd;
  background: #fff; color: var(--pri); font-size: 13.5px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.btn:hover { border-color: var(--pri-l); background: var(--pri-soft); box-shadow: 0 4px 12px rgba(11,87,208,.12); }
.btn.primary { background: var(--coral-grad); border: 0; color: #fff; box-shadow: 0 8px 20px rgba(47,84,201,.25), inset 0 -2px 0 rgba(0,0,0,.08); }
.btn.primary:hover { box-shadow: 0 10px 26px rgba(217,45,32,.42); }
.btn.ok { border-color: #bfe8d2; color: var(--green); background: #f2fcf7; }
.btn.danger { border-color: #ffd0da; color: var(--red); background: #fff5f7; }
.btn.sm { padding: 4px 12px; font-size: 12.5px; }
.btn-bar { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn-bar form { display: inline; }

/* 空态与提示：虚线边框空态卡 */
.empty { text-align: center; color: var(--muted); padding: 28px 12px; font-size: 13.5px; border: 1.5px dashed #d0d5dd; border-radius: 14px; background: #ffffff; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 10px; line-height: 1.8; }
.flash { padding: 11px 15px; border-radius: 12px; background: #fff8ec; color: #9a6b0f; font-size: 13px; margin-bottom: 14px; border: 1px solid #f3e2bb; }
.flash.ok { background: #e9f9f0; color: #0f8a4d; border-color: #bfe8d2; }
.login-err { padding: 11px 15px; border-radius: 12px; background: #ffe4ea; color: #e6355f; font-size: 13px; margin-bottom: 14px; }

/* 信息行 */
.irs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2px 28px; }
.ir { display: flex; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.ir .k { width: 96px; color: var(--muted); flex-shrink: 0; }
.ir .v { flex: 1; color: var(--text); word-break: break-all; font-weight: 600; }

/* 进度条：紫渐变圆角 */
.bar { background: #f0f2f5; border-radius: 999px; height: 10px; overflow: hidden; display: inline-block; width: 120px; vertical-align: middle; }
.bar.big { width: 100%; height: 16px; }
.bar i { display: block; height: 100%; background: var(--pri-grad); border-radius: 999px; }
.bar-t { font-size: 12px; color: var(--muted); margin-left: 8px; }
.dist { display: flex; flex-direction: column; gap: 9px; padding: 4px 0; }
.dist-row { display: flex; align-items: center; gap: 12px; }
.dist-row .dk { width: 52px; color: var(--muted); font-size: 12.5px; text-align: right; }
.dist-row .bar { flex: 1; width: auto; }
.dist-row .dv { width: 30px; font-size: 13px; font-weight: 800; color: var(--pri); }

/* 表单：圆角输入框，聚焦紫光环 */
.form-row { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; flex-wrap: wrap; }
.form-row label { width: 84px; color: var(--sub); font-size: 13.5px; font-weight: 600; flex-shrink: 0; }
.form-row input, .form-row select, .form-row textarea {
  flex: 1; min-width: 160px; padding: 9px 12px; border: 1px solid #d0d5dd; border-radius: 10px;
  font-size: 13.5px; font-family: inherit; outline: none; background: #ffffff; color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--pri); background: #fff; box-shadow: 0 0 0 3px rgba(11,87,208,.1); }
.form-row.pair { display: flex; gap: 16px; }
.form-row.pair > div { flex: 1; display: flex; align-items: center; gap: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 22px; }
.score-in { width: 76px; padding: 6px 8px; border: 1px solid #d0d5dd; border-radius: 10px; text-align: center; font-size: 13.5px; background: #ffffff; }
.score-in:focus { border-color: var(--pri); outline: none; box-shadow: 0 0 0 3px rgba(11,87,208,.1); }
.assign-sel { padding: 6px 9px; border: 1px solid #d0d5dd; border-radius: 10px; font-size: 13px; background: #ffffff; }
.chip-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-block; padding: 6px 16px; border-radius: 999px; border: 1.5px solid #d0d5dd;
  font-size: 13px; font-weight: 600; color: var(--sub); background: #fff; cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--pri-l); color: var(--pri); }
.chip.on { background: var(--pri-grad); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(47,84,201,.22); }

/* 课表 */
.tt-wrap { overflow-x: auto; }
.tt { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 12.5px; table-layout: fixed; }
.tt th, .tt td { border: 0; text-align: center; padding: 6px 4px; }
.tt thead th { background: #f4f2fb; font-weight: 700; color: var(--ink); padding: 9px 4px; border-radius: 8px; }
.tt-p { width: 92px; background: #f7f5fc; color: var(--muted); font-size: 12px; border-radius: 8px; }
.tt-p .tt-time { display: block; color: #b6b0d6; font-size: 11px; margin-top: 2px; }
.tt-slot { background: var(--pri-soft); color: var(--pri-d); font-weight: 800; writing-mode: vertical-lr; letter-spacing: 4px; width: 34px; padding: 4px 2px; border-radius: 8px; }
.tt-cell { background: #eef2fb; border-radius: 8px; box-shadow: inset 0 0 0 1px #dde4f2; }
.tt-cell b { display: block; color: var(--pri-d); font-size: 12.5px; margin-bottom: 2px; }
.tt-cell span { display: block; color: #7a8aa3; font-size: 11.5px; }
.tt-cell em { display: block; color: var(--muted); font-style: normal; font-size: 11.5px; }
.tt-cell .tt-wk { display: block; color: #98a2b3; font-size: 10.5px; font-style: normal; }
.tt-empty { background: rgba(255,255,255,.5); border-radius: 8px; }
.wk-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.wk { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; background: #ffffff; }
.wk b { color: var(--pri-d); margin-right: 8px; }
.wk span { color: var(--muted); }
.wk em { display: block; font-style: normal; color: #7a8aa3; margin-top: 4px; }

/* 学期成绩块 */
.term-block { margin-bottom: 18px; }
.term-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 9px 14px; background: #f4f2fb; border-radius: 10px; }
.term-h b { color: var(--ink); font-size: 14px; font-weight: 800; }

/* 通知 */
.notice-list { display: flex; flex-direction: column; }
.notice-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.notice-row:last-child { border-bottom: 0; }
.notice-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.notice-row b { flex: 1; font-weight: 500; }
.nr-meta { color: var(--muted); font-size: 12px; flex-shrink: 0; }

/* 弹层 */
.mask {
  position: fixed; inset: 0; background: rgba(47, 42, 94, .4); backdrop-filter: blur(4px); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px;
}
.mask[hidden] { display: none; }
.sheet {
  background: #fff; border-radius: 20px; width: 560px; max-width: 100%; max-height: 80vh;
  overflow-y: auto; padding: 20px 22px 24px; box-shadow: 0 20px 60px rgba(47,32,110,.3);
}
.sheet-h { display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 800; color: var(--ink); padding-bottom: 12px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.sheet-h .x { cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; }
.sheet-h .x:hover { color: var(--red); }

/* Toast */
.toast {
  position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 200;
  background: rgba(47, 42, 94, .94); color: #fff; padding: 11px 24px; border-radius: 999px;
  font-size: 13.5px; box-shadow: 0 8px 24px rgba(47,32,110,.3);
}
.toast.err { background: rgba(230, 53, 95, .95); }
.toast[hidden] { display: none; }

/* ============ 登录页 ============ */
.pg-login {
  min-height: 100vh; position: relative;
  background:
    #f4f6fa;
  background-attachment: fixed;
}
.pg-login::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background:
    #f4f6fa;
}
.login-wrap { position: relative; max-width: 430px; margin: 0 auto; padding: 6vh 18px 40px; }
.login-brand { display: flex; align-items: center; gap: 14px; justify-content: center; margin-bottom: 22px; color: var(--ink); }
.lg-logo {
  width: 58px; height: 58px; border-radius: 50%; overflow: hidden; background: #fff;
  border: 2.5px solid #fff; box-shadow: 0 8px 24px rgba(47,84,201,.25);
}
.lg-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lg-cn { font-size: 22px; font-weight: 900; letter-spacing: 2px; color: var(--ink); }
.lg-pill {
  font-style: normal; font-size: 12px; font-weight: 900; letter-spacing: 1px; color: #fff;
  background: var(--coral-grad); border-radius: 999px; padding: 4px 12px;
  box-shadow: 0 3px 10px rgba(217,45,32,.32); margin-left: 2px;
}
.login-head { text-align: center; color: var(--ink); margin-bottom: 26px; }
.login-head h1 { font-size: 26px; font-weight: 900; letter-spacing: 1px; margin: 0 0 8px; color: var(--ink); }
.login-head p { font-size: 13px; color: var(--muted); margin: 0; }
.login-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px 28px 26px;
  box-shadow: 0 18px 50px rgba(16,24,40,.15);
}
.login-card form { margin: 0; }
.lf-label { display: block; font-size: 13px; color: var(--sub); font-weight: 600; margin: 14px 0 7px; }
.lf-label:first-child { margin-top: 0; }
.lf-input {
  width: 100%; box-sizing: border-box; border: 1px solid #d0d5dd; border-radius: 12px;
  padding: 12px 14px; font-size: 14.5px; outline: none; background: #ffffff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.lf-input:focus { border-color: var(--pri); background: #fff; box-shadow: 0 0 0 3px rgba(11,87,208,.1); }
.lf-row { display: flex; justify-content: flex-end; margin: 12px 0 4px; }
.lf-row a { font-size: 13px; color: var(--pri); text-decoration: none; }
.lf-row a:hover { text-decoration: underline; }
.login-btn {
  width: 100%; border: 0; background: var(--coral-grad);
  color: #fff; font-size: 15.5px; padding: 14px 0; border-radius: 999px; cursor: pointer;
  letter-spacing: 6px; margin-top: 16px; font-weight: 800;
  box-shadow: 0 10px 26px rgba(217,45,32,.36), inset 0 -3px 0 rgba(0,0,0,.1);
  transition: box-shadow .15s;
}
.login-btn:hover { box-shadow: 0 12px 32px rgba(217,45,32,.46); }
.login-tip {
  margin: 18px auto 0; max-width: 380px; background: var(--pri-soft); border: 1px dashed #d0d5dd;
  border-radius: 14px; padding: 12px 16px; text-align: center; color: var(--sub);
  font-size: 12.5px; line-height: 2;
}
.login-tip b { color: var(--pri-d); }
.login-tip i { font-style: normal; color: var(--pri-d); font-weight: 700; background: rgba(255,255,255,.8); border-radius: 6px; padding: 1px 6px; }
.login-foot { text-align: center; color: #98a2b3; font-size: 12px; margin-top: 24px; }

/* 登录页：多方式切换 Tab */
.lg-tabs { display: flex; gap: 4px; background: var(--pri-soft); border: 0; border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.lg-tab { flex: 1; text-align: center; font-size: 14px; font-weight: 600; color: var(--sub); padding: 10px 0; border: 0; border-radius: 9px; cursor: pointer; background: transparent; transition: all .15s; }
.lg-tab.on { color: #fff; font-weight: 800; background: var(--pri-grad); box-shadow: 0 4px 10px rgba(47,84,201,.25); }
.lg-mode { display: none; } .lg-mode.on { display: block; }
.lf-smsrow { display: flex; gap: 10px; align-items: stretch; margin-top: 6px; }
.lf-smsrow .lf-input { flex: 1; }
.lg-smsbtn { white-space: nowrap; padding: 11px 14px; font-size: 13.5px; border-radius: 12px; border: 1px solid #d0d5dd; background: var(--pri-soft); color: var(--pri); font-weight: 700; cursor: pointer; }
.lg-smsbtn:disabled { opacity: .6; cursor: not-allowed; }

/* 个人中心：手机号绑定面板 */
.sms-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.sms-row input { flex: 1; min-width: 150px; }
.sms-row .lf-input { padding: 9px 12px; font-size: 13.5px; border-radius: 10px; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .frame-body { flex-direction: column; }
  .sidebar { width: 100%; }
  .sb-scroll { display: flex; flex-wrap: wrap; padding: 6px; }
  .sb-item { padding: 8px 12px; }
  .sb-sub { display: none !important; }
  .statusbar .st-copy { display: none; }
  .form-row.pair { flex-direction: column; }
  .irs { grid-template-columns: 1fr; }
  .tb-full { display: none; }
}

/* ============ 电子证明与印章 ============ */
.cert-paper {
  background: #fffef9;
  border: 1px solid #e8e0c8;
  border-radius: 8px;
  padding: 32px 36px;
  position: relative;
  box-shadow: 0 6px 22px rgba(120, 100, 40, .12);
}
.cert-paper::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid #efe6cc;
  border-radius: 4px;
  pointer-events: none;
}
.cert-title {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: #8a1f1f;
  letter-spacing: 6px;
  margin-bottom: 6px;
}
.cert-sub {
  text-align: center;
  font-size: 12px;
  color: #a08b5a;
  letter-spacing: 2px;
  margin-bottom: 22px;
}
.cert-body {
  font-size: 15px;
  line-height: 2.4;
  color: #2a2620;
  text-indent: 2em;
  text-align: justify;
}
.cert-foot {
  margin-top: 30px;
  text-align: right;
  font-size: 13px;
  color: #555;
  line-height: 2;
}
.cert-seal {
  margin-left: 12px;
  width: 92px;
  height: 92px;
  border: 3px solid #c0392b;
  border-radius: 50%;
  color: #c0392b;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  transform: rotate(-12deg);
  opacity: .82;
  font-weight: 700;
  vertical-align: middle;
  letter-spacing: 1px;
}
.cert-seal b { font-size: 13px; }
.cert-no {
  margin-top: 14px;
  font-size: 12px;
  color: #8a7a4a;
  text-align: right;
}

/* 证明模板选择卡 */
.cert-tpl {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.cert-tpl:hover { border-color: #cfd8ea; box-shadow: 0 6px 16px rgba(11, 87, 208, .12); }
.cert-tpl.on { border-color: var(--pri); background: #f5f8ff; box-shadow: 0 6px 18px rgba(11,87,208,.14); }

/* ============ 成绩 / 审批流程 ============ */
.flow {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 10px 0 4px;
  flex-wrap: wrap;
}
.flow-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  font-size: 12px;
  border-radius: 999px;
  background: #f1eff8;
  color: #9a95b8;
}
.flow-step.done { background: #e2f8ec; color: #0f9a56; }
.flow-step.cur { background: #e8edf8; color: #1f3d9e; font-weight: 800; }
.flow-arrow { color: #c9c2e0; margin: 0 4px; font-size: 12px; }

.grade-state {
  display: inline-block;
  padding: 2.5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.grade-state.published { background: #e2f8ec; color: #0f9a56; }
.grade-state.teacher { background: #fff1dc; color: #d97706; }
.grade-state.college { background: #e8f0fe; color: #2f5fc0; }
.grade-state.school { background: #e8edf8; color: #1f3d9e; }
.grade-state.locked { background: #f1eff8; color: #9a95b8; }

.score-big {
  font-size: 22px;
  font-weight: 900;
  color: var(--pri);
}
.flag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
  font-weight: 700;
}
.flag-makeup { background: #fff1dc; color: #d97706; }
.flag-retake { background: #ffe4ea; color: #e6355f; }
.flag-exempt { background: #e2f8ec; color: #0f9a56; }

/* ===== 成绩发布流：流程条 / 审核子面板 / 统计行 ===== */
.flow-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 14px; padding: 11px 14px;
  background: #f7f5fc; border-radius: 12px;
}
.flow-step.done { color: #0f9a56; border-color: #bfe8d2; background: #f2fcf7; }
.flow-step.on { color: #fff; background: var(--pri-grad); border-color: transparent; font-weight: 800; box-shadow: 0 3px 8px rgba(47,84,201,.22); }
.sub-panel { border: 1px solid #eef0f4; border-radius: 14px; padding: 13px 15px; margin-bottom: 14px; background: #fdfcff; }
.sub-panel:last-child { margin-bottom: 0; }
.sub-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 8px; font-size: 14.5px; font-weight: 800; color: var(--ink); }
.sub-h .sub { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.rate-line { margin: 8px 0 10px; font-size: 13px; color: var(--muted); }

/* ===== 电子证明：可申请卡片 ===== */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cert-card { border: 1px solid #e9e6f5; border-radius: 16px; padding: 15px; background: #fdfcff; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s, transform .15s; }
.cert-card:hover { box-shadow: 0 8px 20px rgba(11,87,208,.12); transform: translateY(-1px); }
.cert-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cert-top b { font-size: 15px; color: var(--ink); }
.cert-seal-mini { font-size: 11.5px; color: #c0392b; border: 1px solid #f0c3c3; background: #fef5f5; border-radius: 999px; padding: 2px 8px; font-weight: 700; }
.cert-meta { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.cert-tip { font-size: 12.5px; }
.cert-tip.ok { color: var(--green); }
.cert-tip.no { color: var(--red); }
.cert-card .btn { align-self: flex-start; }

/* ===== 证明打印版面 ===== */
.pg-certview .topbar, .pg-certview .crumb, .pg-certview .side { display: none; }
.pg-certview .frame { display: block; }
.certview-wrap { max-width: 780px; margin: 0 auto; padding: 18px; }
.cv-toolbar { display: flex; gap: 10px; margin-bottom: 16px; }
.cv-paper {
  background: #fff; padding: 56px 60px 44px; border: 1px solid #e6e2f0; border-radius: 8px;
  box-shadow: 0 10px 30px rgba(60,40,120,.12); position: relative;
  font-family: "FangSong", "STFangsong", "SimSun", serif;
}
.cv-head { text-align: center; margin-bottom: 26px; }
.cv-logo img { width: 64px; height: 64px; border-radius: 50%; }
.cv-school { font-size: 26px; font-weight: 800; letter-spacing: 6px; color: #b01c1c; margin-top: 6px; font-family: "SimHei", "Microsoft YaHei", sans-serif; }
.cv-title { font-size: 22px; letter-spacing: 10px; margin-top: 10px; color: #222; font-family: "SimHei", "Microsoft YaHei", sans-serif; }
.cv-body { font-size: 17px; line-height: 2.4; color: #1a1a1a; text-indent: 2em; text-align: justify; min-height: 180px; }
.cv-foot { display: flex; justify-content: flex-end; align-items: flex-end; gap: 24px; margin-top: 46px; position: relative; }
.cv-sign { text-align: center; font-size: 16px; line-height: 2.1; color: #222; }
.seal-circle {
  width: 128px; height: 128px; border: 3px solid #c0392b; border-radius: 50%;
  color: #c0392b; display: flex; flex-direction: column; align-items: center; justify-content: center;
  transform: rotate(-14deg); opacity: .88; font-size: 13px; line-height: 1.5; text-align: center; padding: 10px;
}
.seal-circle span { font-size: 11px; }
.seal-circle b { font-size: 15px; letter-spacing: 2px; }
.cv-no { margin-top: 26px; font-size: 12.5px; color: #666; border-top: 1px dashed #ddd; padding-top: 10px; }
.cv-note { margin-top: 6px; font-size: 12px; color: #999; }
@media print {
  .cv-toolbar { display: none !important; }
  .cv-paper { box-shadow: none; border: 0; padding: 0 8mm; }
  @page { size: A4; margin: 18mm 12mm; }
}

/* ===== 学业预警 / 面板操作条 ===== */
.warn-box { display: flex; flex-direction: column; gap: 6px; padding: 17px 19px; border-radius: 16px; border: 1px solid #eef0f4; background: #ffffff; }
.warn-box b { font-size: 17px; color: var(--ink); }
.warn-box span { font-size: 13px; color: var(--muted); }
.warn-box.ok { border-color: #bfe8d2; background: #f2fcf7; }
.warn-box.ok b { color: var(--green); }
.warn-box.warn { border-color: #f2e2b8; background: #fffbf0; }
.warn-box.warn b { color: #b8860b; }
.warn-box.warn2 { border-color: #f5d0a9; background: #fff7ef; }
.warn-box.warn2 b { color: #d2691e; }
.warn-box.no { border-color: #ffd0da; background: #fff5f7; }
.warn-box.no b { color: var(--red); }
.panel-head-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px dashed var(--line); }
.panel-head-actions .ph-title { font-weight: 800; font-size: 14.5px; color: var(--ink); }
.btn-bar-inline { display: inline-flex; gap: 8px; }

/* ===== 移动端适配（768px） ===== */
@media (max-width: 768px) {
  .tb-search, .tb-more, .tb-full, .tb-role { display: none; }
  .topbar { position: sticky; top: 0; z-index: 40; height: 52px; padding: 0 10px; }
  /* 导航必须收缩进剩余宽度并在内部横滑，否则会把顶栏撑到视口外 */
  .tb-nav { flex: 1; min-width: 0; max-width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tb-nav::-webkit-scrollbar { display: none; }
  .tb-item { flex-shrink: 0; padding: 6px 11px; }
  /* 用户区在移动端只保留头像缩写，不展开姓名和退出（已有抽屉菜单） */
  .tb-user { display: none; }
  .tb-logout { display: none; }

  .sidebar { width: 100%; padding: 8px; }
  .sb-scroll { display: block; padding: 0; max-height: 38vh; overflow-y: auto; }
  .sb-item { padding: 10px 12px; }
  .sb-sub { display: block !important; margin: 2px 6px 6px; border-radius: 8px; }
  .sb-sub-item { padding: 10px 12px 10px 34px; }

  .content { padding: 0; }
  .page { padding: 12px 12px 34px; }
  .crumb { display: none; }
  .page-h { padding: 2px 0 8px; }
  .panel { padding: 13px; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; }
  .panel-h { font-size: 14.5px; }

  .tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .tbl th, .tbl td { padding: 9px 12px; font-size: 13px; }

  input[type=text], input[type=password], input[type=tel], input[type=email],
  input[type=number], input[type=date], select, textarea { font-size: 16px; }
  .btn { min-height: 40px; }

  .statusbar { padding: 6px 12px; font-size: 12px; }
  .st-term { display: none; }
  .hero { padding: 18px; }
}

/* ============================================================
   v4 融合设计层
   骨架：itic-sci 深空蓝星空导航 + 浅色内容区 + 圆角卡片轻投影
   灵魂：/stu 的蓝紫品牌、弹性丝滑动效、精致质感
   ============================================================ */
:root {
  --pri: #3b5bdb;
  --pri-d: #2c47b8;
  --pri-l: #4f6ef7;
  --violet: #2563eb;
  --pri-soft: #eef1fd;
  --pri-grad: linear-gradient(135deg, #4f6ef7, #2563eb);
  --coral-grad: linear-gradient(135deg, #4f6ef7, #3b5bdb);
  --accent: #fc5f16;
  --nav-bg: #101a35;
  --nav-bg2: #16224a;
  --line: #e6e9f2;
  --bg: #f5f7fb;
  --page-bg: #f5f7fb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.05);
  --shadow-2: 0 8px 26px rgba(16,24,40,.10), 0 2px 6px rgba(16,24,40,.05);
  --ease-pop: cubic-bezier(.22, 1.4, .36, 1);
  --ease-snap: cubic-bezier(.34, 1.56, .64, 1);
}
body {
  background:
    radial-gradient(900px 360px at 78% -80px, rgba(37,99,235,.06), transparent 62%),
    radial-gradient(760px 320px at 12% -60px, rgba(59,91,219,.06), transparent 60%),
    #f5f7fb;
  background-attachment: fixed;
  color: #1a2233;
}

/* ---------- 顶栏：白底 + 细线 ---------- */
.topbar {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
}
.tb-logo { border: 0; border-radius: 10px; box-shadow: 0 3px 10px rgba(59,91,219,.24); }
.tb-cn { font-weight: 800; letter-spacing: .2px; }
.tb-item { border-radius: 8px; font-weight: 600; transition: background .18s ease, color .18s ease, transform .2s var(--ease-out, ease); }
.tb-item:hover { background: var(--pri-soft); transform: translateY(-1px); }
.tb-item.on { background: var(--pri-grad); box-shadow: 0 3px 12px rgba(79,110,247,.32); }
.tb-search input {
  background: #f3f5f9; border: 1px solid transparent; border-radius: 9px;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tb-search input:focus { background: #fff; border-color: var(--pri); box-shadow: 0 0 0 3px rgba(59,91,219,.12); }
.tb-role { background: var(--pri-soft); color: var(--pri-d); border-radius: 6px; font-weight: 600; }

/* ---------- 侧栏：深空蓝 + 星点 ---------- */
.sidebar {
  width: 216px;
  background:
    radial-gradient(circle at 20% 8%, rgba(37,99,235,.35), transparent 45%),
    radial-gradient(circle at 88% 92%, rgba(59,91,219,.4), transparent 48%),
    linear-gradient(180deg, #101a35 0%, #16224a 100%);
  color: #aeb8d4;
  border-right: 0;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.05);
}
.sb-item {
  border-radius: 10px; color: #aeb8d4; font-weight: 600;
  transition: background .2s ease, color .2s ease, transform .22s var(--ease-out, ease), padding-left .22s var(--ease-out, ease);
  position: relative;
}
.sb-item:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(2px); }
.sb-item.on {
  background: linear-gradient(90deg, rgba(79,110,247,.42), rgba(37,99,235,.16));
  color: #fff; box-shadow: none;
}
.sb-item.on::before {
  content: ""; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 0 3px 3px 0; background: #4f6ef7;
  box-shadow: 0 0 10px rgba(142,164,255,.9);
}
.sb-group.open { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); border-radius: 12px; }
.sb-sub-item { color: #98a4c4; border-radius: 8px; transition: background .18s ease, color .18s ease, transform .2s var(--ease-out, ease); }
.sb-sub-item:hover { background: rgba(255,255,255,.07); color: #fff; transform: translateX(3px); }
.sb-sub-item.on { background: rgba(79,110,247,.28); color: #fff; border-left-color: #4f6ef7; font-weight: 700; }
.sb-ar { color: #8f9bbd; }

/* ---------- 面包屑 / 页头 ---------- */
.crumb { color: #7b8494; }
.crumb .on { color: #1a2233; }
.crumb-sep { color: #c3c9d6; }
.page-h b { font-size: 20px; font-weight: 800; letter-spacing: .2px; }
.page-h span { color: #7b8494; }

/* ---------- 卡片：白底 12px 圆角 + 轻投影 ---------- */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: box-shadow .28s ease, transform .28s var(--ease-out, ease), border-color .28s ease;
}
.panel:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); border-color: #dde3f0; }
.panel-h { border-bottom: 1px solid #eef1f7; font-weight: 800; }
.panel-h b { letter-spacing: .2px; }

/* 统计卡：浅蓝→浅紫渐变（借鉴 itic-sci 服务卡） */
.stat-card, .num-card, .stat {
  background: linear-gradient(135deg, #f5f7ff, #f5f7ff);
  border: 1px solid #e7ebfa;
  border-radius: 12px;
  transition: transform .28s var(--ease-pop), box-shadow .28s ease;
}
.stat-card:hover, .num-card:hover, .stat:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(79,110,247,.14); }

/* ---------- 按钮 ---------- */
.btn, .btn-pri, .btn-primary, .btn-ghost, button.btn {
  border-radius: 9px; font-weight: 600;
  transition: transform .18s var(--ease-snap), box-shadow .2s ease, background .2s ease, color .18s ease, border-color .18s ease;
}
.btn-pri, .btn-primary { background: var(--pri-grad); border: 0; }
.btn-pri:hover, .btn-primary:hover { box-shadow: 0 6px 18px rgba(79,110,247,.34); transform: translateY(-1px); }
.btn:active, .btn-pri:active, .btn-primary:active { transform: scale(.96); }
.btn:hover { transform: translateY(-1px); }

/* ---------- 表格 ---------- */
.tbl th { background: #f7f9fc; color: #5b6478; font-weight: 600; border-bottom: 1px solid var(--line); }
.tbl td { border-color: #eef1f7; }
.tbl tbody tr { transition: background .16s ease; }
.tbl tbody tr:hover { background: #f6f8ff; }
.tbl tr.today td { background: #fff7ed; }

/* ---------- 表单 ---------- */
input[type=text], input[type=password], input[type=tel], input[type=email],
input[type=number], input[type=date], select, textarea {
  border-radius: 9px; border: 1px solid #d8dde9; background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--pri) !important; box-shadow: 0 0 0 3px rgba(59,91,219,.12); outline: none;
}

/* ---------- 徽章：橙色强调 ---------- */
.badge, .tag { border-radius: 6px; font-weight: 600; padding: 2px 9px; }
.badge.new, .tag.new, .bd-new { background: #fff1e8; color: #d9480f; }
.badge.hot, .tag.hot { background: #fff0f0; color: #e5484d; }

/* ---------- 进度条 ---------- */
.bar { background: #eef1f7; border-radius: 999px; }
.bar i { background: var(--pri-grad); }


/* ---------- 课表格子 ---------- */
.tt-cell {
  border-radius: 8px;
  transition: transform .22s var(--ease-pop), box-shadow .22s ease, filter .18s ease;
  cursor: pointer; will-change: transform;
}
.tt-cell:hover, .tt-cell:focus-visible {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 24px rgba(59,91,219,.2);
  z-index: 2; outline: none; filter: saturate(1.1);
}
.tt-c0 { background: #eef2ff; border-left: 3px solid #4f6ef7; }
.tt-c1 { background: #e9f7ef; border-left: 3px solid #12a150; }
.tt-c2 { background: #fff4e8; border-left: 3px solid #f59e0b; }
.tt-c3 { background: #fdeef3; border-left: 3px solid #e5484d; }
.tt-c4 { background: #f1efff; border-left: 3px solid #2563eb; }
.tt-c5 { background: #e9f8fb; border-left: 3px solid #0891b2; }
.tt-c6 { background: #fdf2ec; border-left: 3px solid #ea580c; }
.tt-c7 { background: #f2f4f8; border-left: 3px solid #64748b; }

/* ---------- 弹窗 ---------- */
.ttm-mask { background: rgba(16,26,53,.46); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: ttmFade .2s ease both; }
.ttm { border-radius: 16px; box-shadow: 0 20px 54px rgba(16,26,53,.28); overflow: hidden; animation: ttmPop .34s var(--ease-pop) both; }
.ttm-h {
  background: linear-gradient(120deg, #16224a, #3b2f78);
  border: 0; padding: 15px 20px;
}
.ttm-h b { color: #fff; font-size: 15.5px; font-weight: 700; }
.ttm-x { background: rgba(255,255,255,.16); color: #fff; border-radius: 50%; transition: background .15s ease; }
.ttm-x:hover { background: rgba(255,255,255,.3); }
.ttm-b { padding: 16px 20px; }
.ttm-b .ttm-row { border-bottom: 1px solid #f0f2f7; padding: 9px 2px; }
.ttm-b .ttm-k { color: #7b8494; }
.ttm-b .ttm-v { color: #1a2233; font-weight: 500; }
@keyframes ttmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ttmPop { 0% { opacity: 0; transform: translateY(20px) scale(.95); } 100% { opacity: 1; transform: none; } }

/* ---------- 动效：级联入场 ---------- */
.page > .panel, .page > .tbl-wrap, .page > .card-grid > .panel {
  animation: jwRise .44s var(--ease-pop) both;
}
.page > .panel:nth-child(2), .page > .tbl-wrap:nth-child(2) { animation-delay: .05s; }
.page > .panel:nth-child(3), .page > .tbl-wrap:nth-child(3) { animation-delay: .1s; }
.page > .panel:nth-child(4), .page > .tbl-wrap:nth-child(4) { animation-delay: .15s; }
.page > .panel:nth-child(5) { animation-delay: .2s; }
.page > .panel:nth-child(6) { animation-delay: .25s; }
.page > .panel:nth-child(n+7) { animation-delay: .3s; }
@keyframes jwRise {
  0% { opacity: 0; transform: translateY(16px) scale(.985); }
  100% { opacity: 1; transform: none; }
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #ccd4e4; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #a9b5cf; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* ============================================================
   v4.1 优化补丁 — 移动端深度适配 + PC端显示优化
   追加于原样式之后，通过层叠覆盖增强体验
   ============================================================ */

/* ---------- 全局触摸优化 ---------- */
@media (hover: none) and (pointer: coarse) {
  a, button, .btn, .tb-item, .sb-item, .sb-sub-item {
    -webkit-tap-highlight-color: rgba(59,91,219,.15);
  }
  .btn, .btn-pri, .btn-primary { min-height: 44px; }
  .tb-item, .sb-item, .sb-sub-item { min-height: 44px; display: flex; align-items: center; }
  .panel:hover, .stat-card:hover, .stat:hover, .cert-card:hover {
    transform: none !important;
    box-shadow: var(--shadow) !important;
    border-color: var(--line) !important;
  }
  .tt-cell:hover, .tt-cell:focus-visible {
    transform: none !important;
    box-shadow: none !important;
  }
}

/* ---------- 600px 中间断点 ---------- */
@media (max-width:600px) {
  /* 顶栏紧凑化 */
  .topbar { height: 48px; padding: 0 10px; gap: 8px; }
  .tb-logo { width: 28px; height: 28px; border-radius: 9px; }
  .tb-cn { font-size: 13px; }
  .tb-full { display: none; }
  .tb-nav { gap: 1px; }
  .tb-item { padding: 6px 10px; font-size: 12.5px; }
  .tb-uname { max-width: 80px; }

  /* 侧栏：折叠式 */
  .sidebar { width: 100%; padding: 6px; }
  .sb-scroll { max-height: 32vh; overflow-y: auto; }
  .sb-item { padding: 9px 12px; font-size: 13.5px; }
  .sb-sub { margin: 2px 4px 4px; }
  .sb-sub-item { padding: 9px 12px 9px 30px; font-size: 13px; }

  /* 内容区 */
  .content { padding: 0; }
  .page { padding: 10px 10px 28px; }
  .panel { padding: 12px; border-radius: 12px; }
  .panel-h { font-size: 14px; padding-bottom: 8px; }
  .page-h b { font-size: 17px; }

  /* Hero 区 */
  .hero { padding: 16px; border-radius: 14px; }
  .hero-name { font-size: 18px; }
  .hero-sub, .hero-week { font-size: 12px; }

  /* 表格 */
  .tbl { font-size: 12px; }
  .tbl th, .tbl td { padding: 7px 8px; }

  /* 表单 */
  .form-row.pair { flex-direction: column; gap: 8px; }
  .irs { grid-template-columns: 1fr; }

  /* 成绩卡 */
  .score-big { font-size: 18px; }
  .grade-state { font-size: 10.5px; padding: 2px 8px; }

  /* 流程步骤 */
  .flow { gap: 6px; }
  .flow-step { padding: 4px 10px; font-size: 11px; }
  .flow-arrow { font-size: 11px; }

  /* 证明纸张 */
  .cert-paper, .cv-paper { padding: 18px 16px; border-radius: 10px; }
  .cert-title { font-size: 18px; letter-spacing: 4px; }
  .cert-body { font-size: 14px; line-height: 2; }
  .cert-seal { width: 76px; height: 76px; font-size: 10px; }
  .cert-seal b { font-size: 12px; }
  .cv-paper { padding: 28px 18px; }
  .cv-school { font-size: 20px; letter-spacing: 4px; }
  .cv-title { font-size: 17px; letter-spacing: 5px; }
  .cv-body { font-size: 15px; line-height: 2.2; }
  .seal-circle { width: 100px; height: 100px; font-size: 12px; }

  /* 状态栏 */
  .statusbar { padding: 5px 10px; font-size: 11.5px; }
  .st-term { display: none; }

  /* 弹窗 */
  .ttm-b { padding: 12px 14px; }
  .ttm-h { padding: 12px 14px; }
  .ttm-h b { font-size: 14px; }

  /* 按钮缩小 */
  .btn { min-height: 40px; padding: 8px 16px; font-size: 13.5px; border-radius: 8px; }
  .btn-sm { min-height: 36px; padding: 6px 12px; font-size: 12.5px; }

  /* 课表 */
  .tt-cell { font-size: 11px; padding: 4px; border-radius: 6px; }

  /* 警告框 */
  .warn-box { padding: 14px 16px; border-radius: 12px; }
  .warn-box b { font-size: 15px; }
  .warn-box span { font-size: 12px; }
}

/* ---------- 480px 小手机断点 ---------- */
@media (max-width:480px) {
  .topbar { height: 44px; padding: 0 8px; gap: 6px; }
  .tb-logo { width: 26px; height: 26px; }
  .tb-cn { font-size: 12px; }
  .tb-item { padding: 5px 8px; font-size: 11.5px; }
  .tb-uname { max-width: 70px; font-size: 12px; }
  .tb-search, .tb-more, .tb-role { display: none; }

  .page { padding: 8px 8px 22px; }
  .panel { padding: 10px; border-radius: 10px; }
  .panel-h { font-size: 13.5px; }
  .page-h b { font-size: 16px; }

  .hero { padding: 12px; border-radius: 12px; }
  .hero-name { font-size: 16px; }
  .hero-sub, .hero-week { font-size: 11px; }
  .hero-day, .hero-xh { font-size: 11px; }

  .sidebar { padding: 4px; }
  .sb-scroll { max-height: 26vh; }
  .sb-item { padding: 8px 10px; font-size: 13px; }
  .sb-sub-item { padding: 8px 10px 8px 26px; font-size: 12.5px; }

  .tbl { font-size: 11px; }
  .tbl th, .tbl td { padding: 5px 6px; }

  .cert-paper, .cv-paper { padding: 14px 12px; }
  .cert-title { font-size: 16px; letter-spacing: 3px; }
  .cert-body { font-size: 13px; line-height: 1.9; }
  .cert-seal { width: 64px; height: 64px; font-size: 9px; }
  .cert-seal b { font-size: 11px; }
  .cv-paper { padding: 20px 14px; }
  .cv-school { font-size: 18px; letter-spacing: 3px; }
  .cv-title { font-size: 15px; letter-spacing: 4px; }
  .cv-body { font-size: 14px; line-height: 2; }
  .seal-circle { width: 84px; height: 84px; font-size: 11px; }

  .btn { min-height: 38px; padding: 7px 14px; font-size: 13px; }
  .score-big { font-size: 16px; }
  .warn-box { padding: 12px; }
  .warn-box b { font-size: 14px; }
  .warn-box span { font-size: 11.5px; }
}

/* ---------- 360px 超小屏 ---------- */
@media (max-width:360px) {
  .tb-cn { font-size: 11px; }
  .tb-item { padding: 4px 6px; font-size: 11px; }
  .hero-name { font-size: 14px; }
  .panel { padding: 8px; }
  .tbl { font-size: 10.5px; }
  .tbl th, .tbl td { padding: 4px 5px; }
}

/* ---------- PC端优化（>900px） ---------- */
@media (min-width:901px) {
  /* 面板 hover 效果 */
  .panel { transition: box-shadow .28s ease, transform .28s ease, border-color .28s ease; }
  .panel:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

  /* 按钮 hover/active */
  .btn { transition: transform .18s ease, box-shadow .2s ease; }
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: scale(.96); }

  /* 课表格子 hover */
  .tt-cell { transition: transform .22s ease, box-shadow .22s ease, filter .18s ease; }
  .tt-cell:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 10px 24px rgba(59,91,219,.2);
    z-index: 2; filter: saturate(1.1);
  }

  /* 侧栏菜单 hover */
  .sb-item, .sb-sub-item { transition: background .18s ease, color .18s ease, transform .2s ease; }
  .sb-item:hover { transform: translateX(2px); }
  .sb-sub-item:hover { transform: translateX(3px); }

  /* 顶栏导航 hover */
  .tb-item { transition: background .18s ease, color .18s ease, transform .2s ease; }
  .tb-item:hover { transform: translateY(-1px); }
}

/* ---------- 登录页优化 ---------- */
@media (max-width:480px) {
  .auth-body { padding: 16px 10px; }
  .auth-card { padding: 20px 16px; border-radius: 14px; }
  .auth-headline { font-size: 18px; }
  .auth-sub { font-size: 12px; margin-bottom: 14px; }
  .auth-tabs { padding: 3px; }
  .auth-tab { padding: 8px 0; font-size: 13px; }
  .auth-field input { padding: 10px 12px; font-size: 13px; }
  .btn-login { padding: 11px 0; font-size: 14px; letter-spacing: 4px; }
  .captcha-row input, .sms-row input { font-size: 13px; }
  .btn-sms { padding: 0 12px; font-size: 12px; }
}

/* ---------- 安全区域适配 ---------- */
@supports (padding: env(safe-area-inset-bottom)) {
  .foot { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .floatbar { bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* ---------- 横屏手机优化 ---------- */
@media (max-width:900px) and (orientation: landscape) and (max-height:500px) {
  .hero { padding: 10px 14px; }
  .hero-name { font-size: 15px; }
  .hero-sub, .hero-week, .hero-day { font-size: 10px; }
  .sidebar { width: 100%; }
  .sb-scroll { max-height: 20vh; }
  .page { padding: 8px 10px 18px; }
  .panel { padding: 10px; }
}

/* ---------- 滚动条美化（Webkit） ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccd4e4; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #a9b5cf; border: 2px solid transparent; background-clip: content-box; }

/* ---------- 打印优化增强 ---------- */
@media print {
  .topbar, .sidebar, .statusbar, .crumb, .floatbar { display: none !important; }
  .frame-body { display: block; }
  .content { width: 100%; }
  .page { padding: 0; }
  .panel { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .tbl { display: table; white-space: normal; }
  body { background: #fff; }
}

/* ============================================================
   Stu Design Language injection · aijw
   ============================================================ */
:root{
  --bg:#f0f4ff; --page-bg:#f0f4ff;
  --line:#e8ecfb;
}
body{
  background:
    radial-gradient(circle,#eef2ff 1.3px,transparent 1.3px) 0 0 / 20px 20px,
    linear-gradient(180deg,#fafcff 0%,#f0f4ff 100%) !important;
  background-attachment:fixed !important;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif !important;
  color:#22223a !important;
  -webkit-font-smoothing:antialiased;
}
.card,.panel,.auth-card,.box{
  background:#fff !important; border-radius:20px !important;
  border:1px solid #e8ecfb !important;
  box-shadow:0 18px 44px rgba(30,58,138,.10),0 3px 10px rgba(30,58,138,.06) !important;
  animation:stuRise .5s cubic-bezier(.34,1.56,.64,1) both;
}
.btn,.btn-primary,.btn-login,.btn-sms,button.btn{
  border-radius:999px !important; font-weight:800 !important; letter-spacing:.4px;
  transition:transform .15s cubic-bezier(.34,1.56,.64,1),box-shadow .15s !important;
}
.btn-primary,.btn-login{
  background:linear-gradient(135deg,#4f6ef7,#3b5bdb) !important; color:#fff !important; border:0 !important;
  box-shadow:0 8px 22px rgba(59,91,219,.30) !important;
}
.btn-primary:active,.btn-login:active{ transform:scale(.95); }
.btn-ghost{ background:#fff !important; color:#3b5bdb !important; border:1.5px solid rgba(59,91,219,.28) !important; border-radius:999px !important; }
.auth-tab,.tab-item,.tab{ border-radius:999px !important; font-weight:700 !important; transition:all .18s cubic-bezier(.34,1.56,.64,1) !important; }
.auth-tab.on,.tab-item.active,.tab.active{ background:linear-gradient(135deg,#4f6ef7,#3b5bdb) !important; color:#fff !important; box-shadow:0 8px 22px rgba(59,91,219,.30) !important; }
.auth-tabs,.tabs{ background:#eef2ff !important; border-radius:999px !important; padding:4px !important; }
input,textarea,select,.auth-input{
  border-radius:14px !important; border:1.5px solid #e8ecfb !important; background:#f6f8ff !important;
  transition:border-color .18s,box-shadow .18s !important;
}
input:focus,textarea:focus,select:focus,.auth-input:focus{
  border-color:#4f6ef7 !important; box-shadow:0 0 0 4px rgba(59,91,219,.10) !important; outline:none !important; background:#fff !important;
}
.auth-tag,.badge,.tag,.chip{ border-radius:999px !important; font-weight:800 !important; }
.auth-tag{ background:linear-gradient(135deg,#ff8f5e,#f4364e) !important; color:#fff !important; box-shadow:0 4px 12px rgba(244,54,78,.32) !important; }
/* 注意：这里曾有一条 `.auth-brand{ background:...; border-radius:50%; box-shadow:... }`
   误把「logo + 校名 + 端标签」的整行 flex 容器当成圆形徽章上色，
   导致校名后面出现一圈蓝色椭圆与阴影。品牌行本身不应有背景，
   需要着色的是其中的 logo（.auth-brand img），见登录页内联样式。 */
.auth-brand{ background:transparent !important; color:inherit !important; border-radius:0 !important; box-shadow:none !important; }
::-webkit-scrollbar{ width:8px;height:8px; }
::-webkit-scrollbar-thumb{ background:rgba(59,91,219,.25);border-radius:99px; }
::-webkit-scrollbar-track{ background:transparent; }
@keyframes stuRise{ from{opacity:0;transform:translateY(14px);} to{opacity:1;transform:translateY(0);} }

/* ============================================================
   移动端侧栏：抽屉式导航
   ------------------------------------------------------------
   原先 <=768px 时把桌面侧栏压成「内容上方一条 32vh 的滚动菜单」，
   首页内容被整块往下推，看起来像菜单铺满了整屏。
   现改为：默认收起，顶栏汉堡按钮唤出左侧抽屉 + 遮罩。
   ============================================================ */
.tb-menu {
  display: none;
  align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none;
  margin-right: 2px; padding: 0;
  border: 0; border-radius: 10px;
  background: transparent; color: inherit;
  cursor: pointer;
  transition: background .15s;
}
.tb-menu:active { background: rgba(59,91,219,.14); }

.sb-mask {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(10,16,40,.44);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.sb-mask.show { opacity: 1; pointer-events: auto; }

@media (max-width: 768px) {
  .tb-menu { display: inline-flex; }

  /* 侧栏变为抽屉：脱离文档流，不占据内容位置 */
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    width: min(84vw, 300px); height: 100%;
    padding: 12px 10px 26px;
    transform: translateX(-102%);
    transition: transform .26s cubic-bezier(.22,.68,.36,1);
    box-shadow: 10px 0 34px rgba(8,16,50,.34);
    overflow-y: auto; overscroll-behavior: contain;
  }
  body.sb-open .sidebar { transform: none; }

  /* 抽屉内菜单项加大点击区 */
  .sb-scroll { display: block; max-height: none; padding: 0; }
  .sb-item { padding: 12px 14px; font-size: 14.5px; }
  .sb-sub-item { padding: 11px 14px 11px 34px; font-size: 13.5px; }
  body.sb-open { overflow: hidden; }
}

/* ============================================================
   hero 例外：必须放在文件最后
   ------------------------------------------------------------
   上文有一条 
   的全局覆盖，它会把  的深色星空底压成白色；
   而 hero 内部文字是 #fff，结果就是「白底白字」的空白卡片。
   这里以同样的 !important 在更靠后的位置重新声明深色底与白字。
   ============================================================ */
.panel.hero {
  background-color: #16224a !important;
  background-image:
    radial-gradient(circle 2px at 22% 30%, rgba(255,255,255,.5), transparent),
    radial-gradient(circle 1.6px at 68% 22%, rgba(255,255,255,.4), transparent),
    radial-gradient(circle 1.6px at 86% 66%, rgba(255,255,255,.35), transparent),
    radial-gradient(circle 1.4px at 38% 78%, rgba(255,255,255,.3), transparent),
    linear-gradient(120deg, #16224a 0%, #24336b 45%, #3b2f78 100%) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(22,34,74,.28) !important;
}
.panel.hero .hero-name,
.panel.hero .hero-sub,
.panel.hero .hero-week,
.panel.hero .hero-day,
.panel.hero .hero-xh { color: #fff !important; }

/* 课程表芯片移动端：换行而非横向溢出 */
@media (max-width: 768px) {
  .sched-chip, .sched-chips { white-space: normal; word-break: break-all; max-width: 100%; }
  .sched-list { flex-wrap: wrap; gap: 6px; }
}

/* 课程表：移动端格子不超宽 */
@media (max-width: 768px) {
  .tbl { table-layout: fixed; width: 100%; }
  .tbl th, .tbl td { word-break: break-word; max-width: 40vw; }
}
