:root {
  --bg: #f5f4f0; --panel: #ffffff; --ink: #1c1b19; --muted: #6c6a64; --line: #e3e1da; --soft: #efeee9;
  --accent: #1f5f4a; --accent-ink: #ffffff; --accent-soft: #e2efe9;
  --warn: #9a5b00; --warn-soft: #fbf0dc; --bad: #a3271f; --bad-soft: #f9e3e1; --ok: #2c6e3f; --ok-soft: #e1f1e4;
  --info: #2b4f8a; --info-soft: #e3ebf7;
  --radius: 10px; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14px; color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #151614; --panel: #1d1f1c; --ink: #ebeae4; --muted: #9b998f; --line: #2f322d; --soft: #252723;
    --accent: #6fbf9c; --accent-ink: #0e1a14; --accent-soft: #1f3329; --warn: #e5b45c; --warn-soft: #3a2e17;
    --bad: #f08b80; --bad-soft: #3d201d; --ok: #84cc94; --ok-soft: #1d3322; --info: #8fb2ea; --info-soft: #1e2a3f; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
nav.side { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: -.01em; padding: 4px 10px 18px; display: flex; align-items: center; gap: 8px; }
.brand i { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); display: inline-block; }
nav.side a { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; margin-bottom: 2px; }
nav.side a:hover { background: var(--soft); }
nav.side a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
nav.side .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 10px 6px; }
main { padding: 24px 32px 60px; max-width: 1400px; min-width: 0; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat .n { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 12.5px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.btn { border: 1px solid var(--line); background: var(--panel); padding: 7px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn.pri { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.pri:hover { filter: brightness(1.08); }
.btn.bad { color: var(--bad); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=password], input[type=number], input[type=url], input[type=email], input[type=tel], input[type=search], select, textarea {
  border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 7px 10px; width: 100%; min-width: 0; }
textarea { font-family: var(--mono); font-size: 12.5px; }
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-weight: 600; margin-bottom: 5px; }
label.f small, .hint { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; flex-wrap: wrap; }
label.check.f > span { display: inline; margin: 0; font-weight: 600; }
label.check.f > small { flex-basis: 100%; margin-left: 24px; }
img.broken { visibility: hidden; }
td.mono { white-space: nowrap; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.tbl { overflow-x: auto; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--muted); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.badge { background: var(--warn); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.banner { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.info { background: var(--info-soft); color: var(--info); }
.thumb { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: var(--soft); flex: none; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.err { color: var(--bad); font-size: 12.5px; }
.bar { height: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; width: 70px; display: inline-block; vertical-align: middle; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--accent); font-weight: 600; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border: 0; }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-weight: 700; font-size: 12.5px; flex: none; }
.steps li.done::before { content: "✓"; background: var(--ok-soft); color: var(--ok); }
.steps li > div { flex: 1; }
.cands { display: grid; gap: 6px; margin-top: 8px; }
.cand { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.cand.sel { border-color: var(--accent); background: var(--accent-soft); }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ruleline { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr auto; gap: 6px; margin-bottom: 6px; }
.actline { display: grid; grid-template-columns: 1fr 1fr 1.6fr auto; gap: 6px; margin-bottom: 6px; }
.login { max-width: 380px; margin: 12vh auto; }
#toast { position: fixed; top: 20px; right: 20px; display: grid; gap: 8px; z-index: 50; }
#toast div { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; max-width: 420px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
#toast div.bad { background: var(--bad); color: #fff; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; }
@media (max-width: 860px) {
  .cmp, .ruleline, .actline { grid-template-columns: 1fr; }
}

.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
a.chcard { color: inherit; text-decoration: none; display: block; transition: border-color .15s; }
a.chcard:hover { border-color: var(--accent); }
td.sect { background: var(--soft); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 10px; }

.stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 18px; }
.stepper a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px; text-decoration: none; color: var(--muted); }
.stepper a:hover { background: var(--soft); }
.stepper a.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.stepper a.on .num { background: rgba(255,255,255,.25); color: inherit; }
.stepper .num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-size: 12px; font-weight: 700; }
.stepper a.done .num { background: var(--ok-soft); color: var(--ok); }
.stepper .sep { flex: 1; }
.stepper a.extra { border: 1px solid var(--line); }
.stepper .badge { margin-left: 2px; }
.kw { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 12px; letter-spacing: .05em; padding: 3px 9px; border-radius: 6px; }

a.btn { text-decoration: none; display: inline-block; }

.banner.ok { background: var(--ok-soft); color: var(--ok); }

#jobs { position: fixed; bottom: 20px; right: 20px; width: 380px; max-width: calc(100vw - 32px); display: grid; gap: 8px; z-index: 40; }
#jobs .job { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
#jobs .job.done { border-color: var(--ok); }
#jobs .job.error { border-color: var(--bad); }
#jobs .pct { font-weight: 700; font-variant-numeric: tabular-nums; }
#jobs .small { font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jbar { height: 7px; background: var(--soft); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.jbar > i { display: block; height: 100%; background: var(--accent); transition: width .5s; }
.job.done .jbar > i { background: var(--ok); } .job.error .jbar > i { background: var(--bad); }
.jbar.indet > i { width: 30% !important; animation: indet 1.2s infinite ease-in-out; }
@keyframes indet { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }

.copybox { border-color: var(--accent); }

.small { font-size: 12px; }
a.plink { color: inherit; text-decoration: none; }
a.plink:hover { color: var(--accent); text-decoration: underline; }

.projsel { padding: 0 6px 10px; }
.projsel select { margin-top: 4px; font-weight: 600; }
nav.side .grp { margin-top: 18px; }
a.chnav { display: flex; align-items: center; gap: 8px; }
a.chnav .chname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.dry { background: var(--info); } .dot.off { background: var(--line); border: 1px solid var(--muted); }
.navfoot { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); }
.fixbox { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); border: 1px solid var(--accent); }

/* ---- indeling: tabbladen binnen een pagina, gegroepeerd kanalenmenu, landen-tabbladen ---- */
.tabs.subtabs { margin-top: 4px; }
.tabs.subtabs a { cursor: pointer; }
.subpane[hidden] { display: none !important; }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 0; margin-top: 12px; background: var(--bg); border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .savebar { position: static; border-top: 0; }
  .savebar .muted.small { display: none; }

}
nav.side .chgrp > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--ink); }
nav.side .chgrp > summary::-webkit-details-marker { display: none; }
nav.side .chgrp > summary:hover { background: var(--soft); }
nav.side .chgrp > summary .caret { width: 10px; color: var(--muted); font-size: 10px; transition: transform .15s; }
nav.side .chgrp[open] > summary .caret { transform: rotate(90deg); }
nav.side .chgrp > summary .chname { flex: 1; }
nav.side .chgrp .sub { padding-left: 18px; }
nav.side .chgrp .sub a.chnav { padding: 6px 10px; font-size: 13.5px; }
.countrytabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; align-items: center; }
.countrytabs a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--ink); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; background: var(--panel); }
.countrytabs a.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.countrytabs a.on .dot { background: #fff; border-color: #fff; }
details.more { position: relative; }
details.more > summary { list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more .menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px; min-width: 260px; display: flex; flex-direction: column; gap: 2px; }
details.more .menu button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; font: inherit; color: var(--ink); }
details.more .menu button.danger { color: var(--bad); border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; margin-top: 4px; }
details.more .menu button:hover { background: var(--soft); }
details.more .menu small { display: block; color: var(--muted); font-size: 12px; }
.acctype { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.acctype a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--ink); font-size: 13px; background: var(--panel); }
.acctype a.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* voortgangsmeldingen wegklikken */
.job .jclose { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 2px; line-height: 1; }
.job .jclose:hover { color: var(--ink); }
.jpill { display: block; margin-left: auto; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.jpill:hover { background: var(--soft); }
#jobs .job > .row.spread { flex-wrap: nowrap; align-items: flex-start; gap: 8px; }
#jobs .job > .row.spread > b { flex: 1; min-width: 0; }
#jobs .job > .row.spread > span { flex: none; }
/* Foto-uploader */
.upgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 10px; }
.upthumb { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.upthumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.upthumb .btn { position: absolute; top: 4px; right: 4px; padding: 2px 8px; }
.upthumb.white .check { position: absolute; bottom: 4px; left: 4px; background: rgba(255,255,255,.9); border-radius: 6px; padding: 2px 6px; font-size: 12px; }
.btn.big { padding: 12px 18px; font-size: 16px; }
/* Verzenden */
tr.rowbad > td { background: color-mix(in srgb, var(--bad) 7%, transparent); }
.err.small, .small { font-size: 12px; }

/* Keuze na inloggen: SyncSoft of Verzenden */
.choicewrap { max-width: 640px; margin: 12vh auto; padding: 0 16px; }
.choicewrap > p { margin: 8px 0 18px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; cursor: pointer; font: inherit; color: var(--ink); padding: 22px; transition: border-color .15s, box-shadow .15s; }
.card.choice:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.card.choice b { font-size: 18px; }
.card.choice .ico { font-size: 30px; line-height: 1; }
.card.choice.off { opacity: .55; cursor: not-allowed; }
@media (max-width: 600px) { .choices { grid-template-columns: 1fr; } }
/* Losse verzendmodule */
.shiplayout { min-height: 100vh; }
.shiptop { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.shiptop .brand { margin: 0; }
.shiptop .projsel select { min-width: 160px; }
main.shipmain { max-width: 1400px; margin: 0 auto; }

/* Schakelaar SyncSoft ↔ Verzendportaal */
.appswitch { display: flex; gap: 2px; padding: 3px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; margin: 10px 0 12px; }
.appswitch a { flex: 1; text-align: center; padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 13px; white-space: nowrap; margin: 0 !important; display: block !important; }
.appswitch a.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.appswitch a:not(.on):hover { color: var(--ink); background: transparent !important; }
.shiptop .appswitch { margin: 0; min-width: 280px; }
nav.side .appswitch a { padding: 6px 4px; font-size: 12.5px; }
nav.side .appswitch .ico { display: none; }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); font-weight: 600; }
.btn.ok:hover { filter: brightness(1.08); }
/* Logboek */
.logtbl td { vertical-align: top; }
.logtbl tr.lg-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.logtbl tr.lg-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.lvl { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; background: var(--soft); color: var(--muted); }
.lvl.bad { background: var(--bad-soft); color: var(--bad); }
.lvl.warn { background: var(--warn-soft); color: var(--warn); }
details.logmsg summary { cursor: pointer; list-style: none; }
details.logmsg summary::-webkit-details-marker { display: none; }
details.logmsg summary::after { content: ' meer ▾'; color: var(--muted); font-size: 12px; white-space: nowrap; }
details.logmsg[open] summary::after { content: ' minder ▴'; }
details.logmsg > div { white-space: pre-wrap; margin-top: 6px; padding: 8px 10px; background: var(--soft); border-radius: 6px; }
.lvl.ok { background: var(--ok-soft); color: var(--ok); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }

/* ================= iPhone / mobiel ================= */
.mtop, .mtab, .navshade { display: none; }
html { -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
@media (max-width: 860px) {
  .layout { display: block; min-height: 0; }
  main { padding: 14px 14px calc(86px + env(safe-area-inset-bottom)); max-width: none; }
  main > h1, main h1 { font-size: 24px; line-height: 1.2; }
  /* Bovenbalk */
  .mtop { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; background: var(--panel); border-bottom: 1px solid var(--line);
    padding: calc(8px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left)); }
  .mtitle { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
  .mtitle b, .mtitle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mbtn { width: 44px; height: 44px; border: 0; background: transparent; display: grid; place-items: center; margin-left: -8px; border-radius: 10px; }
  .mbtn:active { background: var(--soft); }
  .burger, .burger::before, .burger::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); position: relative; content: ''; }
  .burger::before { position: absolute; top: -6px; } .burger::after { position: absolute; top: 6px; }
  .mbadge { background: var(--bad-soft); color: var(--bad); font-weight: 700; font-size: 13px; padding: 6px 10px; border-radius: 99px; text-decoration: none; }
  /* Menu als lade */
  nav.side { position: fixed; top: 0; bottom: 0; left: 0; width: min(84vw, 320px); height: 100dvh; z-index: 60; transform: translateX(-105%); transition: transform .22s ease;
    padding: calc(16px + env(safe-area-inset-top)) 12px calc(20px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left)); box-shadow: 0 0 40px rgba(0,0,0,.2); overscroll-behavior: contain; display: block; }
  body.navopen nav.side { transform: none; }
  body.navopen { overflow: hidden; }
  body.navopen .navshade { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
  nav.side .grp { display: block; }
  nav.side a, nav.side .chgrp > summary { min-height: 44px; }
  nav.side .chgrp .sub a { min-height: 40px; }
  /* Tabbalk onderin */
  .mtab { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--panel); border-top: 1px solid var(--line);
    padding: 4px calc(4px + env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) calc(4px + env(safe-area-inset-left)); }
  .mtab a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 50px; font-size: 11px; color: var(--muted); text-decoration: none; border-radius: 10px; }
  .mtab a i { font-style: normal; font-size: 20px; line-height: 1; }
  .mtab a.on { color: var(--accent); font-weight: 600; }
  .mtab a:active { background: var(--soft); }
  /* Geen inzoomen op iPhone bij invoervelden (minimaal 16px) */
  input, select, textarea { font-size: 16px !important; }
  input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
  .btn { min-height: 40px; }
  .btn.sm { min-height: 34px; }
  /* Tabbladen: horizontaal schuiven in plaats van onder elkaar */
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-left: -14px; margin-right: -14px; padding: 0 14px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; flex: none; }
  /* Tabellen: zijwaarts schuiven binnen de kaart */
  .card { padding: 14px; }
  .card.tbl, .tbl { -webkit-overflow-scrolling: touch; }
  .banner { padding: 10px 12px; }
  .row { flex-wrap: wrap; }
  #toast { top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); left: 12px; right: 12px; }
  #toast div { max-width: none; }
  /* Kiesscherm en inloggen */
  .login, .choicewrap { margin-top: calc(8vh + env(safe-area-inset-top)); }
  /* Verzendportaal */
  .shiptop { position: sticky; top: 0; padding: calc(8px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left)); gap: 8px; }
  .shiptop .brand { padding: 0; font-size: 15px; }
  .shiptop .brand span { display: none; }
  .shiptop .appswitch { min-width: 0; flex: 1 1 100%; order: 3; }
  main.shipmain { padding: 14px 14px calc(30px + env(safe-area-inset-bottom)); }
}
@media (max-width: 860px) and (display-mode: standalone) { .mtop { padding-top: calc(10px + env(safe-area-inset-top)); } }

@media (max-width: 860px) {
  /* Verzendportaal: elke order als kaart */
  table.shiptbl, table.shiptbl tbody { display: block; }
  table.shiptbl tr:first-child { display: flex; align-items: center; gap: 8px; padding: 4px 2px 8px; border-bottom: 1px solid var(--line); }
  table.shiptbl tr:first-child th { display: none; border: 0; padding: 0; }
  table.shiptbl tr:first-child th:first-child { display: flex; align-items: center; gap: 8px; }
  table.shiptbl tr:first-child th:first-child::after { content: 'Alles aanvinken'; font-weight: 400; color: var(--muted); }
  table.shiptbl tr:not(:first-child) { display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
  table.shiptbl td { display: block; border: 0; padding: 0; min-width: 0; }
  table.shiptbl td:nth-child(1) { grid-row: 1 / span 2; padding-top: 2px; }
  table.shiptbl td:nth-child(2) { grid-column: 2; }
  table.shiptbl td:nth-child(3) { grid-column: 3; text-align: right; font-weight: 600; }
  table.shiptbl td:nth-child(4), table.shiptbl td:nth-child(5), table.shiptbl td:nth-child(6), table.shiptbl td:nth-child(7), table.shiptbl td:nth-child(8) { grid-column: 2 / span 2; }
  table.shiptbl td:nth-child(6)::before { content: 'Gewicht (g) '; color: var(--muted); font-size: 13px; }
  table.shiptbl td:nth-child(8) { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
  table.shiptbl tr.rowbad { background: transparent; box-shadow: inset 3px 0 0 var(--bad); padding-left: 8px; }
  /* Retouren als kaarten */
  table.rettbl, table.rettbl tbody { display: block; }
  table.rettbl tr:first-child { display: none; }
  table.rettbl tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.rettbl td { display: block; border: 0; padding: 0; min-width: 0; }
  table.rettbl td:nth-child(n+3) { grid-column: 1 / span 2; }
  /* Verbindingstest en logboek: melding onder de naam */
  .logtbl, .logtbl tbody { display: block; }
  .logtbl tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
  .logtbl tr:has(th) { display: none; }
  .logtbl td { display: block; border: 0 !important; padding: 0 !important; width: auto !important; box-shadow: none !important; min-width: 0; }
  .logtbl td:nth-child(3) { grid-column: 1 / span 3; padding-left: 0 !important; }
  .logtbl td:nth-child(4) { grid-column: 1 / span 3; }
  .logtbl tr.lg-bad { box-shadow: inset 3px 0 0 var(--bad); padding-left: 8px; }
  .logtbl tr.lg-warn { box-shadow: inset 3px 0 0 var(--warn); padding-left: 8px; }
}
@media (max-width: 860px) {
  table.shiptbl tr.rowbad td { background: transparent !important; }
  table.shiptbl tr.rowbad { background: var(--bad-soft); border-radius: 10px; margin: 6px 0; border-bottom: 0; }
}

.card.finder { padding: 12px 14px; margin-bottom: 12px; }
.findres { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .findres { grid-template-columns: 1fr; } }
.exch { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.manualaddr { margin-top: 8px; padding: 10px; background: var(--soft); border-radius: 8px; }
.manualaddr input { flex: 1; min-width: 0; }

/* Logo */
.brand img { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.brand .wm { letter-spacing: -.02em; }
.brand .wm > span { color: var(--accent); }
.shiptop .brand img { width: 24px; height: 24px; }

/* Keuzescherm na inloggen: twee grote vakken */
.choicewrap { max-width: 900px; margin: 9vh auto 40px; padding: 0 20px; }
.choicehead { text-align: center; margin-bottom: 26px; }
.choicehead .brand { justify-content: center; padding: 0 0 10px; font-size: 20px; }
.choicehead h1 { font-size: 28px; margin: 6px 0 0; letter-spacing: -.02em; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.card.choice { align-items: center; text-align: center; justify-content: center; gap: 10px; min-height: 280px; padding: 34px 26px; border-width: 2px; border-radius: 18px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card.choice:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.card.choice .ico { font-size: 0; line-height: 1; margin-bottom: 6px; }
.card.choice .ico img { width: 84px; height: 84px; border-radius: 20px; }
.card.choice .ico .shipico { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 20px; background: #f3e6d3; font-size: 46px; }
.card.choice b { font-size: 24px; letter-spacing: -.01em; }
.card.choice .muted { max-width: 300px; }
.card.choice .go { margin-top: 8px; font-weight: 600; color: var(--accent); }
@media (max-width: 700px) { .choices { grid-template-columns: 1fr; } .card.choice { min-height: 190px; padding: 24px; } .choicewrap { margin-top: calc(5vh + env(safe-area-inset-top)); } }
@media (max-width: 700px) {
  .card.choice { min-height: 0; padding: 20px 18px; gap: 6px; }
  .card.choice .ico img, .card.choice .ico .shipico { width: 56px; height: 56px; border-radius: 14px; }
  .card.choice .ico .shipico { font-size: 30px; }
  .card.choice b { font-size: 20px; }
  .choicehead h1 { font-size: 22px; }
  .choices { gap: 14px; }
}

.choices { grid-template-columns: repeat(3, 1fr); }
.choicewrap { max-width: 1080px; }
.card.choice .ico .addrico { background: #e4ecf7; }
@media (max-width: 900px) { .choices { grid-template-columns: 1fr; } }
/* Vier tegels: 2 × 2 */
.choices { grid-template-columns: repeat(4, 1fr); }
.choicewrap { max-width: 1280px; }
.card.choice .ico .bookico { background: #f3ead7; }
@media (max-width: 1150px) { .choices { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .choices { grid-template-columns: 1fr; } }
@media print{.shiptop,.bkwiz button,.bkwiz a.small{display:none!important}}
@media (max-width:800px){.invgrid{grid-template-columns:1fr!important}}
.qrbox{display:flex;justify-content:center;margin:8px 0}.qrbox svg{max-width:240px;height:auto;border:1px solid #eee;border-radius:8px}
.reccodes{font:16px/1.7 ui-monospace,Menlo,monospace;background:#f6f6f3;border:1px dashed #ccc;border-radius:8px;padding:12px 16px;columns:2;user-select:all}
