:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #122017;
  color: #f8fafc;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #122017; }
button, input { font: inherit; }

.auth-page { min-height: 100vh; padding: 24px 16px 48px; }
.auth-page--centered { display: grid; place-items: center; }
.auth-shell { width: min(100%, 768px); margin: 0 auto; display: grid; gap: 16px; }

.auth-card {
  padding: clamp(20px, 4vw, 28px);
  border: 1px solid #2f493b;
  border-radius: 16px;
  background: #1c2a21;
  box-shadow: 0 16px 40px rgb(0 0 0 / 24%);
}

.auth-card h1, .auth-card h2, .auth-card p { margin: 0; }
.auth-card h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.auth-card h2 { margin-bottom: 8px; font-size: 1.125rem; }
.auth-muted { margin-top: 6px !important; color: #a7b7ad; }
.auth-form, .auth-stack { display: grid; gap: 14px; }
.auth-form { margin-top: 20px; }
.auth-field { display: grid; gap: 7px; }
.auth-field[hidden], .auth-error[hidden] { display: none; }
.auth-field label { font-size: .9rem; font-weight: 650; color: #d7e4dc; }

.auth-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #456252;
  border-radius: 10px;
  padding: 10px 12px;
  background: #233b32;
  color: #f0fdf4;
}

.auth-field input:focus-visible, .auth-primary:focus-visible,
.auth-password button:focus-visible, .auth-card a:focus-visible {
  outline: 3px solid #38e079;
  outline-offset: 2px;
}

.auth-password { position: relative; }
.auth-password input { padding-right: 88px; }
.auth-password button {
  position: absolute;
  inset: 0 4px 0 auto;
  min-width: 76px;
  border: 0;
  background: transparent;
  color: #b9cec1;
  cursor: pointer;
}

.auth-primary {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid #38e079;
  border-radius: 10px;
  padding: 10px 18px;
  background: #38e079;
  color: #07160e;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.auth-primary:hover { background: #6aea98; }
.auth-error { color: #fecaca; font-weight: 650; }
.auth-bill dl { display: grid; gap: 8px; margin: 0 0 16px; }
.auth-bill dl div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-bill dt { color: #a7b7ad; }
.auth-bill dd { margin: 0; text-align: right; font-weight: 650; overflow-wrap: anywhere; }

@media (max-width: 480px) {
  .auth-page { padding-inline: 12px; }
  .auth-card { border-radius: 12px; }
}

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