@layer sections {
/* ── Auth pages ────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
  overflow: auto;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 44px 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 2px 16px oklch(0% 0 0 / 5%);
}

.auth-logo { margin-bottom: 28px; }

.auth-title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 28px;
  line-height: 1.2;
}
.auth-title:has(+ .auth-subtitle) { margin-bottom: 6px; }

.auth-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}

.auth-flash {
  margin-bottom: 20px;
  padding: 10px 14px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  animation: fadeSlideIn 0.25s both;
}
.auth-flash--alert  { background: oklch(95% 0.025 8); color: oklch(40% 0.1 8); }

.auth-field { margin-bottom: 18px; }

.auth-field .form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.auth-field .form-input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--t-slow), box-shadow var(--t-slow);
}
.auth-field .form-input:focus {
  border-color: oklch(60% 0.08 65);
  box-shadow: 0 0 0 3px oklch(92% 0.03 65);
}
.auth-field .form-input::placeholder { color: var(--faint); }
.auth-field select.form-input { min-height: 42px; }
.auth-field .form-input--code { letter-spacing: 0.4em; }

.auth-btn {
  display: block;
  width: 100%;
  padding: 11px 18px;
  margin-top: 8px;
  background: var(--text);
  color: var(--surface);
  border: none;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--t-slow);
  text-align: center;
}
.auth-btn:hover { opacity: 0.85; }

.auth-links {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.auth-links a { color: var(--text); font-weight: 500; }
.auth-links a:hover { text-decoration: underline; }

#error_explanation {
  background: var(--rose-bg);
  border: 1px solid oklch(88% 0.05 8);
  border-radius: var(--r);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--rose-fg);
}
#error_explanation h2 { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
#error_explanation ul { padding-left: 16px; }
#error_explanation li { margin-bottom: 2px; }

/* auth page lives inside .main-content which clips, override */
.main-content:has(.auth-page) { overflow: auto; }
.auth-page { min-height: 100%; }
}
