/* ============================================================
   页面 01 · 学生端登录 / 注册（1280×800 横屏）
   ============================================================ */

.login-stage {
  display: grid;
  grid-template-columns: 700px 1fr;
  background: var(--bg);
}

/* ================= 左侧品牌区 ================= */

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 44px 56px 36px;
  overflow: hidden;
  color: var(--on-dark-1);
  background:
    radial-gradient(760px 520px at 78% 18%, rgba(47, 107, 255, 0.28), transparent 62%),
    radial-gradient(560px 420px at 8% 96%, rgba(30, 79, 216, 0.22), transparent 65%),
    linear-gradient(158deg, #0a1222 0%, #0b1830 52%, #0f2146 100%);
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 62% 38%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 62% 38%, #000 0%, transparent 72%);
  pointer-events: none;
}

.brand-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name b {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-name span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.34em;
  color: var(--on-dark-3);
}

.seal {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 2px;
  border-radius: 4px;
  background: var(--seal);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(217, 69, 61, 0.4);
  transform: rotate(-4deg);
}

.panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--on-dark-2);
}

.panel-tag i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(18, 184, 134, 0.16);
}

.brand-main {
  position: relative;
  z-index: 2;
  margin-top: 92px;
  max-width: 486px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--brand-200);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(191, 210, 255, 0.5);
}

.brand-main h1 {
  margin-top: 22px;
  font-size: 46px;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: 0.005em;
}

.brand-main h1 .hl {
  color: #9fbaff;
}

.brand-sub {
  margin-top: 22px;
  max-width: 432px;
  font-size: 15px;
  line-height: 1.95;
  color: var(--on-dark-2);
}

.lang-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
}

.lang-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 14px 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.045);
}

.lang-chip .glyph {
  font-family: var(--font-lang);
  font-size: 16px;
  font-weight: 500;
  color: #dfe7fa;
}

.lang-chip span {
  font-size: 12px;
  color: var(--on-dark-2);
  letter-spacing: 0.04em;
}

.lang-chip.is-on {
  border-color: rgba(47, 107, 255, 0.5);
  background: rgba(47, 107, 255, 0.16);
}

.lang-chip.is-on span {
  color: #e8efff;
}

.brand-foot {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.foot-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--on-dark-3);
}

.foot-stats {
  display: flex;
  align-items: flex-end;
  gap: 54px;
  margin-top: 14px;
}

.foot-stat b {
  display: block;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.foot-stat span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--on-dark-3);
}

.copyright {
  position: relative;
  z-index: 2;
  margin-top: 26px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(108, 124, 153, 0.75);
}

/* 装饰：漂浮字母 + 轨道 */
.glyph-a {
  position: absolute;
  top: 92px;
  right: -34px;
  font-family: var(--font-lang);
  font-size: 330px;
  font-weight: 300;
  line-height: 1;
  color: #fff;
  opacity: 0.045;
  animation: float-y 13s ease-in-out infinite;
  pointer-events: none;
}

.glyph-b {
  position: absolute;
  right: 96px;
  bottom: 78px;
  font-family: var(--font-lang);
  font-size: 170px;
  font-weight: 400;
  line-height: 1;
  color: #cfe0ff;
  opacity: 0.035;
  animation: float-y 16s ease-in-out infinite reverse;
  pointer-events: none;
}

.glyph-c {
  position: absolute;
  right: 250px;
  top: 332px;
  font-family: var(--font-serif);
  font-size: 96px;
  line-height: 1;
  color: #fff;
  opacity: 0.03;
  animation: float-y 19s ease-in-out infinite;
  pointer-events: none;
}

.orbit {
  position: absolute;
  top: 76px;
  right: 34px;
  opacity: 0.5;
  pointer-events: none;
}

/* ================= 右侧表单区 ================= */

.form-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 40px;
  background:
    radial-gradient(rgba(31, 35, 41, 0.055) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(180deg, #f8f9fc 0%, #f3f5f9 100%);
}

.form-panel::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 540px;
  height: 540px;
  border: 1px solid rgba(31, 35, 41, 0.055);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.form-panel::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 380px;
  height: 380px;
  border: 1px dashed rgba(31, 35, 41, 0.06);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.login-stage .toast {
  bottom: 64px;
}

.preview-tag {
  position: absolute;
  top: 28px;
  right: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(100, 106, 115, 0.55);
}

.preview-tag::before {
  content: "";
  width: 22px;
  height: 1px;
  background: rgba(100, 106, 115, 0.3);
}

.login-col {
  position: relative;
  z-index: 1;
  width: 424px;
}

.login-card-wrap {
  position: relative;
  width: 100%;
  z-index: 1;
}

/* 表单级错误（账号停用 / 网络异常） */
.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid #f6d7c8;
  border-radius: 9px;
  background: var(--danger-bg);
  color: var(--danger-deep);
  font-size: 12px;
  line-height: 1.55;
}

.form-alert svg {
  flex: none;
  margin-top: 1px;
}

.field-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-400);
}

.field-note i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand-400);
}

.demo-code {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--brand-600);
}

.demo-code b {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* 演示账号入口：低干扰文字按钮，点击开弹层 */
.demo-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  margin-top: 16px;
  padding: 4px 0;
  font-size: 11.5px;
  color: var(--ink-400);
  transition: color var(--dur-fast) var(--ease-soft);
}

.demo-trigger::before {
  content: "▸";
  font-size: 9px;
}

.demo-trigger:hover {
  color: var(--brand-600);
}

.demo-table {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.demo-table div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.demo-table b {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-900);
}

.demo-table span {
  font-size: 11.5px;
  color: var(--ink-400);
}

.sheet {
  position: absolute;
  inset: 0;
  border-radius: var(--r-2xl);
  background: #fff;
  border: 1px solid rgba(211, 220, 236, 0.7);
}

.sheet-1 {
  transform: rotate(-1.6deg) translate(-6px, 7px);
  opacity: 0.75;
}

.sheet-2 {
  transform: rotate(1.1deg) translate(7px, 4px);
  opacity: 0.55;
}

.login-card {
  position: relative;
  z-index: 2;
  padding: 34px 38px 28px;
  border-radius: var(--r-2xl);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 2px 4px rgba(15, 30, 60, 0.03),
    0 26px 64px rgba(15, 30, 60, 0.11);
}

.card-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-400);
}

.card-eyebrow .ok {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.08em;
  color: var(--ink-400);
}

.card-eyebrow .ok i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
}

.login-card h2 {
  margin-top: 12px;
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.form-sub {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-600);
}

/* 分段控件 */
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 22px;
  padding: 4px;
  border-radius: var(--r-md);
  background: #f2f4f8;
}

.seg button {
  height: 34px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-600);
  transition: all var(--dur-fast) var(--ease-soft);
}

.seg button.is-active {
  background: #fff;
  color: var(--ink-900);
  box-shadow: 0 1px 3px rgba(15, 30, 60, 0.12);
}

/* 表单 */
.auth-form {
  margin-top: 16px;
}

.field {
  margin-top: 14px;
}

.field:first-child {
  margin-top: 0;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-600);
}

.control {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fbfcfe;
  transition:
    border-color var(--dur-fast) var(--ease-soft),
    background var(--dur-fast) var(--ease-soft),
    box-shadow var(--dur-fast) var(--ease-soft);
}

.control:focus-within {
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: var(--shadow-focus);
}

.control .prefix {
  flex: none;
  padding-right: 10px;
  border-right: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-600);
  font-variant-numeric: tabular-nums;
}

.control input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink-900);
}

.control input::placeholder {
  color: var(--ink-300);
  font-size: 13.5px;
  letter-spacing: 0;
}

.control input[type="number"]::-webkit-outer-spin-button,
.control input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.code-btn {
  flex: none;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  background: var(--brand-050);
  color: var(--brand-600);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background var(--dur-fast) var(--ease-soft);
}

.code-btn:hover {
  background: var(--brand-100);
}

.code-btn:disabled {
  background: #f2f4f8;
  color: var(--ink-400);
  cursor: default;
  font-variant-numeric: tabular-nums;
}

.eye-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--ink-400);
  border-radius: 5px;
}

.eye-btn:hover {
  color: var(--ink-700);
  background: var(--line-soft);
}

.field-msg {
  min-height: 15px;
  margin-top: 4px;
  font-size: 11px;
  line-height: 15px;
  color: var(--danger);
  opacity: 0;
  transform: translateY(-2px);
  transition: all var(--dur-fast) var(--ease-soft);
}

.field.has-error .control {
  border-color: var(--danger);
  background: #fff8f8;
}

.field.has-error .field-msg {
  opacity: 1;
  transform: translateY(0);
}

/* 协议 */
.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-600);
}

.checkbox {
  position: relative;
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  cursor: pointer;
}

.checkbox input {
  position: absolute;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.checkbox .box {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid #c9ced8;
  border-radius: 4px;
  background: #fff;
  transition: all var(--dur-fast) var(--ease-soft);
}

.checkbox input:checked + .box {
  border-color: var(--brand-500);
  background: var(--brand-500);
}

.checkbox .box svg {
  opacity: 0;
  transform: scale(0.6);
  transition: all var(--dur-fast) var(--ease-out);
}

.checkbox input:checked + .box svg {
  opacity: 1;
  transform: scale(1);
}

.checkbox input:focus-visible + .box {
  box-shadow: var(--shadow-focus);
}

.agree-row a {
  color: var(--ink-900);
  text-decoration: underline;
  text-decoration-color: #c9ced8;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.agree-row a:hover {
  text-decoration-color: var(--brand-500);
  color: var(--brand-600);
}

/* 主按钮 */
.btn-primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin-top: 18px;
  border-radius: var(--r-md);
  background: var(--brand-500);
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 20px rgba(47, 107, 255, 0.28);
  transition:
    background var(--dur-fast) var(--ease-soft),
    transform var(--dur-fast) var(--ease-soft),
    box-shadow var(--dur-fast) var(--ease-soft);
}

.btn-primary:hover {
  background: var(--brand-600);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 26px rgba(30, 79, 216, 0.34);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary svg {
  transition: transform var(--dur-base) var(--ease-out);
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

.btn-primary.is-loading {
  pointer-events: none;
  background: var(--brand-600);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--ink-400);
}

.form-hint svg {
  flex: none;
  color: var(--ink-300);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--ink-400);
}

.card-foot a {
  color: var(--ink-600);
  font-weight: 600;
}

.card-foot a:hover {
  color: var(--brand-600);
}

.form-panel-foot {
  position: absolute;
  bottom: 26px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 10.5px;
  color: var(--ink-400);
}

.form-panel-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.form-panel-foot i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--success);
}

/* ============================================================
   手机壳（<1024 / ?shell=mobile）
   登录表单改为流式单列，不做 1280 舞台缩放
   ============================================================ */

.mobile-brand {
  display: none;
}

html.is-mobile body {
  background: var(--bg);
}

html.is-mobile .stage-wrap {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
}

html.is-mobile .stage.login-stage {
  display: block;
  width: 100%;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: visible;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
  transform: none !important;
}

html.is-mobile .brand-panel {
  display: none;
}

html.is-mobile .form-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  background:
    radial-gradient(560px 380px at 82% -6%, rgba(47, 107, 255, 0.12), transparent 66%),
    linear-gradient(180deg, #f8f9fc 0%, #f3f5f9 100%);
}

html.is-mobile .form-panel::before,
html.is-mobile .form-panel::after {
  display: none;
}

html.is-mobile .preview-tag,
html.is-mobile .form-panel-foot {
  display: none;
}

html.is-mobile .mobile-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  gap: 10px;
  padding: 18px 20px 4px;
}

.mobile-brand-name {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mobile-brand-name b {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-900);
}

.mobile-brand-name span {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: var(--ink-400);
}

html.is-mobile .login-col {
  width: 100%;
  max-width: 480px;
  margin: auto;
  padding: 10px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

html.is-mobile .sheet {
  display: none;
}

html.is-mobile .login-card {
  padding: 22px 18px 18px;
  border-radius: 18px;
  border-color: var(--line);
  box-shadow:
    0 1px 2px rgba(15, 30, 60, 0.03),
    0 14px 36px rgba(15, 30, 60, 0.08);
}

html.is-mobile .card-eyebrow {
  display: none;
}

html.is-mobile .login-card h2 {
  margin-top: 0;
  font-size: 24px;
}

html.is-mobile .form-sub {
  font-size: 13px;
}

html.is-mobile .seg {
  height: 42px;
  margin-top: 16px;
}

html.is-mobile .seg button {
  height: 36px;
  font-size: 13px;
}

html.is-mobile .field-label {
  font-size: 13px;
}

html.is-mobile .control {
  height: 50px;
}

html.is-mobile .control input {
  font-size: 16px;
}

html.is-mobile .code-btn {
  height: 34px;
  font-size: 13px;
}

html.is-mobile .field-msg {
  font-size: 12px;
}

html.is-mobile .agree-row {
  font-size: 12px;
}

html.is-mobile .btn-primary {
  height: 50px;
  font-size: 15px;
}

html.is-mobile .card-foot {
  font-size: 12px;
}

html.is-mobile .demo-trigger {
  font-size: 12px;
}

html.is-mobile .login-stage .toast {
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100% - 32px);
}

/* 电脑上强制手机预览：390×844 机身外框，不做缩放 */
html.is-mobile.is-forced-mobile body {
  display: grid;
  place-items: center;
  background:
    radial-gradient(760px 520px at 50% -8%, rgba(47, 107, 255, 0.22), transparent 64%),
    radial-gradient(680px 480px at 92% 108%, rgba(30, 79, 216, 0.16), transparent 62%),
    #070c16;
}

html.is-mobile.is-forced-mobile .stage-wrap {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
}

html.is-mobile.is-forced-mobile .stage.login-stage {
  width: 390px;
  height: min(844px, calc(100vh - 64px));
  height: min(844px, calc(100dvh - 64px));
  min-height: 0;
  overflow: hidden;
  border-radius: 30px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 40px 90px rgba(0, 0, 0, 0.55);
  /* 让弹层固定在机身内，而不是铺满整个桌面 */
  transform: translateZ(0) !important;
}

html.is-mobile.is-forced-mobile .dlg-mask {
  padding: 18px;
}

html.is-mobile.is-forced-mobile .dlg,
html.is-mobile.is-forced-mobile .doc-dlg {
  width: 100%;
  padding: 22px 18px 18px;
  border-radius: 18px;
}

html.is-mobile.is-forced-mobile .form-panel {
  min-height: 100%;
}

/* 入场动效 */
.anim {
  opacity: 0;
  animation: fade-up 0.6s var(--ease-out) forwards;
}

.d1 {
  animation-delay: 0.05s;
}

.d2 {
  animation-delay: 0.12s;
}

.d3 {
  animation-delay: 0.19s;
}

.d4 {
  animation-delay: 0.26s;
}

.d5 {
  animation-delay: 0.34s;
}

.login-card.is-shake {
  animation: shake 0.45s var(--ease-soft);
}

[hidden] {
  display: none !important;
}
