:root {
  color-scheme: light;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --canvas: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d9d9dd;
  --blue: #0a62c7;
  --blue-strong: #0054ac;
  --danger: #b42318;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(188, 219, 247, .46), transparent 31rem),
    radial-gradient(circle at 86% 82%, rgba(229, 236, 248, .72), transparent 28rem),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; }

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(10, 98, 199, .3);
  outline-offset: 3px;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.login-card {
  width: min(100%, 406px);
  padding: 42px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(29, 29, 31, .12), 0 2px 8px rgba(29, 29, 31, .05);
  backdrop-filter: blur(22px) saturate(1.1);
}

.login-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 23px;
  color: #fff;
  background: linear-gradient(150deg, #2673cf, #075bab);
  border-radius: 17px;
  box-shadow: 0 10px 22px rgba(10, 98, 199, .22);
}

.login-mark svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
.login-kicker { margin: 0 0 5px; color: var(--muted); font-size: 12px; font-weight: 720; letter-spacing: .055em; }
h1 { margin: 0; font-size: clamp(27px, 7vw, 33px); font-weight: 760; letter-spacing: -.042em; line-height: 1.14; }
.login-copy { margin: 11px 0 28px; color: var(--muted); font-size: 15px; line-height: 1.55; }

form { display: grid; }
label { margin-bottom: 7px; color: var(--ink); font-size: 13px; font-weight: 680; }
input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: .12em;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 12px;
  caret-color: var(--blue);
  transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus { border-color: rgba(10, 98, 199, .72); box-shadow: 0 0 0 4px rgba(10, 98, 199, .11); }
input[aria-invalid="true"] { border-color: var(--danger); }
.login-hint { min-height: 20px; margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.login-message { min-height: 21px; margin: 7px 0 0; color: var(--danger); font-size: 13px; font-weight: 600; }
.login-message:empty { display: none; }

button {
  min-height: 48px;
  margin-top: 15px;
  color: #fff;
  cursor: pointer;
  background: var(--blue);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 5px 12px rgba(10, 98, 199, .2);
  font-size: 16px;
  font-weight: 700;
  transition: background-color .15s ease, transform .1s ease, opacity .15s ease;
}
button:hover { background: var(--blue-strong); }
button:active { transform: scale(.985); }
button:disabled { cursor: wait; opacity: .66; }
.login-footnote { margin: 24px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

@media (max-width: 420px) {
  .login-card { padding: 32px 25px 28px; border-radius: 24px; }
  .login-mark { width: 48px; height: 48px; margin-bottom: 19px; }
  .login-copy { margin-bottom: 23px; }
}

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

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