body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
}
.login-top { display: flex; justify-content: flex-end; padding: 16px; }
.login-wrap {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 16px 12vh;
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px 28px;
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.login-brand-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.login-brand-name span { color: var(--text-2); font-weight: 500; }
h1 { font-size: 22px; line-height: 1.25; letter-spacing: -.02em; margin: 0 0 6px; font-weight: 650; }
.login-lede { margin: 0 0 24px; color: var(--text-2); }

.field label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 6px; }
.pw { position: relative; }
.pw input {
  width: 100%; height: 42px; padding: 0 44px 0 12px;
  font-size: 15px; /* >= 15px keeps iOS from zooming on focus */
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color .12s, box-shadow .12s;
}
.pw input:hover { border-color: var(--muted); }
.pw input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.pw input[aria-invalid="true"] { border-color: var(--critical); }
.pw input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--critical) 22%, transparent); }
.pw-toggle {
  position: absolute; right: 4px; top: 4px; width: 34px; height: 34px;
  display: grid; place-items: center; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }
.pw-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pw-toggle .eye-off { display: none; }
.pw-toggle[aria-pressed="true"] .eye { display: none; }
.pw-toggle[aria-pressed="true"] .eye-off { display: block; }

.login-error {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--critical-soft); color: var(--critical); font-size: 13px; font-weight: 500;
}
.login-error[hidden] { display: none; }
.login-error::before {
  content: "!"; flex: none; display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%; margin-top: 0;
  background: var(--critical); color: var(--surface); font-size: 12px; font-weight: 700;
}
.login-submit { width: 100%; height: 42px; margin-top: 20px; font-size: 15px; }
.login-submit .spinner[hidden] { display: none; }
.login-foot { margin: 20px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

@media (max-width: 440px) {
  .login-card { padding: 26px 20px 22px; border-radius: var(--radius); }
  .login-wrap { padding-bottom: 8vh; }
}
