/* V2.7 模块选择页 + 登录页（深色，与 ctf.css 同一套变量） */

/* 选择页没有顶栏，容器放宽 */
.portal-page .container { max-width: 1680px; padding: 34px 40px 44px; }
.portal-page .footer { max-width: 1680px; margin: 0 auto; }

.portal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 26px;
}
.portal-head h1 { font-size: 32px; margin: 0 0 8px; color: #f0f9ff; letter-spacing: .3px; }
.portal-sub { display: flex; align-items: center; gap: 12px; margin: 0; flex-wrap: wrap; }
.portal-brief { font-size: 13px; color: #8fa3c0; }
.pill {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  color: #67e8f9; border: 1px solid rgba(34, 211, 238, .4);
  background: rgba(34, 211, 238, .08);
}
.portal-account {
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; color: #9fb6cf; white-space: nowrap; padding-top: 6px;
}
.portal-account a { color: #7dd3fc; text-decoration: none; }
.portal-account a:hover { color: #a5f3fc; }
.portal-account .acct-quit { color: #fb7185; }
.portal-account .acct-name { color: #cbd5e1; }

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.portal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 560px;
  padding: 28px 28px 22px;
  border-radius: 16px;
  border: 1px solid var(--line, #22324b);
  background: linear-gradient(180deg, #101d30, #0c1524);
  color: var(--ink, #e6eefb);
  text-decoration: none;
  overflow: hidden;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.portal-card::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(320px 150px at 82% -18%, rgba(34, 211, 238, .14), transparent 70%);
  pointer-events: none;
}
.portal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, .55);
  box-shadow: 0 20px 48px rgba(6, 182, 212, .16);
  text-decoration: none;
  color: var(--ink, #e6eefb);
}
.pc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pc-ico {
  width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 21px; background: rgba(34, 211, 238, .12);
  border: 1px solid rgba(34, 211, 238, .3);
}
.pc-head h2 { margin: 0; font-size: 22px; color: #f0f9ff; }
.pc-desc { margin: 2px 0 0; font-size: 12.5px; color: var(--muted, #8fa3c0); }

.pc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.pc-kpis > div {
  padding: 9px 10px; border-radius: 10px;
  background: rgba(11, 21, 36, .6); border: 1px solid rgba(56, 189, 248, .1);
}
.pc-kpis b {
  display: block; font-size: 25px; line-height: 1.15; color: #f8fafc;
  font-variant-numeric: tabular-nums;
}
.pc-kpis span { display: block; margin-top: 3px; font-size: 11px; color: var(--muted, #8fa3c0); }

.pc-section-label {
  font-size: 11.5px; letter-spacing: .08em; color: #64748b;
  margin: 0 0 8px; text-transform: uppercase;
}
.pc-bars { display: flex; flex-direction: column; gap: 11px; margin-bottom: 14px; }
.pc-bar {
  display: grid; grid-template-columns: 74px 1fr 52px; gap: 10px; align-items: center;
  font-size: 12px; color: #cbd5e1;
}
.pc-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-bar i { height: 7px; border-radius: 99px; background: rgba(148, 163, 184, .18); overflow: hidden; }
.pc-bar i em { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #22d3ee, #38bdf8); }
.pc-bar u { text-decoration: none; text-align: right; color: #9fb6cf; font-variant-numeric: tabular-nums; }
.pc-bar.mine span { color: #67e8f9; font-weight: 700; }
.pc-bar.mine i em { background: linear-gradient(90deg, #67e8f9, #a3e635); }

.pc-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.pc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 9px; font-size: 12.5px; color: #cbd5e1;
  background: rgba(11, 21, 36, .5); border: 1px solid rgba(56, 189, 248, .07);
}
.pc-row.hot { border-color: rgba(251, 113, 133, .35); background: rgba(251, 113, 133, .06); }
.pc-row.mine { border-color: rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .08); }
.pc-rank {
  width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #67e8f9;
  background: rgba(34, 211, 238, .12); border: 1px solid rgba(34, 211, 238, .3);
}
.pc-row-name { color: #e2e8f0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-row-team { color: #64748b; font-size: 11.5px; white-space: nowrap; }
.pc-row-when { margin-left: auto; color: #9fb6cf; font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pc-row-tag {
  margin-left: auto; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; white-space: nowrap;
  background: #131f33; color: #9fb6cf; border: 1px solid var(--line, #22324b);
}
.pc-row-tag.is-running, .pc-row-tag.is-closing { background: rgba(251, 113, 133, .12); color: #fda4af; border-color: rgba(251, 113, 133, .35); }
.pc-row-tag.is-grading { background: rgba(251, 191, 36, .12); color: #fcd34d; border-color: rgba(251, 191, 36, .3); }
.pc-row-tag.is-scheduled { background: rgba(56, 189, 248, .12); color: #7dd3fc; border-color: rgba(56, 189, 248, .3); }

.pc-empty { margin: 0; padding: 12px 4px; font-size: 12px; color: var(--muted, #8fa3c0); }
.pc-go {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed rgba(56, 189, 248, .18);
  color: #67e8f9; font-weight: 700; font-size: 14px;
}
.portal-foot { margin-top: 22px; font-size: 12px; color: #64748b; }

/* ---------- 登录页：就一个登录框 ---------- */
.login-solo {
  min-height: 62vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
}
.login-card-v27 {
  width: 100%; max-width: 380px;
  padding: 30px 28px 24px;
  border-radius: 16px;
  border: 1px solid var(--line, #22324b);
  background: linear-gradient(180deg, rgba(17, 31, 51, .96), rgba(11, 21, 36, .96));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}
.login-card-v27 h2 { margin: 0 0 4px; font-size: 22px; color: #f0f9ff; }
.login-card-v27 .login-sub { margin: 0 0 20px; font-size: 12.5px; color: var(--muted, #8fa3c0); }
.login-card-v27 .field span { color: #9fb6cf; }
.login-card-v27 .field input {
  background: #0a1626; border: 1px solid rgba(56, 189, 248, .22); color: #e2e8f0;
}
.login-card-v27 .field input:focus { border-color: rgba(34, 211, 238, .7); outline: none; }
.login-card-v27 .btn-primary { width: 100%; }
.login-foot { margin: 14px 0 0; text-align: center; font-size: 11.5px; color: #64748b; }

@media (max-width: 1200px) {
  .pc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .portal-page .container { padding: 22px 18px 30px; }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-card { min-height: 0; }
  .portal-head { flex-direction: column; gap: 10px; }
  .portal-head h1 { font-size: 24px; }
  .portal-account { padding-top: 0; }
}

/* ---------- 正在考试：交卷进度 ---------- */
.pc-progress {
  margin: 0 0 14px; padding: 12px 12px 10px; border-radius: 10px;
  background: rgba(251, 113, 133, .07); border: 1px solid rgba(251, 113, 133, .28);
}
.pc-progress-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; color: #fda4af; margin-bottom: 8px;
}
.pc-progress-head b { font-size: 16px; color: #fecdd3; font-variant-numeric: tabular-nums; }
.pc-progress-bar {
  display: block; height: 8px; border-radius: 99px; overflow: hidden;
  background: rgba(148, 163, 184, .18);
}
.pc-progress-bar em {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #fb7185, #fbbf24);
}
.pc-progress-note { margin-top: 7px; font-size: 11.5px; color: #cbd5e1; }

/* ---------- 打字卡：全体学生滚动列表 ---------- */
.pc-alllist {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 330px; overflow-y: auto; margin-bottom: 14px;
  padding-right: 4px;
}
.pc-alllist::-webkit-scrollbar { width: 6px; }
.pc-alllist::-webkit-scrollbar-thumb { background: #22324b; border-radius: 99px; }
.pc-adrow {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px; font-size: 12.5px; color: #cbd5e1;
  background: rgba(11, 21, 36, .5); border: 1px solid rgba(56, 189, 248, .07);
}
.pc-adrow.mine { border-color: rgba(34, 211, 238, .45); background: rgba(34, 211, 238, .1); }
.pc-adrow.never { opacity: .62; }
.pc-arank {
  width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 800; color: #67e8f9;
  background: rgba(34, 211, 238, .12); border: 1px solid rgba(34, 211, 238, .3);
}
.pc-adrow.never .pc-arank { color: #64748b; background: #131c2b; border-color: #22324b; }
.pc-aname { color: #e2e8f0; font-weight: 600; white-space: nowrap; }
.pc-ateam { color: #64748b; font-size: 11px; white-space: nowrap; }
.pc-atime { margin-left: auto; color: #9fb6cf; font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pc-adrow.never .pc-atime { color: #64748b; }

/* ============================================================
   V2.8：模块选择页 + 登录页
   ============================================================ */

/* 顶栏出现后：容器上边距收紧，账号区已在顶栏，不重复显示 */
.portal-page .topbar + main.container { padding-top: 24px; }
.portal-page .topbar + main.container .portal-head { margin-bottom: 20px; }
.portal-page .topbar + main.container .portal-account { display: none; }
.portal-page .portal-account .acct-name { display: inline-block; vertical-align: middle; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-brief { color: #9fb3cd; }
.portal-foot { color: #8fa3c0; }
.pc-section-label { color: #8fa3c0; }
.pc-row-team, .pc-ateam { color: #8fa3c0; }
.pc-row-tag { color: #b6c7dd; }

@media (max-width: 980px) {
  .portal-page .topbar + main.container { padding-top: 18px; }
}

/* ---------- 登录页：左品牌展示 + 右登录卡 ---------- */
/* HTML 结构约定（前端补）：
   <section class="login-split">
     <div class="login-brand"><div class="login-brand-inner">
       <p class="login-kicker">…</p>
       <h1 class="login-brand-title">娄职 网络教研室<br><em>备赛训练平台</em></h1>
       <p class="login-brand-sub">…</p>
       <ul class="login-features">
         <li class="login-feature"><span class="lf-ico">…</span><div><b>…</b><span>…</span></div></li>
       </ul>
       <p class="login-brand-foot">…</p>
     </div></div>
     <div class="login-panel"><div class="login-card-v27">现有登录框</div></div>
   </section>
*/
.login-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 440px);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  width: 100%;
  max-width: 1200px;
  min-height: calc(100vh - 180px);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 52px) 20px 44px;
}
.login-brand {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid rgba(34, 211, 238, .22);
  border-radius: 22px;
  background:
    linear-gradient(rgba(34, 211, 238, .055) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(34, 211, 238, .055) 1px, transparent 1px) 0 0 / 34px 34px,
    radial-gradient(520px 340px at 12% 0%, rgba(34, 211, 238, .18), transparent 66%),
    radial-gradient(420px 320px at 100% 100%, rgba(163, 230, 53, .10), transparent 66%),
    linear-gradient(160deg, #0d1a2c, #08101d);
  box-shadow: inset 0 0 90px rgba(34, 211, 238, .05), 0 28px 80px rgba(0, 0, 0, .45);
}
.login-brand::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -130px;
  top: -130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .22), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
}
.login-brand-inner { position: relative; z-index: 1; max-width: 620px; min-width: 0; }
.login-kicker {
  margin: 0;
  color: #67e8f9;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.login-brand-title {
  margin: 12px 0;
  color: #f0f9ff;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.18;
  letter-spacing: .5px;
}
.login-brand-title em {
  font-style: normal;
  background: linear-gradient(90deg, #67e8f9, #a3e635);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-brand-sub {
  max-width: 50ch;
  margin: 0 0 26px;
  color: #a9bbd4;
  font-size: 15px;
  line-height: 1.8;
}
.login-features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
}
.login-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(56, 189, 248, .14);
  border-radius: 12px;
  background: rgba(11, 21, 36, .62);
}
.login-feature .lf-ico {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid rgba(34, 211, 238, .3);
  background: rgba(34, 211, 238, .1);
  font-size: 15px;
}
.login-feature b { display: block; color: #e6eefb; font-size: 13.5px; line-height: 1.5; }
.login-feature span { display: block; margin-top: 2px; color: #9fb3cd; font-size: 12px; line-height: 1.6; }
.login-brand-foot {
  margin: 0;
  padding-top: 16px;
  border-top: 1px dashed rgba(34, 211, 238, .18);
  color: #8fa3c0;
  font-size: 12px;
  line-height: 1.7;
}
.login-panel { display: flex; align-items: center; justify-content: center; min-width: 0; }
.login-panel .login-card-v27 { width: 100%; max-width: 420px; }

@media (max-width: 900px) {
  .login-split {
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: 0;
    padding: 18px 16px 34px;
    align-items: stretch;
  }
  /* 左栏收成顶部横幅：只留标题和一句介绍 */
  .login-brand { min-height: 0; padding: 20px 18px; border-radius: 16px; }
  .login-brand::after { display: none; }
  .login-kicker { font-size: 10.5px; letter-spacing: .14em; }
  .login-brand-title { margin: 6px 0; font-size: 24px; }
  .login-brand-title br { display: block; }
  .login-brand-sub { margin: 0; font-size: 13px; line-height: 1.7; max-width: none; }
  .login-features, .login-brand-foot { display: none; }
  .login-panel { padding-bottom: 8px; }
  .login-panel .login-card-v27 { max-width: none; }
}

@media (max-width: 560px) {
  .login-split { padding: 12px 12px 26px; gap: 12px; }
  .login-brand { padding: 16px 14px; border-radius: 14px; }
  .login-brand-title { font-size: 21px; }
  .login-brand-sub { font-size: 12.5px; }
  .login-panel .login-card-v27 { padding: 22px 18px 18px; border-radius: 14px; }
}

/* 旧版单框登录页的底纹（前端换结构前也不显得空） */
.login-solo { position: relative; }
.login-solo::before {
  content: "";
  position: absolute;
  inset: 10% 6%;
  border-radius: 28px;
  background:
    linear-gradient(rgba(34, 211, 238, .05) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(34, 211, 238, .05) 1px, transparent 1px) 0 0 / 34px 34px,
    radial-gradient(480px 300px at 18% 20%, rgba(34, 211, 238, .14), transparent 65%),
    radial-gradient(420px 260px at 82% 84%, rgba(163, 230, 53, .08), transparent 65%);
  border: 1px solid rgba(34, 211, 238, .16);
  pointer-events: none;
}
.login-solo > * { position: relative; z-index: 1; }


@supports not ((background-clip: text) or (-webkit-background-clip: text)) {
  .login-brand-title em {
    color: var(--brand);
    background: none;
  }
}
