/**
 * Inloggnings- och kontosidornas skal.
 *
 * Samma scen som startsidan — mörk botten med logotypens tre färgfält i
 * långsam drift — men med ett vitt kort i mitten. Kortets innehåll bygger
 * på site.css (.field, .btn); den här filen äger bara scenen och kortet.
 */

body.auth {
  background: var(--ink);
  color: var(--ink);
  min-height: 100dvh;
}

/* ---------- Rörlig bakgrund — samma blobbar som startsidan ---------- */
.auth-bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.auth-bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.auth-bg__blob--blue {
  width: 55vmax; height: 55vmax;
  background: var(--blue);
  top: -18vmax; left: -12vmax;
  animation: auth-drift1 34s ease-in-out infinite alternate;
}
.auth-bg__blob--pink {
  width: 48vmax; height: 48vmax;
  background: var(--pink);
  top: -10vmax; right: -14vmax;
  animation: auth-drift2 41s ease-in-out infinite alternate;
}
.auth-bg__blob--citron {
  width: 42vmax; height: 42vmax;
  background: var(--citron);
  bottom: -18vmax; left: 32vw;
  opacity: 0.42;
  animation: auth-drift3 47s ease-in-out infinite alternate;
}
@keyframes auth-drift1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(14vw, 12vh, 0) scale(1.18); }
}
@keyframes auth-drift2 {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-16vw, 16vh, 0) scale(0.92); }
}
@keyframes auth-drift3 {
  from { transform: translate3d(0, 0, 0) scale(0.95); }
  to   { transform: translate3d(-18vw, -14vh, 0) scale(1.22); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-bg__blob { animation: none; }
}

/* ---------- Scenen ---------- */
.auth-stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vh, 3rem) 1.25rem;
}

.auth-card {
  background: var(--paper);
  border-radius: 24px;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  width: min(430px, 100%);
  box-shadow: 0 30px 80px rgba(11, 11, 18, 0.45);
}
.auth-card--wide { width: min(920px, 100%); }

/* ---------- Kortets huvud ---------- */
.auth-brand { display: block; margin-bottom: 1.5rem; }
.auth-brand img { height: 30px; width: auto; display: block; }

.auth-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}
.auth-lead { color: var(--muted); font-size: 0.97rem; margin-bottom: 1.5rem; }
.auth-lead strong { color: var(--ink); }

/* ---------- Meddelanden ---------- */
.notice {
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 0.93rem;
  line-height: 1.45;
  margin-bottom: 1.25rem;
}
.notice--error {
  background: rgba(199, 64, 95, 0.09);
  border: 1px solid rgba(199, 64, 95, 0.35);
  color: var(--pink-deep);
}
.notice--error a { color: inherit; font-weight: 600; text-decoration: underline; }
.notice--success {
  background: rgba(165, 168, 31, 0.12);
  border: 1px solid rgba(165, 168, 31, 0.4);
  color: #6E7113;
}

/* ---------- Formulärdetaljer utöver site.css ---------- */
.auth-card .btn { width: 100%; }
.field__hint { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }

.auth-forgot {
  display: block;
  text-align: right;
  font-size: 0.85rem;
  color: var(--muted);
  margin: -0.3rem 0 1.2rem;
}
.auth-forgot:hover { color: var(--blue); }

/* ---------- Länkar under formuläret ---------- */
.auth-alt {
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.auth-alt a { color: var(--blue); font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }

.auth-back { text-align: center; margin-top: 1rem; font-size: 0.88rem; }
.auth-back a { color: var(--muted); }
.auth-back a:hover { color: var(--ink); }

/* ---------- Tvåspalt (organisationsregistrering) ---------- */
.auth-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.auth-section-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--line);
}
.auth-section-title--blue { border-color: var(--blue); }
.auth-section-title--pink { border-color: var(--pink); }

.auth-note {
  background: var(--mist);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.field-row { display: grid; grid-template-columns: 2fr 3fr; gap: 0.75rem; }

@media (max-width: 720px) {
  .auth-columns { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- Statusikon (ogiltig länk m.m.) ---------- */
.auth-mark {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
}
.auth-mark--blue { background: var(--blue); color: #fff; }
.auth-mark--pink { background: var(--pink); color: #fff; }
.auth-mark--citron { background: var(--citron); color: var(--ink); }
