:root {
  color-scheme: dark;
  --background: #120d1b;
  --ink: #f6effc;
  --muted: #bdb1cb;
  --field: #17111f;
  --line: #54465f;
  --accent: #e5bdff;
  --danger: #ffb5c6;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 36px 16px;
  background:
    radial-gradient(ellipse 46rem 28rem at 50% 0%, #322044 0%, transparent 82%),
    radial-gradient(ellipse 35rem 27rem at 100% 100%, #2a1529 0%, transparent 84%),
    var(--background);
  color: var(--ink);
  font: 15px/1.55 "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
.login-stage { width: min(100%, 29rem); }
.login-brand { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 35px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid #9d6dc6;
  border-radius: 18px;
  background: #362247;
  box-shadow: 0 8px 30px #7c49a04a;
  color: var(--accent);
  font-size: 29px;
  font-weight: 750;
}
.login-brand h1 { margin: 13px 0 0; color: var(--accent); font-size: clamp(2.3rem, 6vw, 3.15rem); letter-spacing: .16em; text-indent: .16em; line-height: 1.2; }
.login-brand p { margin: 10px 0 0; color: var(--muted); letter-spacing: .12em; }
.login-form { display: grid; gap: 17px; }
.field { display: grid; gap: 7px; font-weight: 600; }
.field input {
  width: 100%;
  min-height: 53px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--field);
  color: var(--ink);
  font-family: inherit;
  line-height: 1.4;
  font-size: 16px;
  font-weight: 400;
}
.field input::placeholder { color: #a89ab4; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.login-hint { margin: -4px 0 0; color: var(--muted); font-size: 13px; }
.login-btn {
  min-height: 52px;
  margin-top: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(100deg, #d1a1fa, #ed91c6 56%, #ffb282);
  color: #241429;
  font-family: inherit;
  line-height: 1.3;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 7px 26px #b35e9040;
}
.login-btn:hover:enabled { filter: brightness(1.09); }
.login-btn:disabled, .login-toggle:disabled { opacity: .65; cursor: wait; }
.login-status { margin: 12px 0 0; color: var(--danger); font-size: 14px; }
.login-status:empty { margin: 0; }
.login-status[data-success] { color: #a1e6c0; }
.login-toggle { justify-self: center; min-height: 42px; padding: 7px 9px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.login-toggle:hover:enabled { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 540px) { .login-brand { margin-bottom: 25px; } }
