* {
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 88px 24px 24px;
}
.auth-card {
  width: min(440px, 100%);
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px #1f29371a;
}
.brand {
  display: block;
  color: var(--accent-text);
  font-weight: 800;
  text-decoration: none;
  margin-bottom: 36px;
}
.auth-card h1 {
  margin: 0 0 8px;
  font-size: 30px;
}
.hint {
  color: var(--muted);
  margin: 0 0 26px;
}
form {
  display: grid;
  gap: 17px;
}
label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}
input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font: inherit;
}
input:focus {
  outline: 3px solid var(--focus);
  border-color: var(--accent-text);
}
.primary,
#send-code {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}
.primary {
  background: var(--accent);
  color: var(--ink);
}
.code-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
}
#send-code {
  border: 1px solid var(--focus);
  color: var(--accent-text);
  background: var(--accent-soft);
}
.message {
  min-height: 22px;
  font-size: 13px;
}
.message.error {
  color: var(--danger);
}
.message.success {
  color: var(--accent-text);
}
nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  font-size: 13px;
}
nav a {
  color: var(--accent-text);
  text-decoration: none;
}

.auth-account-nav {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.captcha-open { overflow: hidden; }
.auth-captcha-dialog[hidden] { display: none; }
.auth-captcha-dialog { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.auth-captcha-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000a; }
.auth-captcha-card { position: relative; width: min(400px, 100%); border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 80px #0008; padding: 24px; }
.auth-captcha-card header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.auth-captcha-card h2 { margin: 0; font-size: 20px; }
.auth-captcha-card header button { border: 1px solid var(--line); background: transparent; color: var(--ink); width: 32px; height: 32px; border-radius: 6px; cursor: pointer; font-size: 22px; }
.captcha-box { display: grid; justify-items: center; min-height: 100px; }
.captcha-box p { color: var(--muted); font-size: 12px; }
.auth-captcha-cancel { margin-top: 16px; min-height: 42px; width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); cursor: pointer; }
@media (max-width: 380px) { .auth-captcha-dialog { padding: 8px; } .auth-captcha-card { padding: 12px; } }
