/* ============================================================
 *  登录页 / 错误页
 * ============================================================ */
:root {
  --brand: #F2542D;
  --brand-2: #FF8A4C;
  --ink: #1B1F2A;
  --muted: #8A91A3;
  --line: #EDF0F6;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); font-size: 14px; background: #F4F6FB;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.ico { flex: none; }

.auth-wrap { display: grid; grid-template-columns: 1.02fr .98fr; min-height: 100vh; }

/* 左侧品牌面板 */
.auth-hero {
  position: relative; overflow: hidden;
  padding: 54px 56px;
  color: #fff;
  background: linear-gradient(150deg, #2A3149 0%, #1B2133 48%, #14181F 100%);
  display: flex; flex-direction: column;
}
.auth-hero::after {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  right: -180px; bottom: -220px;
  background: radial-gradient(circle, rgba(242, 84, 45, .55), transparent 62%);
}
.auth-hero::before {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  left: -140px; top: -120px;
  background: radial-gradient(circle, rgba(255, 138, 76, .20), transparent 65%);
}
.brand-line { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, #FF9A5A, #F2542D);
  display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(242, 84, 45, .35);
}
.brand-name { font-size: 17px; font-weight: 650; letter-spacing: .5px; }
.brand-sub { font-size: 11px; color: rgba(255, 255, 255, .5); letter-spacing: 1.6px; margin-top: 2px; }

.hero-body { margin-top: auto; position: relative; z-index: 2; max-width: 460px; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; letter-spacing: 1.4px; color: #FFC9AF;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
  padding: 5px 11px; border-radius: 30px; margin-bottom: 22px;
}
.hero-title { font-size: 40px; line-height: 1.24; font-weight: 750; letter-spacing: -.5px; margin: 0 0 14px; }
.hero-title em { font-style: normal; color: #FFA772; }
.hero-desc { font-size: 13.5px; line-height: 1.85; color: rgba(255, 255, 255, .62); margin: 0 0 26px; }
.hero-feats { display: flex; gap: 26px; flex-wrap: wrap; }
.hero-feat { display: flex; gap: 9px; align-items: flex-start; }
.hero-feat .ic {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: rgba(255, 255, 255, .08); color: #FFB68F;
  display: grid; place-items: center;
}
.hero-feat b { display: block; font-size: 12.5px; font-weight: 600; color: #fff; }
.hero-feat span { font-size: 11px; color: rgba(255, 255, 255, .45); }

.hero-foot { margin-top: 44px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 11.5px; color: rgba(255, 255, 255, .38); position: relative; z-index: 2; }

/* 右侧表单 */
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 32px; background: #fff; }
.auth-box { width: 100%; max-width: 352px; }
.auth-box h2 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
.auth-box .tip { font-size: 13px; color: var(--muted); margin: 0 0 26px; }

.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 12.5px; color: #6B7387; margin-bottom: 7px; }
.input-wrap { position: relative; }
.input-wrap .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #A7AEC0; }
.input {
  width: 100%; height: 46px; border-radius: 12px;
  border: 1px solid #E6EAF3; background: #FAFBFE;
  padding: 0 14px 0 40px; font-size: 14px; font-family: inherit;
  outline: none; transition: all .15s;
}
.input:focus { border-color: rgba(242, 84, 45, .55); box-shadow: 0 0 0 3px rgba(242, 84, 45, .10); background: #fff; }
.input::placeholder { color: #B6BCCB; }

.btn-login {
  width: 100%; height: 47px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, #FF8A4C, #F2542D);
  color: #fff; font-size: 14.5px; font-weight: 650; font-family: inherit;
  box-shadow: 0 12px 24px rgba(242, 84, 45, .26);
  margin-top: 6px; transition: transform .12s, filter .12s;
}
.btn-login:hover { filter: brightness(1.03); }
.btn-login:active { transform: scale(.99); }

.alert {
  display: flex; gap: 8px; align-items: center;
  background: #FFF3F1; border: 1px solid #FFD9D2; color: #C33A26;
  font-size: 12.5px; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px;
}

.demo-box { margin-top: 28px; padding-top: 20px; border-top: 1px dashed #E7EBF3; }
.demo-box .t { font-size: 11.5px; color: var(--muted); letter-spacing: .4px; margin-bottom: 10px; }
.demo-list { display: grid; gap: 7px; }
.demo-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 10px; background: #F8FAFD;
  border: 1px solid #EFF2F8; cursor: pointer; transition: border-color .15s, background .15s;
  text-align: left; font-family: inherit; font-size: 12.5px; color: #3D4459;
}
.demo-item:hover { border-color: #FFD3C2; background: #FFFAF7; }
.demo-item .role {
  font-size: 10.5px; padding: 2px 7px; border-radius: 6px; font-weight: 600;
  background: #FFF1EC; color: #C7431F; flex: none;
}
.demo-item .ph { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11.5px; }

.auth-foot { margin-top: 26px; font-size: 11.5px; color: #B0B7C6; text-align: center; }

/* 错误页 */
.err-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.err-box { text-align: center; max-width: 420px; }
.err-code { font-size: 72px; font-weight: 800; letter-spacing: -3px; color: #FFD9CB; line-height: 1; }
.err-box h1 { font-size: 19px; margin: 12px 0 8px; }
.err-box p { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.err-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 42px; padding: 0 20px; border-radius: 12px;
  background: linear-gradient(135deg, #FF8A4C, #F2542D); color: #fff;
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 10px 22px rgba(242, 84, 45, .24);
}

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { padding: 34px 26px 30px; }
  .hero-body { margin-top: 30px; }
  .hero-title { font-size: 27px; }
  .hero-desc { margin-bottom: 18px; font-size: 12.5px; }
  .hero-feats, .hero-foot { display: none; }
  .auth-panel { padding: 28px 22px 40px; background: #fff; border-radius: 22px 22px 0 0; margin-top: -18px; position: relative; z-index: 3; }
}

/* ---------------- 分端登录入口 ---------------- */
.portal-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 650;
  padding: 5px 11px; border-radius: 20px; margin-bottom: 12px;
}
.portal-badge.portal-admin { background: #EEF4FF; color: #2F5BD6; }
.portal-badge.portal-teacher { background: #EDF8F2; color: #178A5E; }
.portal-badge.portal-parent { background: #FFF1EC; color: #D4502D; }
.portal-switch { margin-top: 22px; padding-top: 16px; border-top: 1px dashed #E4E8F2; }
.portal-switch .t { font-size: 11px; color: #B0B7C6; margin-bottom: 8px; }
.ps-list { display: flex; gap: 8px; }
.ps-item {
  flex: 1; text-align: center; text-decoration: none;
  font-size: 12.5px; color: #6B7280;
  padding: 8px 0; border-radius: 10px; background: #F5F7FB;
  border: 1px solid transparent; transition: all .15s ease;
}
.ps-item:hover { color: #1F2A44; background: #EEF1F8; }
.ps-item.on { background: #fff; color: #D4502D; font-weight: 650; border-color: #F5C9B8; box-shadow: 0 2px 8px rgba(212,80,45,.10); }
.portal-badge.portal-boss { background: #F3EFFE; color: #6B4EE6; }
.ps-item[data-boss].on, .ps-item.on { }
