/* Midnight account pages. Authentication behavior lives in the existing pages. */
:root {
  color-scheme: dark;
  --cream: #101117;
  --cream-deep: #14161e;
  --white: #191b24;
  --ink: #f6f7fb;
  --ink-soft: #afb5c8;
  --muted: #929bb0;
  --terracotta: #b4a5ff;
  --terracotta-soft: #2b2541;
  --sage: #b4a5ff;
  --sage-soft: #2b2541;
  --border: #343947;
  --shadow-lg: 0 24px 70px #00000033;
}

html { background: #101117; }
body.auth-midnight {
  min-width: 280px;
  min-height: 100svh;
  background: #101117;
  color: var(--ink);
  font: 400 14px/1.7 'Inter', Arial, sans-serif;
}
.auth-midnight h1,
.auth-midnight h2,
.auth-midnight h3 { font-family: 'Manrope', Arial, sans-serif; font-weight: 800; }
.auth-midnight :focus-visible { outline: 2px solid var(--terracotta); outline-offset: 4px; }
.auth-midnight nav.top { background: #101117; border-color: var(--border); }
.auth-midnight .nav-inner {
  width: calc(100% - 92px);
  max-width: 1140px;
  min-height: 86px;
  padding: 18px 0;
  gap: 24px;
}
.auth-midnight .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 800 24px/1.2 'Manrope', Arial, sans-serif;
  letter-spacing: -1.2px;
  flex: none;
}
.auth-midnight .logo-mark { width: 28px; height: 28px; flex: none; }
.auth-midnight .auth-nav-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.auth-midnight .auth-nav-note::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--terracotta);
  border-radius: 50%;
}
.auth-midnight .page { padding: 56px 24px 40px; }
.auth-midnight .auth-card {
  max-width: 460px;
  min-width: 0;
  padding: 38px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
.auth-midnight.auth-create .auth-card { max-width: 500px; }
.auth-midnight .auth-card .eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--terracotta);
}
.auth-midnight .auth-card .eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.auth-midnight .auth-card h1 { font-size: 32px; line-height: 1.2; letter-spacing: -1.3px; margin-bottom: 10px; }
.auth-midnight .auth-card .subtitle { color: var(--ink-soft); font-size: 14px; line-height: 1.75; margin-bottom: 28px; }
.auth-midnight .form-group { min-width: 0; gap: 7px; margin-bottom: 19px; }
.auth-midnight label { font-size: 12px; color: var(--ink); font-weight: 500; }
.auth-midnight input[type='email'],
.auth-midnight input[type='password'],
.auth-midnight input[type='text'] {
  min-width: 0;
  min-height: 48px;
  padding: 11px 14px;
  font: 400 16px/1.5 'Inter', Arial, sans-serif;
  color: var(--ink);
  background: #101117;
  border: 1px solid #687188;
  border-radius: 6px;
  box-shadow: none;
}
.auth-midnight input::placeholder { color: var(--muted); opacity: 1; }
.auth-midnight input:focus { background: #14161e; border-color: var(--terracotta); box-shadow: 0 0 0 3px #b4a5ff1f; }
.auth-midnight input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #14161e inset;
  caret-color: var(--ink);
}
.auth-midnight .forgot { color: var(--ink-soft); font-size: 12px; min-height: 30px; margin-top: -6px; margin-bottom: 16px; }
.auth-midnight .forgot:hover { color: var(--terracotta); }
.auth-midnight .btn-submit {
  min-height: 48px;
  padding: 12px 18px;
  background: var(--terracotta);
  color: #141124;
  border: 1px solid transparent;
  border-radius: 6px;
  font: 700 13px/1.5 'Inter', Arial, sans-serif;
  gap: 12px;
  margin-top: 8px;
}
.auth-midnight .btn-submit:hover { background: #c5baff; color: #141124; transform: translateY(-1px); }
.auth-midnight .btn-submit:active { transform: translateY(0); }
.auth-midnight .btn-submit:disabled { opacity: .65; cursor: wait; transform: none; }
.auth-midnight .btn-social {
  min-height: 48px;
  padding: 12px 14px;
  color: var(--ink);
  background: #222530;
  border: 1px solid #687188;
  border-radius: 6px;
  font: 500 13px/1.5 'Inter', Arial, sans-serif;
}
.auth-midnight .btn-social:hover { color: var(--ink); background: #2a2e3a; border-color: var(--muted); }
.auth-midnight .divider { color: var(--muted); font-size: 11px; margin: 24px 0; gap: 14px; }
.auth-midnight .divider::before,
.auth-midnight .divider::after { background: var(--border); }
.auth-midnight .switch-link { color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
.auth-midnight .switch-link a { color: var(--terracotta); font-weight: 500; }
.auth-midnight .hint,
.auth-midnight .terms { color: var(--muted); font-size: 12px; }
.auth-midnight .terms { line-height: 1.7; margin-top: 18px; }
.auth-midnight .terms a { color: var(--ink-soft); text-underline-offset: 3px; }
.auth-midnight .auth-card p a { color: var(--terracotta); text-decoration: underline; text-underline-offset: 3px; }
.auth-midnight .access-notice {
  padding: 13px 14px;
  color: var(--ink-soft);
  background: #232334;
  border-color: #51466f;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 24px;
}
.auth-midnight #auth-message {
  padding: 14px;
  color: #d3caff !important;
  background: #2b2541;
  border: 1px solid #675b8d;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.auth-midnight footer { padding: 20px 24px 28px; font-size: 12px; color: var(--muted); }
.auth-midnight footer a { display: inline-block; color: var(--ink-soft); padding-block: 6px; }
.auth-midnight footer a:hover { color: var(--terracotta); }
@media (max-width: 600px) {
  .auth-midnight .nav-inner { width: calc(100% - 40px); min-height: 75px; gap: 14px; }
  .auth-midnight .logo { font-size: 22px; gap: 8px; }
  .auth-midnight .auth-nav-note { font-size: 11px; }
  .auth-midnight .page { align-items: flex-start; padding: 32px 20px 22px; }
  .auth-midnight .auth-card { padding: 28px 24px; }
  .auth-midnight .auth-card h1 { font-size: 29px; letter-spacing: -1.1px; }
}
@media (max-width: 380px) {
  .auth-midnight .nav-inner { width: calc(100% - 32px); }
  .auth-midnight .auth-nav-note { display: none; }
  .auth-midnight .page { padding: 24px 16px 18px; }
  .auth-midnight .auth-card { padding: 26px 20px; }
  .auth-midnight .auth-card h1 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-midnight *, .auth-midnight *::before, .auth-midnight *::after { transition: none !important; animation: none !important; }
}
