/* ============================================================
   A.dk — auth pages (signup, signin)
   Uses variables from styles.css. Centered card on a soft background.
   ============================================================ */

.auth-shell {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
  padding: clamp(40px, 8vw, 80px) 20px;
  position: relative;
}

.auth-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(32px, 5vw, 52px);
  width: min(480px, 100%);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sage-soft), transparent 70%);
  filter: blur(40px);
  z-index: 0;
}
.auth-card > * { position: relative; z-index: 1; }

.auth-head {
  text-align: center;
  margin-bottom: 32px;
}
.auth-head .eyebrow { margin-bottom: 18px; }
.auth-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--ink);
}
.auth-head h1 em { color: var(--sage-deep); font-style: italic; }
.auth-head p {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 15px;
}

.auth-form { display: grid; gap: 18px; }

.field {
  display: grid;
  gap: 6px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.field input {
  font: inherit;
  font-size: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  color: var(--ink);
  outline: 0;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  width: 100%;
}
.field input::placeholder { color: var(--muted); }
.field input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 4px var(--sage-soft);
}
.field .hint {
  font-size: 12px;
  color: var(--muted);
}

/* Two fields side by side (postnr + by). Stacks on narrow screens. */
.field-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 2fr;
  gap: 14px;
}
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}

/* Section heading inside a multi-group form (Virksomhed / Adresse / Kontakt). */
.field-group-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 10px 0 -4px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

/* The company step has many fields — give it more room than the login card. */
.auth-card-wide { max-width: 560px; }
.field input[aria-invalid="true"] {
  border-color: #c65a5a;
  box-shadow: 0 0 0 4px #f7e0e0;
}

.form-error {
  background: #fbe9e9;
  border: 1px solid #f1c4c4;
  color: #8a2a2a;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  display: none;
}
.form-error.show { display: block; }

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ink);
  color: var(--cream);
  padding: 15px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease);
  width: 100%;
  margin-top: 4px;
}
.submit-btn:hover:not(:disabled) { background: var(--sage-deep); transform: translateY(-1px); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.submit-btn svg { transition: transform 0.2s var(--ease); }
.submit-btn:hover:not(:disabled) svg { transform: translateX(3px); }

.auth-foot {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}
.auth-foot a {
  color: var(--sage-deep);
  font-weight: 600;
}
.auth-foot a:hover { text-decoration: underline; }

.legal {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.legal a { text-decoration: underline; }

.nav-user { font-size: 14px; color: var(--ink-soft); font-weight: 500; }

/* App (dashboard) */
.app-shell {
  max-width: 1080px;
  margin: 40px auto;
  padding: 0 20px;
}
.app-hero {
  background: linear-gradient(145deg, var(--sage-soft), var(--paper) 70%);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: clamp(32px, 5vw, 56px);
  box-shadow: var(--shadow-md);
}
.app-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 400;
  color: var(--ink);
}
.app-hero h1 em { color: var(--sage-deep); font-style: italic; }
.app-hero p { margin-top: 14px; color: var(--ink-soft); max-width: 56ch; font-size: 17px; }

.app-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.app-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.app-card h3 { font-size: 16px; font-weight: 600; color: var(--ink); }
.app-card p  { color: var(--ink-soft); font-size: 14px; margin-top: 6px; }
.app-card .big {
  font-family: var(--font-serif);
  font-size: 38px;
  line-height: 1;
  color: var(--ink);
  margin-top: 8px;
}

.app-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.app-actions .btn-out {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s var(--ease);
}
.app-actions .btn-out:hover { background: var(--cream-warm); }

@media (max-width: 600px) {
  .auth-card { padding: 28px 22px; border-radius: var(--r-lg); }
}

/* === MFA / 2-faktor-sider (allauth) ===================================
   Disse sider arver base.html via templates/allauth/layouts/base.html.
   `main` gøres til et centreret kort, og alt sættes i samme skrifttype
   (Inter) for et roligt, ensartet udtryk. */
.mfa-shell main {
  max-width: 500px;
  margin: 56px auto;
  padding: 52px 56px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px -32px rgba(43, 45, 66, 0.28);
}
/* Samme skrifttype overalt — også overskrifter (ingen serif-blanding her). */
.mfa-shell main,
.mfa-shell main h1,
.mfa-shell main h2,
.mfa-shell main h3,
.mfa-shell main label,
.mfa-shell main p { font-family: var(--font-sans); }

.mfa-shell main h1 { font-size: 27px; font-weight: 600; text-align: center; margin: 6px 0 10px; color: var(--ink); }
.mfa-shell main h2 { font-size: 18px; font-weight: 600; margin: 22px 0 8px; }
.mfa-shell main > p,
.mfa-shell .mfa-lede { text-align: center; color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.mfa-shell .mfa-head { margin-bottom: 8px; }
.mfa-shell .eyebrow { display: flex; justify-content: center; margin-bottom: 14px; }

/* Bare allauth-felter (kode-input, authenticator-secret) → samme look som login. */
.mfa-shell main p > label,
.mfa-shell main label { display: block; text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.mfa-shell main input:not([type="checkbox"]):not([type="radio"]),
.mfa-shell main textarea {
  width: 100%;
  padding: 13px 15px;
  font-size: 15px;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.mfa-shell main input:focus { outline: none; border-color: var(--sage); background: #fff; }

/* QR-kode centreret. */
.mfa-shell main img { display: block; margin: 8px auto 20px; max-width: 200px; height: auto; }

/* Knapper centreret og luftige. */
.mfa-shell main form,
.mfa-shell .mfa-actions { text-align: center; }
.mfa-shell .mfa-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 4px; }
.mfa-shell main .btn { margin-top: 12px; }
.mfa-shell main .btn + .btn { margin-left: 8px; }

/* Recovery-koder: centreret gitter, hver kode tydeligt synlig. */
.mfa-codes {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
  padding: 0;
}
.mfa-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 16px;
  letter-spacing: 1.5px;
  text-align: center;
  padding: 13px 8px;
  color: var(--ink);
  background: var(--cream-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.mfa-foot { text-align: center; margin-top: 24px; font-size: 14px; }
.mfa-foot a { color: var(--sage-deep); }

@media (max-width: 600px) {
  .mfa-shell main { margin: 28px 16px; padding: 36px 28px; }
  .mfa-codes { grid-template-columns: 1fr; }
}

/* --- Vælg bogholderi (multi-tenant picker) --- */
.tenant-picker .tenant-list { list-style: none; margin: 22px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tenant-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.tenant-row:hover { border-color: var(--sage); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.tenant-row.is-active { border-color: var(--sage); box-shadow: 0 0 0 2px var(--sage-soft) inset; }
.tenant-row-name { font-weight: 700; color: var(--ink); font-size: 16px; }
.tenant-row-meta { font-size: 12px; color: var(--ink-soft); }
.tenant-add-btn {
  display: inline-block;
  padding: 11px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  text-align: center;
}
.tenant-add-btn:hover { border-color: var(--sage); color: var(--sage-deep); }
.tenant-limit-note { font-size: 13px; color: var(--ink-soft); text-align: center; }
.tenant-logout { margin-top: 18px; text-align: center; }
.tenant-logout button { background: none; border: 0; color: var(--ink-soft); cursor: pointer; font-size: 13px; text-decoration: underline; }
