/* ── Account pages: login, register, forgot/reset password ── */

.auth-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
  box-sizing: border-box;
}

.auth-shell {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-brand {
  font-family: 'Archivo', sans-serif;
  font-size: var(--t-lg);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-title { font-family: 'Archivo', sans-serif; font-size: var(--t-lg); font-weight: 600; margin: 0; }
.auth-lead { font-size: var(--t-sm); color: var(--muted); margin: -8px 0 0 0; line-height: 1.5; }
.auth-lead.auth-mfa-hint { margin: 0; }

/* Honeypot — off-screen, not display:none (some bots specifically skip
   hidden/display:none fields but still fill ones that are merely
   positioned off-screen). Real users never see or reach it. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Plain <form> has no class to hang styles on, and without this it's just
   a block box — its .auth-field rows and the submit button below them
   would sit flush against each other with zero gap between. */
.auth-card form, .modal-card form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: var(--t-sm); color: var(--muted); font-weight: 500; }
.auth-field input {
  font: inherit;
  font-size: var(--t-base);
  padding: 10px 12px;
  min-height: var(--tap);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface2);
  color: var(--ink);
  box-sizing: border-box;
}
.auth-field input:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-sm);
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.auth-remember input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.auth-submit {
  border: none;
  /* Plain fallback first: if color-mix() isn't supported, this line wins
     and the button still looks fine, just without the gradient below it.
     The gradient darkens *away* from --primary rather than lightening
     toward white, so its lightest point always matches today's flat
     colour — safe in night mode too, where --primary is already a pale
     blue that would lose contrast against white text if lightened further. */
  background: var(--primary);
  background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 75%, black) 100%);
  color: #fff;
  font: inherit;
  font-size: var(--t-base);
  font-weight: 600;
  min-height: var(--tap);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px -4px var(--primary);
  transition: transform .15s ease, box-shadow .15s ease;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -6px var(--primary); }
.auth-submit:active { transform: translateY(0); box-shadow: 0 2px 8px -3px var(--primary); }

.auth-error {
  background: var(--rough-bg);
  color: var(--rough-ink);
  font-size: var(--t-sm);
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 10px;
}
.auth-success {
  background: var(--good-bg);
  color: var(--good-ink);
  font-size: var(--t-sm);
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 10px;
}

.auth-links { display: flex; justify-content: space-between; gap: 10px; font-size: var(--t-sm); flex-wrap: wrap; }
.auth-links.is-centered { justify-content: center; margin-top: 14px; }
.auth-links a { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-links a:hover { text-decoration: underline; }

/* A submit-styled full-width link (register success -> "go to forecast",
   reset success -> "log in") — same visual as .auth-submit but an <a>. */
.auth-submit-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* ── "Konto" settings group ── */

.account-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.account-verify-note {
  font-size: var(--t-sm);
  color: var(--cau-ink);
  font-weight: 500;
}

/* Account deletion (indstillinger.php "Slet konto", slet-konto.php) —
   deliberately not the primary blue, so the irreversible action never
   looks like the default "go ahead" button. */
.label.is-danger { color: var(--rough-ink); }
.auth-submit.is-danger { background: var(--rough-ink); color: var(--rough-bg); }
.auth-submit.is-danger:hover,
.auth-submit.is-danger:active { box-shadow: 0 8px 22px -6px var(--rough-ink); }

/* ── Invite link landing page (makker.php) ── */
.invite-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.invite-hero .auth-lead { margin: 0; }
.invite-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--t-sm); color: var(--muted); }
.invite-bio { font-style: italic; color: var(--ink); }
