/* Punctio-site & klantportaal — zelfde stijl als de desktop-app:
   blauwe kopbalk, grijze achtergrond, witte kaarten, Segoe UI. */

:root {
  --primair: #1f3a5f;
  --primair-licht: #e8eef6;
  --accent: #2e7d32;
  --rood: #c0392b;
  --grijs: #f2f4f7;
  --rand: #d7dde6;
  --tekst: #1c2733;
  --muted: #6b7785;
  --wit: #fff;
  --schaduw: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--tekst);
  background: #eef1f5;
  font-size: 15px;
  line-height: 1.5;
}
h1 { font-size: 26px; margin: 0 0 6px; color: var(--primair); }
h2 { font-size: 19px; margin: 0 0 10px; color: var(--primair); }
h3 { font-size: 13px; margin: 0 0 8px; color: var(--primair); text-transform: uppercase; letter-spacing: .04em; }
p { margin: 6px 0; }
a { color: #15539e; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }

/* ---- navigatiebalk (zoals de app-header) -------------------------------- */
.navbalk {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--primair); color: #fff; padding: 10px 22px;
}
.navbalk .merk {
  display: flex; align-items: center; gap: 10px; margin-right: auto;
  color: #fff; text-decoration: none; font-weight: 700; font-size: 16px;
}
.navbalk .merk img { width: 30px; height: 30px; border-radius: 7px; }
.navbalk .merk .tagline { font-size: 11px; opacity: .8; font-weight: 400; display: block; }
.navbalk nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-link {
  color: rgba(255,255,255,.88); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 7px 11px; border-radius: 6px;
}
.nav-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-link.actief { background: rgba(255,255,255,.18); color: #fff; }
.nav-knop {
  text-decoration: none; font-size: 13.5px; font-weight: 600; padding: 7px 13px; border-radius: 7px;
  border: 1px solid rgba(255,255,255,.45); color: #fff; cursor: pointer; background: transparent;
  font-family: inherit;
}
.nav-knop:hover { background: rgba(255,255,255,.12); }
.nav-knop.vol { background: #fff; color: var(--primair); border-color: #fff; }
.nav-knop.vol:hover { background: var(--primair-licht); }
.nav-email { font-size: 13px; opacity: .85; }

/* ---- knoppen (zoals de app) --------------------------------------------- */
.btn {
  display: inline-block; text-align: center; text-decoration: none;
  border: 1px solid var(--rand); background: var(--wit); color: var(--tekst);
  padding: 8px 14px; border-radius: 7px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; font-family: inherit; transition: .12s;
}
.btn:hover { border-color: var(--primair); }
.btn.primary { background: var(--primair); border-color: var(--primair); color: #fff; }
.btn.primary:hover { background: #16294a; }
.btn.danger { color: var(--rood); border-color: #e6b0aa; }
.btn.danger:hover { background: #fdecea; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.big { padding: 13px 22px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---- hero + secties (publieke site) ------------------------------------- */
.hero { background: linear-gradient(160deg, #1f3a5f 0%, #2b4f7e 100%); color: #fff; padding: 54px 22px 58px; }
.hero .midden { max-width: 960px; margin: 0 auto; }
.hero h1 { color: #fff; font-size: clamp(26px, 4.5vw, 36px); margin: 0 0 10px; max-width: 22ch; }
.hero p { color: rgba(255,255,255,.88); max-width: 62ch; font-size: 16px; margin: 0 0 22px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn.wit { background: #fff; border-color: #fff; color: var(--primair); }
.hero .btn.wit:hover { background: var(--primair-licht); }
.hero .btn.doorzichtig { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.hero .btn.doorzichtig:hover { background: rgba(255,255,255,.12); }

.sectie { max-width: 980px; margin: 0 auto; padding: 36px 22px 8px; }
.sectie > h2 { font-size: 22px; }
.sectie > .intro { color: var(--muted); max-width: 68ch; margin: 0 0 18px; }
.sectie-voet { max-width: 980px; margin: 0 auto; padding: 28px 22px 46px; }

.kaarten { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.kaart {
  background: var(--wit); border: 1px solid var(--rand); border-radius: 10px;
  padding: 18px; box-shadow: var(--schaduw);
}
.kaart .icoon { font-size: 26px; margin-bottom: 8px; }
.kaart h3 { font-size: 14px; text-transform: none; letter-spacing: 0; }
.kaart p { color: var(--muted); font-size: 13.5px; margin: 0; }
.kaart ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.kaart li { margin: 3px 0; }

.stappen { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: stap; }
.stap { position: relative; padding: 18px 18px 18px 58px; }
.stap::before {
  counter-increment: stap; content: counter(stap);
  position: absolute; left: 16px; top: 18px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primair); color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

.blauwvlak {
  background: var(--primair-licht); border: 1px solid #cfdcee; border-radius: 10px;
  padding: 20px 22px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}
.blauwvlak .tekst { flex: 1; min-width: 260px; }
.blauwvlak h2 { margin-bottom: 4px; }
.blauwvlak p { color: var(--muted); margin: 0; }

/* functiepagina: rij per module */
.functie { display: flex; gap: 18px; align-items: flex-start; padding: 18px; }
.functie .icoon { font-size: 30px; flex: none; width: 44px; text-align: center; }
.functie h3 { font-size: 15px; text-transform: none; letter-spacing: 0; margin-bottom: 4px; }
.functie p { color: var(--muted); font-size: 13.5px; margin: 0; max-width: 70ch; }
.functies-lijst { display: flex; flex-direction: column; gap: 12px; }

/* ---- formulieren / auth-kaarten ------------------------------------------ */
.auth-wrap { display: flex; align-items: flex-start; justify-content: center; padding: 44px 20px 60px; }
.kaart.smal { max-width: 470px; width: 100%; padding: 26px; }
.brand { display: flex; gap: 13px; align-items: center; margin-bottom: 18px; }
.brand .logo { width: 48px; height: 48px; border-radius: 10px; flex: none; }
.brand h1 { font-size: 19px; margin: 0; }
.brand p { margin: 0; }

.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 2px solid var(--rand); }
.tab {
  border: none; background: none; padding: 9px 14px; cursor: pointer; font-family: inherit;
  font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tab.active { color: var(--primair); border-bottom-color: var(--primair); font-weight: 600; }

.pane { display: flex; flex-direction: column; gap: 13px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
input, select {
  padding: 9px 11px; border: 1px solid var(--rand); border-radius: 7px;
  font-size: 14px; font-family: inherit; color: var(--tekst); background: #fff;
}
input:focus { outline: none; border-color: var(--primair); box-shadow: 0 0 0 3px var(--primair-licht); }
input[readonly] { background: var(--grijs); color: var(--muted); }

.msg { min-height: 1.2em; font-size: 13.5px; margin: 0; }
.msg.err { color: var(--rood); }
.msg.ok { color: var(--accent); }

.download { text-align: center; margin: 10px 0 16px; display: flex; flex-direction: column; gap: 12px; }

/* ---- portaal -------------------------------------------------------------- */
.layout { display: flex; align-items: flex-start; min-height: calc(100vh - 54px); }
.sidebar {
  flex: 0 0 224px; width: 224px; align-self: stretch;
  background: #e9edf3; border-right: 1px solid var(--rand); padding: 14px 10px;
}
.side-panel { background: var(--wit); border: 1px solid var(--rand); border-radius: 6px; overflow: hidden; }
.side-panel-h {
  background: linear-gradient(#f4f6fa, #e4e9f1); border-bottom: 1px solid var(--rand);
  padding: 7px 10px; font-size: 12px; font-weight: 700; color: var(--primair);
}
.side-panel .snav {
  display: block; padding: 8px 12px; font-size: 13.5px; color: #15539e;
  text-decoration: none; border-bottom: 1px solid #eef1f6;
}
.side-panel .snav:last-child { border-bottom: none; }
.side-panel .snav:hover { background: var(--primair-licht); }
.side-panel .snav.actief { background: var(--primair); color: #fff; font-weight: 600; }
.layout main { flex: 1; min-width: 0; padding: 22px 26px 50px; }
.layout main .kaart { margin-bottom: 16px; }
.paneelkop { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.paneelkop h2 { margin: 0; }
.paneelkop .spacer { flex: 1; }

/* zoeken + filteren (gebruikerslijst) */
.zoekbalk { display: flex; gap: 8px; align-items: center; }
.zoekbalk input[type="search"] { min-width: 240px; }
.zoekbalk select { min-width: 130px; }

/* e-mailformulier */
.email-form { display: flex; flex-direction: column; gap: 12px; }
.email-form textarea { min-height: 200px; resize: vertical; }
.knoprij { display: flex; justify-content: flex-end; gap: 8px; }

.tabel-wrap { overflow-x: auto; border: 1px solid var(--rand); border-radius: 8px; background: #fff; }
table.lijst { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
table.lijst th {
  text-align: left; background: linear-gradient(#f4f6fa, #e9eef5); color: var(--primair);
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  padding: 8px 12px; border-bottom: 1px solid var(--rand); white-space: nowrap;
}
table.lijst td { padding: 9px 12px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
table.lijst tr:last-child td { border-bottom: none; }
table.lijst tr:hover td { background: #f7f9fc; }
td.acties { white-space: nowrap; text-align: right; }
td.acties .btn { margin-left: 6px; }

.pil { display: inline-block; border-radius: 99px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pil.slot { background: #fdf3e0; color: #9a6200; }
.pil.open { background: #e7f2e8; color: var(--accent); }

.leeg { text-align: center; color: var(--muted); padding: 34px 20px; }
.leeg .icoon { font-size: 34px; margin-bottom: 8px; }

/* dialoog (bewerken) */
dialog {
  border: 1px solid var(--rand); border-radius: 10px; padding: 0;
  width: min(440px, 92vw); box-shadow: 0 12px 40px rgba(16,24,40,.25);
  font-family: inherit; color: var(--tekst);
}
dialog::backdrop { background: rgba(16,24,40,.45); }
dialog .dlg-kop { background: var(--primair); color: #fff; padding: 11px 16px; font-weight: 700; font-size: 14px; }
dialog form { padding: 16px; display: flex; flex-direction: column; gap: 13px; }
dialog .keuze { display: flex; flex-direction: row; align-items: center; gap: 7px; font-weight: 400; font-size: 13.5px; }
dialog .keuze input[type="radio"] { accent-color: var(--primair); }
dialog .dlg-knoppen { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

textarea {
  padding: 9px 11px; border: 1px solid var(--rand); border-radius: 7px;
  font-size: 14px; font-family: inherit; color: var(--tekst); background: #fff; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--primair); box-shadow: 0 0 0 3px var(--primair-licht); }

/* factuur-dialoog: breder, met regeltabel */
#dlg-factuur { width: min(640px, 95vw); }
.fac-regels-kop, .fac-regel {
  display: grid; grid-template-columns: 1fr 70px 100px 34px; gap: 8px; align-items: center;
}
.fac-regels-kop { font-size: 11.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .03em; margin-bottom: -4px; }
.fac-regels-kop span:nth-child(2), .fac-regels-kop span:nth-child(3) { text-align: right; }
#fac-regels { display: flex; flex-direction: column; gap: 8px; }
.fac-regel input { padding: 7px 9px; }
.fac-regel .r-aantal, .fac-regel .r-prijs { text-align: right; }
.fac-totalen { display: flex; flex-direction: column; gap: 4px; align-items: flex-end;
  border-top: 1px solid var(--rand); padding-top: 10px; font-variant-numeric: tabular-nums; }
.fac-totalen > div { display: flex; gap: 26px; min-width: 220px; justify-content: space-between; font-size: 13.5px; }
.fac-totalen .tot { font-weight: 700; font-size: 15px; border-top: 1px solid var(--rand); padding-top: 5px; margin-top: 2px; }

/* toast-melding */
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: var(--tekst); color: #fff; font-size: 13.5px; padding: 9px 16px;
  border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.3); opacity: 0;
  transition: opacity .2s; pointer-events: none; z-index: 50;
}
#toast.zichtbaar { opacity: 1; }

/* ---- sitevoet -------------------------------------------------------------- */
.site-voet {
  border-top: 1px solid var(--rand); background: #e9edf3; margin-top: 40px;
  padding: 20px 22px; text-align: center; color: var(--muted); font-size: 12.5px;
}
.site-voet a { color: var(--muted); margin: 0 8px; }

@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; border-right: none; border-bottom: 1px solid var(--rand); }
  .row2 { grid-template-columns: 1fr; }
  .functie { flex-direction: column; gap: 8px; }
  td.acties { text-align: left; }
}
