:root {
  --auth-primary: #7c3aed;
  --auth-primary-hover: #6d28d9;
  --auth-ink: #0f172a;
  --auth-muted: #64748b;
  --auth-border: #e2e8f0;
}

html { min-height: 100%; }

body.auth-page {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 42%, rgba(124, 58, 237, 0.08), transparent 30rem), #fff;
  color: var(--auth-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-page * { font-family: inherit; }

.auth-header {
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.9);
}

.auth-nav {
  display: flex;
  width: min(100% - 4.8rem, 124rem);
  min-height: 7.2rem;
  align-items: center;
  margin: 0 auto;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  color: var(--auth-ink);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.auth-brand:hover,
.auth-brand:focus { color: var(--auth-primary); }
.auth-brand img { width: 3.8rem; height: 3.8rem; object-fit: contain; }
.auth-brand span { color: inherit; }

.auth-main {
  display: grid;
  min-height: calc(100vh - 7.3rem);
  place-items: center;
  padding: 4.8rem 2.4rem 7.2rem;
}

.auth-card {
  width: min(100%, 44rem);
  border: 1px solid var(--auth-border);
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.96);
  padding: 4rem;
  box-shadow: 0 1.8rem 5rem rgba(30, 20, 50, 0.08);
}

.auth-title {
  margin: 0;
  color: var(--auth-ink);
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.auth-copy {
  margin: 1rem 0 3rem;
  color: var(--auth-muted);
  font-size: 1.6rem;
  line-height: 1.5;
}

.auth-field { margin-bottom: 2rem; }
.auth-field label {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--auth-ink);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.4;
}

.auth-field .form-control {
  height: 5.2rem;
  border: 1px solid #cbd5e1;
  border-radius: 1.2rem;
  background: #fff;
  padding: 0 1.6rem;
  color: var(--auth-ink);
  font-size: 1.6rem !important;
  line-height: 1.5;
  box-shadow: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-field .form-control::placeholder { color: #94a3b8; }
.auth-field .form-control:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.auth-help {
  display: block;
  margin-top: 0.7rem;
  color: var(--auth-muted) !important;
  font-size: 1.25rem;
  line-height: 1.4;
}

.auth-submit {
  width: 100%;
  height: 5.2rem;
  margin-top: 0.4rem;
  border: 1px solid var(--auth-primary);
  border-radius: 1.2rem;
  background: var(--auth-primary);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1rem 2.4rem rgba(124, 58, 237, 0.2);
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  border-color: var(--auth-primary-hover);
  background: var(--auth-primary-hover);
}
.auth-submit:hover { transform: translateY(-1px); }
.auth-submit:focus-visible,
.auth-page a:focus-visible { outline: 3px solid rgba(124, 58, 237, 0.22); outline-offset: 3px; }

.auth-page #warning-message {
  min-height: 2rem;
  margin: -0.4rem 0 1.2rem;
  color: #be123c;
  font-size: 1.4rem;
  line-height: 1.4;
  text-align: left;
}

.auth-links {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 2.4rem;
  color: var(--auth-muted);
  font-size: 1.4rem;
  line-height: 1.5;
  text-align: center;
}

.auth-links span,
.auth-links a { font-size: inherit; line-height: inherit; }
.auth-links a,
.auth-legal a { color: var(--auth-primary); font-weight: 700; }
.auth-links a:hover,
.auth-legal a:hover { color: var(--auth-primary-hover); }

.auth-legal {
  margin: 2.4rem 0 0;
  color: var(--auth-muted);
  font-size: 1.2rem;
  line-height: 1.55;
  text-align: center;
}

@media (max-width: 520px) {
  .auth-nav { width: min(100% - 3.2rem, 124rem); }
  .auth-main { align-items: start; padding: 3.2rem 1.6rem 4.8rem; }
  .auth-card { padding: 3.2rem 2.4rem; }
}
