:root {
  --auth-ink: #222831;
  --auth-slate: #445773;
  --auth-slate-deep: #35465c;
  --auth-muted: #5c6678;
  --auth-line: #d7dde6;
  --auth-paper: #ffffff;
  --auth-soft: #f4f6f9;
  --auth-head: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --auth-body: 'Montserrat', 'Barlow', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body.auth-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--auth-body);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(68, 87, 115, 0.18), transparent 55%),
    linear-gradient(165deg, #e8ecf2 0%, #f5f7fa 45%, #ffffff 100%);
  color: var(--auth-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.auth-shell {
  width: min(440px, 100%);
}

.auth-brand {
  background: var(--auth-slate);
  text-align: center;
  padding: 28px 24px 22px;
  border: 1px solid var(--auth-slate-deep);
  border-bottom: 0;
}

.auth-logo {
  display: inline-block;
  text-decoration: none;
}

.auth-logo img {
  display: block;
  width: 200px;
  max-width: 72%;
  height: auto;
  margin: 0 auto;
}

.auth-tagline {
  margin: 12px 0 0;
  font-family: var(--auth-body);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: #d7dde8;
}

.auth-card {
  width: 100%;
  background: var(--auth-paper);
  border: 1px solid var(--auth-line);
  border-top: 0;
  padding: 32px 28px 28px;
  box-shadow: 0 22px 48px rgba(53, 70, 92, 0.12);
}

.auth-card h1 {
  margin: 0 0 8px;
  font-family: var(--auth-head);
  font-weight: 500;
  font-size: 30px;
  color: var(--auth-slate);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.auth-card .auth-sub {
  margin: 0 0 26px;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.auth-field { margin-bottom: 16px; }
.auth-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auth-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.auth-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--auth-line);
  background: var(--auth-soft);
  padding: 0 14px;
  font: inherit;
  color: var(--auth-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--auth-slate);
  box-shadow: 0 0 0 3px rgba(68, 87, 115, 0.15);
  background: #fff;
}

.auth-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  background: var(--auth-slate);
  color: #fff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s ease;
}
.auth-btn:hover { background: var(--auth-slate-deep); }
.auth-btn:disabled { opacity: 0.6; cursor: wait; }
.auth-btn.secondary {
  background: transparent;
  color: var(--auth-slate);
  border: 1px solid var(--auth-line);
}
.auth-btn.secondary:hover { background: var(--auth-soft); }

.auth-error { color: #a33; font-size: 14px; margin-top: 12px; text-align: center; }
.auth-ok { color: #2f6b4f; font-size: 14px; margin-top: 12px; text-align: center; }

.auth-links {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--auth-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.auth-links a {
  color: var(--auth-slate);
  text-decoration: none;
}
.auth-links a:hover { text-decoration: underline; }

.auth-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  line-height: 1.65;
  color: var(--auth-muted);
}
.auth-foot strong {
  display: block;
  font-family: var(--auth-head);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--auth-slate);
  font-weight: 500;
  margin-bottom: 4px;
}
.auth-foot a { color: var(--auth-slate); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }
.auth-foot-links {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.auth-step { display: none; }
.auth-step.is-active { display: block; }

@media (max-width: 480px) {
  body.auth-page { padding: 16px 12px; align-items: flex-start; padding-top: 20px; }
  .auth-brand { padding: 22px 18px 18px; }
  .auth-card { padding: 24px 18px 22px; }
  .auth-card h1 { font-size: 26px; }
  .auth-links a { min-height: 40px; display: inline-flex; align-items: center; }
}
