:root{
  --red:#C0392B; --blue:#185FA5; --green:#3B6D11; --amber:#BA7517;
  --bg:#F4F6F8; --card:#FFFFFF; --line:#E3E8EE; --text:#1F2937; --muted:#6B7280;
  --blue-d:#0C447C;
}
*{box-sizing:border-box;}
body{
  margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  background:var(--bg); color:var(--text); line-height:1.6; font-size:15px;
}
a{color:var(--blue); text-decoration:none;}
.topbar{
  background:linear-gradient(135deg,#185FA5,#0C447C); color:#fff; padding:0 16px; height:54px;
  display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:10;
}
.topbar .brand{font-weight:700; font-size:16px; display:flex; align-items:center; gap:8px;}
.topbar .brand small{font-weight:400; opacity:.8; font-size:12px;}
.topbar .right{display:flex; align-items:center; gap:12px; font-size:13px;}
.topbar .right .uname{opacity:.92;}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px; cursor:pointer;
  border:1px solid var(--line); background:#fff; color:var(--text); padding:8px 14px; border-radius:8px;
  font-size:14px; transition:.15s;
}
.btn:hover{border-color:#c4ccd6;}
.btn.primary{background:var(--blue); color:#fff; border-color:var(--blue);}
.btn.primary:hover{background:var(--blue-d);}
.btn.danger{background:#fff; color:var(--red); border-color:#f0c4be;}
.btn.danger:hover{background:#fdecea;}
.btn.sm{padding:5px 10px; font-size:13px; border-radius:6px;}
.btn:disabled{opacity:.5; cursor:not-allowed;}
.wrap{max-width:920px; margin:0 auto; padding:16px;}
.card{background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px; margin-bottom:14px;}
.muted{color:var(--muted);}
.center{min-height:100vh; display:flex; align-items:center; justify-content:center; padding:16px;}
.login-card{width:100%; max-width:380px;}
.login-card h1{font-size:20px; margin:0 0 4px;}
.login-card .sub{color:var(--muted); font-size:13px; margin-bottom:18px;}
.field{margin-bottom:12px;}
.field label{display:block; font-size:13px; color:var(--muted); margin-bottom:5px;}
.field input,.field select,.field textarea{
  width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:8px; font-size:15px; background:#fff; color:var(--text);
}
.field textarea{resize:vertical; min-height:64px;}
.row{display:flex; gap:10px; flex-wrap:wrap;}
.row>*{flex:1; min-width:120px;}
.tag{display:inline-block; padding:1px 8px; border-radius:999px; font-size:12px; border:1px solid var(--line); color:var(--muted); background:#f7f9fb;}
.tag.crit{color:var(--red); border-color:#f0c4be; background:#fdecea;}
.tag.func1{color:var(--blue); border-color:#bcd3ea; background:#eaf2fb;}
.tag.func2{color:var(--amber); border-color:#ecd6ab; background:#fbf3e3;}
.tag.func3{color:var(--red); border-color:#f0c4be; background:#fdecea;}
.tag.func4{color:var(--green); border-color:#bfdca6; background:#eef6e6;}
table{width:100%; border-collapse:collapse; font-size:14px;}
th,td{padding:9px 10px; border-bottom:1px solid var(--line); text-align:left;}
th{color:var(--muted); font-weight:600; font-size:13px; background:#fafbfc;}
.tabs{display:flex; gap:6px; margin-bottom:14px; flex-wrap:wrap;}
.tabs .tab{padding:8px 14px; border:1px solid var(--line); border-radius:8px; cursor:pointer; background:#fff; font-size:14px;}
.tabs .tab.active{background:var(--blue); color:#fff; border-color:var(--blue);}
.q{margin-bottom:16px; padding:14px; border:1px solid var(--line); border-radius:10px; background:#fff;}
.q .qhead{display:flex; gap:8px; align-items:center; margin-bottom:8px; flex-wrap:wrap;}
.q .stem{font-weight:600; margin-bottom:10px;}
.opt{display:flex; align-items:center; gap:8px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; margin-bottom:7px; cursor:pointer;}
.opt:hover{background:#f7f9fb;}
.opt.sel{border-color:var(--blue); background:#eaf2fb;}
.opt.correct{border-color:var(--green); background:#eef6e6;}
.opt.wrong{border-color:var(--red); background:#fdecea;}
.opt input{accent-color:var(--blue);}
.score{font-size:18px; font-weight:700; padding:12px; border-radius:10px; background:#eaf2fb; margin-bottom:14px;}
.hidden{display:none!important;}
.toast{position:fixed; left:50%; bottom:28px; transform:translateX(-50%); background:#1f2937; color:#fff; padding:10px 16px; border-radius:8px; font-size:14px; z-index:50; opacity:0; transition:.2s; pointer-events:none;}
.toast.show{opacity:1;}
.hint{font-size:12px; color:var(--muted); margin-top:4px;}
.cols{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
@media(max-width:640px){.cols{grid-template-columns:1fr;}}
.kpis{display:flex; gap:10px; flex-wrap:wrap;}
.kpi{flex:1; min-width:120px; background:#fff; border:1px solid var(--line); border-radius:10px; padding:12px;}
.kpi b{font-size:22px; display:block;}
.entry-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:14px;}
@media(max-width:760px){.entry-grid{grid-template-columns:1fr;}}
.entry{display:block; padding:22px; border-radius:14px; color:#fff; text-decoration:none; min-height:120px; display:flex; flex-direction:column; justify-content:space-between;}
.entry.student{background:linear-gradient(135deg,#3B6D11,#264c0a);}
.entry.coach{background:linear-gradient(135deg,#BA7517,#8a550f);}
.entry.admin{background:linear-gradient(135deg,#185FA5,#0C447C);}
.entry.handbook{background:linear-gradient(135deg,#7a4db8,#4e2d80);}
.entry.rubric{background:linear-gradient(135deg,#37474F,#1c262b);}
.entry.sheets{background:linear-gradient(135deg,#00695C,#003d33);}
.entry h2{margin:0; font-size:20px;}
.entry p{margin:6px 0 0; opacity:.9; font-size:13px;}
.note{font-size:12px; color:var(--muted); border-top:1px dashed var(--line); padding-top:10px; margin-top:10px;}
/* 站点品牌 */
.crest{width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.18);overflow:hidden;font-size:18px;flex:0 0 auto;}
.crest img{width:100%;height:100%;object-fit:contain;}
.crest.light{background:#eef2f7;}
/* 兜底：顶栏内任何 logo 容器（含漏写 .crest 的页面）一律约束尺寸，防止大图撑爆顶栏 */
.topbar [data-logo]{width:34px;height:34px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,.18);overflow:hidden;font-size:18px;flex:0 0 auto;}
.topbar [data-logo] img{width:100%;height:100%;object-fit:contain;}
.noticebar{background:#FFF7E8;border-bottom:1px solid #F0DCB0;color:#8a550f;font-size:13px;padding:8px 16px;text-align:center;line-height:1.6;}

/* ===== 正式登录版式（三端统一） ===== */
.login-bg{
  background:
    radial-gradient(1100px 520px at 12% -12%, rgba(24,95,165,.16) 0%, transparent 62%),
    radial-gradient(900px 460px at 96% 106%, rgba(192,57,43,.12) 0%, transparent 60%),
    linear-gradient(180deg,#F7F9FC 0%,#EDF2F7 100%);
}
.login-card.formal{
  width:100%; max-width:430px; padding:0; overflow:hidden; border-radius:16px;
  border:1px solid #dfe6ee; box-shadow:0 18px 46px rgba(15,42,80,.14);
}
.login-card.formal .lc-top{
  background:linear-gradient(135deg,#185FA5,#0C447C); color:#fff; padding:20px 24px 18px; text-align:center;
}
.login-card.formal .lc-top .lg{
  width:58px; height:58px; margin:0 auto 10px; border-radius:14px; background:rgba(255,255,255,.16);
  display:flex; align-items:center; justify-content:center; font-size:29px; overflow:hidden;
}
.login-card.formal .lc-top .lg img{width:100%;height:100%;object-fit:contain;}
.login-card.formal .lc-top .orgname{
  font-size:13px; letter-spacing:.5px; opacity:.95; line-height:1.5; font-weight:600;
  padding-bottom:10px; margin-bottom:10px; border-bottom:1px solid rgba(255,255,255,.22);
}
.login-card.formal .lc-top h1{font-size:20px; margin:0; font-weight:800; letter-spacing:1px;}
.login-card.formal .lc-top .sub{font-size:12.5px; opacity:.88; margin-top:5px; line-height:1.6;}
.login-card.formal .lc-body{padding:22px 24px 18px;}
.login-card.formal .field label{font-weight:600; color:#5b6b7b;}
.login-card.formal .btn.primary{padding:11px 14px; font-size:15px; font-weight:700; letter-spacing:2px;}
.remember{
  display:flex; align-items:center; gap:7px; font-size:13px; color:#5b6b7b;
  margin:2px 0 14px; cursor:pointer; user-select:none;
}
.remember input{width:15px; height:15px; accent-color:var(--blue); margin:0; cursor:pointer;}
.login-card.formal .lc-foot{
  border-top:1px dashed #e3e8ee; margin-top:16px; padding-top:12px;
  text-align:center; font-size:11.5px; color:#8b98a6; line-height:1.7;
}
.login-card.formal .lc-note{font-size:12px; color:#8b98a6; text-align:center; line-height:1.6;}

/* ===== 课件 PPT 在线查看器（幻灯片模式，三端共用） ===== */
.pv-wrap{display:flex; flex-direction:column; gap:10px;}
.pv-stage{
  position:relative; width:100%; aspect-ratio:16/9; overflow:auto;
  background:linear-gradient(160deg,#ffffff,#f3f6fa); border:1px solid #dbe3ec; border-radius:12px;
  box-shadow:0 6px 24px rgba(15,42,80,.08); padding:22px 26px; display:flex; flex-direction:column;
}
.pv-stage .pv-pg{
  position:absolute; right:12px; bottom:10px; font-size:12px; font-weight:800; color:#8b98a6;
  background:rgba(255,255,255,.9); border:1px solid #e3e8ee; border-radius:999px; padding:2px 10px;
}
/* 图片模式：舞台铺满幻灯片画面（真实 PPT 渲染图） */
.pv-stage.pv-imgmode{padding:0; background:#e9eef5; overflow:hidden; align-items:center; justify-content:center;}
.pv-stage .pv-img{width:100%; height:100%; object-fit:contain; display:block; border-radius:12px; background:#fff;}
.pv-stage .pv-pdf{width:100%; height:100%; border:0; background:#fff; border-radius:12px; display:block;}
.pv-stage.pv-imgmode .pv-pg{background:rgba(12,68,124,.82); color:#fff; border-color:transparent;}
.pv-title{
  font-size:19px; font-weight:900; color:#0C447C; line-height:1.4; margin:0 0 12px;
  padding-bottom:10px; border-bottom:2px solid #eaf0f6;
}
.pv-lines{flex:1; display:flex; flex-direction:column; gap:7px;}
.pv-lines .li{display:flex; gap:9px; font-size:15px; line-height:1.7; color:#37474F;}
.pv-lines .li .b{flex:0 0 auto; width:7px; height:7px; margin-top:10px; border-radius:50%; background:var(--blue,#185FA5);}
.pv-bar{display:flex; align-items:center; gap:9px; flex-wrap:wrap;}
.pv-bar .pv-count{font-size:13px; color:#6B7280; font-weight:800; min-width:74px; text-align:center;}
.pv-bar .pv-keys{font-size:11.5px; color:#9aa7b3; margin-left:auto;}
.pv-thumbs{display:flex; gap:7px; overflow-x:auto; padding:4px 2px 6px;}
.pv-thumbs .th{
  flex:0 0 auto; width:76px; height:47px; border:1px solid #dbe3ec; border-radius:7px; background:#fff;
  cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700;
  color:#8b98a6; overflow:hidden; padding:3px; line-height:1.2; text-align:center;
}
.pv-thumbs .th.on{border-color:var(--blue,#185FA5); color:var(--blue,#185FA5); box-shadow:0 0 0 2px rgba(24,95,165,.18);}
/* 全屏 modal */
.pv-modal{position:fixed; inset:0; z-index:90; background:rgba(12,20,32,.62); display:flex; align-items:center; justify-content:center; padding:14px;}
.pv-modal .pv-box{background:#fff; border-radius:16px; width:min(1080px,100%); max-height:94vh; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 24px 60px rgba(0,0,0,.35);}
.pv-modal .pv-head{display:flex; align-items:center; gap:10px; padding:13px 16px; border-bottom:1px solid #e8eef4; background:linear-gradient(135deg,#185FA5,#0C447C); color:#fff;}
.pv-modal .pv-head .t{font-weight:800; font-size:15px;}
.pv-modal .pv-head .s{font-size:12px; opacity:.85; margin-top:2px;}
.pv-modal .pv-close{margin-left:auto; background:rgba(255,255,255,.16); color:#fff; border:0; border-radius:999px; width:31px; height:31px; cursor:pointer; font-size:15px; flex:0 0 auto;}
.pv-modal .pv-close:hover{background:rgba(255,255,255,.3);}
.pv-modal .pv-body{padding:16px; overflow:auto;}
/* 全屏查看（预览栏「⛶ 全屏」按钮；modal 内对 .pv-box 全屏，内联查看器对 .pv-wrap 全屏） */
.pv-box:fullscreen, .pv-box:-webkit-full-screen{width:100%; height:100%; max-height:none; border-radius:0;}
.pv-box:fullscreen .pv-body, .pv-box:-webkit-full-screen .pv-body{display:flex; flex-direction:column; overflow:hidden; padding:12px 16px;}
.pv-box:fullscreen .pv-wrap, .pv-box:-webkit-full-screen .pv-wrap{flex:1; min-height:0;}
.pv-wrap:fullscreen, .pv-wrap:-webkit-full-screen{background:#0b1420; padding:14px; height:100%; gap:12px;}
.pv-box:fullscreen .pv-stage, .pv-wrap:fullscreen .pv-stage,
.pv-box:-webkit-full-screen .pv-stage, .pv-wrap:-webkit-full-screen .pv-stage{flex:1; min-height:0; aspect-ratio:auto;}
.pv-box:fullscreen .pv-stage.pv-imgmode, .pv-wrap:fullscreen .pv-stage.pv-imgmode,
.pv-box:-webkit-full-screen .pv-stage.pv-imgmode, .pv-wrap:-webkit-full-screen .pv-stage.pv-imgmode{background:#0b1420; border-color:transparent; box-shadow:none;}
.pv-box:fullscreen .pv-keys, .pv-wrap:fullscreen .pv-keys,
.pv-box:-webkit-full-screen .pv-keys, .pv-wrap:-webkit-full-screen .pv-keys{color:#c7d2de;}
@media(max-width:640px){
  .pv-stage{padding:14px 15px;}
  .pv-title{font-size:16px;}
  .pv-lines .li{font-size:13.5px;}
  .pv-bar .pv-keys{display:none;}
}

/* ===== 官方考核评分表（30 课目）浏览器 ===== */
.kh-bar{display:flex; gap:8px; align-items:center; margin:2px 0 12px;}
.kh-search{
  flex:1; padding:10px 12px; border:1px solid #dbe3ec; border-radius:10px; font-size:14px; background:#fff;
}
.kh-search:focus{outline:none; border-color:var(--blue,#185FA5); box-shadow:0 0 0 3px rgba(24,95,165,.12);}
.kh-cards{display:flex; flex-direction:column; gap:10px;}
.kh-card{border:1px solid #e3e8ee; border-radius:12px; background:#fff; overflow:hidden;}
.kh-head{
  display:flex; align-items:center; gap:10px; padding:12px 14px; cursor:pointer; user-select:none;
  background:#f7f9fb; transition:background .15s;
}
.kh-head:hover{background:#eef4fa;}
.kh-no{
  flex:0 0 auto; min-width:26px; text-align:center; background:var(--blue,#185FA5); color:#fff;
  font-size:12px; font-weight:800; border-radius:6px; padding:2px 7px;
}
.kh-name{font-weight:800; font-size:14.5px; color:#1f2d3d; flex:1; line-height:1.4;}
.kh-meta{font-size:12px; color:#6b7a8b; flex:0 0 auto;}
.kh-toggle{font-size:12px; color:var(--blue,#185FA5); font-weight:700; flex:0 0 auto;}
.kh-body{padding:4px 14px 14px;}
.kh-subsec{
  font-weight:800; color:#b45309; font-size:13.5px; padding:8px 0 4px;
}
.kh-tbl{border-collapse:collapse; width:100%; font-size:13px; background:#fff;}
.kh-tbl th,.kh-tbl td{border:1px solid #dde4ec; padding:7px 9px; vertical-align:top; text-align:left;}
.kh-tbl th{background:#eef3f9; font-weight:800; white-space:nowrap; color:#0C447C;}
.kh-tbl td.c{text-align:center; white-space:nowrap;}
.kh-tbl th.c{text-align:center;}
.kh-tbl tr:nth-child(even) td{background:#fbfcfe;}
.kh-rule{color:#4b5b6b; line-height:1.6; font-size:12.5px;}
.kh-tbl tr.kh-sub td{background:#fdf6e7; font-weight:800; color:#8a5a00;}
.kh-tbl tr.kh-total td{background:#e8f4ea; font-weight:800; color:#1f6b31;}
@media(max-width:640px){
  .kh-tbl{font-size:12px;}
  .kh-tbl th,.kh-tbl td{padding:5px 6px;}
  .kh-name{font-size:13.5px;}
  .kh-meta{display:none;}
}
