/* Chaara Planning. Indeling: monteur = één kolom op de telefoon met grote knoppen; planner = weekbord
   (rij per monteur, kolom per dag) met een paneel dat van rechts inschuift. Huisstijl van Chaara Infra
   (zelfde tokens als de kantoor-app): geel als hoofdactie, antraciet voor kop en tekst, licht en rustig.
   Bewust alleen een lichte weergave: buiten op de telefoon en op kantoor het best leesbaar. */
:root {
  color-scheme: light;
  --bg: #F5F5F1; --vlak: #FFFFFF; --vlak2: #FAFAF7; --lijn: #E2E2DA; --lijn2: #EFEFE9;
  --tekst: #1F2022; --zacht: #63666A; --zachter: #9A9D9F;
  --geel: #F2D516; --geel-z: #FBF6D0; --geel-r: #E8D77A; --geel-d: #8A7A00;
  --donker: #2A2B2D; --donker2: #3A3B3E; --op-donker: #C9CBCD;
  --groen: #23784D; --groen-z: #E2F1E8; --oranje: #9A5C00; --oranje-z: #FCEFD6;
  --rood: #B5372A; --rood-z: #FBE6E2; --blauw: #2558B8; --blauw-z: #E6EEFB;
  --hout: #9A5F22; --steen: #56636B; --herstel: #7E4A9E; --assist: #1C7484;
  --kop: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --tekstfont: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 12px;
  --schaduw: 0 10px 30px rgba(31, 32, 34, .16);
}

html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--tekst); font: 15px/1.45 var(--tekstfont); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
h1, h2, h3 { font-family: var(--kop); margin: 0; text-wrap: balance; letter-spacing: .005em; }
:focus-visible { outline: 3px solid var(--blauw); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.verborgen-invoer { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* gedeelde onderdelen */
.soort { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--zacht); white-space: nowrap; }
.soort::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--kleur, var(--zachter)); flex: none; }
.soort-timmerwerk { --kleur: var(--hout); } .soort-straatwerk { --kleur: var(--steen); }
.soort-herstel { --kleur: var(--herstel); } .soort-assistentie { --kleur: var(--assist); }

.status { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--lijn2); color: var(--zacht); }
.status-klaar-fotos { background: var(--groen-z); color: var(--groen); }
.status-klaar-zonder { background: var(--oranje-z); color: var(--oranje); }
.status-niet-klaar { background: var(--rood-z); color: var(--rood); }
.status-onderweg { background: var(--blauw-z); color: var(--blauw); }
.status-niet-gemeld { background: var(--vlak); color: var(--rood); box-shadow: inset 0 0 0 1.5px var(--rood); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-gepland::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }

.knop { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--donker); background: var(--donker); color: #FFFFFF; font-weight: 700; text-decoration: none; }
.knop.geel { background: var(--geel); border-color: var(--geel); color: var(--tekst); }
.knop.licht { background: var(--vlak); border-color: var(--lijn); color: var(--tekst); }
.knop.rood { background: var(--vlak); border-color: var(--rood); color: var(--rood); }
.knop.klein { min-height: 32px; padding: 4px 12px; font-size: 13.5px; border-radius: 8px; }
.knop.tekst { background: none; border-color: transparent; color: var(--zacht); padding-inline: 8px; }

.melding-onder { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--donker); color: #FFFFFF; padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 60; box-shadow: var(--schaduw); max-width: calc(100% - 32px); }

/* ================= MONTEUR (telefoon) ================= */
.m-app { position: relative; height: 100%; display: flex; flex-direction: column; background: var(--bg); font-size: 17px; overflow: hidden; }
.m-kop { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--donker); color: #FFFFFF; flex: none; }
.m-kop img { height: 26px; width: auto; }
.m-kop .wie { line-height: 1.15; min-width: 0; }
.m-kop .wie b { display: block; font-family: var(--kop); font-size: 19px; }
.m-kop .wie span { font-size: 13px; color: var(--op-donker); }
.m-kop .rond { margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--donker2); color: #FFFFFF; display: grid; place-items: center; }
.m-kop .rond.draait .ico { animation: draai 1s linear infinite; }
@keyframes draai { to { transform: rotate(360deg); } }
.m-inhoud { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.m-balk { padding: 12px 14px; border-radius: 12px; background: var(--geel-z); border: 1px solid var(--geel-r); font-size: 15px; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.m-balk.rood { background: var(--rood-z); border-color: #F0C2BB; color: var(--rood); }
.m-dagkop { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.m-dagkop h2 { font-size: 24px; }
.m-dagkop span { color: var(--zacht); font-size: 15px; }
.m-leeg { color: var(--zacht); font-size: 15px; padding: 2px 2px 6px; }

.m-klus { background: var(--vlak); border: 1px solid var(--lijn); border-radius: 14px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.m-klus.vandaag { border-color: #D9D7C9; box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.m-klus .boven { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.m-klus .tijd { font-weight: 700; font-variant-numeric: tabular-nums; }
.m-klus .nieuw { margin-left: auto; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--geel); color: var(--tekst); padding: 2px 8px; border-radius: 6px; }
.m-klus .adres { font-family: var(--kop); font-size: 25px; font-weight: 700; line-height: 1.1; }
.m-klus .plaats { color: var(--zacht); font-weight: 600; margin-top: -4px; }
.m-klus .wat { white-space: pre-line; }
.m-klus .planner { background: var(--geel-z); border-radius: 10px; padding: 9px 12px; font-size: 15.5px; }
.m-klus .planner b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--geel-d); }
.m-klus .bewoner { font-size: 15.5px; color: var(--zacht); }
.m-klus .bewoner a { color: var(--tekst); font-weight: 700; }
.m-klus .gemeld { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: 15.5px; }
.m-klus .gemeld.klaar { background: var(--groen-z); color: var(--groen); }
.m-klus .gemeld.niet { background: var(--rood-z); color: var(--rood); }
.m-klus .gemeld.wacht { background: var(--blauw-z); color: var(--blauw); }
.m-klus .gemeld small { display: block; font-weight: 500; color: var(--zacht); }
.m-knoppen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.m-knop { min-height: 56px; border-radius: 12px; border: 1.5px solid var(--lijn); background: var(--vlak); font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 12px; text-decoration: none; color: var(--tekst); }
.m-knop.groot { grid-column: 1 / -1; min-height: 62px; font-size: 19px; background: var(--geel); border-color: var(--geel); }
.m-knop.donker { background: var(--donker); border-color: var(--donker); color: #FFFFFF; }
.m-knop.vol { grid-column: 1 / -1; }
.m-knop:active { transform: translateY(1px); }
.m-uit { align-self: center; margin-top: 10px; }

/* tabs en weekplanning */
.m-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 16px; background: var(--vlak); border-bottom: 1px solid var(--lijn); flex: none; }
.m-tabs button { min-height: 44px; border-radius: 10px; border: 1.5px solid var(--lijn); background: var(--vlak); font-weight: 700; font-size: 16px; color: var(--zacht); padding: 4px 6px; }
.m-tabs button.aan { background: var(--donker); border-color: var(--donker); color: #FFFFFF; }
.m-weeknav { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px; text-align: center; }
.m-weeknav b { display: block; font-family: var(--kop); font-size: 22px; line-height: 1.1; }
.m-weeknav span { color: var(--zacht); font-size: 15px; }
.m-rondje { width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--lijn); background: var(--vlak); display: grid; place-items: center; }
.m-weekdag { display: grid; gap: 8px; }
.m-weekdag h3 { font-size: 20px; display: flex; align-items: baseline; gap: 8px; }
.m-weekdag h3 em { font-style: normal; font-family: var(--tekstfont); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--geel); color: var(--tekst); padding: 1px 7px; border-radius: 6px; }
.m-weekdag.vandaag .m-weekklus { border-color: #D9CF8A; background: #FFFEF6; }
.m-weekdag .m-leeg { padding: 0 2px; }
.m-weekklus { background: var(--vlak); border: 1px solid var(--lijn); border-radius: 12px; padding: 10px 14px; display: grid; gap: 2px; }
.m-weekklus .boven { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; margin-bottom: 2px; }
.m-weekklus .tijd { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.m-weekklus b { font-family: var(--kop); font-size: 20px; line-height: 1.15; }
.m-weekklus > span { color: var(--zacht); font-weight: 600; font-size: 15px; }
.m-weekklus p { margin: 4px 0 0; font-size: 15px; }

/* inloggen */
.m-inlog { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 28px 16px 24px; background: var(--donker); color: #FFFFFF; text-align: center; }
.m-inlog img { width: 190px; height: auto; margin-top: 8px; }
.m-inlog h1 { font-size: 28px; }
.m-inlog p { margin: 0; color: var(--op-donker); max-width: 30ch; }
.m-stippen { display: flex; gap: 14px; height: 22px; align-items: center; }
.m-stippen i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--op-donker); }
.m-stippen i.vol { background: var(--geel); border-color: var(--geel); }
.m-pinfout { min-height: 24px; color: #FFB4A8; font-weight: 600; }
.m-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; }
.m-pad button { height: 64px; border-radius: 16px; border: 0; background: var(--donker2); color: #FFFFFF; font-size: 26px; font-weight: 600; font-family: var(--tekstfont); }
.m-pad button:active { background: #4A4B4F; }
.m-pad .wis { font-size: 16px; }
.m-inlog .m-knop { width: 100%; max-width: 252px; }
.m-demo-pin { font-size: 14px; color: var(--geel); border: 1px dashed var(--geel); border-radius: 10px; padding: 6px 12px; }

/* schermen die over de planning heen schuiven */
.m-blad { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--bg); }
.m-blad .bkop { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--vlak); border-bottom: 1px solid var(--lijn); flex: none; }
.m-blad .bkop h2 { font-size: 22px; line-height: 1.1; }
.m-blad .bkop small { display: block; color: var(--zacht); font-size: 14px; font-weight: 600; font-family: var(--tekstfont); }
.m-blad .bkop button { margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--lijn); background: var(--vlak); display: grid; place-items: center; flex: none; }
.m-blad .binh { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.m-blad .bvoet { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--vlak); border-top: 1px solid var(--lijn); display: grid; gap: 10px; flex: none; }
.m-label { font-weight: 700; font-size: 15px; display: block; margin-bottom: 6px; }
.m-tekstvak { width: 100%; box-sizing: border-box; min-height: 92px; border: 1.5px solid var(--lijn); border-radius: 12px; padding: 12px; background: var(--vlak); resize: vertical; font-size: 17px; }
.m-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-foto { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--lijn2); max-width: 100%; }
.m-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-foto .weg { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(31,32,34,.75); color: #FFFFFF; display: grid; place-items: center; }
.m-foto .mb { position: absolute; left: 4px; bottom: 4px; font-size: 12px; font-weight: 700; background: rgba(31,32,34,.75); color: #FFFFFF; padding: 1px 6px; border-radius: 6px; }
.m-foto .bezig { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--zacht); }
.m-som { font-size: 14.5px; color: var(--zacht); }
.m-keuzes { display: grid; gap: 10px; }
.m-keuze { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 16px; border-radius: 12px; border: 1.5px solid var(--lijn); background: var(--vlak); font-weight: 700; text-align: left; }
.m-keuze i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--zachter); flex: none; }
.m-keuze.aan { border-color: var(--donker); box-shadow: inset 0 0 0 1px var(--donker); }
.m-keuze.aan i { border: 7px solid var(--donker); }
.m-vraag { background: var(--oranje-z); border: 1px solid #F0D3A0; border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; font-weight: 600; }
.m-fout { color: var(--rood); font-weight: 600; font-size: 15px; }

/* versturen */
.m-rij { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; }
.m-rij .dum { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--lijn2); display: grid; place-items: center; }
.m-rij b { display: block; font-size: 16px; }
.m-rij small { color: var(--zacht); font-size: 14px; }
.m-rij.mislukt small { color: var(--rood); font-weight: 600; }
.m-rij.klaar small { color: var(--groen); font-weight: 700; }
.m-balkje { height: 8px; border-radius: 99px; background: var(--lijn2); overflow: hidden; margin: 5px 0 3px; }
.m-balkje i { display: block; height: 100%; background: var(--blauw); border-radius: 99px; transition: width .2s; }
.m-rij.klaar .m-balkje i { background: var(--groen); }
.m-rij.mislukt .m-balkje i { background: var(--rood); }
.m-gelukt { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 10px; color: var(--groen); font-weight: 700; font-size: 19px; }
.m-gelukt .ico { width: 44px; height: 44px; }

/* ================= PLANNER (laptop) ================= */
.p-app { position: relative; height: 100%; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
.p-kop { display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: var(--donker); color: #FFFFFF; flex: none; flex-wrap: wrap; }
.p-kop img { height: 28px; width: auto; }
.p-kop .titel { font-family: var(--kop); font-weight: 700; font-size: 20px; padding-right: 8px; border-right: 1px solid #55575A; }
.p-tabs { display: flex; gap: 4px; }
.p-tabs button { border: 0; background: none; color: var(--op-donker); font-weight: 600; padding: 7px 12px; border-radius: 8px; }
.p-tabs button.aan { background: var(--donker2); color: #FFFFFF; box-shadow: inset 0 -3px 0 var(--geel); }
.p-kop .rechts { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.p-inhoud { flex: 1; overflow: auto; padding: 18px 20px 28px; }
.p-rij { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.p-weekkop { margin-bottom: 14px; }
.p-weekkop h1 { font-size: 26px; min-width: 0; }
.p-weekkop h1 span { color: var(--zacht); font-weight: 600; }
.p-pijl { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--lijn); background: var(--vlak); display: grid; place-items: center; }
.p-legenda { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.p-bak { background: var(--vlak2); border: 1.5px dashed var(--lijn); border-radius: var(--r); padding: 10px 12px; margin-bottom: 14px; }
.p-bak h2 { font-size: 15px; font-family: var(--tekstfont); font-weight: 700; color: var(--zacht); margin-bottom: 8px; }
.p-bak .kaarten { display: flex; gap: 8px; flex-wrap: wrap; min-height: 54px; align-items: flex-start; }
.p-bak .kaarten .p-kaart { width: 190px; }
.p-bak .leeg { color: var(--zachter); font-size: 13.5px; align-self: center; }

.p-bordrol { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--lijn); background: var(--vlak); }
.p-bord { display: grid; grid-template-columns: 150px repeat(6, minmax(140px, 1fr)); min-width: 990px; }
.p-bord .kopcel { padding: 9px 10px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--lijn); border-left: 1px solid var(--lijn2); background: var(--vlak2); position: sticky; top: 0; z-index: 2; }
.p-bord .kopcel small { display: block; font-weight: 500; color: var(--zacht); }
.p-bord .kopcel.vandaag { background: var(--geel-z); box-shadow: inset 0 3px 0 var(--geel); }
.p-bord .naam { padding: 10px; border-bottom: 1px solid var(--lijn2); }
.p-bord .naam b { display: block; font-size: 14.5px; }
.p-bord .naam small { color: var(--zacht); font-size: 12.5px; }
.p-cel { padding: 6px; border-bottom: 1px solid var(--lijn2); border-left: 1px solid var(--lijn2); min-height: 92px; display: flex; flex-direction: column; gap: 6px; transition: background .12s; }
.p-cel.vandaag { background: #FFFDF0; }
.p-cel.zondrop, .p-bak.zondrop { background: var(--blauw-z); }
.p-plek { height: 4px; border-radius: 4px; background: var(--blauw); margin: -1px 0; }

.p-kaart { background: var(--vlak); border: 1px solid var(--lijn); border-radius: 9px; padding: 7px 9px 8px; font-size: 13px; cursor: grab; display: flex; flex-direction: column; gap: 3px; text-align: left; width: 100%; box-sizing: border-box; box-shadow: 0 1px 2px rgba(31,32,34,.05); }
.p-kaart:hover { border-color: #C9C9BE; }
.p-kaart.sleept { opacity: .4; }
.p-kaart .boven { display: flex; gap: 2px 8px; align-items: center; flex-wrap: wrap; }
.p-kaart .tijd { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 12.5px; white-space: nowrap; }
.p-kaart .tijd:empty { display: none; }
.p-kaart .adres { font-weight: 700; font-size: 13.5px; line-height: 1.25; overflow-wrap: anywhere; }
.p-kaart .plaats { color: var(--zacht); font-size: 12.5px; }
.p-kaart .status { align-self: flex-start; margin-top: 2px; font-size: 11.5px; }
.p-kaart .datum { font-size: 12px; color: var(--zacht); font-weight: 600; }

/* paneel van rechts */
.p-scherm { position: absolute; inset: 0; background: rgba(31,32,34,.25); z-index: 30; }
.p-paneel { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--vlak); box-shadow: var(--schaduw); z-index: 31; display: flex; flex-direction: column; }
.p-paneel .pkop { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--lijn); }
.p-paneel .pkop h2 { font-size: 22px; line-height: 1.15; }
.p-paneel .pkop .onder { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--zacht); }
.p-sluit { margin-left: auto; border: 0; background: var(--lijn2); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.p-paneel .pinh { flex: 1; overflow-y: auto; padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 18px; }
.p-paneel .pvoet { padding: 12px 18px; border-top: 1px solid var(--lijn); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.p-velden { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.p-veld { display: grid; gap: 4px; min-width: 0; }
.p-veld.breed { grid-column: 1 / -1; }
.p-veld > span { font-weight: 600; font-size: 13px; color: var(--zacht); }
.p-veld input, .p-veld select, .p-veld textarea, .p-invoer { border: 1px solid var(--lijn); border-radius: 9px; padding: 8px 10px; background: var(--vlak); min-width: 0; width: 100%; box-sizing: border-box; }
.p-veld textarea { resize: vertical; min-height: 64px; }
.p-veld .uitleg { font-size: 12.5px; color: var(--zacht); }
.p-tijden { display: flex; gap: 6px; align-items: center; }
.p-sectie h3 { font-size: 16px; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.p-meldingen { display: grid; gap: 8px; }
.p-melding { padding: 9px 11px; border-radius: 9px; background: var(--vlak2); border: 1px solid var(--lijn2); font-size: 13.5px; }
.p-melding .wanneer { color: var(--zacht); font-size: 12.5px; }
.p-fotos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.p-fotos button { padding: 0; border: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--lijn2); max-width: 100%; }
.p-fotos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-map { display: grid; gap: 6px; padding: 10px 12px; border-radius: 9px; background: var(--vlak2); border: 1px solid var(--lijn2); font-size: 13px; }
.p-map code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; overflow-wrap: anywhere; }
.p-fout { color: var(--rood); font-weight: 600; font-size: 13.5px; }
.p-let { background: var(--oranje-z); color: var(--oranje); border-radius: 9px; padding: 9px 11px; font-size: 13.5px; font-weight: 600; display: grid; gap: 8px; }

/* dialoog */
.p-dialoog { position: absolute; inset: 0; z-index: 40; background: rgba(31,32,34,.4); display: grid; place-items: center; padding: 16px; }
.p-dialoog .doos { background: var(--vlak); border-radius: 14px; box-shadow: var(--schaduw); width: min(520px, 100%); max-height: 100%; overflow: auto; padding: 20px 22px; display: grid; gap: 14px; box-sizing: border-box; }
.p-dialoog .doos h2 { font-size: 22px; }
.p-dialoog .doos p { margin: 0; }
.p-dialoog .knoppen { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.p-toegang { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.p-pin { font-family: var(--kop); font-size: 40px; font-weight: 700; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.p-link { display: flex; gap: 8px; align-items: center; background: var(--vlak2); border: 1px solid var(--lijn); border-radius: 9px; padding: 6px 6px 6px 10px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; min-width: 0; }
.p-link span { overflow-wrap: anywhere; flex: 1; min-width: 0; user-select: all; }
.p-qr { width: 140px; height: 140px; display: grid; place-items: center; background: #FFFFFF; border: 1px solid var(--lijn); border-radius: 10px; padding: 6px; box-sizing: border-box; }
.p-qr img, .p-qr canvas { width: 100% !important; height: auto !important; }
.p-groot { width: min(900px, 100%); background: var(--donker); border-radius: 14px; padding: 12px; display: grid; gap: 10px; color: #FFFFFF; box-sizing: border-box; }
.p-groot .p-pijl { color: var(--tekst); }
.p-groot img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 8px; background: #000000; }

/* monteurs en importeren */
.p-blok { background: var(--vlak); border: 1px solid var(--lijn); border-radius: var(--r); padding: 16px 18px; margin-bottom: 16px; max-width: 1100px; }
.p-blok h2 { font-size: 20px; margin-bottom: 4px; }
.p-blok > p { margin: 0 0 12px; color: var(--zacht); max-width: 75ch; }
.p-tabelrol { overflow-x: auto; }
.p-tabel { width: 100%; border-collapse: collapse; font-size: 14px; }
.p-tabel th { text-align: left; color: var(--zacht); font-weight: 600; font-size: 13px; padding: 7px 10px; border-bottom: 1px solid var(--lijn); white-space: nowrap; }
.p-tabel td { padding: 9px 10px; border-bottom: 1px solid var(--lijn2); vertical-align: top; }
.p-tabel tr:last-child td { border-bottom: 0; }
.p-tabel select, .p-tabel input[type=text] { border: 1px solid var(--lijn); border-radius: 8px; padding: 5px 8px; background: var(--vlak); }
.p-regels td { padding: 5px 6px; }
.p-fotokeuze { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.p-mini { width: 36px; height: 36px; padding: 0; border: 1px solid var(--lijn); border-radius: 6px; overflow: hidden; background: var(--lijn2); flex: none; }
.p-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-regels td:first-child input { width: 100%; min-width: 220px; box-sizing: border-box; }
.p-tabel .acties { display: flex; gap: 6px; flex-wrap: wrap; }
.p-tabel tr.nee td { color: var(--zachter); }
.toegang { font-weight: 600; font-size: 13.5px; }
.toegang-actief { color: var(--groen); } .toegang-geblokkeerd { color: var(--rood); } .toegang-ingetrokken, .toegang-geen { color: var(--zacht); }
.p-bezig { display: flex; gap: 10px; align-items: center; color: var(--zacht); font-weight: 600; padding: 10px 0; }
.p-bezig .ico { animation: draai 1s linear infinite; }
.p-klaarbalk { background: var(--groen-z); color: var(--groen); padding: 10px 12px; border-radius: 9px; font-weight: 600; }
.p-klein { font-size: 12.5px; color: var(--zacht); }
.p-oranje { color: var(--oranje); font-weight: 600; }

/* ================= DEMO-OMLIJSTING ================= */
.d-shell { height: 100%; display: flex; flex-direction: column; }
.d-balk { display: flex; align-items: center; gap: 12px 16px; padding: 8px 16px; background: var(--geel); color: var(--tekst); flex-wrap: wrap; flex: none; }
.d-voorbeeld { font-family: var(--kop); font-weight: 700; font-size: 15px; letter-spacing: .1em; background: var(--tekst); color: var(--geel); padding: 2px 10px; border-radius: 6px; }
.d-uitleg { font-weight: 600; font-size: 14px; min-width: 0; flex: 1 1 260px; }
.d-groep { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.d-schakel { display: inline-flex; border: 1.5px solid var(--tekst); border-radius: 9px; overflow: hidden; }
.d-schakel button { border: 0; background: transparent; padding: 4px 11px; font-weight: 700; font-size: 13.5px; }
.d-schakel button.aan { background: var(--tekst); color: var(--geel); }
.d-balk .knop { min-height: 32px; padding: 4px 12px; font-size: 13.5px; }
.d-tabs { display: none; }
.d-werk { flex: 1; min-height: 0; display: flex; }
.d-planner { flex: 1; min-width: 0; position: relative; }
.d-telefoonkolom { width: 430px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 16px; background: #E7E7E0; border-left: 1px solid var(--lijn); overflow: auto; box-sizing: border-box; }
.d-telefoonkolom label { font-weight: 700; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.d-telefoonkolom select { border: 1px solid var(--lijn); border-radius: 8px; padding: 5px 8px; background: var(--vlak); font-weight: 600; }
.d-toestel { width: 390px; max-width: 100%; height: 760px; max-height: calc(100% - 44px); min-height: 520px; border-radius: 40px; border: 10px solid #1B1C1E; background: #1B1C1E; overflow: hidden; box-shadow: var(--schaduw); position: relative; box-sizing: border-box; flex: none; }
.d-scherm { position: absolute; inset: 0; border-radius: 30px; overflow: hidden; }
.d-scherm > div { height: 100%; }
.d-tip { font-size: 13px; color: var(--zacht); max-width: 380px; text-align: center; }
.d-bevestig { display: flex; gap: 8px; align-items: center; font-size: 13.5px; font-weight: 600; }

@media (max-width: 1180px) {
  .d-tabs { display: inline-flex; }
  .d-werk[data-toon="telefoon"] .d-planner { display: none; }
  .d-werk[data-toon="planner"] .d-telefoonkolom { display: none; }
  .d-werk[data-toon="telefoon"] .d-telefoonkolom { flex: 1; width: auto; border-left: 0; }
}
@media (max-width: 560px) {
  .d-balk { padding: 6px 16px; gap: 6px 8px; }
  .d-uitleg { font-size: 12.5px; line-height: 1.3; flex-basis: 100%; order: 5; }
  .d-lang { display: none; }
  .d-schakel button { padding: 3px 9px; font-size: 13px; }
  .d-balk .knop { min-height: 28px; padding: 2px 10px; font-size: 13px; }
  .d-telefoonkolom { padding: 0; background: var(--bg); gap: 0; }
  .d-telefoonkolom > label { padding: 8px 16px; align-self: stretch; justify-content: space-between; background: var(--vlak); border-bottom: 1px solid var(--lijn); }
  .d-telefoonkolom .d-tip { display: none; }
  .d-toestel { width: 100%; height: auto; flex: 1; min-height: 0; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
  .d-scherm { border-radius: 0; }
  .p-inhoud { padding: 14px 16px 24px; }
  .p-velden { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}
