/* cleardash: de stijl van alles. Donker grafiet, lila voor selectie, perzik voor de hoofdknop. */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  color-scheme: dark;
  --bg: oklch(25.5% .002 248);       /* achtergrond */
  --card: oklch(27.7% .004 264.5);   /* kaarten */
  --surface: oklch(30.9% .004 264.5);/* paneel, pop-ups */
  --input: oklch(33.3% .004 264.5);  /* velden, knoppen */
  --hl: oklch(39% .004 264.5);       /* actief menu, hover */
  --edge: oklch(21.8% .004 264.5);   /* lijnen en knoprand */
  --text: #fff;
  --soft: rgb(255 255 255 / .72);
  --mute: rgb(255 255 255 / .5);
  --faint: rgb(255 255 255 / .32);
  --icon: oklch(56.6% .011 267.3);
  --violet: oklch(84.8% .082 295.5); /* selectie, tellers */
  --violet-t: oklch(74.8% .103 295);
  --peach: oklch(85.8% .088 52.7);   /* hoofdknop */
  --peach-edge: oklch(63.8% .097 51.6);
  --peach-t: oklch(72% .095 52);
  --green-t: oklch(75% .12 148);
  --orange-t: oklch(76% .14 55);
  --amber-t: oklch(80% .13 85);
  --red-t: oklch(72% .115 13.5);
  --blue-t: oklch(72% .11 255);
  --sh: oklch(20.2% .005 67.5);       /* harde schaduw onder knoppen en kaarten */
  --well-inset: rgb(0 0 0 / .08);
  --row-hover: oklch(20% .006 271 / .25);
  --row-sel: oklch(20% .006 271 / .45);
  --r: 8px;
  --rc: 16px;
  --mono: 'Geist Mono', ui-monospace, monospace;

  /* oude namen, nog gebruikt door paginacss */
  --line: var(--edge);
  --line-2: oklch(43.5% .004 264.5);
  --sunk: var(--input);
  --acc: var(--violet);
  --accbg: oklch(84.8% .082 295.5 / .12);
  --blue: var(--blue-t);
  --bluebg: oklch(72% .11 255 / .12);
  --green: var(--green-t);
  --greenbg: oklch(75% .12 148 / .12);
  --red: var(--red-t);
  --redbg: oklch(72% .115 13.5 / .12);
  --amber: var(--amber-t);
  --amberbg: oklch(80% .13 85 / .12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Geist, system-ui, sans-serif; }
a { color: var(--violet); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
::placeholder { color: var(--mute); }
.mute { color: var(--mute); font-size: 13px; }
.red { color: var(--red-t); }
.grow { flex: 1; min-width: 0; }
.t { display: block; font-weight: 600; }
.s { display: block; font-size: 12.5px; color: var(--mute); }
code, .mono { font-family: var(--mono); font-size: 12.5px; }

/* Knoppen: donker met een randje onder, perzik voor de hoofdactie */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--edge); background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 0 0 var(--sh); transition: translate .15s, box-shadow .15s, background-color .15s; }
.btn:hover { translate: 0 -1px; box-shadow: 0 3px 0 0 var(--sh); }
.btn:active { translate: 0 0; box-shadow: 0 1px 0 0 var(--sh); }
.btn svg { width: 15px; height: 15px; }
.btn.accent, .btn.primary { background: var(--peach); border-color: var(--peach-edge); color: #1c1917; box-shadow: 0 2px 0 0 var(--peach-edge); }
.btn.accent:hover, .btn.primary:hover { box-shadow: 0 3px 0 0 var(--peach-edge); }
.btn.accent:active, .btn.primary:active { box-shadow: 0 1px 0 0 var(--peach-edge); }
.ibtn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--edge); background: var(--surface); color: var(--icon); cursor: pointer; box-shadow: 0 2px 0 0 var(--sh); transition: translate .15s, box-shadow .15s; }
.ibtn:hover { translate: 0 -1px; box-shadow: 0 3px 0 0 var(--sh); color: var(--text); }
.ibtn:active { translate: 0 0; box-shadow: 0 1px 0 0 var(--sh); }
.ibtn svg { width: 15px; height: 15px; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; }

/* Schil: menu links, pagina rechts */
body.shell { display: flex; min-height: 100vh; }
.side { position: sticky; top: 12px; flex: none; width: 212px; height: calc(100vh - 24px); margin: 12px 0 12px 12px; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--edge); border-radius: var(--rc); box-shadow: 0 3px 0 0 var(--sh); }
.side-top { display: flex; align-items: center; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--edge); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.logo i { width: 24px; height: 24px; border-radius: 6px; background: var(--violet); color: #1e1636; display: grid; place-items: center; }
.logo svg { width: 15px; height: 15px; }
.side nav { flex: 1; overflow: auto; padding: 4px 10px 10px; }
.sec { display: flex; align-items: center; width: 100%; padding: 14px 10px 6px; border: 0; background: none; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.sec svg { width: 14px; height: 14px; margin-left: auto; color: var(--icon); transition: rotate .15s; }
.grp.closed .sec svg { rotate: 180deg; }
.grp.closed a { display: none !important; }
.sec-plan { color: var(--violet-t); }
.sec-klant { color: var(--peach-t); }
.sec-tools { color: var(--green-t); }
.sec-links { color: var(--soft); }
.side nav a { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: var(--r); color: var(--soft); font-weight: 600; text-decoration: none; }
.side nav a svg { width: 16px; height: 16px; color: var(--icon); }
.side nav a:hover { background: var(--row-hover); color: var(--text); }
.side nav a.on { background: var(--hl); color: var(--text); }
.side nav a.on svg { color: var(--text); }
.side-foot { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--edge); }
.side-foot .av { width: 32px; height: 32px; margin-right: auto; border-radius: 50%; background: var(--bg); color: var(--soft); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.main { flex: 1; min-width: 0; }

/* Zoeken in het menu */
.search { position: relative; display: flex; align-items: center; gap: 8px; height: 36px; margin: 12px 12px 4px; padding: 0 10px; border: 1px solid var(--edge); border-radius: 10px; background: var(--input); box-shadow: inset 0 2px 0 0 var(--well-inset), 0 2px 0 0 var(--sh); }
.search:focus-within { border-color: var(--line-2); }
.search svg { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--icon); stroke-width: 1.8; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 13.5px; }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: inherit; font-size: 11px; color: var(--mute); border: 1px solid var(--edge); border-radius: 4px; padding: 0 5px; }
.search:focus-within kbd { display: none; }
.results { position: absolute; top: calc(100% + 6px); left: 0; width: 340px; z-index: 30; padding: 6px; background: var(--surface); border: 1px solid var(--edge); border-radius: 12px; box-shadow: 0 16px 40px rgb(0 0 0 / .4); }
.results a { display: block; padding: 8px 10px; border-radius: 7px; color: var(--text); text-decoration: none; }
.results a:hover, .results a.on { background: var(--hl); }
.results a b { display: block; font-weight: 600; }
.results a span { display: block; font-size: 12px; color: var(--mute); }
.results p { margin: 0; padding: 8px 10px; font-size: 12.5px; color: var(--mute); }

/* Pagina */
.page { margin: 0; padding: 32px 32px 48px; display: flex; flex-direction: column; gap: 16px; }
.phead, .title { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; margin-bottom: 6px; }
.phead h1, .title h1 { font-size: 22px; }
.phead .sub { margin: 2px 0 0; color: var(--soft); }
.phead .actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.title { align-items: baseline; }

/* Kaarten: kop met titel en uitleg, daaronder inhoud */
.card { background: var(--card); border: 1px solid var(--edge); border-radius: var(--rc); padding: 18px 20px; min-width: 0; box-shadow: 0 3px 0 0 var(--sh); }
.card.flush { padding: 0; overflow: clip; }
.chead { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--edge); }
.chead h2 { font-size: 16px; }
.chead p { margin: 2px 0 0; color: var(--soft); font-size: 13.5px; }
.chead .actions { margin-left: auto; display: flex; gap: 8px; }
.ctools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--edge); }
.error { color: var(--red-t); }
.head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.head h2 { font-size: 15px; }
.head .mute { margin-left: auto; }

/* Cijfers bovenaan */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--edge); border-radius: var(--rc); overflow: hidden; box-shadow: 0 3px 0 0 var(--sh); }
.stat { display: block; width: 100%; padding: 14px 18px; border: 0; border-left: 1px solid var(--edge); background: none; text-align: left; color: var(--text); }
.stat:first-child { border-left: 0; }
button.stat { cursor: pointer; }
button.stat:hover { background: var(--row-hover); }
.stat span { display: block; color: var(--soft); }
.stat b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 2px 0; }
.stat small { display: block; color: var(--mute); font-size: 12.5px; }
.stat small.red { color: var(--red-t); }

/* Filters: knoppenrij */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgb(0 0 0 / .09); box-shadow: inset 0 2px 0 0 var(--well-inset), inset 0 0 0 1px rgb(255 255 255 / .05); }
.filter { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 11px; white-space: nowrap; border: 0; border-radius: 7px; background: none; color: var(--soft); font-size: 13px; font-weight: 600; cursor: pointer; }
.filter:hover { color: var(--text); }
.filter.on { background: oklch(43.5% .004 264.5); color: var(--text); box-shadow: 0 1px 0 0 var(--sh); }
.filter i { font-style: normal; color: var(--mute); margin-left: 4px; }

/* Tabel met leveringen */
.tr { display: grid; grid-template-columns: 20px minmax(0, 1.2fr) minmax(0, 1.4fr) 64px 112px 96px; gap: 14px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--edge); }
.tr.th { padding: 11px 20px; color: var(--soft); font-weight: 500; }
.tr:last-child { border-bottom: 0; }
.orow { cursor: pointer; }
.orow:hover { background: var(--row-hover); }
.orow.on { background: var(--row-sel); box-shadow: inset 2px 0 0 var(--violet); }
.orow .t, .orow .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day b { display: block; font-weight: 600; }
.day small { display: block; color: var(--mute); font-size: 12.5px; }
.day.today b { color: var(--violet); }
.tr .items { color: var(--soft); }
.tr .num { font-weight: 700; }
.tr .end { text-align: right; display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.tr.up { grid-template-columns: 120px minmax(0, 1.1fr) minmax(0, 1.2fr) 64px 260px; }
.plan { display: flex; gap: 8px; align-items: center; min-width: 0; }
.plan input { height: 34px; padding: 0 10px; flex: 1; min-width: 0; font-size: 13.5px; }
.plan input::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .6; cursor: pointer; }
.plan .btn { height: 34px; }
.stat small.warn { color: var(--amber-t); }
.code { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--mute); text-decoration: none; }
.code:hover { color: var(--violet); }
.code svg { width: 13px; height: 13px; }
.tr.none { padding: 10px 20px; color: var(--faint); font-size: 13.5px; }
.tr.none .day b { font-weight: 500; color: var(--faint); }
.prow { display: flex; align-items: center; gap: 8px; padding: 8px 20px; border-bottom: 1px solid var(--edge); background: var(--bluebg); color: var(--blue-t); font-size: 13px; font-weight: 600; }
.prow svg { width: 15px; height: 15px; }
.prow span { color: var(--mute); font-weight: 400; }
.prow b { margin-left: auto; font-weight: 600; }
.wa-n { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--green-t); }
.wa-n.wait { color: var(--amber-t); font-weight: 500; }
.wa-n svg { width: 14px; height: 14px; }

/* Labels met een rand: vervoer en status */
.carrier, .pill { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid; font-size: 12px; font-weight: 600; white-space: nowrap; }
.carrier { width: 96px; }
select.carrier { appearance: none; -webkit-appearance: none; cursor: pointer; text-align: center; text-align-last: center; padding-right: 16px; background-repeat: no-repeat; background-position: right 7px center; background-size: 7px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 5'%3E%3Cpath d='M1 1l3 3 3-3' fill='none' stroke='%23999' stroke-width='1.4'/%3E%3C/svg%3E"); }
select.carrier option { background: var(--surface); color: var(--text); }
.c-open { background-color: var(--amberbg); border-color: oklch(80% .13 85 / .35); color: var(--amber-t); }
.c-il, .c-rit { background-color: var(--bluebg); border-color: oklch(72% .11 255 / .35); color: var(--blue-t); }
.c-own { background-color: oklch(76% .14 55 / .12); border-color: oklch(76% .14 55 / .4); color: var(--orange-t); }
.c-afhalen { background-color: var(--input); border-color: var(--line-2); color: var(--soft); }
.pill { border-color: var(--line-2); background: var(--input); color: var(--soft); }
.pill.red { background: var(--redbg); border-color: oklch(72% .115 13.5 / .35); color: var(--red-t); }
.pill.amber { background: var(--amberbg); border-color: oklch(80% .12 80 / .35); color: var(--amber-t, var(--amber)); }
.pill.green { background: var(--greenbg); border-color: oklch(75% .12 148 / .35); color: var(--green-t); }

/* Formulieren: één stijl voor alle invoervelden, keuzelijsten en tekstvakken (specificiteit 0, dus paginastijl mag erover) */
:where(input:not([type=checkbox], [type=radio], [type=hidden], [type=range], [type=file], [type=color]), select, textarea) { width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--edge); border-radius: 10px; background: var(--input); color: var(--text); font: inherit; font-size: 14px; min-width: 0; box-shadow: inset 0 2px 0 0 var(--well-inset); }
:where(textarea) { height: auto; min-height: 72px; padding: 8px 11px; resize: vertical; line-height: 1.45; }
:where(select) { appearance: none; -webkit-appearance: none; padding-right: 28px; cursor: pointer; background-repeat: no-repeat; background-position: right 11px center; background-size: 9px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 5'%3E%3Cpath d='M1 1l3 3 3-3' fill='none' stroke='%23999' stroke-width='1.4'/%3E%3C/svg%3E"); }
:where(select) option { background: var(--surface); color: var(--text); }
:where(input, select, textarea):focus { outline: none; border-color: var(--line-2); }
:where(input, select, textarea):disabled, :where(input)[readonly] { color: var(--mute); cursor: default; box-shadow: none; }
:where(input[type=range]) { width: 100%; accent-color: var(--violet); }
:where(input[type=checkbox], input[type=radio]) { accent-color: var(--violet); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--soft); font-size: 13px; }
.field > span:first-child { display: flex; align-items: baseline; gap: 8px; }
.field small { color: var(--mute); font-size: 12px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ffoot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.ffoot .grow { flex: 1; }
.copy { display: flex; gap: 6px; margin-bottom: 12px; }
/* Keuze als kaartjes (radio verborgen): .choices > label.choice > input[type=radio] + b + span + small */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.choice { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 9px 11px; border: 1px solid var(--edge); border-radius: 12px; background: var(--input); box-shadow: 0 2px 0 0 var(--sh); cursor: pointer; font-size: 12.5px; color: var(--soft); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { color: var(--text); font-size: 13.5px; }
.choice small { color: var(--mute); font-size: 11.5px; }
.choice:hover { border-color: var(--line-2); }
.choice:has(input:checked) { border-color: var(--violet); background: oklch(from var(--violet) l c h / .14); }
.choice:has(input:disabled) { opacity: .4; cursor: default; }
.choice:has(input:focus-visible) { outline: 2px solid var(--violet); outline-offset: 2px; }
/* Radio als segment: .seg > label.filter > input[type=radio] */
.seg label.filter input { position: absolute; opacity: 0; pointer-events: none; }
.seg label.filter:has(input:checked) { background: oklch(43.5% .004 264.5); color: var(--text); box-shadow: 0 1px 0 0 var(--sh); }
.chk { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); font-size: 13px; cursor: pointer; }
.chk input { width: 16px; height: 16px; }
.copy input { font-family: var(--mono); font-size: 12px; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; align-items: start; }
.shelp { margin: 0 0 12px; font-size: 13px; }
.chead p .pill { margin-top: 2px; }

/* Venster (order, Te doen, WhatsApp): midden in beeld; op de telefoon het hele scherm */
.drawer-bg { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / .55); opacity: 0; pointer-events: none; transition: opacity .16s; }
.drawer { position: fixed; top: 50%; left: 50%; z-index: 41; width: min(560px, calc(100vw - 48px)); max-height: calc(100vh - 64px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--rc); box-shadow: 0 24px 60px rgb(0 0 0 / .5); opacity: 0; pointer-events: none; transform: translate(-50%, -48%) scale(.985); transition: opacity .16s, transform .16s ease-out; }
.drawer:has(.panel.wide.on) { width: min(1080px, calc(100vw - 48px)); }
body.drawer-open .drawer-bg { opacity: 1; pointer-events: auto; }
body.drawer-open .drawer { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.pcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; align-items: start; }
body.instant .drawer, body.instant .drawer-bg { transition: none; }
.panel { display: none; flex: 1; min-height: 0; flex-direction: column; }
.panel.on { display: flex; }
.p-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 14px; border-bottom: 1px solid var(--edge); }
.p-head h2 { font-size: 18px; }
.p-head p { margin: 2px 0 0; color: var(--soft); font-size: 13.5px; }
.close { margin-left: auto; flex: none; width: 32px; height: 32px; border: 0; border-radius: var(--r); background: none; color: var(--mute); cursor: pointer; display: grid; place-items: center; }
.close:hover { background: var(--hl); color: var(--text); }
.close svg { width: 16px; height: 16px; }
.p-body { flex: 1; overflow: auto; padding: 14px 16px; }
.p-foot { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--edge); }
.p-foot > .btn:first-child { margin-right: auto; }
.box { padding: 14px 16px; margin-bottom: 14px; border: 1px solid var(--edge); border-radius: 14px; background: var(--card); box-shadow: 0 3px 0 0 var(--sh); }
.label { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--text); }
.label .mute, .label .link-btn { margin-left: auto; }
.label-row .link-btn { margin-left: auto; }
.block + .block { margin-top: 20px; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--edge); }
.kv span:first-child { color: var(--mute); }
.kv span:last-child { overflow: hidden; text-overflow: ellipsis; }
.note { margin-top: 10px; padding: 9px 12px; border-radius: var(--r); background: var(--amberbg); color: var(--amber-t); }
.prod { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--edge); }
.prod:first-of-type { border-top: 0; }
.prod .ico { height: 22px; color: var(--violet); }
.prod b { font-weight: 600; }
.prod small { color: var(--mute); font-size: 12.5px; }
.prod strong { margin-left: auto; font-size: 15px; }
.prod.free { align-items: flex-start; font-size: 13.5px; line-height: 1.45; }
.prod.free strong { white-space: nowrap; }
.empty { padding: 24px 0; text-align: center; color: var(--mute); }

/* Leveradressen */
.addr { display: block; width: 100%; text-align: left; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; border: 1px solid var(--edge); background: var(--input); box-shadow: 0 2px 0 0 var(--sh); }
.addr.pick { cursor: pointer; }
.addr.pick:hover { border-color: var(--line-2); }
.addr.on { border-color: oklch(84.8% .082 295.5 / .6); background: var(--accbg); }
.addr b { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.addr b em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--violet); }
.addr span { display: block; color: var(--soft); margin-top: 2px; }
.addr-actions { display: flex; gap: 14px; margin-top: 8px; }
.add-addr { width: 100%; height: 34px; border-radius: var(--r); border: 1px dashed var(--line-2); background: transparent; color: var(--soft); cursor: pointer; }
.add-addr:hover { color: var(--text); border-color: var(--icon); }
.addr-form { display: none; margin-top: 8px; padding: 12px; border-radius: 10px; background: var(--bg); gap: 8px; grid-template-columns: 1fr 1fr; }
.addr-form.on { display: grid; }
.addr-form .wide { grid-column: span 2; }
.addr-form .btn { justify-content: center; }
.addr-hint { text-align: left; padding: 7px 10px; border: 1px dashed oklch(84.8% .082 295.5 / .6); border-radius: var(--r); background: var(--accbg); color: var(--violet); font-size: 13px; cursor: pointer; }

/* Velden */
.addr-form input, .addr-form select, .add input, .login input, .wa-filter, select.link, .plan input { height: 38px; padding: 0 12px; border: 1px solid var(--edge); border-radius: 10px; background: var(--input); color: var(--text); min-width: 0; box-shadow: inset 0 2px 0 0 var(--well-inset), 0 2px 0 0 var(--sh); }
.addr-form input:focus, .addr-form select:focus, .add input:focus, .login input:focus, .wa-filter:focus { outline: none; border-color: var(--line-2); }
.addr-form select option { background: var(--surface); }

.link-btn { padding: 0; border: 0; background: none; color: var(--violet); font-weight: 600; font-size: 13px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--mute); }
.link-btn.danger.sure { color: var(--red-t); }

/* Taken */
.task { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.task + .task { border-top: 1px solid var(--edge); }
.check { flex: none; width: 18px; height: 18px; padding: 0; border-radius: 5px; border: 1px solid var(--edge); background: var(--input); cursor: pointer; display: grid; place-items: center; box-shadow: inset 0 2px 0 0 var(--well-inset), 0 1px 0 0 var(--sh); }
.check svg { width: 11px; height: 11px; fill: none; stroke: transparent; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.check:hover { border-color: var(--text); }
.done .check { background: var(--violet); border-color: oklch(64.3% .123 294.3); box-shadow: 0 1px 0 0 oklch(64.3% .123 294.3); }
.done .check svg { stroke: #1e1636; }
.task.done .t { text-decoration: line-through; color: var(--faint); }
.task.hot .check { border-color: var(--red-t); }
.task .t { font-weight: 500; }
.add input { width: 100%; margin-top: 10px; }

/* Te maken */
.group { padding: 12px 0; border-top: 1px solid var(--edge); }
.group:first-child { border-top: 0; padding-top: 0; }
.ghead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ghead .carrier { width: auto; }
.gday { font-weight: 600; }
.ghead .mute { margin-left: auto; }
.mks { display: flex; flex-wrap: wrap; gap: 6px; }
.mk { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 7px; border-radius: var(--r); background: var(--input); border: 1px solid var(--edge); font-weight: 600; box-shadow: 0 2px 0 0 var(--sh); }
.mk b { font-size: 15px; }
.mk small { font-size: 12px; font-weight: 500; color: var(--mute); }
.ico { width: 18px; height: 22px; display: flex; align-items: flex-end; justify-content: center; color: var(--icon); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--input); border-radius: var(--r); padding: 7px 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--edge); }

/* WhatsApp */
.msg { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--edge); }
.msg:first-child { border-top: 0; }
.msg .grow { min-width: 0; }
.mtop { display: flex; align-items: center; gap: 8px; }
.mtop .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clamp { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.bubble { max-width: 84%; width: fit-content; margin: 6px 0 0; padding: 8px 11px; border-radius: 10px; background: var(--hl); white-space: pre-line; }
.bubble.me { margin-left: auto; background: oklch(84.8% .082 295.5 / .16); }
.bubble .when { display: block; font-size: 11px; color: var(--mute); margin-top: 2px; text-align: right; }
.wa-av { flex: none; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--hl); color: var(--soft); display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; }
.wa-unread { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--violet); color: #1e1636; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.wa-open { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--amber-t); }
.wa-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.wa-tab { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px 0 4px; border: 1px solid transparent; border-radius: var(--r); background: none; color: var(--soft); font-weight: 600; font-size: 13px; white-space: nowrap; cursor: pointer; }
.wa-tab .wa-av { width: 26px; height: 26px; font-size: 10.5px; }
.wa-tab:hover { color: var(--text); }
.wa-tab.on { background: var(--surface); border-color: var(--edge); color: var(--text); box-shadow: 0 2px 0 0 var(--sh); }
.wa-pane { display: none; }
.wa-pane.on { display: block; }
.wa-who { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.wa-who b { display: block; font-weight: 600; }
.wa-who small { display: block; color: var(--mute); }
.wa-who .wa-unread, .wa-who .wa-open { margin-left: auto; }
.wa-img { display: block; max-width: 240px; max-height: 240px; border-radius: var(--r); margin-bottom: 4px; }
.wa-file { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; margin-bottom: 4px; border-radius: var(--r); background: var(--input); color: var(--text); font-weight: 600; text-decoration: none; }
.wa-file::before { content: ''; width: 12px; height: 14px; border: 1.5px solid currentColor; border-radius: 2px; }
.wa-file.none { color: var(--mute); font-weight: 500; }
.wa-file.none::before { display: none; }
.bubble audio { display: block; max-width: 240px; height: 36px; margin-bottom: 4px; }
.wa-body { display: block; }
.wa-body a { color: var(--blue-t); word-break: break-all; }
.ai { margin-top: 12px; padding: 10px 12px; border-radius: var(--r); border: 1px dashed var(--line-2); font-size: 13px; color: var(--mute); }

/* Klanten en klantpagina */
.task select.carrier { flex: none; }
.klant { padding: 0; }
.d-head { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--edge); }
.d-head h1 { font-size: 22px; }
.d-sub { display: flex; align-items: center; gap: 10px; margin-top: 4px; color: var(--soft); }
.d-amount { margin-left: auto; text-align: right; }
.d-body { padding: 20px 24px 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-content: start; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--hl); color: var(--text); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.orow-link { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--edge); color: var(--text); text-decoration: none; }
.orow-link:hover .t { color: var(--violet); }
a.t { color: var(--text); text-decoration: none; }
a.t:hover { color: var(--violet); }

/* Pop-up (WhatsApp koppelen) */
.modal { width: min(560px, calc(100vw - 32px)); border: 1px solid var(--edge); border-radius: var(--rc); padding: 20px; background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgb(0 0 0 / .5); }
.modal::backdrop { background: rgb(0 0 0 / .5); }
.mhead { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.mtitle { font-size: 18px; }
.x { margin-left: auto; width: 32px; height: 32px; border-radius: var(--r); border: 0; background: none; color: var(--mute); font-size: 20px; line-height: 1; cursor: pointer; }
.x:hover { background: var(--hl); color: var(--text); }
.wa-filter { width: 100%; margin: 12px 0 8px; }
.wa-list { max-height: 52vh; overflow: auto; margin: 0 -6px; }
.wa-row { display: flex; align-items: flex-start; gap: 12px; padding: 9px 6px; border-radius: var(--r); cursor: pointer; }
.wa-row:hover { background: var(--row-hover); }
.wa-row input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--violet); }
.wa-row .clamp { color: var(--faint); }
.wa-other { color: var(--amber-t); }
.wa-auto { display: none; font-size: 12px; font-weight: 600; color: var(--violet); white-space: nowrap; }
.wa-row.auto .wa-auto { display: inline; }
.mfoot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--edge); }
.mfoot .mute { margin-right: auto; }
/* Melding in een venster: rood bij een fout, groen met .ok */
.alert { margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; background: var(--redbg); color: var(--red-t); }
.alert.ok { background: var(--greenbg); color: var(--green-t); }
.msub { margin: 0 0 14px; font-size: 13.5px; }
.cmodal { width: min(620px, calc(100vw - 24px)); }
.cmodal .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cmodal .field.wide { grid-column: 1 / -1; }
@media (max-width: 600px) { .cmodal .fields { grid-template-columns: minmax(0, 1fr); } }

.lightbox { padding: 0; border: 0; background: none; max-width: 92vw; max-height: 92vh; overflow: visible; cursor: zoom-out; }
.lightbox::backdrop { background: rgb(0 0 0 / .82); }
.lightbox img { display: block; max-width: 92vw; max-height: 86vh; border-radius: var(--r); }
.lightbox a { display: inline-block; margin-top: 10px; color: #fff; font-size: 13px; }

/* Inloggen */
.login { max-width: 340px; margin: 18vh auto 0; display: flex; flex-direction: column; gap: 10px; }
.login .logo { margin-bottom: 6px; }
.login .btn { justify-content: center; height: 40px; }

@media (max-width: 1100px) {
  .tr { grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr) 50px 112px 70px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Keuzelijsten: eigen donkere pop-up (Chrome/Edge), anders de gewone van de browser */
@supports (appearance: base-select) {
  select.carrier, .addr-form select { appearance: base-select; }
  select.carrier { position: relative; background-image: none; padding: 0 16px; justify-content: center; }
  select.carrier::picker-icon { position: absolute; right: 7px; font-size: 8px; opacity: .7; }
  .addr-form select { display: flex; align-items: center; }
  .addr-form select::picker-icon { color: var(--icon); font-size: 10px; }
  ::picker(select) { appearance: base-select; margin-top: 4px; padding: 4px; min-width: 160px; border: 1px solid var(--edge); border-radius: 12px; background: var(--surface); box-shadow: 0 3px 0 0 var(--sh), 0 18px 40px rgb(0 0 0 / .45); }
  select option { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; color: var(--text); font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer; }
  select option:hover, select option:focus-visible { background: var(--hl); outline: 0; }
  select option::checkmark { order: 1; margin-left: auto; color: var(--violet); }
  select.carrier option::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
  select.carrier option[value="open"]::before { background: var(--amber-t); }
  select.carrier option[value="il"]::before { background: var(--blue-t); }
  select.carrier option[value="own"]::before { background: var(--orange-t); }
  select.carrier option[value="afhalen"]::before { background: var(--icon); }
}

/* Paneel: titel met keuzelijst rechts, tabs, oudere berichten */
.label-end { margin-left: auto; display: inline-flex; }
.tabs { gap: 2px; padding: 3px; border-radius: 10px; background: rgb(0 0 0 / .09); box-shadow: inset 0 2px 0 0 var(--well-inset), inset 0 0 0 1px rgb(255 255 255 / .05); }
.tab { height: 26px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--soft); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.on { background: oklch(43.5% .004 264.5); color: var(--text); box-shadow: 0 1px 0 0 var(--sh); }
.tabpane { display: none; }
.tabpane.on { display: block; }
.pane-tools { display: flex; justify-content: flex-end; margin: -2px 0 10px; }
.bubble.old { display: none; }
.more { display: block; width: 100%; height: 30px; margin-bottom: 6px; border: 1px dashed var(--line-2); border-radius: var(--r); background: none; color: var(--soft); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.more:hover { color: var(--text); border-color: var(--icon); }
.more span { color: var(--mute); margin-left: 4px; }
.form-btns { display: flex; gap: 8px; }
.form-btns .btn { flex: 1; justify-content: center; }

/* Klantpagina: twee kolommen met dezelfde blokken als het orderpaneel */
.who { display: flex; align-items: center; gap: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.phead .actions .mute { margin-right: 4px; }
.orow-link { padding: 10px 0; border-top: 1px solid var(--edge); }
.orow-link:first-of-type { border-top: 0; }

/* Gesprekken: vaste hoogte, scrollen, nieuwste onderaan */
.wa-pane.on { max-height: 420px; overflow: auto; padding-right: 4px; }
.wa-pane::-webkit-scrollbar { width: 6px; }
.wa-pane::-webkit-scrollbar-thumb { background: var(--hl); border-radius: 3px; }

/* Vinkje "gemaakt" per order */
.mk-orders { margin-top: 10px; }
.mk-orders .task { padding: 7px 0; }
.mk-orders .task.done .t { text-decoration: line-through; color: var(--faint); }

/* Planning: balk per dag (plakt bovenaan bij scrollen), pickup als regel, lege dagen samen */
.dayband { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 9px 20px; background: oklch(26.5% .003 260); border-bottom: 1px solid var(--edge); }
.dayband .end { margin-left: auto; display: flex; gap: 6px; }
.daypill { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 26px; border-radius: 7px; background: var(--hl); font-weight: 700; box-shadow: 0 2px 0 0 var(--sh); }
.daypill.today { background: var(--violet); color: #1e1636; }
.daypill.no-day { background: none; border: 1px dashed var(--line-2); color: var(--mute); box-shadow: none; }
.no-orders { padding: 11px 20px 11px 54px; color: var(--faint); font-size: 13.5px; border-bottom: 1px solid var(--edge); }
.tr.pick { background: var(--bluebg); }
.tr.pick .t { color: var(--blue-t); }
.pick-ico { color: var(--blue-t); display: grid; }
.pick-ico svg { width: 17px; height: 17px; }
.carrier { text-align: center; }
.daypill.today.no-day { background: var(--violet); border: 0; color: #1e1636; box-shadow: 0 2px 0 0 var(--sh); }

/* Menu: teller bij Inbox, pijltje bij externe link */
.nav-n { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--violet); color: #1e1636; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.side nav a svg + svg { width: 12px; height: 12px; margin-left: auto; }
/* Lijstpagina's (Pickups, Te maken, Inbox, Pakbonnen, Instellingen) */
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--edge); }
.lrow:last-child { border-bottom: 0; }
.lrow .grow .t, .lrow .grow .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.lrow, .lrow a.grow { color: inherit; text-decoration: none; }
.lrow .grow { display: flex; flex-direction: column; }
a.lrow:hover { background: var(--row-hover); }
.card .body { padding: 14px 20px; }
.soon { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px dashed var(--line-2); color: var(--mute); font-size: 12px; font-weight: 600; }
.ok { color: var(--green-t); }

/* ---------- Telefoon: voelt als een app ---------- */
.tabbar, .menu-close { display: none; }
@media (max-width: 900px) {
  html { -webkit-text-size-adjust: 100%; }
  html, body.shell { overflow-x: clip; }
  body.shell { display: block; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .plan input, .lvs-search input, .add input, .addr-form input, .search input { font-size: 16px; }

  /* Bovenbalk: logo en zoeken; het menu zelf komt via Meer */
  .side { position: sticky; top: 0; z-index: 30; width: auto; height: auto; margin: 0; border-radius: 0; border-width: 0 0 1px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; padding-top: env(safe-area-inset-top); box-shadow: none; }
  .side .search { min-width: 0; }
  .side-top { height: 52px; border: 0; padding: 0 6px 0 14px; }
  .side .search { margin: 0 12px 0 4px; }
  .side .search kbd { display: none; }
  .side .results { width: calc(100vw - 24px); left: auto; right: 0; }
  .side nav, .side-foot { display: none; }
  body.menu-open .side { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: stretch; border: 0; }
  body.menu-open .side-top { border-bottom: 1px solid var(--edge); padding-right: 12px; }
  body.menu-open .side nav { display: block; flex: 1; overflow: auto; padding: 8px 14px 24px; }
  body.menu-open .side nav a { height: 46px; font-size: 16px; }
  body.menu-open .side .search { margin: 10px 14px; }
  body.menu-open .side-foot { display: flex; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  body.menu-open .menu-close { display: inline-grid; margin-left: auto; }
  body.menu-open { overflow: hidden; }

  /* Tabbalk onderin */
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--edge); }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border: 0; border-radius: 10px; background: none; color: var(--mute); font-size: 11px; font-weight: 600; text-decoration: none; cursor: pointer; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .on { color: var(--text); background: var(--hl); }
  .tabbar b { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--violet); color: #1e1636; font-size: 10.5px; display: grid; place-items: center; }
  body.drawer-open .tabbar { display: none; }

  /* Pagina */
  .page { padding: 16px 12px 24px; gap: 12px; }
  .phead { margin-bottom: 0; gap: 10px; }
  .phead h1 { font-size: 24px; }
  .phead .sub { font-size: 13.5px; }
  .phead .actions { margin-left: 0; width: 100%; }
  .phead .actions .btn.accent { flex: 1; justify-content: center; }
  .card, .stats, .box { border-radius: 14px; }
  .chead { padding: 14px 16px; flex-wrap: wrap; }
  .chead .actions { margin-left: auto; }
  .chead .actions .mute { display: none; }
  .ctools { padding: 10px 12px; }
  .ctools .seg { display: flex; width: 100%; }
  .ctools .filter { flex: 1 1 0; min-width: 0; height: auto; padding: 6px 2px; display: flex; flex-direction: column-reverse; align-items: center; gap: 1px; font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ctools .filter i { margin: 0; font-size: 16px; font-weight: 700; color: inherit; }
  .card .body { padding: 12px 16px; }
  .grid2, .cols { grid-template-columns: 1fr; gap: 12px; }
  .btn { height: 40px; }
  .btn.sm { height: 34px; }

  /* Cijfers: 2 bij 2, compact */
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 12px 14px; }
  .stat b { font-size: 22px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--edge); }

  /* Orders als kaartjes: vinkje, klant + vervoer, producten + WhatsApp */
  .tr.th { display: none; }
  .tr.orow, .tr.pick { grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "c k car" "c i wa"; gap: 4px 10px; padding: 12px 14px; }
  .tr.orow > :nth-child(1), .tr.pick > :nth-child(1) { grid-area: c; align-self: center; }
  .tr.orow > :nth-child(2), .tr.pick > :nth-child(2) { grid-area: k; }
  .tr.orow > :nth-child(3), .tr.pick > :nth-child(3) { grid-area: i; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tr.orow > :nth-child(4), .tr.pick > :nth-child(4) { display: none; }
  .tr.orow > :nth-child(5), .tr.pick > :nth-child(5) { grid-area: car; }
  .tr.orow > :nth-child(6), .tr.pick > :nth-child(6) { grid-area: wa; }
  .tr .t { font-size: 15px; }
  .check { width: 26px; height: 26px; border-radius: 7px; }
  .check svg { width: 15px; height: 15px; }
  .carrier { width: 104px; height: 28px; font-size: 12px; }
  .dayband { top: calc(53px + env(safe-area-inset-top)); padding: 8px 14px; }
  .dayband .mute { font-size: 12.5px; }
  .dayband .pill:first-child { display: none; }
  .daypill { width: 92px; }
  .no-orders { padding: 10px 14px 10px 56px; }

  /* Niet ingepland: klant, producten, datum kiezen */
  .tr.up { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 14px; }
  .tr.up.th, .tr.up > .day, .tr.up > .num { display: none; }
  .plan input { height: 40px; }

  /* Paneel: hele scherm */
  .drawer, .drawer:has(.panel.wide.on) { inset: 0; width: 100vw; height: auto; max-height: none; border: 0; border-radius: 0; transform: translateY(16px); padding-top: env(safe-area-inset-top); }
  body.drawer-open .drawer { transform: none; }
  .pcols { grid-template-columns: minmax(0, 1fr); }
  .p-foot .btn.accent { flex: 1; justify-content: center; }
  .p-head { padding: 14px 14px 12px; }
  .p-body { padding: 12px; -webkit-overflow-scrolling: touch; }
  .p-foot { padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
  .box { padding: 14px; }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  .wa-pane.on { max-height: 55vh; }
  .addr-form { grid-template-columns: 1fr; }
  .addr-form .wide { grid-column: auto; }

  /* Lijsten en klanten */
  .lrow { padding: 12px 14px; flex-wrap: wrap; }
  .lrow > .mute { width: 100%; padding-left: 38px; font-size: 13px; order: 5; }
  .card.narrow, .card.wide { max-width: none; }
  .task { flex-wrap: wrap; }
  .d-head { padding: 16px; }
  .who .avatar { width: 40px; height: 40px; }
}

/* Qargo: order opzoeken */
.qsearch { display: flex; gap: 8px; }
.qsearch input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--edge); border-radius: 10px; background: var(--input); color: var(--text); font-size: 15px; box-shadow: inset 0 2px 0 0 var(--well-inset); }
.qsearch input:focus { outline: none; border-color: var(--line-2); }
.qsearch .btn { height: 40px; }

/* Versienummer naast het logo */
.logo .ver { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--hl); color: var(--mute); font-family: var(--mono); font-size: 11px; font-weight: 500; }

/* Datumkiezer (date_field) */
.dpick { position: relative; }
.dpick-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--edge); border-radius: 10px; background: var(--input); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; box-shadow: inset 0 2px 0 0 var(--well-inset); }
.dpick-btn svg { width: 16px; height: 16px; color: var(--icon); }
.dpick-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 272px; padding: 10px; border: 1px solid var(--edge); border-radius: 12px; background: var(--surface); box-shadow: 0 2px 0 0 var(--sh), 0 12px 32px #0007; }
.dpick-pop[hidden] { display: none; }
.dpick-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dpick-head b { font-size: 14px; }
.dpick-head .ibtn { width: 28px; height: 28px; font-size: 16px; }
.dpick-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dpick-grid i { font-style: normal; font-size: 11.5px; color: var(--mute); text-align: center; padding: 4px 0; }
.dpick-grid button { height: 32px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.dpick-grid button:hover { background: var(--row-hover); }
.dpick-grid .out { color: var(--mute); opacity: .5; }
.dpick-grid .wk { color: var(--soft); }
.dpick-grid .today { box-shadow: inset 0 0 0 1px var(--violet); }
.dpick-grid .on { background: var(--violet); color: #1a1530; font-weight: 600; }

/* Gmail: lijst met mails (Context en Inbox) */
.mails { display: flex; flex-direction: column; }
.mail { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-top: 1px solid var(--edge); color: var(--text); text-decoration: none; }
.mail:first-child { border-top: 0; }
.mail:hover .mail-sub { color: var(--violet-t); }
.mail-top { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.mail-top b { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-top .mute { font-size: 12px; flex: none; }
.mail-sub { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-snip { font-size: 12.5px; color: var(--mute); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mail.unread .mail-sub { font-weight: 600; }
.mail.unread .mail-top b::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--violet); vertical-align: 1px; }
.card .mails { padding: 4px 18px 10px; }
.plan .dpick-btn span { white-space: nowrap; }

/* Klanten: filter boven de lijst */
.kfind { padding: 14px 18px; border-bottom: 1px solid var(--edge); }
.kfind input { max-width: 420px; }
.krow { padding: 10px 18px; }
.krow .s .mono { font-size: 12px; }

/* Qargo-icoon bij een order: grijs = aangemeld bij I&L, groen = in Qargo */
.qg { display: inline-flex; flex: none; color: var(--faint); }
.qg svg { width: 14px; height: 14px; }
.qg.on { color: var(--green-t); }
.qbook { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qbook .wide { grid-column: 1 / -1; }
.qbook .ffoot { margin-top: 0; }
.qbook .alert { margin-top: 0; }

/* Laden: balk bovenin, rondje in de knop, pagina even gedimd bij wisselen */
.busy-bar { position: fixed; z-index: 1000; top: 0; left: 0; right: 0; height: 2px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .2s; }
.busy-bar::after { content: ''; position: absolute; top: 0; bottom: 0; width: 35%; background: var(--violet); border-radius: 2px; animation: busy-bar 1s ease-in-out infinite; }
body.loading .busy-bar { opacity: 1; transition-delay: .1s; }
@keyframes busy-bar { from { left: -35%; } to { left: 100%; } }
.busy { position: relative; pointer-events: none; color: transparent !important; }
.busy > * { visibility: hidden; }
.busy::after { content: ''; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border: 2px solid var(--text); border-right-color: transparent; border-radius: 50%; animation: busy-spin .6s linear infinite; }
.btn.accent.busy::after { border-color: #2a1a10; border-right-color: transparent; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
body.loading { cursor: progress; }
body.navigating .page { opacity: .55; transition: opacity .15s .1s; }
@media (prefers-reduced-motion: reduce) { .busy-bar::after, .busy::after { animation-duration: 2s; } }

/* E-mail koppelen (Context) */
.mlinks { flex-wrap: wrap; gap: 6px; }
.mlinks .link-btn { margin-left: auto; }
.pill-x { margin: 0 -3px 0 4px; padding: 0 2px; border: 0; background: none; color: inherit; font: inherit; line-height: 1; cursor: pointer; opacity: .6; }
.pill-x:hover { opacity: 1; }
.mlink-form { margin-bottom: 10px; }

/* ---------- Telefoon, ontwerp M1: tabbalk met plusknop, vellen van onderen, grote invoer ---------- */
.top-title, .msearch, .bsheet, .sheet-dim, .qacts, .wkstrip { display: none; }
@media (max-width: 900px) {
  body.shell { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body.sheet-open, body.drawer-open { overflow: hidden; }

  /* Bovenbalk: titel van de pagina + zoeken (opent een zoekveld eronder) */
  .side { display: block; background: oklch(25.5% .002 248 / .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .side-top { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px 0 14px; }
  .side-top .logo { font-size: 0; gap: 0; }
  .side-top .logo .ver { display: none; }
  .top-title { display: block; flex: 1; min-width: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .msearch { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--input); }
  .msearch svg { width: 19px; height: 19px; }
  .side .search { display: none; margin: 0 12px 12px; height: 48px; }
  body.search-open .side .search { display: flex; }
  .side .search input { height: 46px; font-size: 16px; }
  .side .results { left: 0; right: 0; width: auto; max-height: 60vh; overflow: auto; }
  .side .results a { min-height: 52px; }
  .phead h1 { display: none; }
  .phead { min-height: 0; }

  /* Tabbalk: vier tabs met in het midden de plusknop */
  .tabbar { grid-template-columns: repeat(5, 1fr); align-items: start; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: oklch(27.7% .004 264.5 / .94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  .tabbar a, .tabbar button { padding: 5px 0 3px; }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar .on { background: none; color: var(--text); }
  .tabbar .fab { justify-self: center; width: 58px; height: 52px; margin-top: -18px; padding: 0; display: grid; place-items: center; border-radius: 18px; background: var(--peach); color: #2a1a10; box-shadow: 0 3px 0 0 var(--peach-edge), 0 10px 24px rgb(0 0 0 / .45); }
  .tabbar .fab svg { width: 26px; height: 26px; }
  body.sheet-open .tabbar { z-index: 62; }

  /* Vellen van onderen (Nieuw, Meer) */
  .sheet-dim { display: block; position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.sheet-open .sheet-dim { opacity: 1; pointer-events: auto; }
  .bsheet { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 85dvh; overflow: auto; padding: 0 14px calc(100px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--surface); box-shadow: 0 -10px 40px rgb(0 0 0 / .45); transform: translateY(110%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
  .bsheet.on { transform: none; }
  .grab { height: 22px; display: grid; place-items: center; }
  .grab::after { content: ''; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); }
  .bs-title { margin: 0 6px 12px; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
  .bs-list { display: grid; gap: 4px; }
  .bs-list a { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 16px; color: var(--text); text-decoration: none; }
  .bs-list a:active { background: var(--hl); }
  .bs-list b { display: block; font-size: 16px; }
  .bs-list small { color: var(--mute); font-size: 13.5px; }
  .bs-i { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 15px; background: var(--input); color: var(--text); }
  .bs-i svg { width: 22px; height: 22px; }
  .bs-i.accent { background: var(--peach); color: #2a1a10; }
  .bs-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .bs-tiles a { display: grid; justify-items: center; gap: 8px; padding: 16px 4px 14px; border-radius: 18px; background: var(--card); color: var(--soft); font-size: 13px; font-weight: 600; text-align: center; text-decoration: none; box-shadow: 0 2px 0 0 var(--sh); }
  .bs-tiles a:active { background: var(--hl); }

  /* Pagina en bouwstenen: groter, voor vingers */
  .page { padding: 12px 14px 24px; }
  .btn { height: 46px; border-radius: 13px; font-size: 15px; }
  .btn.sm { height: 40px; }
  .ibtn { width: 42px; height: 42px; }
  :where(input:not([type=checkbox], [type=radio], [type=range], [type=hidden]), select) { min-height: 48px; font-size: 16px; }
  :where(textarea) { font-size: 16px; }
  .filter { height: 38px; padding: 0 14px; font-size: 14px; }
  .dpick-btn { height: 48px; border-radius: 12px; font-size: 16px; }
  select.carrier, select.link { min-height: 0; height: 34px; font-size: 13px; }
  .seg { border-radius: 12px; }
  .seg .filter { border-radius: 9px; }
  /* Toetsenbord open: tabbalk weg, zodat er niets over de invoer zweeft */
  body:has(:is(input:not([type=checkbox], [type=radio], [type=range]), textarea, select):focus) .tabbar { display: none; }
  .card, .stats, .box { border-radius: 18px; }

  /* Vensters: hele scherm, kop bovenaan en knoppen onderaan vast (boven het toetsenbord) */
  dialog.modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0 16px; border: 0; border-radius: 0; overflow: auto; overscroll-behavior: contain; }
  dialog.modal[open] { animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1); }
  dialog.modal .mhead { position: sticky; top: 0; z-index: 5; margin: 0 -16px 6px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--surface); border-bottom: 1px solid var(--edge); }
  dialog.modal .mtitle { flex: 1; font-size: 18px; }
  dialog.modal .mhead .x { width: 40px; height: 40px; border-radius: 50%; background: var(--input); }
  dialog.modal .mfoot { position: sticky; bottom: 0; z-index: 5; margin: 16px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--edge); }
  dialog.modal .mfoot .btn { flex: 1; justify-content: center; }
  dialog.modal .mfoot { flex-wrap: wrap; }
  dialog.modal[open] { display: flex; flex-direction: column; }
  dialog.modal > form { flex: 1 0 auto; display: flex; flex-direction: column; }
  dialog.modal .mfoot { margin-top: auto; }
  dialog.modal .mfoot::before { content: ''; }
  .kv:has(.plan) { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .plan { flex-wrap: wrap; }
  dialog.modal .mfoot .btn.accent, dialog.modal .mfoot .btn.primary { order: -1; flex-basis: 100%; }
  dialog.modal .mfoot .grow, dialog.modal .mfoot > .mute { display: none; }
  dialog.modal .fields { grid-template-columns: minmax(0, 1fr) !important; }

  /* Orderpaneel: vel van onderen met greep, snelknoppen en knoppen onderaan */
  .drawer, .drawer:has(.panel.wide.on) { inset: auto 0 0 0; top: calc(36px + env(safe-area-inset-top)); width: 100vw; height: auto; max-height: none; padding-top: 0; border: 0; border-radius: 24px 24px 0 0; transform: translateY(100%); opacity: 1; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
  body.drawer-open .drawer:is(*, :has(.panel.wide.on)) { transform: none; }
  .drawer .p-head { position: relative; padding: 24px 16px 10px; border-bottom: 0; touch-action: none; }
  .drawer .p-head::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line-2); }
  .drawer .p-head h2 { font-size: 21px; letter-spacing: -.02em; }
  .drawer .close { width: 36px; height: 36px; border-radius: 50%; background: var(--input); }
  .qacts { display: flex; gap: 8px; padding: 0 16px 12px; border-bottom: 1px solid var(--edge); }
  .qacts:empty { display: none; }
  .qacts a { flex: 1; height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 14px; background: var(--input); color: var(--text); font-weight: 600; text-decoration: none; box-shadow: 0 2px 0 0 var(--sh); }
  .qacts svg { width: 18px; height: 18px; }
  .drawer .p-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .drawer .p-foot .btn { flex: 1; justify-content: center; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (max-width: 900px) {
  .krow { flex-wrap: wrap; gap: 8px 10px; padding: 14px 16px; }
  .krow .grow { flex: 1 0 100%; }
  .krow .t { font-size: 16px; }
  .krow .carrier { margin-left: auto; }
}
