/* =========================================================
   Dakkapel Haaglanden - beheer
   Huisstijl: Lato, groen #006d2d, donkergroen #06623b, geel #ffed00
   ========================================================= */
:root {
	--groen: #006d2d;
	--groen-d: #00561f;
	--groen-dd: #003d17;
	--groen-tint: #e8f3ec;
	--groen-lijn: #bcdcc7;
	--geel: #ffed00;
	--geel-d: #e9d800;
	--inkt: #1d2320;
	--tekst: #3a403c;
	--grijs: #6c736e;
	--lichtgrijs: #9aa29c;
	--lijn: #e4e7e2;
	--lijn-d: #d3d8d2;
	--vlak: #f4f5f2;
	--wit: #fff;
	--rood: #c0392b;
	--rood-tint: #fbeae8;
	--oranje: #a85b06;
	--oranje-tint: #fdf2e2;
	--blauw: #2a6ab1;
	--blauw-tint: #e8f0fa;
	--font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--schaduw: 0 1px 2px rgba(16, 40, 24, .05), 0 6px 20px rgba(16, 40, 24, .06);
	--schaduw-hoog: 0 12px 40px rgba(16, 40, 24, .16);
	--r: 14px;
	--r-k: 10px;
	--menu-b: 256px;
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--vlak); color: var(--tekst); font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--groen); text-decoration: none; }
a:hover { color: var(--groen-d); text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--inkt); font-weight: 900; letter-spacing: -.01em; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 12px; }
hr { border: 0; border-top: 1px solid var(--lijn); margin: 18px 0; }
:focus-visible { outline: 3px solid rgba(0, 109, 45, .45); outline-offset: 2px; border-radius: 6px; }
.dh-skip { position: absolute; left: -999px; top: 8px; z-index: 999; padding: 8px 14px; border-radius: 8px; background: var(--wit); }
.dh-skip:focus { left: 8px; }
[hidden], .verborgen { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.klein { font-size: 13px; color: var(--grijs); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.rechts { text-align: right; }
.nowrap { white-space: nowrap; }
.dh-ic { width: 20px; height: 20px; flex: none; }

/* ---------- Opbouw ---------- */
.dh-app { display: grid; grid-template-columns: var(--menu-b) minmax(0, 1fr); min-height: 100vh; }
.dh-menu { position: sticky; top: 0; z-index: 40; display: flex; flex-direction: column; gap: 6px; height: 100vh; padding: 16px 14px 14px; background: linear-gradient(180deg, var(--groen) 0%, var(--groen-dd) 100%); color: #e9f3ec; overflow-y: auto; }
.dh-menu a.dh-menu__logo { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px 10px; margin-bottom: 8px; background: var(--wit); border-radius: 12px; text-decoration: none !important; }
.dh-menu a.dh-menu__logo img { width: 176px; height: auto; display: block; }
.dh-menu a.dh-menu__logo span { font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--groen); }
.dh-menu a.dh-menu__nieuw { width: 100%; justify-content: center; margin: 4px 0 10px; background: var(--geel); color: var(--inkt); padding: 11px 14px; }
.dh-menu a.dh-menu__logo:hover { background: var(--wit); }
.dh-menu__nav, .dh-menu__onder { display: flex; flex-direction: column; gap: 2px; }
.dh-menu__onder { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .14); }
.dh-menu a, .dh-menu button { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: #dcebe0; font: inherit; font-weight: 700; font-size: 14.5px; text-align: left; cursor: pointer; text-decoration: none; transition: background .15s, color .15s; }
.dh-menu a:hover, .dh-menu button:hover { background: rgba(255, 255, 255, .09); color: #fff; text-decoration: none; }
.dh-menu a.is-actief { background: rgba(255, 255, 255, .14); color: #fff; }
.dh-menu a.is-actief::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--geel); }
.dh-menu a.dh-menu__nieuw { color: var(--inkt); }
.dh-menu a.dh-menu__nieuw:hover { background: var(--geel-d); color: var(--inkt); }
.dh-menu form { margin: 0; }
.dh-teller { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--geel); color: var(--inkt); font-size: 12px; line-height: 22px; text-align: center; font-weight: 900; }
.dh-teller--let { background: #ffb54a; }
.dh-menu__wie { margin: 10px 12px 2px; font-size: 13px; font-weight: 700; color: #fff; line-height: 1.3; }
.dh-menu__wie small { display: block; font-weight: 400; color: #b9d4c1; }
.dh-hoofd { min-width: 0; display: flex; flex-direction: column; }
.dh-inhoud { width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px 32px 60px; }
body.is-breed .dh-inhoud { max-width: none; }
.dh-balk, .dh-tabbar, .dh-scherm { display: none; }

/* ---------- Paginakop ---------- */
.dh-pk { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.dh-pk__tekst p { margin: 6px 0 0; color: var(--grijs); }
.dh-pk__acties { display: flex; gap: 8px; flex-wrap: wrap; }
.dh-terug { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--grijs); }
.dh-terug .dh-ic { width: 16px; height: 16px; }

/* ---------- Knoppen ---------- */
.dh-knop { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; border: 0; border-radius: var(--r-k); background: var(--groen); color: #fff; font: inherit; font-weight: 700; font-size: 14.5px; line-height: 1.2; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; }
.dh-knop:hover { background: var(--groen-d); color: #fff; }
.dh-knop:active { transform: translateY(1px); }
.dh-knop .dh-ic { width: 18px; height: 18px; }
.dh-knop--geel { background: var(--geel); color: var(--inkt); }
.dh-knop--geel:hover { background: var(--geel-d); color: var(--inkt); }
.dh-knop--rand { background: var(--wit); color: var(--groen); box-shadow: inset 0 0 0 1.5px var(--groen-lijn); }
.dh-knop--rand:hover { background: var(--groen-tint); color: var(--groen-d); }
.dh-knop--stil { background: transparent; color: var(--tekst); box-shadow: inset 0 0 0 1px var(--lijn-d); }
.dh-knop--stil:hover { background: var(--wit); color: var(--inkt); }
.dh-knop--gevaar { background: var(--wit); color: var(--rood); box-shadow: inset 0 0 0 1.5px #ecc4bf; }
.dh-knop--gevaar:hover { background: var(--rood-tint); color: var(--rood); }
.dh-knop--klein { min-height: 34px; padding: 6px 12px; font-size: 13.5px; }
.dh-knop--groot { min-height: 50px; font-size: 16px; padding: 12px 24px; }
.dh-knop--blok { width: 100%; }
.dh-knop[disabled], .dh-knop.is-bezig { opacity: .6; pointer-events: none; }
.dh-knop.is-bezig::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: dh-draai .7s linear infinite; }
@keyframes dh-draai { to { transform: rotate(360deg); } }
.dh-knoppen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }

/* ---------- Kaarten ---------- */
.dh-kaart { background: var(--wit); border-radius: var(--r); box-shadow: var(--schaduw); padding: 22px 24px; margin-bottom: 18px; }
.dh-kaart > h2 { margin-bottom: 14px; }
.dh-kaart__kop { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.dh-kaart__kop h2 { margin: 0; }
.dh-kaart--vol { padding: 0; overflow: hidden; }
.dh-kaart--vol .dh-kaart__kop { padding: 18px 22px 0; }
.dh-raster { display: grid; gap: 18px; }
.dh-raster--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dh-raster--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dh-raster--21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.dh-raster > .dh-kaart { margin-bottom: 0; }

/* Cijfers op het overzicht */
.dh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.dh-stat { display: block; background: var(--wit); border-radius: var(--r); box-shadow: var(--schaduw); padding: 18px 20px; color: inherit; text-decoration: none !important; transition: transform .12s, box-shadow .12s; }
a.dh-stat:hover { transform: translateY(-2px); box-shadow: var(--schaduw-hoog); }
.dh-stat span { display: block; font-size: 13px; font-weight: 700; color: var(--grijs); }
.dh-stat b { display: block; margin-top: 4px; font-size: 30px; font-weight: 900; color: var(--inkt); line-height: 1.1; font-variant-numeric: tabular-nums; }
.dh-stat small { color: var(--grijs); }
.dh-stat--groen { background: var(--groen); }
.dh-stat--groen span, .dh-stat--groen small { color: #cfe6d7; }
.dh-stat--groen b { color: #fff; }

/* ---------- Tabellen en lijsten ---------- */
.dh-tabel-w { overflow-x: auto; }
.dh-tabel { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.dh-tabel th { padding: 11px 14px; border-bottom: 1px solid var(--lijn); text-align: left; font-size: 12px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--grijs); background: #fafbf9; white-space: nowrap; }
.dh-tabel td { padding: 13px 14px; border-bottom: 1px solid var(--lijn); vertical-align: middle; }
.dh-tabel tbody tr:last-child td { border-bottom: 0; }
.dh-tabel tbody tr.is-klik { cursor: pointer; }
.dh-tabel tbody tr.is-klik:hover td { background: #f8fbf9; }
.dh-tabel td b a, .dh-tabel td a.dh-rij-link { color: var(--inkt); }
.dh-tabel__sub { display: block; font-size: 13px; color: var(--grijs); }
.dh-lijst { list-style: none; margin: 0; padding: 0; }
.dh-lijst li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--lijn); }
.dh-lijst li:last-child { border-bottom: 0; }
.dh-lijst__hoofd { flex: 1; min-width: 0; }
.dh-lijst__hoofd b { display: block; color: var(--inkt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-lijst__hoofd span { display: block; font-size: 13px; color: var(--grijs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-leeg { padding: 34px 20px; text-align: center; color: var(--grijs); }
.dh-leeg b { display: block; margin-bottom: 4px; font-size: 16px; color: var(--inkt); }
.dh-paginas { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px; font-size: 13px; color: var(--grijs); }

/* Status-labels */
.dh-status { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; background: var(--vlak); color: var(--tekst); white-space: nowrap; box-shadow: inset 0 0 0 1px var(--lijn); }
.dh-status--aanvraag-nieuw, .dh-status--offerte-verstuurd, .dh-status--klant-offerte { background: var(--blauw-tint); color: var(--blauw); box-shadow: none; }
.dh-status--aanvraag-nieuw { background: var(--geel); color: var(--inkt); }
.dh-status--offerte-akkoord, .dh-status--klant-opdracht, .dh-status--inmeting-definitief, .dh-status--klant-afgerond { background: var(--groen-tint); color: var(--groen); box-shadow: none; }
.dh-status--offerte-afgewezen, .dh-status--klant-afgewezen, .dh-status--offerte-verlopen { background: var(--rood-tint); color: var(--rood); box-shadow: none; }
.dh-status--klant-inmeting, .dh-status--aanvraag-inmeting, .dh-status--aanvraag-contact { background: var(--oranje-tint); color: var(--oranje); box-shadow: none; }
.dh-chip { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--groen-tint); color: var(--groen); }

/* ---------- Formulieren ---------- */
.veld { margin-bottom: 14px; min-width: 0; }
.veld > label, .veld__label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 700; color: var(--inkt); }
.veld__hulp { display: block; margin-top: 5px; font-size: 12.5px; color: var(--grijs); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=search], input[type=url], select, textarea {
	width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: var(--r-k); background: var(--wit); color: var(--inkt); font: inherit; font-size: 16px; box-shadow: inset 0 0 0 1.5px var(--lijn-d); transition: box-shadow .15s; -webkit-appearance: none; appearance: none; margin: 0;
}
select { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5l5 5 5-5' fill='none' stroke='%236c736e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--groen); }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.veld--fout input, .veld--fout select { box-shadow: inset 0 0 0 2px var(--rood); }
.raster-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.raster-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.raster-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.raster-adres { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 0 14px; }
.raster-pc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0 14px; }
.vinkje { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; cursor: pointer; font-weight: 700; color: var(--inkt); }
.vinkje input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--groen); flex: none; }
.vinkje small { display: block; font-weight: 400; color: var(--grijs); }
.dh-zoek { position: relative; flex: 1; min-width: 200px; }
.dh-zoek .dh-ic { position: absolute; left: 12px; top: 12px; color: var(--lichtgrijs); }
.dh-zoek input { padding-left: 40px; }
.dh-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.dh-filters select { width: auto; min-width: 170px; }
.dh-segment { display: inline-flex; padding: 4px; gap: 4px; background: #e9ece7; border-radius: 12px; flex-wrap: wrap; }
.dh-segment a, .dh-segment button { padding: 7px 14px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--tekst); cursor: pointer; text-decoration: none !important; }
.dh-segment .is-actief { background: var(--wit); color: var(--groen); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* ---------- Meldingen ---------- */
.dh-melding { position: relative; padding: 12px 42px 12px 16px; margin-bottom: 16px; border-radius: var(--r-k); font-size: 14.5px; font-weight: 700; background: var(--blauw-tint); color: var(--blauw); }
.dh-melding--goed { background: var(--groen-tint); color: var(--groen); }
.dh-melding--fout { background: var(--rood-tint); color: var(--rood); }
.dh-melding--let { background: var(--oranje-tint); color: var(--oranje); }
.dh-melding__weg { position: absolute; right: 8px; top: 7px; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; opacity: .7; }
.dh-toast { position: fixed; left: 50%; bottom: 24px; z-index: 300; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 12px; background: var(--inkt); color: #fff; font-weight: 700; font-size: 14px; box-shadow: var(--schaduw-hoog); transform: translate(-50%, 140%); opacity: 0; transition: transform .25s, opacity .25s; pointer-events: none; }
.dh-toast.is-zichtbaar { transform: translate(-50%, 0); opacity: 1; }
.dh-toast.is-fout { background: var(--rood); }

/* ---------- Dialogen ---------- */
.dh-dialoog { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: var(--r); box-shadow: var(--schaduw-hoog); color: var(--tekst); }
.dh-dialoog::backdrop { background: rgba(10, 30, 18, .45); }
.dh-dialoog__kop { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--lijn); }
.dh-dialoog__inhoud { padding: 20px 22px; }
.dh-dialoog__voet { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--lijn); background: #fafbf9; }
.dh-dialoog__sluit { width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; font-size: 24px; cursor: pointer; color: var(--grijs); }

/* ---------- Gegevens (label + waarde) ---------- */
.dh-gegevens { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px 16px; margin: 0; font-size: 14.5px; }
.dh-gegevens dt { color: var(--grijs); }
.dh-gegevens dd { margin: 0; font-weight: 700; color: var(--inkt); overflow-wrap: anywhere; }
.dh-contactknoppen { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* Tijdlijn (notities) */
.dh-tijdlijn { list-style: none; margin: 0; padding: 0; }
.dh-tijdlijn li { position: relative; padding: 0 0 16px 22px; }
.dh-tijdlijn li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--groen); }
.dh-tijdlijn li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--lijn); }
.dh-tijdlijn li:last-child::after { display: none; }
.dh-tijdlijn small { display: block; color: var(--grijs); font-size: 12.5px; }
.dh-tijdlijn p { margin: 2px 0 0; white-space: pre-wrap; }

/* Foto's */
.dh-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.dh-foto { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--vlak); box-shadow: inset 0 0 0 1px var(--lijn); }
.dh-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dh-foto--bestand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; font-size: 12px; font-weight: 700; color: var(--grijs); text-align: center; overflow-wrap: anywhere; }
.dh-foto__weg { position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }
.dh-upload { display: flex; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 1; border-radius: 10px; border: 2px dashed var(--groen-lijn); color: var(--groen); font-weight: 700; font-size: 13px; cursor: pointer; text-align: center; padding: 8px; background: #fbfdfb; }
.dh-upload input { display: none; }

/* ---------- Losse pagina's (inloggen) ---------- */
.dh-los { min-height: 100vh; background: radial-gradient(120% 70% at 50% 0%, #0b7a39 0%, var(--groen) 38%, var(--groen-dd) 100%); }
.dh-los__w { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 32px 16px; }
.dh-los__logo { margin-bottom: 20px; padding: 14px 22px; background: var(--wit); border-radius: 14px; box-shadow: var(--schaduw-hoog); }
.dh-los__logo img { display: block; width: 230px; height: auto; }
.dh-los__kaart { width: 100%; max-width: 420px; padding: 30px 30px 26px; background: var(--wit); border-radius: 18px; box-shadow: var(--schaduw-hoog); border-top: 5px solid var(--geel); }
.dh-los__kaart h1 { font-size: 24px; margin-bottom: 6px; }
.dh-los__kaart .intro { color: var(--grijs); margin-bottom: 20px; }
.dh-los__onder { margin: 16px 0 0; text-align: center; font-size: 14px; }
.dh-los__voet { margin-top: 20px; color: #b9d8c3; font-size: 13px; }
.dh-code-invoer { font-size: 26px !important; letter-spacing: 8px; text-align: center; font-weight: 900; }
.dh-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; }
.dh-codes span { padding: 9px; border-radius: 8px; background: var(--vlak); text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; }
.dh-qr { display: inline-block; padding: 12px; background: #fff; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--lijn); }

/* =========================================================
   Inmeet-tool
   ========================================================= */
body.is-tool .dh-inhoud { max-width: none; padding: 20px 24px 120px; }
.im { display: grid; grid-template-columns: minmax(380px, 470px) minmax(0, 1fr); gap: 20px; align-items: start; }
.im__form { min-width: 0; }
.im__tekening { position: sticky; top: 20px; min-width: 0; }
.im-kop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.im-kop h1 { font-size: 22px; flex: 1; min-width: 200px; }
.im-opslag { font-size: 13px; font-weight: 700; color: var(--grijs); display: inline-flex; align-items: center; gap: 6px; }
.im-opslag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lichtgrijs); }
.im-opslag.is-opgeslagen::before { background: var(--groen); }
.im-opslag.is-gewijzigd::before { background: #ffb54a; }
.im-sectie { background: var(--wit); border-radius: var(--r); box-shadow: var(--schaduw); margin-bottom: 12px; overflow: hidden; }
.im-sectie > summary { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; font-weight: 900; font-size: 15.5px; color: var(--inkt); user-select: none; }
.im-sectie > summary::-webkit-details-marker { display: none; }
.im-sectie > summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid var(--grijs); border-bottom: 2px solid var(--grijs); transform: rotate(45deg); transition: transform .2s; }
.im-sectie[open] > summary::after { transform: rotate(-135deg); }
.im-sectie > summary small { font-weight: 700; font-size: 12.5px; color: var(--grijs); margin-left: auto; text-align: right; max-width: 52%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-sectie > summary small + * { margin-left: 0; }
.im-nr { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--groen); color: #fff; font-size: 13px; }
.im-sectie__inhoud { padding: 2px 18px 18px; }
.im-maat { display: flex; align-items: stretch; gap: 0; }
.im-maat input { border-radius: var(--r-k) 0 0 var(--r-k); text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.im-maat span { display: flex; align-items: center; padding: 0 12px; border-radius: 0 var(--r-k) var(--r-k) 0; background: var(--vlak); box-shadow: inset 0 0 0 1.5px var(--lijn-d); margin-left: -1.5px; font-size: 13px; font-weight: 700; color: var(--grijs); }
.im-stap { display: flex; flex: 1; }
.im-stap button { width: 44px; flex: none; border: 0; background: var(--vlak); box-shadow: inset 0 0 0 1.5px var(--lijn-d); font-size: 20px; font-weight: 700; color: var(--groen); cursor: pointer; }
.im-stap button:first-child { border-radius: var(--r-k) 0 0 var(--r-k); }
.im-stap button:last-child { border-radius: 0 var(--r-k) var(--r-k) 0; }
.im-stap input { border-radius: 0; text-align: center; font-weight: 700; margin: 0 -1.5px; position: relative; z-index: 1; }
.im-keuzes { display: flex; flex-wrap: wrap; gap: 6px; }
.im-keuzes button { min-height: 40px; padding: 8px 13px; border: 0; border-radius: 9px; background: var(--wit); box-shadow: inset 0 0 0 1.5px var(--lijn-d); font: inherit; font-size: 14px; font-weight: 700; color: var(--tekst); cursor: pointer; }
.im-keuzes button.is-aan { background: var(--groen-tint); box-shadow: inset 0 0 0 2px var(--groen); color: var(--groen-d); }
.im-kleuren { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.im-kleuren button { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 10px; border: 0; border-radius: 9px; background: var(--wit); box-shadow: inset 0 0 0 1.5px var(--lijn-d); font: inherit; font-size: 12.5px; font-weight: 700; color: var(--tekst); text-align: left; line-height: 1.2; cursor: pointer; }
.im-kleuren button i { flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.im-kleuren button.is-aan { box-shadow: inset 0 0 0 2px var(--groen); background: var(--groen-tint); }
.im-sub { margin: 16px 0 10px; font-size: 12px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; color: var(--groen); }
.im-muur { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 8px; align-items: end; padding: 10px; margin-bottom: 8px; border-radius: 10px; background: var(--vlak); }
.im-muur .veld { margin: 0; }
.im-muur__weg { height: 44px; border: 0; border-radius: 9px; background: var(--wit); color: var(--rood); font-size: 20px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--lijn-d); }
.im-kozijn { padding: 12px; margin-bottom: 10px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--lijn); }
.im-kozijn.is-warn { box-shadow: inset 0 0 0 2px #e0b400; background: #fffdf0; }
.im-kozijn__kop { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; font-size: 14px; }
.im-kozijn__maat { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--grijs); }
.im-kozijn__maat input { width: 104px; min-height: 38px; text-align: right; font-weight: 700; }
.im-mini { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; }
.im-mini button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--vlak); font-size: 18px; font-weight: 700; color: var(--groen); cursor: pointer; }
.im-ramen { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; }
.im-raam { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; border: 0; border-radius: 9px; background: var(--wit); box-shadow: inset 0 0 0 1.5px var(--lijn-d); font: inherit; font-size: 12px; font-weight: 700; color: var(--tekst); cursor: pointer; line-height: 1.2; }
.im-raam svg { width: 34px; height: 40px; }
.im-raam small { font-weight: 400; color: var(--grijs); font-size: 11px; }
.im-raam.is-kiep { background: var(--groen-tint); box-shadow: inset 0 0 0 2px var(--groen); }
.im-waarschuwing { padding: 10px 12px; margin: 8px 0; border-radius: 9px; background: var(--oranje-tint); color: var(--oranje); font-size: 13px; font-weight: 700; }
.im-info { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; margin-top: 6px; border-radius: 10px; background: var(--vlak); font-size: 13.5px; }
.im-info b { text-align: right; font-variant-numeric: tabular-nums; color: var(--inkt); }
.im-info .is-tot { padding-top: 6px; margin-top: 2px; border-top: 1px solid var(--lijn-d); }
.im-paneel { background: var(--wit); border-radius: var(--r); box-shadow: var(--schaduw); overflow: hidden; }
.im-paneel__tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--lijn); background: #fafbf9; overflow-x: auto; }
.im-paneel__tabs button { padding: 8px 14px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--tekst); cursor: pointer; white-space: nowrap; }
.im-paneel__tabs button.is-aan { background: var(--groen); color: #fff; }
.im-paneel__tabs .im-zoom { margin-left: auto; display: flex; gap: 4px; }
.im-paneel__tabs .im-zoom button { width: 36px; padding: 8px 0; box-shadow: inset 0 0 0 1px var(--lijn-d); }
.im-tekening { padding: 14px; overflow: auto; max-height: calc(100vh - 130px); background: #fff; }
.im-tekening svg { display: block; width: 100%; height: auto; }
.im-tekening.is-zoom svg { width: 180%; }
.im-blad__titel { margin: 8px 0 4px; font-size: 12px; font-weight: 900; color: var(--inkt); }
.im-actiebalk { position: fixed; z-index: 30; right: 0; bottom: 0; left: var(--menu-b); display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--lijn); }
.im-actiebalk .im-opslag { margin-right: auto; }
.im-klant { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--groen-tint); }
.im-klant b { display: block; color: var(--inkt); }
.im-klant span { display: block; font-size: 13px; color: var(--grijs); }
.im-klant > div { flex: 1; min-width: 0; }
.im-resultaten { margin-top: 6px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--lijn); overflow: hidden; }
.im-resultaten button { display: block; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--lijn); background: #fff; font: inherit; text-align: left; cursor: pointer; }
.im-resultaten button:hover { background: var(--groen-tint); }
.im-resultaten small { display: block; color: var(--grijs); }
.im-tekenknop { display: none; }

/* =========================================================
   Offerte
   ========================================================= */
.of-regels { width: 100%; border-collapse: collapse; font-size: 14px; }
.of-regels th { padding: 8px 6px; font-size: 11.5px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--grijs); text-align: left; border-bottom: 1px solid var(--lijn); }
.of-regels td { padding: 6px; border-bottom: 1px solid var(--lijn); vertical-align: top; }
.of-regels input, .of-regels select, .of-regels textarea { min-height: 38px; padding: 7px 9px; font-size: 14px; }
.of-regels textarea { min-height: 38px; height: 38px; }
.of-regels .of-num { width: 86px; text-align: right; }
.of-regels td.of-oms { min-width: 280px; }
.of-regels select { min-width: 110px; }
.of-regels .of-prijs { width: 110px; text-align: right; }
.of-regels .of-tot { width: 110px; text-align: right; font-weight: 700; white-space: nowrap; padding-top: 15px; }
.of-regels .of-weg { width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: var(--rood); font-size: 18px; cursor: pointer; }
.of-regels tr.is-kop td { background: #fafbf9; }
.of-totalen { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; max-width: 360px; margin: 16px 0 0 auto; font-size: 15px; }
.of-totalen b { text-align: right; font-variant-numeric: tabular-nums; }
.of-totalen .is-tot { padding-top: 8px; border-top: 2px solid var(--inkt); font-size: 18px; font-weight: 900; color: var(--inkt); }

/* =========================================================
   Afdrukken / PDF (A4)
   ========================================================= */
.dh-print { background: #e9ebe7; }
.dh-print__balk { position: sticky; top: 0; z-index: 10; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 12px; background: var(--groen-dd); }
.dh-print__balk span { color: #d6e9dc; font-size: 13px; }
.dh-blad { width: 297mm; min-height: 210mm; margin: 18px auto; padding: 12mm 13mm; background: #fff; box-shadow: var(--schaduw-hoog); color: #111; font-size: 11px; }
.dh-blad--staand { width: 210mm; min-height: 297mm; padding: 16mm 16mm 18mm; font-size: 12px; }
.dh-blad svg { display: block; width: 100%; height: auto; }
@media print {
	@page { size: A4 landscape; margin: 0; }
	body.dh-print--staand { }
	.dh-print { background: #fff; }
	.dh-print__balk { display: none !important; }
	.dh-blad { margin: 0; box-shadow: none; page-break-after: always; break-after: page; }
	.dh-blad:last-child { page-break-after: auto; break-after: auto; }
}

/* =========================================================
   Tablet en telefoon
   ========================================================= */
@media (max-width: 1180px) {
	.im { grid-template-columns: minmax(0, 1fr); }
	.im__tekening { position: static; }
	.im-tekening { max-height: none; }
	.dh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	:root { --menu-b: 0px; }
	.dh-app { display: block; }
	.dh-menu { position: fixed; top: 0; left: 0; bottom: 0; width: 290px; max-width: 86vw; transform: translateX(-104%); transition: transform .25s ease; box-shadow: var(--schaduw-hoog); padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
	.dh-menu.is-open { transform: none; }
	.dh-scherm { position: fixed; inset: 0; z-index: 35; background: rgba(10, 30, 18, .45); }
	body.menu-open .dh-scherm { display: block; }
	body.menu-open { overflow: hidden; }
	.dh-balk { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: calc(58px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0; background: var(--wit); border-bottom: 1px solid var(--lijn); }
	.dh-balk__logo img { display: block; height: 34px; width: auto; }
	.dh-balk__titel { flex: 1; min-width: 0; font-weight: 900; color: var(--inkt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; text-align: right; }
	.dh-balk__menu { width: 42px; height: 42px; border: 0; border-radius: 10px; background: var(--vlak); color: var(--inkt); cursor: pointer; display: flex; align-items: center; justify-content: center; }
	.dh-tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: flex-end; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--wit); border-top: 1px solid var(--lijn); box-shadow: 0 -4px 18px rgba(0, 0, 0, .05); }
	.dh-tabbar a, .dh-tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 700; color: var(--grijs); text-decoration: none !important; cursor: pointer; }
	.dh-tabbar .dh-ic { width: 23px; height: 23px; }
	.dh-tabbar__plus .dh-ic { width: 48px; height: 48px; padding: 12px; margin-top: -22px; border-radius: 50%; background: var(--geel); color: var(--inkt); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
	.dh-inhoud { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
	body.is-tool .dh-inhoud { padding: 14px 12px calc(160px + env(safe-area-inset-bottom)); }
	.im-actiebalk { left: 0; bottom: calc(64px + env(safe-area-inset-bottom)); padding: 10px 12px; }
	h1 { font-size: 22px; }
	.dh-raster--2, .dh-raster--3, .dh-raster--21 { grid-template-columns: minmax(0, 1fr); }
	.dh-kaart { padding: 18px 16px; }
}
@media (max-width: 640px) {
	.raster-2, .raster-3 { grid-template-columns: minmax(0, 1fr); }
	.raster-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.raster-2.blijf, .raster-3.blijf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dh-stats { gap: 10px; }
	.dh-stat { padding: 14px; }
	.dh-stat b { font-size: 24px; }
	.dh-pk { margin-bottom: 16px; }
	.dh-pk__acties { width: 100%; }
	.dh-pk__acties .dh-knop { flex: 1; }
	.verberg-mobiel { display: none !important; }
	.dh-tabel th, .dh-tabel td { padding: 11px 10px; }
	.dh-gegevens { grid-template-columns: 1fr; gap: 0; }
	.dh-gegevens dd { margin-bottom: 10px; }
	.im-tekenknop { display: inline-flex; }
	.im-actiebalk .dh-knop { flex: 1; padding: 9px 10px; }
	.im-actiebalk .im-opslag { display: none; }
	.of-regels thead { display: none; }
	.of-regels tr { display: grid; grid-template-columns: 1fr 1fr 1fr 36px; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--lijn); }
	.of-regels td { display: block; padding: 0; border: 0; }
	.of-regels td.of-oms { grid-column: 1 / -1; }
	.of-regels .of-num, .of-regels .of-prijs { width: 100%; }
	.of-regels .of-tot { padding-top: 10px; }
}

/* Inmeet-tool op smalle telefoons: maatvelden onder elkaar, ruimere invoer */
@media (max-width: 560px) {
	.im .raster-2.blijf { grid-template-columns: minmax(0, 1fr); }
	.im-stap button { width: 52px; }
	.im-stap input { font-size: 18px; }
	.im-sectie > summary small { max-width: 44%; }
	.dh-balk__titel { display: none; }
	.dh-balk { justify-content: space-between; }
}
