:root {
  --brand-blue: #1769ff;
  --brand-blue-2: #3f88ff;
  --deep-blue: #071a45;
  --text-blue: #1c3968;
  --muted-blue: #7086a9;
  --fine-line: rgba(190, 208, 234, .72);
  --error: #e75465;
  --success: #1bb786;
  --glass-white: rgba(255, 255, 255, .89);
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; }
body {
  margin: 0;
  color: var(--text-blue);
  background: #f7faff;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.login-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(660px, 3fr) minmax(500px, 2fr);
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(248,251,255,.20) 0%, rgba(248,251,255,.05) 58%, rgba(248,251,255,.28) 100%),
    linear-gradient(180deg, rgba(255,255,255,.02) 52%, rgba(242,248,255,.16) 100%),
    url("assets/login-knowledge-scene.webp") center bottom / cover no-repeat;
}

.brand-stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
}
.scene-image {
  display: none;
}
.scene-wash {
  display: none;
}
.brand-stage::after {
  display: none;
}

.login-brand {
  position: absolute;
  top: clamp(28px, 4vh, 48px);
  left: clamp(44px, 6vw, 94px);
  display: flex;
  align-items: center;
  text-decoration: none;
  filter: drop-shadow(0 2px 5px rgba(29, 91, 186, .08));
}
.login-brand-mark {
  display: block;
  width: clamp(70px, 5.7vw, 91px);
  height: auto;
  margin-right: 8px;
  flex: 0 0 auto;
}
.login-brand-name {
  color: #071d4a;
  font-size: clamp(21px, 1.55vw, 27px);
  font-weight: 800;
  letter-spacing: -1px;
}
.login-brand-name span { color: var(--brand-blue); }

.hero-copy {
  position: absolute;
  z-index: 2;
  top: clamp(132px, 18vh, 190px);
  left: clamp(52px, 6.8vw, 106px);
  width: min(770px, calc(100% - 120px));
}
.hero-eyebrow {
  width: 200px;
  margin: 0 0 16px;
  color: #6f93cc;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 2.5px;
  line-height: 1.55;
}
.hero-copy h1 {
  margin: 0;
  color: #071746;
  font-size: clamp(40px, 4vw, 66px);
  font-weight: 820;
  letter-spacing: -3.1px;
  line-height: 1.15;
  text-shadow: 0 2px 1px rgba(255,255,255,.8);
}
.hero-copy h1 em {
  color: var(--brand-blue);
  font-style: normal;
  font-weight: 860;
}
.hero-subtitle {
  margin: 17px 0 0;
  color: #173763;
  font-size: clamp(16px, 1.5vw, 23px);
  font-weight: 480;
  letter-spacing: .8px;
  line-height: 1.7;
}
.hero-features {
  display: flex;
  align-items: stretch;
  gap: clamp(24px, 3.2vw, 52px);
  margin-top: 31px;
}
.hero-feature {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.hero-feature:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 8px;
  right: calc(clamp(24px, 3.2vw, 52px) / -2);
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, transparent, #c9d9ef, transparent);
}
.feature-ring {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 47px;
  height: 47px;
  border: 1px solid rgba(165,196,243,.44);
  border-radius: 50%;
  color: var(--brand-blue);
  background: rgba(231,241,255,.78);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.9), 0 7px 16px rgba(48,113,211,.07);
  backdrop-filter: blur(7px);
}
.feature-ring svg { width: 23px; height: 23px; stroke-width: 1.7; }
.hero-feature > span:last-child { display: grid; gap: 2px; min-width: 0; }
.hero-feature b { color: #153560; font-size: 15px; font-weight: 700; white-space: nowrap; }
.hero-feature:first-child b { color: var(--brand-blue); font-size: 20px; }
.hero-feature small { color: #627da8; font-size: 12px; white-space: nowrap; }

.stage-motto {
  position: fixed;
  z-index: 3;
  top: clamp(24px, 4vh, 38px);
  right: 56px;
  display: grid;
  justify-items: end;
  gap: 7px;
  color: #7691bc;
}
.stage-motto span { font-size: 12px; letter-spacing: 6px; }
.stage-motto small { font-size: 10px; letter-spacing: 1.5px; }

.login-zone {
  position: relative;
  display: grid;
  place-items: center start;
  min-height: 100vh;
  padding: 72px 4vw 72px 0;
  background:
    linear-gradient(140deg, rgba(241,247,255,.62), rgba(250,252,255,.76) 48%, rgba(244,248,255,.82));
}
.login-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .45;
  background-image: linear-gradient(rgba(75,126,201,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(75,126,201,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, transparent 0, #000 30%, #000 75%, transparent);
  pointer-events: none;
}
.ambient {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}
.ambient-one { top: -110px; right: -70px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(80,145,255,.14), transparent 68%); }
.ambient-two { bottom: -170px; left: -120px; width: 390px; height: 390px; background: radial-gradient(circle, rgba(110,170,255,.11), transparent 68%); }

.login-card {
  position: relative;
  z-index: 2;
  width: min(490px, 100%);
  padding: 38px 40px 30px;
  border: 1px solid rgba(193, 210, 235, .76);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(252,253,255,.86));
  box-shadow:
    0 30px 75px rgba(37, 83, 146, .12),
    0 4px 15px rgba(52, 102, 172, .055),
    inset 0 1px 0 rgba(255,255,255,.96);
  backdrop-filter: blur(22px) saturate(1.05);
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,1), transparent);
}
.card-heading { text-align: center; }
.mobile-logo { display: none; align-items: center; justify-content: center; gap: 6px; }
.mobile-logo img { display: block; width: 54px; height: auto; }
.mobile-logo b { color: #071d4a; font-size: 18px; font-weight: 800; letter-spacing: -.6px; }
.mobile-logo b span { color: var(--brand-blue); }
.card-heading h2 {
  margin: 0;
  color: var(--deep-blue);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.8px;
  line-height: 1.3;
}
.card-heading > p {
  margin: 6px 0 10px;
  color: #35527c;
  font-size: 16px;
  letter-spacing: 1.2px;
}
.network-info {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 0 10px;
  border-radius: 12px;
  color: #6b82a6;
  background: rgba(244,248,254,.75);
  font-size: 12px;
}
.network-info svg { width: 14px; height: 14px; }
.network-info code { color: #516d98; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.network-info i { width: 6px; height: 6px; margin-left: 3px; border: 2px solid rgba(27,183,134,.19); border-radius: 50%; background: var(--success); }

.login-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 18px 0 19px;
  padding: 4px;
  border: 1px solid rgba(216,226,240,.7);
  border-radius: 11px;
  background: #f0f4fa;
  box-shadow: inset 0 1px 3px rgba(65,95,137,.045);
}
.login-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 35px;
  border: 0;
  border-radius: 8px;
  color: #7286a6;
  background: transparent;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.login-tab svg { width: 17px; height: 17px; }
.login-tab:hover { color: var(--brand-blue); }
.login-tab.active {
  color: var(--brand-blue);
  background: rgba(255,255,255,.98);
  box-shadow: 0 3px 11px rgba(43,83,139,.08), inset 0 0 0 1px rgba(255,255,255,.9);
}

.form-panel { animation: panel-in .2s ease both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.field-label {
  display: block;
  margin: 0 0 7px;
  color: #132d56;
  font-size: 14px;
  font-weight: 650;
}
.password-label { margin-top: 14px; }
.field-shell {
  position: relative;
  display: flex;
  align-items: center;
  height: 45px;
  border: 1px solid #cfdbec;
  border-radius: 8px;
  background: rgba(255,255,255,.88);
  box-shadow: inset 0 1px 2px rgba(24,64,118,.025);
  transition: border-color .17s ease, box-shadow .17s ease, background .17s ease;
}
.field-shell:focus-within {
  border-color: #74a7fa;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23,105,255,.095), inset 0 1px 2px rgba(24,64,118,.02);
}
.field-shell.invalid { border-color: rgba(231,84,101,.65); box-shadow: 0 0 0 3px rgba(231,84,101,.075); }
.field-shell > svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0 13px 0 16px;
  color: #6680a9;
  stroke-width: 1.6;
}
.field-shell input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: #102c58;
  background: transparent;
  caret-color: var(--brand-blue);
  font-size: 14px;
}
.field-shell input::placeholder { color: #91a4c0; opacity: 1; }
.password-toggle, .clear-field, .code-button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.password-toggle, .clear-field {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin-right: 3px;
  color: #6c84aa;
}
.password-toggle:hover, .clear-field:hover { color: var(--brand-blue); }
.password-toggle svg { width: 19px; height: 19px; }
.eye-closed, .password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }
.clear-field { visibility: hidden; }
.field-shell.has-value .clear-field { visibility: visible; }
.clear-field svg { width: 15px; height: 15px; }
.code-button {
  height: 32px;
  margin-right: 10px;
  padding: 0 12px;
  border-left: 1px solid #dce5f1;
  color: var(--brand-blue);
  font-size: 13px;
  font-weight: 600;
}
.code-button:disabled { color: #9aaac0; cursor: default; }
.field-error {
  display: none;
  margin: 6px 0 0;
  color: var(--error);
  font-size: 12px;
}
.field-error.show { display: block; }

.submit-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 47px;
  margin-top: 20px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  color: white;
  background: linear-gradient(105deg, #1769f7, #287dff 55%, #438dff);
  box-shadow: 0 10px 23px rgba(26,109,245,.2), inset 0 1px 0 rgba(255,255,255,.26);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform .17s ease, box-shadow .17s ease, filter .17s ease;
}
.submit-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transform: skewX(-20deg);
  transition: left .5s ease;
}
.submit-button:hover { transform: translateY(-1px); filter: saturate(1.05); box-shadow: 0 13px 28px rgba(26,109,245,.25), inset 0 1px 0 rgba(255,255,255,.3); }
.submit-button:hover::before { left: 120%; }
.submit-button:active { transform: translateY(0); }
.submit-button > svg { position: absolute; right: 18px; width: 18px; height: 18px; opacity: 0; transform: translateX(-4px); transition: .17s ease; }
.submit-button:hover > svg { opacity: .86; transform: translateX(0); }
.button-loading { display: none; align-items: center; gap: 4px; }
.button-loading i { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: login-dot .75s infinite alternate; }
.button-loading i:nth-child(2) { animation-delay: .18s; }
.button-loading i:nth-child(3) { animation-delay: .36s; }
@keyframes login-dot { to { opacity: .35; transform: translateY(-3px); } }
.submit-button.loading .button-label, .submit-button.loading > svg { display: none; }
.submit-button.loading .button-loading { display: flex; }
.submit-button:disabled { cursor: wait; opacity: .75; }

.register-line { margin: 12px 0 17px; color: #637b9f; font-size: 13px; text-align: center; }
.register-line a { margin-left: 4px; color: var(--brand-blue); font-weight: 650; text-decoration: none; }
.register-line a:hover { text-decoration: underline; text-underline-offset: 3px; }

.institution-tip {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 57px;
  padding: 8px 11px;
  border: 1px solid rgba(209,225,247,.68);
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(236,245,255,.93), rgba(244,249,255,.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.tip-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: var(--brand-blue);
  background: rgba(255,255,255,.84);
  box-shadow: 0 4px 12px rgba(34,92,178,.08);
}
.tip-icon svg { width: 19px; height: 19px; }
.institution-tip > span:nth-child(2) { display: grid; gap: 3px; }
.institution-tip b { color: #184478; font-size: 13px; }
.institution-tip small { color: #7890b1; font-size: 11px; }
.tip-state { display: inline-flex; align-items: center; gap: 3px; color: var(--success); font-size: 10px; white-space: nowrap; }
.tip-state svg { width: 13px; height: 13px; stroke-width: 2; }

.login-footer {
  position: fixed;
  z-index: 2;
  right: 0;
  bottom: 20px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #8a9bb4;
  font-size: 11px;
}
.login-footer i { width: 1px; height: 10px; background: #cbd6e5; }
.login-footer a { color: inherit; text-decoration: none; }
.login-footer a:hover { color: var(--brand-blue); }

.login-toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 30px;
  min-width: 190px;
  padding: 10px 17px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 9px;
  color: #fff;
  background: rgba(10,29,63,.91);
  box-shadow: 0 12px 30px rgba(8,31,66,.18);
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  backdrop-filter: blur(10px);
  transition: opacity .18s ease, transform .18s ease;
}
.login-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Login type scale: backend may adjust these variables without changing layout rules. */
:root{--kz-login-small:12px;--kz-login-body:14px;--kz-login-label:15px}
.hero-feature small,.stage-motto span,.form-subtitle,.ip-line,.register-line,.institution-tip small,.login-footer{font-size:var(--kz-login-small)}
.field-label,.login-tab,.institution-tip b{font-size:var(--kz-login-body)}
.field-control input,.submit-button{font-size:var(--kz-login-label)}
.tip-state{font-size:11px}

@media (max-width: 1280px) {
  .login-page { grid-template-columns: minmax(590px, 3fr) minmax(440px, 2fr); }
  .login-zone { padding-right: 3vw; padding-left: 0; }
  .login-card { width: min(470px, 100%); }
  .hero-copy { left: 55px; width: calc(100% - 80px); }
  .hero-copy h1 { letter-spacing: -2.2px; }
  .hero-features { gap: 24px; }
  .hero-feature:not(:last-child)::after { right: -12px; }
  .stage-motto { display: none; }
}

@media (max-width: 1020px) {
  .login-page { display: block; min-height: 100vh; }
  .brand-stage { position: fixed; inset: 0; min-height: 100vh; }
  .scene-image { filter: saturate(.85); }
  .scene-wash { background: rgba(246,250,255,.6); backdrop-filter: blur(2px); }
  .brand-stage::after { display: none; }
  .hero-copy, .stage-motto { display: none; }
  .login-brand { top: 26px; left: 30px; }
  .login-zone { min-height: 100vh; padding: 90px 24px 65px; background: rgba(245,249,255,.42); }
  .login-card { width: min(500px, 100%); }
  .login-footer { bottom: 17px; }
}

@media (max-width: 580px) {
  .brand-stage .login-brand { display: none; }
  .login-zone { padding: 22px 14px 58px; align-items: center; }
  .login-card { padding: 30px 22px 24px; border-radius: 16px; }
  .mobile-logo { display: flex; margin-bottom: 20px; }
  .card-heading h2 { font-size: 25px; }
  .card-heading > p { font-size: 14px; }
  .login-tabs { margin-top: 20px; }
  .field-shell, .submit-button { height: 50px; }
  .institution-tip { grid-template-columns: 36px 1fr; }
  .tip-state { display: none; }
  .login-footer { flex-wrap: wrap; gap: 6px 10px; padding: 0 15px; text-align: center; }
}

@media (max-height: 760px) and (min-width: 1021px) {
  .login-zone { padding-top: 24px; padding-bottom: 46px; }
  .login-card { padding-top: 28px; padding-bottom: 23px; }
  .login-tabs { margin-top: 16px; margin-bottom: 17px; }
  .password-label { margin-top: 13px; }
  .field-shell { height: 47px; }
  .submit-button { height: 48px; margin-top: 18px; }
  .register-line { margin: 12px 0 15px; }
  .institution-tip { min-height: 57px; }
  .hero-copy { top: 125px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
#institutionLogin{padding:8px 12px;border:1px solid #d6e1f0;border-radius:8px;background:white;color:#24436a;cursor:pointer}
