/* Tweestapsverificatie: /login/2fa en de 2FA-status bij Gebruikers, prefix tf- — 6-10-2026.
   Bouwt voort op de login-klassen uit furnit.css (login-scherm, login-kaart, formveld, formfout). */

/* ── Account waarmee je inlogt ───────────────────────────────────────────────────────────────── */
.tf-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #FAFAFB;
}
.tf-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--brand-accent);
  color: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.tf-account-tekst { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.tf-account-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.tf-account-tekst strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-account-mail { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-uitloggen { font-size: 12.5px; font-weight: 600; color: var(--brand-accent); white-space: nowrap; }
.tf-uitloggen:hover { text-decoration: underline; }

/* ── Kaart ───────────────────────────────────────────────────────────────────────────────────── */
.tf-scherm .login-kaart h2:focus { outline: none; }
.tf-scherm .login-kaart h2:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 4px; border-radius: 4px; }
.tf-scherm .login-kaart .sub { margin-bottom: 20px; line-height: 1.55; }

.tf-hoofdknop { width: 100%; padding: 12px 22px; }
.tf-scherm .btn-primary:disabled { opacity: .55; cursor: default; }
.tf-scherm .btn-ghost { font-family: inherit; }

.tf-stappen {
  margin: 0 0 22px 18px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}

.tf-klein { font-size: 12.5px; color: var(--text-2); line-height: 1.55; }
.tf-klein a { color: var(--brand-accent); font-weight: 600; }
.tf-klein a:hover { text-decoration: underline; }

/* QR-code en handmatige sleutel */
.tf-qr {
  display: grid;
  place-items: center;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.tf-qr img { width: 184px; height: 184px; display: block; }
.tf-sleutel-blok { margin: 14px 0 18px; }
.tf-sleutel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.tf-sleutel code {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: #F5F6FA;
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: .04em;
  word-break: normal;
  overflow-wrap: anywhere; /* breekt tussen de groepjes van vier, niet midden in een groep */
  user-select: all;
}
.tf-sleutel .btn-ghost { white-space: nowrap; }

/* Code-invoer: groot en goed leesbaar */
.formveld input.tf-code-invoer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  letter-spacing: .35em;
  text-indent: .35em; /* letter-spacing zet ook ruimte na het laatste cijfer; zo staat de code echt in het midden */
  text-align: center;
  padding: 12px 14px;
}
.formveld input.tf-code-invoer::placeholder { color: #D4D4D8; }
.formveld input.tf-herstel-invoer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.formveld input[readonly] { background: #FAFAFB; }

.tf-geldig {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
  line-height: 1.5;
}

.tf-opnieuw { width: 100%; margin-top: 8px; justify-content: center; }

.tf-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--brand-accent);
  cursor: pointer;
}
.tf-link:hover { text-decoration: underline; }

.tf-melding:not(:empty) {
  font-size: 12.5px;
  color: #166534;
  margin: -4px 0 12px;
}

/* Herstelcodes */
.tf-gelukt { margin-bottom: 18px; }
.tf-herstelcodes {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #FAFAFB;
}
.tf-herstelcodes li { text-align: center; }
.tf-herstelcodes code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  letter-spacing: .05em;
}
.tf-knoppen { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tf-vink {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  cursor: pointer;
}
.tf-vink input { width: 16px; height: 16px; accent-color: var(--brand-accent); }
.tf-verder-hint { margin: -8px 0 12px; }

/* Ingelogd met een herstelcode: hoeveel er nog over zijn */
.tf-herstel-over {
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #F5F6FA;
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
}
.tf-herstel-over.laag { background: var(--yellow-bg); border-color: #FCD34D; color: #92400E; }

/* De otpauth-link opent alleen iets op een telefoon; met muis en toetsenbord weglaten */
@media (hover: hover) and (pointer: fine) {
  .tf-alleen-telefoon { display: none; }
}

/* Telefoon: minder witruimte rond de kaart */
@media (max-width: 520px) {
  .tf-scherm .login-rechts { padding: 28px 18px; place-items: start center; }
  .tf-herstelcodes { gap: 6px; padding: 12px; }
  .tf-herstelcodes code { font-size: 12.5px; }
  .tf-sleutel { flex-wrap: wrap; }
  .tf-sleutel code { flex-basis: 100%; }
}

/* ── Gebruikers: 2FA-status ──────────────────────────────────────────────────────────────────── */
.tf-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tf-status::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.tf-status.aan { color: #166534; }
.tf-status.aan::before { background: var(--green); }
.tf-status.uit { color: var(--text-2); }

/* ── Inlogpagina: uitleg voor kantoor ────────────────────────────────────────────────────────── */
.tf-login-hint { margin-top: 14px; }

/* ── Backoffice: melding kort voor 21:00 / 07:00 (TweeFactorWacht) ──────────────────────────── */
.tf-wacht {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 32px);
  padding: 10px 12px 10px 16px;
  border-radius: 12px;
  border: 1px solid #FCD34D;
  background: var(--yellow-bg);
  color: #92400E;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
}
.tf-wacht .btn-ghost { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 520px) {
  .tf-wacht { left: 16px; right: 16px; transform: none; max-width: none; flex-wrap: wrap; }
}
