/* ── Reset & base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #f1f5f9;
  background: #0a0c14;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ── Page shell ─────────────────────────────────── */
.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99,102,241,0.18) 0%, transparent 70%),
    #0a0c14;
}

/* ── Nav ────────────────────────────────────────── */
.auth-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.auth-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.auth-nav__logo { width: 26px; height: 26px; }
.auth-nav__name {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}
.auth-nav__hint {
  font-size: 0.875rem;
  color: #64748b;
}
.auth-nav__link {
  color: #818cf8;
  font-weight: 600;
  margin-left: 0.3rem;
  transition: color 120ms;
}
.auth-nav__link:hover { color: #a5b4fc; }

/* ── Main area ──────────────────────────────────── */
.auth-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 3rem 1.5rem;
}

/* ── Auth card ──────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 440px;
}

.auth-card__header {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-card__title {
  margin: 0 0 0.4rem;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #f1f5f9;
}
.auth-card__sub {
  margin: 0;
  font-size: 0.95rem;
  color: #64748b;
}

/* ── Error alert ────────────────────────────────── */
.auth-alert {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: #fca5a5;
}
.auth-alert p { margin: 0; }
.auth-alert p + p { margin-top: 0.25rem; }

/* ── Form ───────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #f1f5f9;
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px;
  outline: none;
  transition: border-color 140ms, box-shadow 140ms;
  -webkit-appearance: none;
}
.form-input::placeholder { color: #334155; }
.form-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}
.form-input--error {
  border-color: rgba(239,68,68,0.6);
}
.form-input--error:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.18);
}

.btn-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  color: #ffffff;
  background: #6366f1;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
  transition: background 140ms, transform 120ms, box-shadow 140ms;
}
.btn-submit:hover {
  background: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.45);
}
.btn-submit:active {
  transform: translateY(0);
}

/* ── Legal note ─────────────────────────────────── */
.auth-card__legal {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.6;
}
.auth-card__legal a {
  color: #475569;
  text-decoration: underline;
  text-decoration-color: #334155;
  transition: color 120ms;
}
.auth-card__legal a:hover { color: #64748b; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 480px) {
  .auth-form { padding: 1.5rem; }
  .auth-card__title { font-size: 1.5rem; }
}
