/* auth.css — loaded only on /login, /register, /forgot-password, /reset-password
   All colours come from bg.css theme variables. No overrides to global styles. */

/* ── PAGE LAYOUT ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 16px 40px; /* 80px top = clear the fixed navbar */
}

/* ── CARD ─────────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 48px 44px 40px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* subtle entrance */
  animation: auth-fade-in 0.35s ease both;
}

@keyframes auth-fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-card__title {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  color: var(--card-text);
}

.auth-card__sub {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--card-muted);
  margin: 0 0 2rem;
}

/* ── ALERT BANNERS ───────────────────────────────────────── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.auth-alert svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-alert--error {
  background: rgba(198, 60, 40, 0.13);
  border: 1px solid rgba(198, 60, 40, 0.35);
  color: #f08070;
}

.auth-alert--success {
  background: rgba(67, 141, 18, 0.13);
  border: 1px solid rgba(67, 141, 18, 0.35);
  color: #7ed645;
}

/* ── FORM ────────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

/* ── FIELD ───────────────────────────────────────────────── */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--card-muted);
}

.auth-field__link {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--nav-accent);
  text-decoration: none;
  transition: color 0.2s;
}

.auth-field__link:hover {
  color: var(--nav-hover);
}

.auth-field input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--card-text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 300;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

[data-theme="light"] .auth-field input {
  background: rgba(255, 255, 255, 0.55);
}

.auth-field input::placeholder {
  color: var(--card-muted);
  opacity: 0.6;
}

.auth-field input:focus {
  border-color: var(--nav-accent);
  box-shadow: 0 0 0 3px rgba(198, 97, 63, 0.18);
}

/* ── SUBMIT BUTTON ───────────────────────────────────────── */
.auth-btn {
  width: 100%;
  padding: 11px 0;
  margin-top: 0.4rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.auth-btn:hover {
  background: var(--btn-hover-bg);
  transform: translateY(-1px);
}

.auth-btn:active {
  transform: translateY(0);
}

/* ── SWITCH LINK ─────────────────────────────────────────── */
.auth-switch {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--card-muted);
  margin: 0;
}

.auth-switch a {
  color: var(--nav-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-switch a:hover {
  color: var(--nav-hover);
}

/* ── DIVIDER (future: social logins) ─────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.5rem 0;
  color: var(--card-muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 520px) {
  .auth-card {
    padding: 36px 24px 28px;
    border-radius: 10px;
  }

  .auth-card__title {
    font-size: 1.45rem;
  }
}
