:root {
  color-scheme: light;
  font-family: Geist, "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: #182925;
  background: #edf3f0;
  --gutter: clamp(20px, 3.3vw, 56px);
  --header-height: 90px;
  --mint: #b4f2e1;
  --rose: #f4bfdc;
  --yellow: #fbefc2;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: var(--header-height) 1fr var(--header-height);
  isolation: isolate;
}

button, input { font: inherit; }
button { cursor: pointer; }

.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 15%, var(--mint), transparent 52%),
    radial-gradient(ellipse at 86% 15%, var(--rose), transparent 49%),
    radial-gradient(ellipse at 23% 100%, var(--yellow), transparent 50%),
    radial-gradient(ellipse at 92% 92%, #cbe9f3, transparent 46%),
    #f4f6f4;
}

.ambient-light {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at var(--light-x, 25%) var(--light-y, 35%), #fffc, transparent 52%),
    radial-gradient(ellipse at 78% 88%, #a6c6df8c, transparent 52%),
    radial-gradient(ellipse at 12% 100%, #fff9ddab, transparent 42%);
}

.glass-scene { position: absolute; width: 100%; height: 100%; display: block; }
.glass-scene[hidden] { display: none; }

.page-header {
  display: flex;
  align-items: center;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -.035em;
  white-space: nowrap;
}

.brand img {
  border-radius: 13px;
  box-shadow: 0 0 0 1px #ffffffbc, 0 5px 14px #384b3420;
}

.brand-identity { display: grid; gap: 4px; line-height: 1.1; }

.brand-tagline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3a312d;
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .17em;
  white-space: nowrap;
  filter: drop-shadow(0 1px 0 #ffffff80);
}

.brand-tagline::before {
  content: "";
  width: 2px;
  height: 1em;
  border-radius: 2px;
  background: linear-gradient(#436d62, #95826d 52%, #a56481);
  transition: filter .2s ease;
}

.brand-tagline:hover::before { filter: brightness(1.35) saturate(1.40); }

@property --tagline-glow {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

@supports (background-clip: text) {
  .brand-tagline > span {
    color: transparent;
    background:
      radial-gradient(ellipse 48px 145% at var(--tagline-spot, 50%) 30%,
        rgb(132 75 98 / var(--tagline-glow)),
        rgb(45 112 104 / var(--tagline-glow)) 52%, transparent),
      #3a312d;
    background-clip: text;
    transition: --tagline-glow .25s ease;
  }

  .brand-tagline:hover > span { --tagline-glow: 1; }
}

main {
  display: grid;
  place-items: center;
  padding: 16px var(--gutter);
}

.login-stage {
  display: grid;
  justify-items: center;
  gap: clamp(12px, 2vh, 19px);
  width: min(100%, 410px);
}

.brand-slogan {
  max-width: 100%;
  margin: 0;
  color: #233e3a;
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(17px, 5.25vw, 25px);
  font-weight: 550;
  line-height: 1.5;
  letter-spacing: .065em;
  text-align: center;
  text-shadow: 0 1px 2px #fff7;
}

.brand-slogan > span { display: inline-block; }

.login-card {
  position: relative;
  width: 100%;
  padding: 37px 38px 17px;
  border: 1px solid #faffffe0;
  border-radius: 34px;
  background:
    radial-gradient(ellipse at var(--light-x, 25%) var(--light-y, 35%), #ffffff8c, transparent 64%),
    linear-gradient(155deg, #ffffffae, #f6fdf369);
  backdrop-filter: blur(10px) saturate(116%);
  box-shadow:
    0 36px 76px -28px #314c6557,
    0 11px 25px -13px #2c49504f,
    inset 0 1px 2px #ffffffe8,
    inset 0 -1px #ffffff82;
}

form { display: grid; gap: 4px; }

.field {
  display: grid;
  font-size: 15px;
  font-weight: 620;
  line-height: 1.35;
}

.field > label { margin-bottom: 7px; }

.field-error {
  visibility: hidden;
  min-height: 18px;
  margin: 3px 2px 0;
  color: #944941;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

.field:has(input[aria-invalid="true"]) .field-error { visibility: visible; }

input {
  width: 100%;
  min-width: 0;
  height: 49px;
  border: 1px solid #465f5827;
  border-radius: 13px;
  padding: 0 14px;
  background: linear-gradient(#ffffffc2, #ffffff66);
  box-shadow: inset 0 1px 1px #718b8315, 0 1px 0 #ffffff80;
  color: #172b26;
  font-weight: 450;
  font-size: 16px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input::placeholder { color: #52625d; opacity: 1; }

input:focus {
  outline: none;
  border-color: #527970;
  background: #fff;
  box-shadow: 0 0 0 3px #79b5a538;
}

input[aria-invalid="true"] {
  border-color: #bb7468;
  background: #fff9f7;
}

input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px #c97d6e2b; }

.password-field { position: relative; }
.password-field input { padding-right: 51px; }
.password-field input::-ms-reveal { display: none; }

.visibility {
  position: absolute;
  display: grid;
  place-items: center;
  top: 4px;
  bottom: 4px;
  right: 4px;
  width: 42px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: #425e56;
  transition: background .18s ease, color .18s ease;
}

.visibility:hover, .visibility[aria-pressed="true"] {
  background: #dceee7;
  color: #1a4235;
}

.eye {
  position: relative;
  width: 15px;
  height: 15px;
  transform: rotate(45deg);
  border-radius: 75% 0;
  border: 1.5px solid currentColor;
}

.eye::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.visibility[aria-pressed="true"] .eye::after {
  content: "";
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 5px;
  width: 1.5px;
  background: currentColor;
  box-shadow: 2px 0 #dceee7;
}

.submit {
  min-height: 52px;
  padding: 0 16px 0 calc(16px + .15em);
  border-radius: 14px;
  border: 1px solid #80a59c69;
  background:
    radial-gradient(ellipse at var(--light-x, 25%) 0%, #ffffffe0, transparent 75%),
    linear-gradient(175deg, #ffffff52, #ffffff10 54%, #376c641f),
    linear-gradient(108deg, #93d7c9, #dcedd9 51%, #edbad2);
  color: #193831;
  font-size: 16px;
  font-weight: 660;
  letter-spacing: .15em;
  box-shadow: inset 0 1px 1px #fffd, 0 6px 15px -7px #53796e6b;
  transition: filter .2s ease, box-shadow .2s ease;
}

.submit:hover {
  filter: saturate(1.18);
  box-shadow: inset 0 1px 1px #fff, 0 8px 17px -7px #53796e8f;
}

.submit:active { box-shadow: inset 0 1px 4px #46756821; }
.submit:disabled { cursor: wait; opacity: .72; }

button:focus-visible {
  outline: 2px solid #315a4b;
  outline-offset: 3px;
}

.form-status {
  margin: 5px 0 0;
  min-height: 21px;
  text-align: center;
  color: #3b544e;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 540px), (max-height: 650px) {
  :root { --header-height: 66px; }
  .brand img { width: 36px; height: 36px; border-radius: 11px; }
  .brand { font-size: 18px; gap: 10px; }
  .login-card { padding-inline: clamp(23px, 7vw, 38px); border-radius: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
