/* MediaPoint Transportal® — rustig, vertrouwenwekkend, geen franje.
   Geen externe fonts of CDN's: alles valt binnen de CSP ('self').

   Dit bestand wijkt bewust af van de bevroren kopie in
   reference/public/assets/style.css: huisstijl-fonts en -kleuren, een
   navigatiebalk en een aantal componenten die de referentie niet had.
   Element-id's en classes uit de referentie zijn ongewijzigd, dus het
   e2e-contract blijft staan.

   De fonts staan lokaal in /assets/fonts als woff2. Ze komen dus niet van
   Google Fonts of een ander CDN: de CSP staat alleen 'self' toe. */

@font-face { font-family: "Google Sans Flex"; src: url("/assets/fonts/google-sans-flex-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Google Sans Flex"; src: url("/assets/fonts/google-sans-flex-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Google Sans Flex"; src: url("/assets/fonts/google-sans-flex-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Google Sans Flex"; src: url("/assets/fonts/google-sans-flex-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Google Sans Flex"; src: url("/assets/fonts/google-sans-flex-900.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

/* ------------------------------------------------------------------ */
/* Huisstijl MediaPoint                                                */
/*                                                                    */
/* De contrastverhoudingen zijn nagerekend tegen WCAG AA (4,5:1 voor  */
/* normale tekst). Het merkcyaan #009fcc haalt met witte tekst maar   */
/* 3,1:1 en is dus onbruikbaar als knopkleur. Vandaar twee tinten van */
/* dezelfde kleur: het lichte cyaan voor het merk en decoratie, een   */
/* donkerder variant zodra er witte tekst op moet.                    */
/* ------------------------------------------------------------------ */

:root {
  /* Rechtstreeks uit het aangeleverde logobestand bemonsterd: #009fcc
     is de kleur van de letters, #da6638 die van de punt op de i. */
  --brand: #009fcc;
  --brand-warm: #da6638;

  --bg: #f2f0eb;
  --bg-glow: #fbfaf7;
  --ink: #14181c;          /* 15,7:1 op de achtergrond */
  --muted: #5c6469;        /* 5,3:1 — leesbaar, niet flets */
  --line: #e2dfd9;
  --line-strong: #cfcac2;
  --card: #ffffff;

  --accent: #006a88;       /* 6,2:1 met wit — links en accenten */
  --accent-dark: #005c76;
  --accent-bg: #e6f4f9;
  --knop: #14181c;         /* 17,8:1 met wit */
  --knop-hover: #2a3138;

  --veld: #fafaf8;
  --zone: #f4fafd;
  --zone-line: #b9dcef;

  --error-bg: #fdeeec;
  --error-ink: #a33227;
  --error-line: #f0c7c1;
  --ok: #176641;
  --ok-bg: #dcf3e3;
  --warn-ink: #7a4a1f;
  --warn-bg: #f7ece0;

  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 28, .05), 0 12px 32px -18px rgba(20, 24, 28, .16);
  --focus: 0 0 0 3px rgba(0, 159, 204, .45);
}

/* ------------------------------------------------------------------ */
/* Basis                                                               */
/* ------------------------------------------------------------------ */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: radial-gradient(1100px 520px at 50% -8%, var(--bg-glow), var(--bg) 62%) fixed;
  color: var(--ink);
  font: 16px/1.55 "Google Sans Flex", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }

[hidden] { display: none !important; }

/* Toetsenbordgebruikers: eerst naar de inhoud, niet door de navigatie. */
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { left: 8px; }

/* Alleen voor schermlezers (kolomkop zonder zichtbare tekst). */
.vh {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  /* clip-path naast het oude clip: zonder deze regel telt de verborgen
     tekst nog mee voor de scrollbreedte van de pagina. */
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 24px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
/* Inloggen, verificatie en foutpagina's: één formulier, smal, en het
   geheel verticaal gecentreerd met het logo erboven in het midden. De
   voet houdt margin-top:auto; door de kop óók auto te geven verdeelt de
   vrije ruimte zich boven en onder het blok. */
.shell.narrow { max-width: 480px; }
.shell.narrow .top {
  margin-top: auto;
  justify-content: center;
  margin-bottom: 22px;
}
.shell.narrow .brand-logo { height: 48px; }
.shell.narrow .brand-name { display: none; }

/* Vóór het inloggen staat het merk in het witte vlak zelf: <main> is dan
   de kaart en de .card erbinnen zakt terug tot gewone inhoud. De klasse
   .card blijft staan — de e2e-tests rekenen op die opbouw. */
.shell.merk-in-kaart main {
  margin-top: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px 26px 28px;
}
.shell.merk-in-kaart .top {
  margin-top: 0;
  margin-bottom: 24px;
}
.shell.merk-in-kaart .card {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.shell.merk-in-kaart .card + .card { margin-top: 24px; }

/* Foto achter het inlogscherm (alleen vóór het inloggen). */
.achtergrond {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}
.met-achtergrond .shell.merk-in-kaart main {
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .55);
}
.met-achtergrond .foot {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}

/* Een los formulier op een breed scherm: velden niet over de volle
   1200 px uitrekken, dat leest slecht en oogt leeg. */
.form-slim { max-width: 560px; }

/* ------------------------------------------------------------------ */
/* Kop: merk en navigatie                                              */
/* ------------------------------------------------------------------ */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.brand-logo {
  display: block;
  height: 32px;
  width: auto;
  /* Bronbestand is 217x84; op 32px hoog blijft er ook op een
     retina-scherm genoeg resolutie over. */
}
.brand-name {
  font-weight: 500;
  color: var(--muted);
  padding-left: 12px;
  margin-left: 2px;
  border-left: 1px solid var(--line);
  letter-spacing: .01em;
  white-space: nowrap;
}

.topnav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 14.5px;
}
.topnav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.topnav a:hover { background: rgba(20, 24, 28, .06); }
.topnav a[aria-current="page"] {
  background: var(--ink);
  color: #fff;
}
.topnav .count {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand-warm);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.topnav a[aria-current="page"] .count { background: #fff; color: var(--ink); }
.topnav .who {
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topnav .inlineform { margin-left: 4px; }

/* ------------------------------------------------------------------ */
/* Kaart en typografie                                                 */
/* ------------------------------------------------------------------ */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow);
}
.card.center { text-align: center; }
.card + .card { margin-top: 18px; }

h1 {
  font-size: 22px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h2 {
  font-size: 16px;
  margin: 30px 0 10px;
}
h2:first-child { margin-top: 0; }
.h2-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 30px 0 10px;
}
.h2-row h2 { margin: 0; }
.h2-row .hint { margin: 0; }

.intro { color: var(--muted); margin: 0 0 18px; }
.hint  { color: var(--muted); font-size: 13.5px; margin: 10px 0 16px; }
.hint:last-child { margin-bottom: 0; }

.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: .06em;
}
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ */
/* Formulieren                                                         */
/* ------------------------------------------------------------------ */

label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  margin: 14px 0 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  color: inherit;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--veld);
}
input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible,
.dropzone:focus-within {
  outline: none;
  box-shadow: var(--focus);
}

/* Eigen pijl, zodat de keuzelijst niet als kale systeemwidget uit de
   vormgeving valt. Als los bestand en niet als data:-URI: de CSP heeft
   geen img-src en valt terug op default-src 'self', en daar hoort een
   data:-URI niet bij. */
select {
  appearance: none;
  background-image: url("/assets/select-arrow.svg");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  padding-right: 34px;
}

.code-input {
  font-size: 26px;
  letter-spacing: .4em;
  text-align: center;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Knoppen. De hoofdknop van een formulier is de enige die de volle
   breedte krijgt; alle andere zijn compact. */
.btn,
form > button[type="submit"]:not(.btn):not(.linklike):not(.iconknop) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--knop);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.3;
}
form > button[type="submit"]:not(.btn):not(.linklike):not(.iconknop) {
  width: 100%;
  margin-top: 18px;
  padding: 12px 16px;
  /* Een knop over de volle breedte hoeft niet op één regel: nowrap laat
     een lang label de pagina zijwaarts oprekken op een smalle telefoon. */
  white-space: normal;
}
.btn:hover:not(:disabled),
form > button[type="submit"]:not(.btn):not(.linklike):not(.iconknop):hover:not(:disabled) { background: var(--knop-hover); color: #fff; }
.btn:disabled,
form > button[type="submit"]:disabled { opacity: .55; cursor: progress; }

.btn-secondary {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover:not(:disabled) { background: var(--veld); color: var(--ink); border-color: var(--muted); }

.btn-danger { background: var(--error-ink); }
.btn-danger:hover:not(:disabled) { background: #8a2a21; }

.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }

/* Icoonlink in de navigatie (instellingen) */
.topnav a.iconlink { padding: 7px; }
.topnav a.iconlink svg { display: block; }

/* Icoonknop (uitloggen) */
.iconknop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.iconknop:hover { background: rgba(20, 24, 28, .06); color: var(--ink); }
.iconknop svg { display: block; }

/* Zoekveld boven de accountlijst */
.zoekform {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.zoekform input[type="search"] {
  flex: 1;
  max-width: 420px;
  padding: 9px 12px;
  font: inherit;
  color: inherit;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--veld);
}

/* Pagina met losse kaarten (instellingen) */
.paginakop { margin: 4px 0 16px; }
.paginakop .intro { margin-bottom: 0; }
.kaarten {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.kaarten .card { margin: 0; }
.kaart-breed { grid-column: 1 / -1; }
.kaarten h3 { font-size: 14.5px; margin: 6px 0 8px; }
.kaarten .kolommen { margin-top: 6px; }
.kaarten .kolommen h3:first-child { margin-top: 0; }
.achtergrond-voorbeeld img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
#logoform .dropzone, #achtergrondform .dropzone,
#faviconform .dropzone, #klanticoonform .dropzone { margin-top: 12px; padding: 18px 16px; }

/* Aanleverpagina: formulier links, uitleg rechts */
.kolommen-upload { grid-template-columns: 1.1fr .9fr; margin-top: 0; }
.uitleg {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--veld);
  border: 1px solid var(--line);
  font-size: 14.5px;
}
.uitleg h2 { margin: 18px 0 8px; font-size: 14.5px; }
.uitleg h2:first-child { margin-top: 0; }
.stappen { margin: 0; padding-left: 22px; }
.stappen li { margin-bottom: 8px; }
.stappen strong { display: block; }
.typen { margin: 0 0 6px; line-height: 2; }

/* Favicon- en icoonvoorbeeld in het beheer */
.favicon-rij { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.favicon-voorbeeld {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}
.icoon-voorbeeld {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 4px;
}
.icoon-voorbeeld img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.kaarten-drie { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 0; }

/* Klantlogo naast een naam, en op de detailpagina */
.mini-logo {
  height: 18px;
  width: auto;
  max-width: 60px;
  vertical-align: -4px;
  margin-right: 7px;
  border-radius: 3px;
}
.who-logo { height: 20px; width: auto; max-width: 70px; vertical-align: -5px; margin-right: 7px; }
/* Een vierkant icoon mag groter dan een breed logo: op 18 pixels hoog
   blijft van een vierkantje niets over. */
.mini-icoon { height: 22px; width: 22px; max-width: 22px; object-fit: cover; border-radius: 5px; vertical-align: -6px; }
.accountlink { color: inherit; text-decoration: none; }
.accountlink:hover .mono { text-decoration: underline; }
.account-kop {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 6px;
}
.account-kop h1 { margin-bottom: 2px; }
.account-kop .intro { margin-bottom: 0; }
.account-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 200px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.feiten-een { grid-template-columns: 1fr; }
.feiten-een .account-logo { height: 40px; }
.bevestig input[type="text"] {
  width: 100%;
  max-width: 360px;
  padding: 10px 12px;
  font: inherit;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .06em;
  border: 1px solid var(--error-ink);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 12px;
}
.bevestig label { margin-top: 6px; }
.foot .reg { font-size: 10px; vertical-align: super; }
.foot-maker .reg { font-size: 5px; }

/* Logo-instellingen */
.logo-rij {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 12px 0 4px;
}
.logo-voorbeeld {
  flex: none;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.logo-voorbeeld img { display: block; height: 32px; width: auto; }
.logo-rij .hint { margin: 0; }
#logoform .dropzone, #faviconform .dropzone, #klanticoonform .dropzone { margin-top: 12px; padding: 18px 16px; }

/* Tekstknop (uitloggen, annuleren) */
.inlineform { margin: 0; display: inline-block; vertical-align: middle; }
.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.linklike:hover { color: var(--ink); }

.btnlink {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  font-weight: 700;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 18px;
}

/* Bestandskeuze: klikken óf slepen. */
.dropzone {
  position: relative;
  display: block;
  margin-top: 16px;
  padding: 28px 16px;
  border: 1.5px dashed var(--zone-line);
  border-radius: var(--radius);
  background: var(--zone);
  text-align: center;
  cursor: pointer;
  transition: border-color .12s, background-color .12s;
}
.dropzone:hover { border-color: var(--accent); }
.dropzone.is-dragover {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-bg);
}
.dropzone.has-file { border-style: solid; border-color: var(--zone-line); }
/* Op de aanleverpagina is dit dé handeling van het scherm; daar mag het
   vak ruimer dan het logo-vakje in de instellingen. */
#uploadform .dropzone { padding: 40px 16px; }
.dropzone input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
}
.dz-title { display: block; font-weight: 700; }
.dz-sub   { display: block; color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.has-file .dz-sub { color: var(--ink); font-weight: 500; }

/* Voortgang van een upload (alleen met JavaScript). */
.progress { margin-top: 18px; }
.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width .15s linear;
}
.progress-text {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* Aanvinkregel met uitleg eronder. */
.keuze {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 6px;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
}
.keuze input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex: none;
}
.keuze .dz-sub { margin-top: 2px; }

/* Inklapbaar blok (nieuw account). */
.disclosure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 26px;
}
.disclosure > summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: var(--radius);
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after {
  content: "";
  width: 9px; height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .12s;
  flex: none;
  margin-right: 4px;
}
.disclosure[open] > summary::after { transform: rotate(-135deg); }
.disclosure[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.disclosure .inner { padding: 4px 16px 18px; }
.disclosure .inner > label:first-child { margin-top: 10px; }

/* ------------------------------------------------------------------ */
/* Meldingen                                                           */
/* ------------------------------------------------------------------ */

.error {
  background: var(--error-bg);
  color: var(--error-ink);
  border: 1px solid var(--error-line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14.5px;
  margin: 0 0 16px;
}
.flash {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid #bfe5cc;
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14.5px;
  margin: 0 0 16px;
}
.notice {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid #e8d3bb;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14.5px;
  margin: 0 0 18px;
}
.notice p { margin: 0; }
.notice p + p { margin-top: 6px; }

.empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

/* Welkom bovenaan de schermen van de klant: naam en logo, binnen de
   kaart en met een streep eronder, zodat het een kop is en geen los
   blokje dat boven de kaart zweeft. */
.welkom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.welkom-tekst { min-width: 0; }
.welkom-logo {
  flex: none;
  height: auto;
  max-height: 52px;
  max-width: 180px;
  width: auto;
  border-radius: var(--radius);
}
.welkom-groet {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.welkom-tekst .dz-sub { margin-top: 2px; }
@media (max-width: 520px) {
  .welkom { gap: 12px; }
  .welkom-tekst { order: 2; }
  .welkom-logo { max-height: 40px; max-width: 120px; }
  .welkom-groet { font-size: 17px; }
}

/* Klaarzetten: klant zoeken met suggesties, en de gekozen klant ernaast */
.klantkiezer { position: relative; }
.klantzoek { width: 100%; }
.suggesties {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 300px;
  overflow-y: auto;
}
.suggestie {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14.5px;
}
.suggestie.is-actief { background: var(--veld); }
.suggestie-naam { font-weight: 500; }
.suggestie-sub { color: var(--muted); font-size: 13px; }
.suggestie-geen { padding: 10px; color: var(--muted); font-size: 14.5px; }

.klantkaart {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  align-self: start;
}
.klantkaart-leeg { margin: 0; color: var(--muted); font-size: 14.5px; }
.klantkaart-logo {
  display: block;
  max-height: 72px;
  max-width: 100%;
  width: auto;
  margin-bottom: 14px;
}
.klantkaart-naam {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.klantkaart .dz-sub { display: block; margin-top: 2px; }

/* Sleutelbeheer: stand van zaken als label/waarde-tabel */
.kv { width: 100%; border-collapse: collapse; margin-top: 4px; }
.kv th {
  width: 150px;
  padding: 9px 12px 9px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
  text-align: left;
  vertical-align: top;
}
.kv td { padding: 9px 0; border-top: 1px solid var(--line); vertical-align: top; }
.afdruk {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 14px;
  letter-spacing: .04em;
}
.sleutelpunten { margin: 14px 0 20px; padding-left: 22px; font-size: 14.5px; }
.sleutelpunten li { margin-bottom: 8px; }
#sleutelstatus:empty { display: none; }
#sleutelstatus.bezig { color: var(--muted); }
#sleutelstatus.fout { color: var(--error-ink); }
@media (max-width: 640px) {
  .kv th { display: block; width: auto; padding-bottom: 0; border-top: 0; }
  .kv td { display: block; border-top: 0; padding-top: 2px; }
  .kv tr + tr th { border-top: 1px solid var(--line); padding-top: 10px; }
}

/* Bevestiging bij meerdere bestanden tegelijk */
.ontvangen-kop {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.ontvangen-kop h1 { margin-bottom: 4px; }
.ontvangen-kop .check { flex: none; margin: 2px 0 0; }
.knoprij {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
td .ref { font-size: 14.5px; }

/* Status- en rolbadges */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-actief { background: var(--ok-bg); color: var(--ok); }
.badge-geblokkeerd { background: var(--error-bg); color: var(--error-ink); }
.badge-uploader { background: var(--accent-bg); color: var(--accent); }
.badge-ophaler { background: var(--ok-bg); color: var(--ok); }
.badge-beheerder { background: var(--warn-bg); color: var(--warn-ink); }
.badge-nognietopgehaald { background: var(--bg); color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Bevestiging en referentie                                           */
/* ------------------------------------------------------------------ */

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 6px 16px -6px rgba(0, 106, 136, .5);
  color: #fff;
  font-size: 22px;
  margin-bottom: 10px;
}
.ref-label {
  margin: 20px 0 4px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.ref {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 26px;
  letter-spacing: .12em;
  margin: 0 0 6px;
  word-break: break-all;
}
.ref-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ref-row .ref { margin: 0; }

/* Eenmalig getoond geheim en het sleutelblok van de ophaler */
.keybox {
  border: 1px solid var(--zone-line);
  border-radius: var(--radius);
  padding: 14px 16px 12px;
  background: var(--zone);
  margin: 4px 0 20px;
}
.keybox label { margin-top: 0; }
.keybox input[type="file"] { margin-top: 8px; width: 100%; font: inherit; font-size: 14px; }
.keybox .ref { font-size: 20px; }
.keybox .ref-label { margin-top: 12px; }

.qr-rij { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.qr {
  background: #fff;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 0;
}
.qr svg { display: block; width: 190px; height: 190px; }

/* Bevestiging vóór een ingrijpende beheerhandeling. */
.bevestig {
  border: 1px solid var(--error-ink);
  background: var(--error-bg);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 4px 0 22px;
}
.bevestig h2 { margin: 0 0 8px; font-size: 17px; }
.bevestig p { margin: 0 0 10px; }
.bevestig-acties { display: flex; align-items: center; gap: 14px; margin-top: 4px; flex-wrap: wrap; }
.bevestig-acties .inlineform { margin: 0; }
button.gevaar { background: var(--error-ink); }
button.gevaar:hover:not(:disabled) { background: #8a2a21; }

/* ------------------------------------------------------------------ */
/* Tabellen                                                            */
/* ------------------------------------------------------------------ */

.tablewrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 0 -8px;
  padding: 0 8px;
  /* De wikkel is het scrollvlak; de absoluut gepositioneerde .vh erin
     hoort daarbinnen te blijven. */
  position: relative;
}
table.files {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
table.files th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
table.files td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.files tbody tr:hover td { background: var(--veld); }
table.files td.num, table.files th.num { text-align: right; }
table.files td.mono { white-space: nowrap; }
/* Een gebruikersnaam breekt niet middenin: "drukkerij.pieterse / n" leest
   als een fout, en de tabel kan zelf schuiven als het echt niet past. */
table.files td.naam .mono { white-space: nowrap; }
table.files .naam { word-break: break-word; min-width: 160px; }
table.files td .dz-sub { margin-top: 1px; }

/* Compacte formulieren in tabelrijen. */
table.files td .inlineform { margin: 0 4px 0 0; }
table.files td .inlineform button { margin-top: 0; }
.inlineform select {
  width: auto;
  padding: 6px 28px 6px 9px;
  font-size: 13px;
  background-position: right 8px center;
}
.acties, .rolcel { white-space: nowrap; }
.acties .inlineform + .inlineform { margin-left: 2px; }

button.decrypt {
  padding: 8px 12px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: var(--knop);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
button.decrypt:hover:not(:disabled) { background: var(--knop-hover); }
button.decrypt:disabled { opacity: .45; cursor: not-allowed; }

/* ------------------------------------------------------------------ */
/* Dashboard                                                           */
/* ------------------------------------------------------------------ */

.tegels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 4px 0 8px;
}
.tegel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--veld);
}
.tegel-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.tegel-waarde {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.tegel-sub { font-size: 13px; color: var(--muted); }

.kolommen {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  margin-top: 10px;
}
/* Een grid-item is standaard min-width:auto en krimpt dus niet onder de
   breedte van zijn inhoud — dan scrollt de pagina zijwaarts op een
   telefoon. Dit is de reden dat het dashboard te breed was. */
.kolommen > *, .kaarten > *, .tegels > *, .serverblok > * { min-width: 0; }
.kolommen h2:first-child { margin-top: 30px; }
.kolommen > div > .h2-row:first-child { margin-top: 30px; }

/* Staafdiagram: één reeks, dunne staven, afgeronde bovenkant, geen
   raster. Hoogte via data-hoogte + CSS in stappen van 5%: inline style
   mag niet van de CSP. De waarde zelf zit in title (hover) en in de
   verborgen tabel eronder. */
.staven {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  padding: 0 2px 4px;
  border-bottom: 1px solid var(--line-strong);
}
.staaf {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}
.staaf-balk {
  display: block;
  width: 100%;
  max-width: 28px;
  min-height: 2px;
  height: 2px;
  border-radius: 4px 4px 0 0;
  background: var(--accent);
}
.staaf-balk.is-max { background: var(--brand-warm); }
.staaf-dag {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.staaf-balk[data-hoogte="0"] { background: var(--line); }
.staaf-balk[data-hoogte="5"] { height: 5%; }  .staaf-balk[data-hoogte="10"] { height: 10%; }
.staaf-balk[data-hoogte="15"] { height: 15%; } .staaf-balk[data-hoogte="20"] { height: 20%; }
.staaf-balk[data-hoogte="25"] { height: 25%; } .staaf-balk[data-hoogte="30"] { height: 30%; }
.staaf-balk[data-hoogte="35"] { height: 35%; } .staaf-balk[data-hoogte="40"] { height: 40%; }
.staaf-balk[data-hoogte="45"] { height: 45%; } .staaf-balk[data-hoogte="50"] { height: 50%; }
.staaf-balk[data-hoogte="55"] { height: 55%; } .staaf-balk[data-hoogte="60"] { height: 60%; }
.staaf-balk[data-hoogte="65"] { height: 65%; } .staaf-balk[data-hoogte="70"] { height: 70%; }
.staaf-balk[data-hoogte="75"] { height: 75%; } .staaf-balk[data-hoogte="80"] { height: 80%; }
.staaf-balk[data-hoogte="85"] { height: 85%; } .staaf-balk[data-hoogte="90"] { height: 90%; }
.staaf-balk[data-hoogte="95"] { height: 95%; } .staaf-balk[data-hoogte="100"] { height: 100%; }
/* De tabelversie van het staafdiagram, alleen voor schermlezers. Het
   moet table.vh-table zijn en niet .vh-table: table.files zet width:100%
   met een hogere specificiteit, en dan stond die "verborgen" tabel toch
   op volle breedte de pagina zijwaarts op te rekken. */
table.vh-table {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.feiten {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin: 0;
}
.feiten > div {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.feiten dt { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.feiten dd { margin: 0; font-weight: 500; }
.feiten dd .dz-sub { display: block; font-weight: 400; }

.activiteiten {
  list-style: none;
  margin: 0;
  padding: 0;
}
.act {
  display: flex;
  gap: 12px;
  padding: 9px 0 9px 12px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
}
.act-tijd { flex: none; width: 74px; color: var(--muted); font-size: 13px; padding-top: 2px; }
.act-dag { display: block; color: var(--ink); font-weight: 500; }
.act-body { display: flex; flex-direction: column; min-width: 0; }
.act-label { font-weight: 500; }
.act-body .dz-sub { word-break: break-word; }
.act-let-op { border-left-color: var(--brand-warm); }
.act-kritiek { border-left-color: var(--error-ink); }
.act-kritiek .act-label { color: var(--error-ink); }

/* Servergegevens onderaan het dashboard */
/* Vaste servergegevens: label boven waarde, zodat een lange hostnaam of
   processornaam zijn eigen kolom heeft in plaats van midden in een zin af
   te breken. */
.serverfeiten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px 26px;
  margin: 0 0 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.serverfeiten dt {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: .02em;
  margin-bottom: 2px;
}
.serverfeiten dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.serverblok {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px 26px;
}
.meting-kop {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 13.5px;
  margin-bottom: 6px;
}
.meting-kop span:first-child { font-weight: 500; }
.meting-kop .num { color: var(--muted); }
.meting .dz-sub { margin-top: 6px; }

/* Meter voor een deel van een bekend totaal (geheugen, schijf). Breedte
   via data-vol in stappen van 5%: inline style mag niet van de CSP. */
.meter {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.meter-vulling {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.meter-vulling.is-vol { background: var(--error-ink); }
.meter-vulling[data-vol="0"] { width: 0; }
.meter-vulling[data-vol="5"] { width: 5%; }    .meter-vulling[data-vol="10"] { width: 10%; }
.meter-vulling[data-vol="15"] { width: 15%; }  .meter-vulling[data-vol="20"] { width: 20%; }
.meter-vulling[data-vol="25"] { width: 25%; }  .meter-vulling[data-vol="30"] { width: 30%; }
.meter-vulling[data-vol="35"] { width: 35%; }  .meter-vulling[data-vol="40"] { width: 40%; }
.meter-vulling[data-vol="45"] { width: 45%; }  .meter-vulling[data-vol="50"] { width: 50%; }
.meter-vulling[data-vol="55"] { width: 55%; }  .meter-vulling[data-vol="60"] { width: 60%; }
.meter-vulling[data-vol="65"] { width: 65%; }  .meter-vulling[data-vol="70"] { width: 70%; }
.meter-vulling[data-vol="75"] { width: 75%; }  .meter-vulling[data-vol="80"] { width: 80%; }
.meter-vulling[data-vol="85"] { width: 85%; }  .meter-vulling[data-vol="90"] { width: 90%; }
.meter-vulling[data-vol="95"] { width: 95%; }  .meter-vulling[data-vol="100"] { width: 100%; }

.loadrij { display: flex; gap: 20px; }
.loadwaarde .num { display: block; font-size: 20px; font-weight: 700; line-height: 1.2; }
.loadwaarde.is-vol .num { color: var(--error-ink); }

/* Turnstile-widget op het inlogformulier */
.cf-turnstile { margin-top: 16px; min-height: 65px; }

/* "Stuur een code per e-mail" onder het codeveld */
.mailcodeform { margin-top: 14px; }

/* ------------------------------------------------------------------ */
/* Foutpagina's en voet                                                */
/* ------------------------------------------------------------------ */

.errorpage .code {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 8px;
}

.foot {
  margin-top: auto;
  padding-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}
.foot p { margin: 0; }
/* De maker klein en op een eigen regel: het portaal is van MediaPoint,
   de ondertekening hoort daar niet mee te concurreren. */
.foot-maker { font-size: 7px; line-height: 1.6; margin-top: 3px !important; }

/* ------------------------------------------------------------------ */
/* Beweging en schermbreedte                                           */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  .card { animation: rise .25s ease-out; }
  @keyframes rise {
    from { transform: translateY(4px); opacity: 0; }
    to   { transform: none; opacity: 1; }
  }
}

@media (max-width: 760px) {
  .kolommen, .kolommen-upload, .kaarten { grid-template-columns: 1fr; }
  .feiten { grid-template-columns: 1fr; }
}

/* Op een telefoon is een tabel van zes kolommen geen tabel meer maar een
   schuifpuzzel. De twee lijsten die mensen daar echt bedienen — wat er
   voor u klaarstaat en wat er binnengekomen is — worden daarom per regel
   één blokje, met het kolomkopje ervoor uit data-label. */
@media (max-width: 640px) {
  .tablewrap:has(table.stapelbaar) { overflow-x: visible; margin: 0; padding: 0; }
  table.stapelbaar, table.stapelbaar tbody, table.stapelbaar tr, table.stapelbaar td { display: block; }
  /* Moet specifieker zijn dan .tablewrap table.files { min-width: 560px },
     anders houdt die regel de tabel breed en scrollt de pagina alsnog. */
  .tablewrap table.files.stapelbaar { min-width: 0; width: 100%; }
  table.stapelbaar thead { display: none; }
  table.stapelbaar tr {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 12px;
    background: var(--card);
  }
  table.stapelbaar tr:hover { background: var(--card); }
  table.stapelbaar td,
  table.files.stapelbaar td.mono,
  table.files.stapelbaar td.num {
    border: 0;
    padding: 3px 0;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  table.stapelbaar td[data-label]::before {
    content: attr(data-label) ": ";
    color: var(--muted);
    font-size: 13px;
  }
  table.stapelbaar td.naam { font-weight: 500; }
  table.stapelbaar td.actiecel { padding-top: 10px; }
  table.stapelbaar td.actiecel .btn,
  table.stapelbaar td.actiecel button { width: 100%; }
}

@media (max-width: 640px) {
  .shell { padding: 18px 14px 20px; }
  .card { padding: 22px 18px; border-radius: 12px; }
  .brand-name { display: none; }
  .topnav { width: 100%; font-size: 14px; }
  .topnav .who { display: none; }
  .tablewrap table.files { min-width: 560px; }
  .qr svg { width: 160px; height: 160px; }
}
