/*
 * Debiteurenportaal nl.legal
 *
 * Handgeschreven en lokaal gehost in plaats van de Tailwind-CDN. De klassen en
 * de schaal volgen Tailwind, maar een portaal waar mensen vanuit een brief
 * binnenkomen mag niet stukgaan omdat een externe CDN geblokkeerd is op een
 * bedrijfsnetwerk. Bovendien blijft de CSP zo op 'self' staan.
 *
 * Merkkleuren komen van nl.legal.
 */

:root {
  --paars: #4F2C75;
  --paars-donker: #3d2159;
  --paars-licht: #f3eff8;
  --groen: #428628;
  --groen-fris: #8FC47A;
  --groen-licht: #f1f8ed;
  --donker: #1a1a1a;
  --grijs-700: #374151;
  --grijs-500: #6b7280;
  --grijs-400: #9ca3af;
  --grijs-200: #e5e7eb;
  --grijs-100: #f3f4f6;
  --grijs-50: #f9fafb;
  --amber: #b45309;
  --amber-licht: #fffbeb;
  --radius: 12px;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+2113;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--grijs-50);
  color: var(--donker);
  line-height: 1.6;
  font-size: 16px;
}

[x-cloak] { display: none !important; }

img { max-width: 100%; display: block; }

.wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.wrap-smal { max-width: 560px; margin: 0 auto; padding: 0 20px; }

/* ---------- kop ---------- */

.merkbalk { background: #fff; border-bottom: 1px solid var(--grijs-200); }
.merkbalk .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}
.merkbalk img { height: 46px; width: auto; }
.merkbalk .ingelogd { font-size: .85rem; color: var(--grijs-500); }
.merkbalk .ingelogd strong { color: var(--donker); font-weight: 600; }
.merkbalk .ingelogd a { color: var(--paars); font-weight: 600; text-decoration: none; margin-left: 12px; }
.merkbalk .ingelogd a:hover { text-decoration: underline; }

/* ---------- hero ---------- */

.hero { background: var(--paars); color: #fff; padding: 34px 0 38px; }
.hero .dossiernr {
  display: inline-block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255,255,255,.14); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.hero h1 { margin: 0 0 10px; font-size: 1.85rem; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
.hero p { margin: 0; opacity: .92; max-width: 60ch; }
.hero .terug { display: inline-block; margin-bottom: 12px; color: var(--groen-fris); font-weight: 600; text-decoration: none; font-size: .9rem; }
.hero .terug:hover { text-decoration: underline; }

/* ---------- betaalblok ---------- */

.betaalkaart {
  background: #fff; border-radius: var(--radius); padding: 26px;
  box-shadow: 0 10px 30px rgba(26,26,26,.10);
  margin-top: -26px; position: relative; z-index: 2;
}
.betaalkaart .label { font-size: .82rem; color: var(--grijs-500); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.betaalkaart .bedrag { font-size: 2.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.betaalkaart .doorgestreept { color: var(--grijs-400); text-decoration: line-through; font-weight: 500; font-size: 1.05rem; }
.betaalkaart .voordeel { color: var(--groen); font-weight: 600; }

.knop {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--groen); color: #fff; border: 0; border-radius: 10px;
  padding: 16px 30px; font-size: 1.08rem; font-weight: 600; font-family: inherit;
  cursor: pointer; text-decoration: none; width: 100%; transition: background .15s, transform .15s;
}
.knop:hover { background: #35701f; }
.knop:active { transform: translateY(1px); }
.knop.paars { background: var(--paars); }
.knop.paars:hover { background: var(--paars-donker); }
.knop.rustig {
  background: #fff; color: var(--paars); border: 1px solid var(--grijs-200); font-weight: 600;
}
.knop.rustig:hover { background: var(--grijs-50); }
.knop[disabled] { opacity: .6; cursor: not-allowed; }
.knop-rij { display: grid; gap: 10px; margin-top: 20px; }
@media (min-width: 640px) { .knop-rij.twee { grid-template-columns: 2fr 1fr; } }

.betaalvoet { margin-top: 14px; font-size: .85rem; color: var(--grijs-500); text-align: center; }

/* ---------- secties ---------- */

main { padding-bottom: 90px; }
section { margin-top: 34px; }
section > h2 {
  font-size: 1.22rem; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em;
}
section > p.intro { margin: 0 0 16px; color: var(--grijs-700); max-width: 68ch; }

.kaart {
  background: #fff; border-radius: var(--radius); padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(26,26,26,.06);
}
.kaart + .kaart { margin-top: 14px; }
.kaart.zacht { background: var(--paars-licht); box-shadow: none; }
.kaart.let-op { background: var(--amber-licht); box-shadow: none; border-left: 3px solid var(--amber); }

/* ---------- bewijs ---------- */

.bewijs-rij { display: grid; gap: 16px; }
@media (min-width: 700px) { .bewijs-rij { grid-template-columns: 1fr 1fr; } }
.bewijs-kolom h3 { margin: 0 0 4px; font-size: .95rem; font-weight: 700; }
.bewijs-kolom p { margin: 0 0 12px; font-size: .88rem; color: var(--grijs-500); }
.bewijs-vak {
  background: var(--grijs-100); border-radius: 10px; overflow: hidden;
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  cursor: zoom-in; position: relative;
}
.bewijs-vak img { width: 100%; height: 100%; object-fit: contain; }
.bewijs-vak .meer {
  position: absolute; right: 8px; bottom: 8px; background: rgba(26,26,26,.75); color: #fff;
  font-size: .75rem; padding: 3px 9px; border-radius: 999px;
}
.duimen { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.duimen button {
  width: 54px; height: 42px; padding: 0; border-radius: 7px; overflow: hidden;
  border: 2px solid transparent; background: var(--grijs-100); cursor: pointer;
}
.duimen button.actief { border-color: var(--paars); }
.duimen img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; background: rgba(15,15,20,.92); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lightbox img { max-width: 100%; max-height: 86vh; object-fit: contain; border-radius: 6px; }
.lightbox .sluit {
  position: absolute; top: 16px; right: 20px; background: none; border: 0; color: #fff;
  font-size: 2rem; line-height: 1; cursor: pointer; padding: 8px;
}
.lightbox .onderschrift { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #d1d5db; font-size: .9rem; }

/* ---------- tabellen ---------- */

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 11px 4px; border-bottom: 1px solid var(--grijs-200); }
tr:last-child td { border-bottom: 0; }
td.bedrag, th.bedrag { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.totaal td { border-top: 2px solid var(--grijs-200); border-bottom: 0; font-weight: 700; padding-top: 13px; }
tr.korting td { color: var(--groen); font-weight: 600; }

.gegevens { display: grid; gap: 2px 20px; }
@media (min-width: 620px) { .gegevens { grid-template-columns: max-content 1fr; } }
.gegevens dt { color: var(--grijs-500); font-size: .9rem; padding: 7px 0 0; }
.gegevens dd { margin: 0; padding: 7px 0; font-weight: 500; word-break: break-word; }

/* ---------- stappen ---------- */

.stappen { list-style: none; margin: 0; padding: 0; }
.stappen li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--grijs-200); }
.stappen li:last-child { border-bottom: 0; }
.stappen .bol {
  flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--grijs-100);
  color: var(--grijs-500); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}
.stappen li.nu .bol { background: var(--paars); color: #fff; }
.stappen li.nu strong { color: var(--paars); }
.stappen .tekst { flex: 1; }
.stappen .tekst span { display: block; color: var(--grijs-500); font-size: .89rem; }

/* ---------- documenten ---------- */

.stuk { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--grijs-200); }
.stuk:last-child { border-bottom: 0; }
.stuk .icoon {
  flex: 0 0 38px; height: 38px; border-radius: 8px; background: var(--paars-licht);
  color: var(--paars); display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700;
}
.stuk .naam { flex: 1; min-width: 0; }
.stuk .naam strong { display: block; font-weight: 600; font-size: .95rem; }
.stuk .naam span { color: var(--grijs-500); font-size: .85rem; }
.stuk a { color: var(--paars); font-weight: 600; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.stuk a:hover { text-decoration: underline; }

/* ---------- formulieren ---------- */

label { display: block; font-weight: 600; margin: 18px 0 6px; font-size: .93rem; }
input[type=text], input[type=password] {
  width: 100%; padding: 14px 14px; font-size: 1.05rem; font-family: inherit;
  border: 1px solid #d1d5db; border-radius: 9px; background: #fff;
}
input:focus { outline: 2px solid var(--paars); outline-offset: 1px; border-color: var(--paars); }
input::placeholder { color: var(--grijs-400); letter-spacing: .08em; }
input.code { letter-spacing: .12em; text-transform: uppercase; font-size: 1.2rem; text-align: center; }
p.hint { margin: 7px 0 0; font-size: .85rem; color: var(--grijs-500); }

.melding { padding: 14px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .95rem; }
.melding.fout { background: #fef2f2; border-left: 3px solid #b91c1c; color: #7f1d1d; }
.melding.goed { background: var(--groen-licht); border-left: 3px solid var(--groen); color: #2f5c1d; }
.melding.tip { background: #fff; border-left: 3px solid var(--groen-fris); box-shadow: 0 1px 3px rgba(26,26,26,.06); }
.melding a { color: inherit; font-weight: 600; }

.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: .76rem; font-weight: 600; background: var(--paars-licht); color: var(--paars);
}
.badge.gesloten { background: var(--grijs-200); color: var(--grijs-500); }
.badge.groen { background: var(--groen-licht); color: var(--groen); }

/* ---------- meelopende betaalbalk ---------- */

.balk-onder {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: #fff; border-top: 1px solid var(--grijs-200);
  box-shadow: 0 -6px 20px rgba(26,26,26,.08);
  padding: 12px 0; transform: translateY(110%); transition: transform .22s ease;
}
.balk-onder.zichtbaar { transform: translateY(0); }
.balk-onder .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.balk-onder .bedrag { font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.balk-onder .bedrag span { display: block; font-size: .78rem; color: var(--grijs-500); font-weight: 500; }
.balk-onder .knop { width: auto; padding: 12px 24px; }

/* ---------- voet ---------- */

footer { background: var(--donker); color: #cbd0d8; font-size: .86rem; padding: 26px 0; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer img { height: 32px; width: auto; filter: brightness(0) invert(1); opacity: .85; }
footer a { color: #fff; }

@media (max-width: 620px) {
  .hero h1 { font-size: 1.5rem; }
  .betaalkaart .bedrag { font-size: 2.1rem; }
  .merkbalk img { height: 38px; }
}
