:root {
  --page: #edf2fa;
  --surface: rgba(255, 255, 255, .68);
  --surface-strong: rgba(255, 255, 255, .9);
  --text: #1e2943;
  --muted: #65708a;
  --muted-soft: #7b86a0;
  --line: rgba(78, 94, 145, .2);
  --line-strong: rgba(78, 94, 145, .3);
  --field: rgba(255, 255, 255, .68);
  --accent-a: #4d6ff0;
  --accent-b: #7658db;
  --danger-bg: rgba(191, 66, 91, .08);
  --danger-line: rgba(181, 58, 82, .24);
  --danger: #a53650;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
p {
  margin-top: 0;
}

.login-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(241, 245, 253, .06) 0%, rgba(241, 245, 253, .08) 48%, rgba(235, 240, 250, .2) 100%),
    url("images/login-poster-light-v3.png") center / cover no-repeat;
}

.login-page::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .1), transparent 30%, rgba(193, 205, 231, .08)),
    radial-gradient(circle at 82% 50%, rgba(255, 255, 255, .08) 0, rgba(233, 239, 250, .12) 56%, rgba(210, 221, 241, .16) 100%);
  pointer-events: none;
}

.page-shell {
  width: min(1280px, calc(100% - 96px));
  min-height: min(760px, calc(100dvh - 80px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: clamp(64px, 8vw, 144px);
  align-items: center;
}

.brand-panel {
  min-width: 0;
  min-height: min(660px, calc(100dvh - 120px));
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 11px;
  background: linear-gradient(145deg, #5979ef, #7957d8);
  box-shadow:
    0 12px 30px rgba(66, 81, 153, .2),
    inset 0 1px 0 rgba(255, 255, 255, .26);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup strong {
  color: #24314e;
  font-size: 15px;
  letter-spacing: .02em;
}

.brand-lockup span {
  margin-top: 3px;
  color: #7885a4;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
}

.brand-content {
  max-width: 430px;
  margin: auto 0 72px;
}

.kicker {
  margin-bottom: 13px;
  color: #5e70d7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

h1 {
  max-width: 420px;
  margin-bottom: 15px;
  color: #202b45;
  font-size: clamp(28px, 2.5vw, 36px);
  line-height: 1.28;
  letter-spacing: -.035em;
  font-weight: 800;
}

.brand-copy {
  max-width: 390px;
  margin-bottom: 0;
  color: #596781;
  font-size: 14px;
  line-height: 1.8;
}

.brand-status {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #76829e;
  font-size: 11px;
}

.brand-status i {
  width: 1px;
  height: 11px;
  background: rgba(72, 85, 128, .2);
}

.auth-panel {
  width: 100%;
}

.auth-card {
  width: 100%;
  padding: 38px 40px 34px;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 16px;
  background: var(--surface);
  box-shadow:
    0 28px 80px rgba(70, 86, 129, .16),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  backdrop-filter: blur(22px) saturate(128%);
  -webkit-backdrop-filter: blur(22px) saturate(128%);
}

.auth-heading {
  margin-bottom: 28px;
}

.auth-heading > p {
  margin-bottom: 8px;
  color: #5f71d7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}

h2 {
  margin-bottom: 9px;
  color: #1f2941;
  font-size: 28px;
  line-height: 1.28;
  letter-spacing: -.03em;
  font-weight: 800;
}

.auth-heading > span {
  color: var(--muted);
  font-size: 13px;
}

.login-messages {
  margin: -6px 0 20px;
}

.login-message {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.55;
}

.login-message.error,
.login-message.warning {
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-form > label {
  display: grid;
  gap: 8px;
  color: #2d3853;
  font-size: 12px;
  font-weight: 700;
}

.field-shell {
  position: relative;
}

.field-shell input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--field);
  color: #1f2941;
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.field-shell input[name="password"] {
  padding-right: 66px;
}

.field-shell input::placeholder {
  color: #919bb1;
}

.field-shell input:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, .86);
}

.field-shell input:focus {
  border-color: #7186ef;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 0 0 3px rgba(99, 119, 235, .18);
}

.password-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  min-width: 48px;
  height: 36px;
  padding: 0 8px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  outline: none;
  background: transparent;
  color: #6d7893;
  font-size: 12px;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(79, 100, 181, .08);
  color: #4054b5;
}

.submit-button {
  min-height: 50px;
  margin-top: 4px;
  padding: 0 17px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  outline: none;
  background: linear-gradient(105deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 12px 28px rgba(35, 40, 114, .3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.button-arrow {
  font-size: 18px;
  font-weight: 500;
}

.submit-button:hover {
  filter: brightness(1.07);
  box-shadow: 0 15px 34px rgba(35, 40, 114, .38);
  transform: translateY(-1px);
}

.submit-button:active {
  transform: translateY(0) scale(.99);
}

.submit-button:focus-visible {
  box-shadow:
    0 0 0 3px rgba(135, 151, 255, .28),
    0 15px 34px rgba(35, 40, 114, .38);
}

.session-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(81, 97, 145, .14);
  color: var(--muted-soft);
  font-size: 11px;
}

.auth-footnote {
  margin: 15px 0 0;
  color: #74809b;
  text-align: center;
  font-size: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 10px;
}

.auth-footnote a {
  color: inherit;
  text-decoration: none;
}

.auth-footnote a:hover {
  color: #334466;
  text-decoration: underline;
}

.auth-footnote a:focus-visible {
  border-radius: 3px;
  outline: 2px solid rgba(60, 82, 163, .4);
  outline-offset: 2px;
}

@media (max-width: 1040px) {
  .page-shell {
    width: min(100% - 48px, 1020px);
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 48px;
  }

  .brand-content {
    margin-bottom: 56px;
  }
}

@media (max-width: 760px) {
  .login-page {
    overflow: auto;
    place-items: start center;
    background-position: 34% center;
  }

  .login-page::after {
    background: rgba(238, 243, 252, .5);
  }

  .page-shell {
    width: min(calc(100% - 32px), 500px);
    min-height: 100dvh;
    padding: 24px 0 30px;
    grid-template-columns: 1fr;
    gap: 24px;
    align-content: start;
  }

  .brand-panel {
    min-height: auto;
    padding: 0;
  }

  .brand-content,
  .brand-status {
    display: none;
  }

  .auth-card {
    padding: 32px 28px 28px;
    background: var(--surface-strong);
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: min(calc(100% - 24px), 500px);
    padding-top: 18px;
    gap: 18px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .brand-lockup strong {
    font-size: 14px;
  }

  .auth-card {
    padding: 28px 22px 24px;
  }

  h2 {
    font-size: 26px;
  }
}

@media (max-height: 700px) and (min-width: 761px) {
  .page-shell {
    min-height: calc(100dvh - 32px);
  }

  .brand-panel {
    min-height: calc(100dvh - 56px);
  }

  .brand-content {
    margin-bottom: 34px;
  }

  .auth-card {
    padding-block: 30px 28px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .auth-card {
    background: #f7f9fd;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
