/* ─────────────────────────────────────────────────────────────────────────────
   IVB Netwerk — auth-base.css  (PORTAL-REMAKE fase A, 2026-10-12)
   Gedeelde basis voor index/login/register/wachtwoord-vergeten.
   Bouwt op design-tokens.css (v1): alleen --ivb- tokens; dark mode via
   prefers-color-scheme (tokenwaarden flippen automatisch), 900px/480px.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Scherm: merkgradiënt-scène met gloed ── */
body.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  background:
    radial-gradient(1000px 620px at 85% -10%, rgba(20, 165, 232, .28), transparent 62%),
    radial-gradient(900px 560px at -12% 108%, rgba(0, 87, 194, .34), transparent 60%),
    linear-gradient(155deg, var(--ivb-brand-dark) 0%, var(--ivb-brand) 52%, var(--ivb-accent) 100%);
  padding: var(--ivb-s5) var(--ivb-s4);
  color: var(--ivb-ink);
  font-family: 'Inter', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  body.auth-shell {
    background:
      radial-gradient(1000px 620px at 85% -10%, rgba(20, 165, 232, .20), transparent 62%),
      radial-gradient(900px 560px at -12% 108%, rgba(0, 87, 194, .30), transparent 60%),
      linear-gradient(155deg, #081b33 0%, var(--ivb-brand-dark) 55%, #0a5fa9 100%);
  }
}

/* ── Split-card: links brand-paneel, rechts form-paneel ── */
.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  max-width: 1020px;
  width: 100%;
  margin: auto;
  background: var(--ivb-card);
  border: 1px solid var(--ivb-border);
  border-radius: var(--ivb-r3);
  box-shadow: 0 24px 70px rgba(4, 32, 72, .38);
  overflow: hidden;
  min-height: 560px;
}

/* ── Brand-paneel (links): gradiënt + orb-decor + USP's ── */
.auth-brand {
  position: relative;
  padding: var(--ivb-s7) var(--ivb-s6);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--ivb-s5);
  background:
    radial-gradient(420px 300px at 82% 8%, rgba(255, 255, 255, .14), transparent 60%),
    linear-gradient(160deg, var(--ivb-brand-dark) 0%, var(--ivb-brand) 60%, #0a6ad0 100%);
  overflow: hidden;
}

.auth-brand::before,
.auth-brand::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.auth-brand::before {
  width: 260px; height: 260px; right: -80px; top: -80px;
  background: rgba(255, 255, 255, .09);
  box-shadow: 0 0 60px rgba(255, 255, 255, .08);
}
.auth-brand::after {
  width: 170px; height: 170px; right: 36px; bottom: 12%;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, .18);
}

/* Decoratieve netwerk-dots (merk: hosting/netwerk) */
.auth-brand-dots {
  position: absolute;
  right: 6px; top: 46%;
  display: grid;
  grid-template-columns: repeat(3, 10px);
  gap: 14px;
  opacity: .55;
  pointer-events: none;
}
.auth-brand-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .55); }

/* Merk-identiteit */
.auth-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.auth-logo-img { width: 42px; height: 42px; border-radius: 10px; box-shadow: 0 6px 18px rgba(4, 32, 72, .3); }
.auth-logo-t { font-size: 1.06rem; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.auth-logo-sub {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}

/* Brand-claim + USP-lijst */
.auth-claim {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -.02em;
  margin: 0 0 var(--ivb-s3);
  color: #fff;
}
.auth-usps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ivb-s3); }
.auth-usps li { display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 600; color: rgba(255, 255, 255, .92); }
.auth-usps svg { flex: 0 0 auto; }

/* Stat-chip onderaan brand-paneel */
.auth-statchip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  align-self: flex-start;
  padding: var(--ivb-s2) var(--ivb-s4);
  border-radius: var(--ivb-r-pill);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: .8rem;
  color: rgba(255, 255, 255, .88);
}
.auth-statchip b { font-family: 'JetBrains Mono', monospace; font-size: 1rem; color: #fff; }

/* ── Form-paneel (rechts) ── */
.auth-panel {
  padding: var(--ivb-s6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ivb-card);
}
.auth-panel h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ivb-ink);
  margin: 0 0 var(--ivb-s1);
}
.auth-sub { color: var(--ivb-ink-muted); font-size: .92rem; margin: 0 0 var(--ivb-s5); }

/* ── Formuliervelden ── */
.auth-field { margin-bottom: var(--ivb-s4); }
.auth-label { display: block; font-size: .82rem; font-weight: 700; color: var(--ivb-ink); margin-bottom: 6px; }
.auth-label .hint { font-weight: 500; color: var(--ivb-ink-faint); }

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1.5px solid var(--ivb-border-strong);
  border-radius: var(--ivb-r1);
  background: var(--ivb-bg);
  color: var(--ivb-ink);
  font-size: .95rem;
  font-family: inherit;
  transition: border-color var(--ivb-speed), box-shadow var(--ivb-speed), background var(--ivb-speed);
}
.auth-input::placeholder { color: var(--ivb-ink-faint); }
.auth-input:focus {
  outline: none;
  border-color: var(--ivb-accent);
  box-shadow: 0 0 0 4px rgba(20, 165, 232, .16);
  background: var(--ivb-card);
}
.auth-input:disabled { opacity: .6; }
.auth-input.is-invalid { border-color: var(--ivb-err); }
.auth-input.is-valid { border-color: var(--ivb-ok); }

/* Veldvalidatie-meldingen (client-side, geen flow-impact) */
.auth-msg { display: block; min-height: 17px; margin-top: 5px; font-size: .76rem; font-weight: 600; }
.auth-msg.is-err { color: var(--ivb-err); }
.auth-msg.is-ok { color: var(--ivb-ok); }
.auth-msg.is-hint { color: var(--ivb-ink-faint); font-weight: 500; }

/* Wachtwoord-toggle (show/hide) */
.auth-pwwrap { position: relative; }
.auth-pwwrap .auth-input { padding-right: 46px; }
.auth-pw-toggle {
  position: absolute;
  right: 6px; top: 2px;
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  border-radius: var(--ivb-r1);
  color: var(--ivb-ink-faint);
  cursor: pointer;
}
.auth-pw-toggle:hover { color: var(--ivb-ink); background: var(--ivb-bg); }
.auth-pw-toggle:focus-visible { outline: 2px solid var(--ivb-accent); outline-offset: 2px; }

/* Wachtwoord-sterkte-meter (register) */
.auth-pw-meter { display: flex; gap: 4px; margin-top: 6px; }
.auth-pw-meter i { height: 3px; flex: 1 1 0; border-radius: 2px; background: var(--ivb-border); transition: background var(--ivb-speed); }
.auth-pw-meter i.weak { background: var(--ivb-err); }
.auth-pw-meter i.mid { background: var(--ivb-warn); }
.auth-pw-meter i.on { background: var(--ivb-ok); }

/* Checkbox-rij */
.auth-check { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 var(--ivb-s4); }
.auth-check input[type="checkbox"] { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--ivb-brand); flex: 0 0 auto; }
.auth-check label { font-size: .83rem; color: var(--ivb-ink-muted); line-height: 1.45; cursor: pointer; }

/* ── Hoofd-CTA (submit) + loading-state ── */
.auth-cta {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 20px;
  border: 0;
  border-radius: var(--ivb-r-pill);
  font-size: .95rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(120deg, var(--ivb-brand), var(--ivb-accent));
  box-shadow: 0 4px 14px rgba(0, 87, 194, .32);
  transition: box-shadow var(--ivb-speed), transform var(--ivb-speed), filter var(--ivb-speed);
}
.auth-cta:hover { filter: brightness(1.06); box-shadow: 0 6px 20px rgba(0, 87, 194, .42); transform: translateY(-1px); }
.auth-cta:active { transform: translateY(0) scale(.985); }
.auth-cta:focus-visible { outline: 2px solid var(--ivb-accent); outline-offset: 3px; }
.auth-cta[disabled] { opacity: .62; cursor: not-allowed; transform: none; }

.auth-cta.is-loading { pointer-events: none; opacity: .85; }
.auth-cta .spinner {
  width: 17px; height: 17px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
  display: none;
}
.auth-cta.is-loading .spinner { display: inline-block; }
.auth-cta .cta-label-loading { display: none; }
.auth-cta.is-loading .cta-label-idle { display: none; }
.auth-cta.is-loading .cta-label-loading { display: inline; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* Ghost-/secundaire knop */
.auth-ghost {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1.5px solid var(--ivb-border-strong);
  border-radius: var(--ivb-r-pill);
  background: var(--ivb-card);
  color: var(--ivb-ink-muted);
  font-size: .88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--ivb-speed), border-color var(--ivb-speed), background var(--ivb-speed);
}
.auth-ghost:hover { color: var(--ivb-brand); border-color: var(--ivb-accent); background: var(--ivb-brand-light); }

/* ── 2FA-code-input (monospaced, gecentreerd) ── */
.auth-code {
  text-align: center;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 10px;
  font-family: 'JetBrains Mono', monospace;
  padding: 12px 14px 12px 26px;
}

/* ── OTP-vakjes (6-digit mailcode; echte input blijft name="code") ── */
.otp-boxes { display: flex; gap: 8px; justify-content: center; }
.otp-boxes span {
  width: 44px; height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ivb-border-strong);
  border-radius: var(--ivb-r1);
  background: var(--ivb-bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ivb-ink);
  transition: border-color var(--ivb-speed), box-shadow var(--ivb-speed), background var(--ivb-speed);
}
.otp-boxes span.otp-focus { border-color: var(--ivb-accent); box-shadow: 0 0 0 3px rgba(20, 165, 232, .16); background: var(--ivb-card); }
.otp-boxes span.otp-filled { border-color: var(--ivb-brand); }

/* ── Meldingen (server + client flash) ── */
.auth-alert {
  border-radius: var(--ivb-r2);
  padding: 12px 14px;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 var(--ivb-s4);
  display: flex;
  gap: 9px;
  align-items: flex-start;
  border: 1px solid transparent;
}
.auth-alert svg { flex: 0 0 auto; margin-top: 2px; }
.auth-alert--error { background: var(--ivb-err-light); color: #b02a2a; border-color: #f5d5d5; }
.auth-alert--success { background: var(--ivb-ok-light); color: #0a6b40; border-color: #cdeedd; }
.auth-alert--info { background: var(--ivb-brand-light); color: var(--ivb-brand-dark); border-color: #c8ddf6; }
@media (prefers-color-scheme: dark) {
  .auth-alert--error { color: var(--ivb-err); border-color: var(--ivb-border-strong); }
  .auth-alert--success { color: var(--ivb-ok); border-color: var(--ivb-border-strong); }
  .auth-alert--info { color: #8db9f5; border-color: var(--ivb-border-strong); }
}
.auth-alert b { font-weight: 800; }
.auth-alert .auth-alert-code {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 4px 0 8px;
}

/* ── Links/voetniveaus ── */
.auth-links { display: flex; justify-content: space-between; align-items: center; gap: var(--ivb-s3); margin-top: var(--ivb-s4); font-size: .83rem; }
.auth-links a { color: var(--ivb-brand); font-weight: 700; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-foot {
  margin-top: var(--ivb-s5);
  padding-top: var(--ivb-s4);
  border-top: 1px solid var(--ivb-border);
  text-align: center;
  font-size: .83rem;
  color: var(--ivb-ink-muted);
}
.auth-foot a { color: var(--ivb-brand); font-weight: 700; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* Paginavoet binnen de scène */
.auth-page-foot {
  grid-row: 2;
  width: 100%;
  max-width: 1020px;
  margin: var(--ivb-s4) auto 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ivb-s2) var(--ivb-s4);
  font-size: .72rem;
  color: rgba(255, 255, 255, .68);
}
.auth-page-foot a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.auth-page-foot a:hover { text-decoration: underline; }
.auth-page-foot .foot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: var(--ivb-r-pill);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  font-weight: 700;
  font-size: .66rem;
  letter-spacing: .1em;
  color: #fff;
}

/* ── 2FA-informatiekaart ── */
.auth-2fa-card {
  border: 1px solid var(--ivb-border);
  border-radius: var(--ivb-r2);
  background: var(--ivb-bg);
  padding: var(--ivb-s4);
  margin-bottom: var(--ivb-s4);
}
.auth-2fa-icoon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--ivb-r2);
  background: var(--ivb-brand-light);
  color: var(--ivb-brand-dark);
  margin-bottom: var(--ivb-s2);
}
.auth-2fa-mail { font-size: .8rem; color: var(--ivb-ink-muted); margin: 4px 0 0; }

/* Honeypot (register) — verbergen via inline-style in de markup */

/* ── Responsive: 900px alleen form-paneel; 480px compact ── */
@media (min-width: 901px) {
  .auth-logo-mobile { display: none; }
}
@media (max-width: 900px) {
  .auth-panel h1 { margin-top: var(--ivb-s2); }
}
@media (max-width: 900px) {
  .auth-card { grid-template-columns: 1fr; min-height: 0; max-width: 480px; }
  .auth-brand { display: none; }
}
@media (max-width: 480px) {
  body.auth-shell { padding: var(--ivb-s3) var(--ivb-s2) var(--ivb-s4); }
  .auth-panel { padding: var(--ivb-s5) var(--ivb-s3); }
  .auth-panel h1 { font-size: 1.28rem; }
  .auth-claim { font-size: 1.3rem; }
  .otp-boxes { gap: 6px; }
  .otp-boxes span { width: 40px; height: 50px; font-size: 1.3rem; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .auth-cta, .otp-boxes span, .auth-input, .auth-pw-meter i { transition: none; }
  .auth-cta .spinner { animation-duration: 1.6s; }
}