/* Rustiger ontwerp (november 2026). Laatste stylesheet: haalt onrust weg zonder de werking te veranderen.
   Uitgangspunten:
   - Gouwestad geel alleen voor de hoofdknop, het actieve menu-item en het logo.
   - Geen hoofdletterlabels; kleine labels in gewone zinsopbouw, grijs.
   - Signaalkleuren zacht: een gekleurde tekst of streep, geen felle vlakken.
   - Kaarten met een dunne rand, zonder schaduw. */

/* Menu */
.sb {
  background: var(--bg);
}
.sb-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
  padding: 18px 10px 4px;
}
.sb-item {
  position: relative;
  padding: 7px 10px;
  font-size: 14.5px;
}
.sb-item.on {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600;
}
.sb-item.on::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.sb-item .cnt {
  font-weight: 600;
  background: transparent;
  color: var(--ink-3);
  padding: 0 4px;
}
.sb-item .cnt.hot {
  background: var(--accent-soft);
  color: var(--accent-text);
  padding: 0 7px;
}
/* Koppelingen onderaan het menu in plaats van een balk boven elk scherm */
.sb-status {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.6;
  margin-bottom: 10px;
}
.sb-status span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 10px;
  white-space: nowrap;
}
.sb-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-2);
  display: inline-block;
}
.sb-status i.live {
  background: var(--ok);
}

/* Bovenbalk en paginakop */
.top {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}
.hero h1 {
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.hero p {
  font-size: 15px;
  max-width: 70ch;
}
h2.sec {
  font-size: 17px;
}

/* Kaarten en kerncijfers */
.card {
  box-shadow: none;
  border-color: var(--line);
}
.kpi {
  gap: 2px;
  padding: 14px 16px;
}
.kpi .l {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
}
.kpi .v {
  font-size: 26px;
}
button.kpi:hover {
  border-color: var(--line-2);
  background: var(--hover);
}

/* Tabellen */
th {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
  background: var(--surface);
}
td {
  padding: 10px 14px;
}

/* Knoppen en filters */
.btn-s {
  border-color: var(--line-2);
}
.btn-s:hover {
  background: var(--surface-2);
}
.chip {
  font-weight: 500;
  border-color: var(--line);
}
.chip.on {
  font-weight: 600;
}

/* Badges: zacht, geen felle vlakken */
.bdg {
  font-weight: 500;
  padding: 1px 8px;
}
.bacc {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.bsoft {
  background: transparent;
  color: var(--ink-3);
  padding-left: 0;
}

/* WhatsApp: neutrale knop met groen icoon */
.wa-link {
  color: var(--ink-2);
  border-color: var(--line);
  font-weight: 500;
}
.wa-link svg {
  color: #25a35a;
}
.wa-link:hover {
  background: var(--surface-2);
}

/* Meldingen: grijs vlak met een dunne gekleurde streep, rustige tekst */
.warn-box {
  background: var(--surface-2);
  color: var(--ink-2);
  border-left: 3px solid var(--warn);
  border-radius: 6px;
}
.ok-box {
  background: var(--surface-2);
  color: var(--ink-2);
  border-left: 3px solid var(--ok);
  border-radius: 6px;
}
.info-box {
  background: var(--surface-2);
  border: 0;
  border-left: 3px solid var(--line-2);
  border-radius: 6px;
}

/* Volgende stap in de klantkaart: wit, met alleen links een gele streep */
.next {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--surface);
}

/* Fasen in de klantkaart: platte segmenten in plaats van gekleurde pijlen */
.path {
  gap: 3px;
}
.pth,
.pth:first-child,
.pth:last-child {
  clip-path: none;
  margin-right: 0;
  border-radius: 6px;
  padding: 7px 8px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--ink-3);
  text-align: center;
}
.pth.done {
  background: var(--surface-2);
  color: var(--ink-2);
}
.pth.cur,
.pth.cur.slow {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: var(--accent-ink) !important;
  font-weight: 600;
}
.pth.cur.slow small {
  color: var(--accent-ink);
  opacity: 0.75;
}
.pth.lost {
  background: var(--bad-bg);
  color: var(--bad);
}

/* Avatars: iets zachter */
.av.lg {
  background: var(--surface-2);
  color: var(--ink-2);
}

/* Kleine labels: gewone zinsopbouw */
.tgroup {
  letter-spacing: 0;
  text-transform: none;
  font-size: 13px;
  font-weight: 600;
}
.owner-tag {
  color: var(--ink-2);
  font-weight: 600;
}
/* Temperatuur: compact label, niet over de hele breedte */
.temp {
  display: inline-block !important;
  width: auto;
  font-weight: 600;
}
/* Knoppen in lijsten en tabellen: de hoofdactie per rij in zacht geel, zodat niet elke rij schreeuwt */
td .btn-p,
.vrow .btn-p,
.vact .btn-p {
  background: var(--accent-soft);
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
td .btn-p:hover,
.vrow .btn-p:hover,
.vact .btn-p:hover {
  background: var(--accent);
  filter: none;
}
/* Statusbadge in de klantkaart niet over de hele breedte */
.hl-fields .bdg,
.hl-fields .temp {
  display: inline-flex !important;
  width: auto;
}
/* Beschikbaar is een eigen, positieve kleur (groen), los van de statuskleuren uit Smartsheet */
:root {
  --avail: #2f8a52;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --avail: #6cc891;
  }
}
:root[data-theme='dark'] {
  --avail: #6cc891;
}
button.bnc.free {
  border-color: var(--avail);
  color: var(--avail);
}
button.bnc.free:hover {
  background: var(--avail);
  color: #fff;
}
tr.row-ready td {
  background: color-mix(in srgb, var(--avail) 7%, var(--surface));
}
tr.row-ready {
  box-shadow: inset 3px 0 0 var(--avail);
}
tr.row-ready:hover td {
  background: color-mix(in srgb, var(--avail) 12%, var(--surface));
}

/* Getekende plattegrond op schaal */
.pl-vecwrap {
  overflow-x: auto;
}
.pl-vec {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
  background: var(--surface);
  font-family: inherit;
}
.pl-vec text {
  text-anchor: middle;
  dominant-baseline: central;
  fill: #3a3631;
  pointer-events: none;
}
.pv-out {
  fill: #fbfaf8;
  stroke: #2b2925;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.pz rect {
  stroke: none;
}
.pz-rijbaan rect {
  fill: #ecebe8;
}
.pz-hellingbaan rect {
  fill: #f5ecd6;
  stroke: #c9b48a;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.pz-trappenhuis rect {
  fill: #1f1d1a;
}
.pz-trappenhuis text {
  fill: #fff;
}
.pz-overig rect {
  fill: #f1f0ed;
  stroke: #cfcac0;
  stroke-dasharray: 4 3;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.pz text {
  font-style: italic;
  fill: #6b665e;
}
.pv :is(rect, polygon) {
  stroke: #b08d57;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.pv :is(rect, polygon),
.pv.pa-tk :is(rect, polygon) {
  fill-opacity: 1;
}
.pv.pa-tk :is(rect, polygon) {
  fill: #ffffff;
}
.pv.pa-oo :is(rect, polygon) {
  fill: #fcd34d;
}
.pv.pa-ma :is(rect, polygon) {
  fill: #f59e0b;
}
.pv.pa-vk :is(rect, polygon) {
  fill: #e5534b;
}
.pv.pa-gp :is(rect, polygon) {
  fill: #b72525;
}
.pv.pa-vk text,
.pv.pa-gp text {
  fill: #fff;
}
.pv-x :is(rect, polygon) {
  fill: #f1f0ed;
  stroke-dasharray: 3 2;
}
.pv.free {
  cursor: pointer;
}
.pv.free:hover :is(rect, polygon) {
  fill: #fff4d6;
}
.pv.off {
  opacity: 0.2;
}
.pv.pref :is(rect, polygon) {
  stroke: #fcaf15;
  stroke-width: 4;
}
.pv.sel :is(rect, polygon) {
  fill: #fcaf15;
  stroke: #1b1a18;
  stroke-width: 3;
}
.uplan:not(.pick) .pv {
  cursor: pointer;
}
.pv-dim line {
  stroke: #6b665e;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.pv-dim text {
  fill: #55524d;
}

/* Plattegrond tekenen */
.pe-grid {
  background-color: #fff;
  background-image: linear-gradient(to right, #eceae5 1px, transparent 1px),
    linear-gradient(to bottom, #eceae5 1px, transparent 1px);
}
.pe-img {
  position: relative;
  width: 100%;
}
.pe-img img,
.pe-img svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.pe-img img {
  opacity: 0.75;
}
#peSvg text {
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  fill: #2b2925;
}
.pe-a rect {
  fill: #ffffff;
  fill-opacity: 0.85;
  stroke: #b08d57;
}
.pe-a.pe-bad rect {
  fill: #fbefed;
  stroke: #a8321f;
}
.pe-z.sel rect,
.pe-a.sel rect {
  stroke: #1b1a18;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.pe-a.sel rect {
  fill: #fcd34d;
}
.pe-toolset {
  margin: 10px 0 4px;
}
.pe-help {
  margin: 4px 0 8px;
}
.pe-check {
  flex-direction: row !important;
  align-items: center;
  gap: 6px !important;
  color: var(--ink-2) !important;
  font-size: 13px !important;
}
.pe-check input {
  width: auto !important;
}
.pe-preview {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.pe-preview summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

/* Actieve knoppen en keuzes in Gouwestad oranje, niet zwart */
.btn-d,
.chip.on,
.seg button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-d:hover,
.chip.on:hover {
  filter: brightness(0.96);
}
.tm.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.ltile.on {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* Selectiebalk: licht met een oranje rand in plaats van een zwart blok */
.bulkbar {
  background: var(--accent-soft);
  color: var(--ink);
  border: 1px solid var(--accent);
}
.bulkbar .btn-g {
  color: var(--ink-2);
  opacity: 1;
}
.bulkbar .hint {
  color: var(--ink-2);
}
.bulkbar select {
  border-color: var(--line-2);
}
.pw-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 14px;
}

/* Op een telefoon of tablet: knoppen en keuzes groot genoeg om met een vinger te raken */
@media (pointer: coarse) {
  .btn-sm,
  .chip,
  .tab,
  .wa-link {
    min-height: 38px;
  }
  .bnc {
    min-width: 40px;
    height: 34px;
    font-size: 13px;
  }
  td select,
  .vrow select {
    min-height: 38px;
  }
}
.pw-note {
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 13px;
}

/* Meer voorkeuren dan er op de regel passen: het aantal dat niet getoond wordt */
.bnc.more {
  background: transparent;
  border-style: dashed;
  color: var(--ink-2);
  cursor: help;
}

/* Optie plaatsen op de plattegrond */
.modal .box.pk {
  width: min(1240px, 100%);
  height: calc(100vh - 32px);
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pk .mh {
  padding-bottom: 10px;
}
.pk-wish {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.pk-wl {
  color: var(--ink-2);
  font-weight: 600;
}
.pk-wa {
  margin-left: 8px;
}
.pk-wt {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  font-weight: 600;
}
.pk-wish .bncs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pk-wish .bnc {
  cursor: pointer;
  gap: 4px;
}
.pk-wish .bnc small {
  font-weight: 500;
  opacity: 0.8;
}
.pk-wish .bnc.on {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
.pk-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 22px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.pk-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.pk-tab span {
  font-weight: 500;
  color: var(--ink-2);
}
.pk-tab.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.pk-tab.on span {
  color: var(--accent-ink);
}
.pk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.pk-dot.pref {
  box-shadow: inset 0 0 0 2px #fcaf15;
}
.pk-dot.alt {
  background: #2f8f5b;
}
.pk-plan {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 22px;
  background: var(--surface-2, var(--surface));
}
.pk-canvas {
  position: relative;
  margin: 0 auto;
}
.pk-canvas > svg.pl-vec {
  margin: 0 auto;
  border-radius: 8px;
}
.pk-schema .up-units .ub {
  cursor: pointer;
}
.pk-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.pk-foot .legend {
  flex: 1;
  flex-wrap: wrap;
}
.pk-count {
  color: var(--ink-2);
}
.pk-count b {
  color: var(--ink);
}
.pk-alt-i {
  background: #fff !important;
  box-shadow: inset 0 0 0 2px #2f8f5b;
}
/* vergelijkbaar alternatief en de gekozen unit op de tekening */
.pv.alt :is(rect, polygon) {
  stroke: #2f8f5b;
  stroke-width: 4;
}
.ub.alt {
  box-shadow: inset 0 0 0 2px #2f8f5b;
}
.pk .pv.sel :is(rect, polygon),
.pk .pv.pk-sel :is(rect, polygon) {
  stroke: #1b1a18;
  stroke-width: 4;
}
.pk .pv.pk-sel.free :is(rect, polygon) {
  fill: #fcaf15;
}
.pk .pv.pk-sel.free text {
  fill: #1b1a18;
}
.pk .pv {
  cursor: pointer;
}
.pk .ub.pk-sel {
  outline: 3px solid #1b1a18;
  outline-offset: 1px;
}
/* het kaartje bij de unit */
.pk-card {
  position: absolute;
  z-index: 3;
  width: 290px;
  max-width: calc(100vw - 72px);
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.pk-ch {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pk-ch b {
  font-size: 16px;
}
.pk-x {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface);
  display: grid;
  place-items: center;
  flex: none;
}
.pk-x svg {
  width: 14px;
  height: 14px;
}
.pk-tags {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pk-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2, var(--surface));
}
.pk-tag.pref {
  background: #fff4d6;
  color: #6b4a00;
}
.pk-tag.alt {
  background: #e3f3ea;
  color: #1f5f3c;
}
.pk-facts {
  color: var(--ink-2);
  line-height: 1.45;
}
.pk-price {
  font-size: 18px;
  font-weight: 700;
}
.pk-price small {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}
.pk-note {
  color: var(--ink-2);
  line-height: 1.4;
}
.pk-act {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pk-act .btn {
  width: 100%;
  justify-content: center;
}
.pk-days {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
}
.pk-days input {
  width: 64px;
  padding: 4px 6px;
}
.pk-alts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pk-alt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2px 10px;
  align-items: center;
  text-align: left;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #b9dcc8;
  background: #f3faf6;
  color: var(--ink);
  font-size: 12px;
}
.pk-alt:hover {
  border-color: #2f8f5b;
}
.pk-alt b {
  font-size: 14px;
}
.pk-alt span {
  color: var(--ink-2);
}
.pk-alt i {
  font-style: normal;
  font-weight: 600;
}
@media (max-width: 640px) {
  .modal:has(.box.pk) {
    padding: 0;
  }
  .modal .box.pk {
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
  .pk-wish,
  .pk-tabs,
  .pk-plan,
  .pk-foot {
    padding-left: 14px;
    padding-right: 14px;
  }
  .pk-foot .legend {
    display: none;
  }
  .pk-card {
    width: 270px;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .pk-tag.pref,
  :root:not([data-theme='light']) .pk-tag.alt,
  :root:not([data-theme='light']) .pk-alt {
    color: #1b1a18;
  }
}
:root[data-theme='dark'] .pk-tag.pref,
:root[data-theme='dark'] .pk-tag.alt,
:root[data-theme='dark'] .pk-alt {
  color: #1b1a18;
}

/* Projectoverzicht: filter op status */
.bn-filterh {
  margin-bottom: 8px;
  gap: 12px;
  flex-wrap: wrap;
}
.bn-filterh .hint {
  font-size: 12px;
}
.bn-stat {
  cursor: pointer;
}

/* Klantkaart: inschrijfdatum met hoe lang geleden */
.hl-fields small.hint {
  display: block;
  font-size: 12px;
  margin-top: 1px;
}

/* Zijbalk: Projectoverzichten in groepen */
.sb-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 8px 10px 4px 12px;
}

/* ---------- Rooster (projectoverzicht en kopersoverzicht): sorteren, filteren, kolommen, bewerken ---------- */
.sgrid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sg-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sg-bar .sg-q {
  width: 300px;
  max-width: 100%;
}
.sg-bar .grow {
  flex: 1;
}
.sg-bar .btn svg {
  width: 15px;
  height: 15px;
}
.sg-help {
  margin-top: 10px;
}
.sg-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sg-cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 4px 16px;
  max-height: 260px;
  overflow: auto;
}
.sg-cols label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 400;
  padding: 3px 0;
  cursor: pointer;
}
.sg-cols input {
  width: auto;
}
.sg-table thead tr:first-child th {
  white-space: nowrap;
}
.sg-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.sg-table th.sorted {
  color: var(--ink);
}
/* Filterrij blijft onder de koppen staan bij het scrollen */
.sg-table thead tr.sg-frow th {
  top: 33px;
  padding: 4px 6px 6px;
  border-bottom: 1px solid var(--line-2);
}
.sg-frow input,
.sg-frow select {
  width: 100%;
  min-width: 70px;
  padding: 3px 6px;
  font-size: 12.5px;
  border-radius: 6px;
  font-weight: 400;
}
.sg-table td.sg-e {
  cursor: cell;
}
.sg-table td.sg-e:hover {
  box-shadow: inset 0 0 0 1px var(--line-2);
  background: var(--hover);
}
.sg-table td .sg-in {
  width: 100%;
  min-width: 110px;
  padding: 3px 6px;
  font: inherit;
  border-radius: 6px;
}
.sg-table td.sg-busy {
  opacity: 0.5;
}
/* In de app gewijzigd, staat nog niet in Smartsheet */
.sg-table td.sg-wait {
  box-shadow: inset 0 0 0 1px var(--accent);
  outline: 1px dashed var(--accent-text);
  outline-offset: -3px;
}
.sg-table .sg-link {
  padding: 1px 6px;
  font-size: 12px;
}
.sg-table .sg-differs {
  color: var(--warn);
}
.sg-table .plink svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 3px;
}
.tab .n.hot {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 0 6px;
  font-weight: 700;
}

/* ---------- Dossiermap uit Google Drive in de app ---------- */
.modal .box.dmbox {
  width: min(1180px, 96vw);
  max-width: 96vw;
}
.dm {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 14px;
  min-height: min(68vh, 720px);
}
.dm-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow: auto;
  max-height: 72vh;
}
.dm-list .between {
  margin-bottom: 6px;
  gap: 8px;
}
.dm-f {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: none;
  border-radius: 8px;
  padding: 7px 8px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.dm-f:hover {
  background: var(--hover);
}
.dm-f.on {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.dm-f svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--ink-3);
}
.dm-f span {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dm-f b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-f small {
  color: var(--ink-3);
  font-size: 12px;
}
.dm-view {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.dm-view iframe {
  flex: 1;
  width: 100%;
  min-height: 60vh;
  border: 0;
  background: #fff;
}
.dm-view .empty {
  margin: auto;
}
@media (max-width: 860px) {
  .dm {
    grid-template-columns: 1fr;
  }
  .dm-list {
    max-height: 34vh;
  }
}

/* ---------- Koper koppelen ---------- */
.koppel-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 300px;
  overflow: auto;
}
.koppel-list .act {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.koppel-list .act.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.koppel-list .act .t {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.koppel-list .act .t span {
  font-size: 12.5px;
  color: var(--ink-3);
}
.koppel-naam summary {
  cursor: pointer;
  font-size: 13.5px;
  color: var(--ink-2);
}

/* ---------- Logo: het bestand van Gouwestad Makelaardij, ongewijzigd ---------- */
.brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 2px 8px 16px;
}
.brand .brand-logo {
  display: block;
  width: 100%;
  max-width: 190px;
  height: auto;
}
.brand span {
  font-size: 12.5px;
  color: var(--ink-3);
  padding-left: 1px;
}
.login .brand .brand-logo {
  max-width: 240px;
}
/* Het logo is gemaakt voor een lichte ondergrond: in de donkere weergave krijgt het een wit vlak eromheen */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .brand .brand-logo {
    background: #fff;
    padding: 8px 10px;
    border-radius: 8px;
  }
}
:root[data-theme='dark'] .brand .brand-logo {
  background: #fff;
  padding: 8px 10px;
  border-radius: 8px;
}

/* ---------- Laadbalk ---------- */
#loadbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
#loadbar.on {
  opacity: 1;
}
#loadbar i {
  display: block;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent) 40%, var(--accent) 60%, transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: loadbar 1.1s linear infinite;
}
#loadbar span {
  display: none;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
#loadbar.slow span {
  display: block;
}
@keyframes loadbar {
  from {
    background-position: -50% 0;
  }
  to {
    background-position: 150% 0;
  }
}
body.is-busy,
body.is-busy button {
  cursor: progress;
}
@media (prefers-reduced-motion: reduce) {
  #loadbar i {
    animation: none;
    background: var(--accent);
  }
}

/* ---------- Klantkaart: de volgende stap direct onder de naam ---------- */
.nextbox {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.nx-step {
  padding: 14px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nx-step .blk-h b {
  font-size: 18px;
}
.nx-step .hint {
  max-width: 82ch;
}
/* De eerste open taak, bovenaan. Te laat is rood, vandaag is oranje. */
.nx-task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 6px 10px 0 0;
}
.nx-task.late {
  background: var(--bad-bg);
}
.nx-task.today {
  background: var(--warn-bg);
}
.nx-task .chk {
  flex: none;
  cursor: pointer;
}
.nx-task-t {
  display: flex;
  align-items: baseline;
  gap: 4px 12px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}
.nx-task-t b {
  font-weight: 600;
}
.nx-task.none {
  justify-content: space-between;
  flex-wrap: wrap;
}
/* Argumenten voor het gesprek */
.nx-talk {
  margin: 0 18px 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 14px;
}
.nx-talk b {
  font-weight: 700;
}
.nx-talk ul {
  margin: 4px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nx-talk .plink {
  font-weight: 600;
}
.owner-note {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.owner-note > span:not(.av) {
  flex: 1 1 220px;
}
.owner-note [data-takeover] {
  flex: none;
}

/* ---------- Klantkaart: indeling als één regel ---------- */
.catline {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.catline-l {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}
.catline-b {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.catline-s {
  margin-left: auto;
}
.catline .cat {
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
}
.catline .cat:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}
.catline .cat.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  cursor: default;
}
.catline .cat.c-weg.on {
  background: var(--bad-bg);
  border-color: var(--bad);
  color: var(--bad);
}
.catline .cat.c-later.on {
  background: var(--info-bg);
  border-color: var(--info);
  color: var(--info);
}
/* De fase met de hand zetten staat bij Details */
.fase-box {
  display: flex;
  align-items: center;
  gap: 10px 16px;
  flex-wrap: wrap;
  padding: 0 0 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.fase-box .hint {
  flex: 1;
  min-width: 240px;
}
.fase-sel {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-weight: 600;
}
.fase-sel select {
  width: auto;
  padding: 5px 8px;
}
/* Velden in de kop: zo breed als de inhoud vraagt, zodat niets wordt afgekapt */
.rec-h .hl-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
}
.rec-h .hl-fields > div {
  min-width: 120px;
}
.rec-h .hl-fields select {
  font-size: 14px;
}
.temp-sel {
  width: auto;
  padding: 3px 8px;
  font-weight: 600;
  border-radius: 8px;
}
.temp-sel.heet {
  color: var(--bad);
}
.temp.heet {
  color: var(--bad);
}
.lose-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.lose-list .btn {
  justify-content: flex-start;
}
.hl-fields .plink svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 3px;
}
.hl-fields .temp-sel {
  width: auto;
  font-size: 14px;
}
@media (max-width: 860px) {
  .catline-s {
    margin-left: 0;
    flex-basis: 100%;
  }
}

/* Op de telefoon: invulvakken in het rooster minstens 16 punten, anders zoomt een iPhone in bij elke tik */
@media (max-width: 860px) {
  .sg-frow input,
  .sg-frow select,
  .sg-table td .sg-in,
  .sg-bar .sg-q {
    font-size: 16px;
  }
}

/* ---------- Melding met een knop (Ongedaan maken) ---------- */
.toast.has-act {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 8px 18px;
  overflow: hidden;
}
.toast-act {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 700;
  font-size: 13.5px;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.toast-act:hover {
  filter: brightness(0.95);
}
.toast.has-act i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  animation: toast-run linear forwards;
}
@keyframes toast-run {
  to {
    transform: scaleX(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast.has-act i {
    animation: none;
    display: none;
  }
}

/* ---------- Bevestigen voordat een koper wordt losgekoppeld of verplaatst ---------- */
.mb.ask p {
  margin: 0 0 10px;
}
.ask-list {
  margin: 0 0 12px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.btn-bad {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}
.btn-bad:hover {
  filter: brightness(0.94);
}

/* ---------- Wijzigingen (beheerder) ---------- */
.chg-sum {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.chg-sum .card {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chg-sum span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.chg-sum b {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
}
.chg-sum .bad b {
  color: var(--bad);
}
.chg-old {
  color: var(--ink-3);
}
.chg-new {
  font-weight: 600;
}
@media (max-width: 860px) {
  .chg-sum {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Instellingen: wie mag de Status wijzigen */
.rights-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 16px;
}
.rights-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.rights-list input {
  width: auto;
  flex: none;
}

/* ---------- Bijlagen van de koper (kopie legitimatiebewijs, uittreksel KvK) ---------- */
/* Het vinkje: compleet (groen), nakijken (oranje) of ontbreekt (rood) */
.docs-b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.docs-b svg {
  width: 13px;
  height: 13px;
  flex: none;
}
.docs-b.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.docs-b.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.docs-b.bad {
  background: var(--bad-bg);
  color: var(--bad);
}
.docs-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.docs-btn:hover .docs-b {
  filter: brightness(0.96);
}
.docs-btn .sub {
  display: block;
}
/* De twee eisen onder elkaar */
.docs-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.docs-l {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.docs-l i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  background: var(--line-2);
  transform: translateY(1px);
}
.docs-l.y i {
  background: var(--ok);
}
.docs-l.w i {
  background: var(--accent);
}
.docs-l.x i {
  background: var(--bad);
}
.docs-l small {
  font-weight: 400;
  color: var(--ink-3);
  font-size: 12.5px;
}
/* Lijst links, de bijlage zelf rechts */
.kf {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 14px;
  min-height: min(66vh, 700px);
}
.kf-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow: auto;
  max-height: 72vh;
}
.kf-f {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.kf-f.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.kf-open {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.kf-open svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--ink-3);
  margin-top: 2px;
}
.kf-open span {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.kf-open b {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.kf-open small {
  color: var(--ink-3);
  font-size: 12px;
}
.kf-f select {
  margin: 0 10px 8px 38px;
  width: auto;
  padding: 4px 8px;
  font-size: 13px;
}
.kf-note {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
}
.kf-view .kdoc-f {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.kf-img {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 10px;
  background: var(--surface-2);
}
.kf-img img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.kf-view .empty {
  text-align: center;
  padding: 20px;
}
/* Gegevenscheck: velden links, bijlagen ernaast */
.mb.chk2 {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 18px;
  align-items: start;
}
.chk-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chk-form .fg {
  grid-template-columns: 1fr;
}
.chk-form .fg label.chk-tick {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  cursor: pointer;
}
.chk-tick input {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
}
.chk-tick span {
  display: flex;
  flex-direction: column;
}
.chk-tick small,
.chk-form label > small.hint {
  font-weight: 400;
  font-size: 12.5px;
}
.chk-files .kf {
  grid-template-columns: minmax(200px, 260px) 1fr;
}
/* Klantkaart: bijlagen van de koper */
.kfiles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kfiles-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.kfiles-list .plink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  overflow-wrap: anywhere;
}
.kfiles-list .plink svg {
  width: 14px;
  height: 14px;
  flex: none;
}
@media (max-width: 860px) {
  .kf,
  .chk-files .kf,
  .mb.chk2 {
    grid-template-columns: 1fr;
  }
  .kf-list {
    max-height: 36vh;
  }
}
.kf-read {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.kf-read svg {
  width: 15px;
  height: 15px;
  flex: none;
}

/* Bouwnummerkaart */
.box.ucbox {
  width: min(640px, calc(100vw - 32px));
}
.uc {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.uc-model {
  font-weight: 400;
  color: var(--ink-3);
  font-size: 0.8em;
  margin-left: 6px;
}
.uc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.uc-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.uc-price {
  text-align: right;
  display: flex;
  flex-direction: column;
}
.uc-price b {
  font-size: 1.35em;
  font-weight: 650;
}
.uc-price small {
  color: var(--ink-3);
}
.uc-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.uc-f {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.uc-f span,
.uc-dates span,
.uc-chg span {
  color: var(--ink-3);
  font-size: 0.85em;
}
.uc-f b {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.uc-sec {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.uc-sec h4 {
  margin: 0;
  font-size: 0.95em;
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.uc-who {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px 12px;
  color: inherit;
  font: inherit;
}
button.uc-who {
  cursor: pointer;
}
button.uc-who:hover {
  background: var(--hover);
}
.uc-who.off {
  border-left-color: var(--line-2);
}
.uc-who .uc-t {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.uc-who small {
  color: var(--ink-3);
}
.uc-go {
  color: var(--accent-text);
  font-size: 0.85em;
  white-space: nowrap;
}
.uc-dates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.uc-dates div {
  display: flex;
  flex-direction: column;
}
.uc-rmk {
  white-space: pre-wrap;
  max-height: 160px;
  overflow: auto;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 8px 10px;
}
.uc-chg {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: baseline;
}
.uc-chg span:first-child {
  min-width: 140px;
}
.uc .mf,
.ucbox .mf {
  flex-wrap: wrap;
  justify-content: flex-start;
}
button.uc-open {
  font-variant-numeric: tabular-nums;
}

/* Regie (beheerder) */
.rg-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.rg-bar select {
  max-width: 240px;
}
.rg-sum {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.rg-sum button.card {
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.rg-sum button.card:hover {
  background: var(--hover);
}
.rg-h {
  margin: 22px 0 8px;
}
.rg-t td {
  vertical-align: top;
}
.rg-t .sub {
  display: block;
}
.rg-t td.late,
.rg-t b.late {
  color: var(--bad);
  font-weight: 700;
}
.rg-t tr.on td {
  background: var(--accent-soft, var(--hover));
}
.rg-t tfoot td {
  border-top: 2px solid var(--line);
}
.rg-t .plink .av {
  margin-right: 6px;
}
.rg-norms {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rg-ngrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.rg-ngrid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}
.rg-ngrid input {
  width: 72px;
}
.rg-t .plink { text-align: left; }

/* Verkoopkansen */
.kn {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.kn-list {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 230px);
  overflow: auto;
}
.kn-sum {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.kn-u {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.kn-u:hover {
  background: var(--hover);
}
.kn-u.on {
  background: var(--accent-soft, var(--hover));
  box-shadow: inset 3px 0 0 var(--accent);
}
.kn-u > span:first-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.kn-u small {
  color: var(--ink-3);
}
.kn-c {
  display: flex;
  gap: 4px;
  flex: none;
}
.kn-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.kn-tools {
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.kn-rows {
  display: flex;
  flex-direction: column;
}
.kn-r {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto 140px 110px;
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.kn-r.off {
  opacity: 0.6;
  cursor: default;
}
.kn-n {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.kn-n .plink {
  text-align: left;
}
.kn-n small {
  color: var(--ink-3);
}
.kn-o,
.kn-m {
  font-size: 12px;
}
.box.kmbox {
  width: min(1100px, calc(100vw - 32px));
}
.km-grid {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 14px;
}
.km-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 60vh;
  overflow: auto;
}
.km-edit {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.km-edit textarea {
  width: 100%;
  font: inherit;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .kn,
  .km-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .kn-r {
    grid-template-columns: 22px minmax(0, 1fr) auto;
  }
  .kn-o,
  .kn-m {
    grid-column: 2 / -1;
  }
}

/* Dossiermap: soorten bestanden, tegels en de Google Drive weergave */
.dm-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.dm-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.dm-crumbs > svg {
  width: 18px;
  height: 18px;
  color: var(--ink-3);
}
.dm-sep {
  color: var(--ink-3);
}
.dm-f svg.dm-ic,
.dm-tile svg.dm-ic {
  width: auto;
  height: auto;
  color: inherit;
}
.dm-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  max-height: 72vh;
  overflow: auto;
  padding: 2px;
}
.dm-tile {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0;
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.dm-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}
.dm-thumb {
  position: relative;
  height: 120px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dm-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  background: #fff;
}
.dm-tile-n,
.dm-tile-f {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  min-width: 0;
}
.dm-tile-f {
  padding: 12px 10px;
}
.dm-tile-n > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dm-tile b {
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-tile small {
  color: var(--ink-3);
  font-size: 11px;
}
.dm-tile svg.dm-ic {
  flex: none;
}
.dm-back {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.dm-embed {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.dm-embed iframe {
  width: 100%;
  min-height: 64vh;
  border: 0;
  background: #fff;
}

/* Bouwnummerkaart: tijdlijn met de belangrijkste datums */
.uc-tl {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 4px 0 2px;
}
.uc-tl > div {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 20px 8px 0 0;
  min-width: 0;
}
.uc-tl > div::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
}
.uc-tl > div.tl-y::before {
  background: #2f7d4f;
}
.uc-tl i {
  position: absolute;
  top: 1px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid #c9c4ba;
  box-sizing: border-box;
}
.uc-tl .tl-y i {
  background: #2f7d4f;
  border-color: #2f7d4f;
}
.uc-tl .tl-next i {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(252, 175, 21, 0.3);
}
.uc-tl span {
  font-size: 11.5px;
  color: var(--ink-2);
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.uc-tl b {
  font-size: 14px;
  font-weight: 650;
  display: flex;
  flex-direction: column;
  margin-top: 2px;
}
.uc-tl b small {
  font-weight: 400;
  font-size: 11px;
  color: var(--ink-3);
}
.uc-tl > div:not(.tl-y):not(.tl-next) b {
  color: var(--ink-3);
  font-weight: 500;
}
.uc-tl .tl-next b {
  color: #9a6400;
}
.uc-tl em {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-3);
}
@media (max-width: 640px) {
  .uc-tl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 12px;
  }
}

.dm-group {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 4px 2px 8px;
}
.dm-ftiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.dm-ftile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.dm-ftile:hover {
  border-color: var(--accent);
}
.dm-ftile b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-ftile svg.dm-ic {
  flex: none;
  width: auto;
  height: auto;
}
.dm-f svg.dm-ic {
  width: 30px;
  height: 30px;
}

/* Spam verwijderen op de klantkaart: rustig onderaan, niet in de weg */
.spam-side {
  display: flex;
  justify-content: flex-end;
}
.spam-side .btn {
  color: var(--ink-3);
}

/* Bouwnummerdossier: het bouwnummer voorop in de kop van het dossier */
.bnr-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.bnr-num {
  min-width: 52px;
  height: 52px;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 22px;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.bnr-t {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.bnr-t b {
  font-size: 16px;
}
.bnr-t small {
  color: var(--ink-2);
}
.bnr-deals {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.bnr-hist summary {
  cursor: pointer;
  padding: 4px 0;
}
.bnr-hist .hint {
  padding: 2px 0 2px 12px;
}

.sr-bn {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.rg-eff-sum {
  padding-bottom: 4px;
  line-height: 1.5;
}

.bh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Menu van de rechtermuisknop */
.ctx {
  position: fixed;
  z-index: 1000;
  min-width: 240px;
  max-width: 400px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(27, 26, 24, 0.16);
  display: flex;
  flex-direction: column;
}
.ctx-t {
  padding: 6px 10px 4px;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ctx button {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  text-align: left;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.ctx button:hover,
.ctx button:focus-visible {
  background: var(--hover);
  outline: none;
}
.ctx button[disabled] {
  color: var(--ink-3);
  cursor: default;
}
.ctx button small {
  color: var(--ink-3);
  font-size: 12px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ctx .ctx-bad {
  color: var(--bad);
}
.ctx-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}

.kn-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.kn-sort button {
  font-size: 12px;
  padding: 3px 8px;
}

/* Optie verlengen met één klik: +3, +7, +14 als één groepje */
.ext {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ext-l {
  font-size: 12px;
  color: var(--ink-3);
  margin-right: 2px;
}
.ext .btn {
  min-width: 38px;
  justify-content: center;
}
.nx-more {
  margin-top: 6px;
}
.catline .grow,
.mf .grow {
  flex: 1;
}

/* ---------- Huisstijl gouwestadmakelaardij.nl (1.33) ----------
   Zelfde letter (Source Sans 3), koppen licht en strak gezet, witte vlakken op warm crème, ronde knoppen,
   en het korte gele streepje onder de titel van een scherm. Minder lijnen, minder kleuren door elkaar. */
h1,
h2,
h3,
.hero h1 {
  font-weight: 400;
  letter-spacing: -0.03em;
}
.hero h1 {
  font-size: clamp(26px, 2.5vw, 34px);
  line-height: 1.12;
  max-width: 30ch;
}
.hero h1 em {
  color: inherit;
  font-weight: 600;
}
.hero::after,
.pg-h::after {
  content: '';
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  margin-top: 14px;
}
.hero p {
  font-size: 16px;
  color: var(--ink-2);
}
.blk-h b,
h2.sec {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Menu: wit, namen op één regel, geen hoofdletterkopjes */
.sb {
  padding: 22px 14px 18px max(14px, env(safe-area-inset-left, 0px));
  gap: 1px;
}
.sb-t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-item {
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 400;
  color: var(--ink);
}
.sb-item svg {
  color: var(--ink-3);
}
.sb-item.on {
  background: var(--accent-soft);
  font-weight: 600;
}
.sb-item.on svg {
  color: var(--ink);
}
.sb-item.on::before {
  display: none;
}
.sb-label,
.sb-sub {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}
.sb-item .cnt {
  background: none;
  color: var(--ink-3);
  font-weight: 500;
  padding: 0 4px;
}
.sb-item .cnt.hot {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  padding: 0 7px;
}

/* Bovenbalk wit, zoals de kop van de website */
.top {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom-color: var(--line);
}

/* Eén smalle regel voor testmodus en wachtwoord */
.sysbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: -6px;
}
.sysbar i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 7px;
}
.sysbar b {
  color: var(--ink);
  font-weight: 600;
}
.sysbar .linkbtn {
  font-size: inherit;
}

/* Knoppen en keuzes: rond, rustig gewicht; alleen de hoofdknop is geel */
.btn {
  font-weight: 500;
  font-size: 15px;
}
.btn-sm {
  font-size: 14px;
}
.btn-p {
  font-weight: 600;
}
.btn-s {
  border-color: var(--line-2);
}
.chip {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
}
.chip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

/* Kaarten: wit op crème, dunne warme lijn, geen schaduw */
.card {
  border-color: var(--line);
  border-radius: 14px;
}
.kpi {
  padding: 16px 18px;
}
.kpi .v {
  font-weight: 400;
  letter-spacing: -0.03em;
}
table th {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--ink-3);
}
.hero p em {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}
.hero p {
  max-width: 78ch;
}
.sysbar .linkbtn {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.between:has(> .hero) {
  align-items: flex-start;
}

/* ---------- Minder op een kaart (1.34) ----------
   Elke kaart beantwoordt drie vragen: wie, welk bouwnummer, wat nu. De rest zit één klik verder. */
/* Menu Meer */
details.more {
  position: relative;
  display: inline-block;
}
details.more > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
details.more > summary::-webkit-details-marker {
  display: none;
}
details.more > summary::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 4px;
  opacity: 0.6;
}
.more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(12, 10, 9, 0.1);
}
.more-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
}
.more-menu button:hover {
  background: var(--hover);
}
.more-menu button svg {
  width: 16px;
  height: 16px;
  color: var(--ink-3);
}
.more-menu button.bad {
  color: var(--bad);
}

/* Uitleg bij een stap: dicht tot je erom vraagt */
.nx-step:not(.bnpref) > .hint,
.nx-coach {
  display: none;
}
.nextbox.help .nx-step > .hint,
.nextbox.help .nx-coach {
  display: block;
}
.nx-q {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: none;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1;
  padding: 0;
  margin-left: 8px;
  vertical-align: 2px;
}
.nextbox.help .nx-q {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}

/* Gegevens van de klant: één regel, openklappen voor de rest */
details.facts {
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
details.facts > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}
details.facts > summary::-webkit-details-marker {
  display: none;
}
.facts-l {
  font-weight: 600;
  color: var(--ink);
}
.facts-l::before {
  content: '▸';
  display: inline-block;
  width: 14px;
  color: var(--ink-3);
}
details.facts[open] .facts-l::before {
  content: '▾';
}
details.facts .hl-fields {
  border-top: 0;
  margin-top: 4px;
}

/* Inklapbaar blok op Vandaag */
details.fold > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  padding: 10px 0;
}
details.fold.card > summary {
  padding: 16px 20px;
}
details.fold > summary::-webkit-details-marker {
  display: none;
}
details.fold > summary::before {
  content: '▸';
  display: inline-block;
  width: 16px;
  color: var(--ink-3);
}
details.fold[open] > summary::before {
  content: '▾';
}
details.fold > summary span {
  font-weight: 400;
  color: var(--ink-3);
  margin-left: 6px;
}
details.fold.card > .card {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
details.fold .tgroup {
  display: none;
}

/* Regels op Vandaag: naam, één feit, één knop */
.kpis.k4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .kpis.k4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.vrow .sub .bncs {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.wa-link {
  width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}
.wa-link svg {
  margin: 0;
}
@media (hover: hover) {
  .vrow .vhov {
    visibility: hidden;
  }
  .vrow:hover .vhov,
  .vrow:focus-within .vhov {
    visibility: visible;
  }
}
.sug {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
}
.sug p {
  margin: 0;
}
.sug p {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vrow .vmain {
  min-width: 0;
}
.vrow .vmain .sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.vrow .vact {
  flex-wrap: nowrap;
  flex: none;
}
@media (max-width: 760px) {
  .vrow .vact {
    flex-wrap: wrap;
    flex: 0 1 auto;
  }
  .vrow .vmain .sub {
    white-space: normal;
  }
  .sug {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .sug > .row {
    grid-column: 2;
  }
  .more-menu {
    right: auto;
    left: 0;
  }
  details.facts > summary {
    flex-direction: column;
    gap: 2px;
  }
}

/* ---------- Automatisch reageren op inschrijvingen (1.35) ---------- */
.auto-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 20px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.auto-row .hint {
  margin-top: 4px;
}
.auto-act {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.auto-set details.fold {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 4px;
}
.auto-steps {
  margin: 10px 0 4px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--ink-2);
}
.auto-quote {
  margin: 6px 0;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 8px;
  color: var(--ink);
}
.auto-set .tbl td {
  vertical-align: top;
}
@media (max-width: 640px) {
  .auto-row {
    grid-template-columns: 1fr;
  }
  .auto-act {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ---------- Businesstoets (1.36) ---------- */
.wwft-row {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.wwft-row:last-child {
  border-bottom: 0;
}
.bt-set .fg {
  margin-top: 6px;
}

/* ---------- Zijbalk helemaal wit (1.36.1) ----------
   Geen lichtgeel vlak meer: wit menu met een dunne lijn, het actieve onderdeel in neutraal grijs.
   Geel blijft alleen voor de tellers die aandacht vragen. */
.sb {
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.sb-item:hover {
  background: color-mix(in srgb, var(--ink) 4%, var(--surface));
}
.sb-item.on {
  background: color-mix(in srgb, var(--ink) 7%, var(--surface));
  box-shadow: none;
}

/* ---------- Inloggen: stappen na het inloggen en tweestapsverificatie (1.37) ---------- */
.login.gate .box {
  max-width: 460px;
}
.gate-f {
  display: grid;
  gap: 12px;
}
.gate-f h3 {
  margin: 0;
}
.tfa-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}
.tfa-qr {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}
.tfa-qr svg {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 100%;
  height: auto;
}
.tfa-key code {
  display: block;
  margin: 8px 0;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 15px;
  letter-spacing: 0.05em;
  word-break: break-all;
}
.tfa-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.tfa-codes code {
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 8px;
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.sysbar .moved i {
  background: var(--bad, #c0392b);
}

.team-list {
  display: grid;
}
.team-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.team-who {
  flex: 1 1 220px;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Verbinding testen (Businesstoets): per stap een gekleurd bolletje, daaronder wat je kunt doen */
.diag {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.diag li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  overflow-wrap: anywhere;
}
.diag li i {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
}
.diag li.bad i {
  background: var(--bad);
}
.diag li.bad span {
  color: var(--ink);
  font-weight: 600;
}
.diag-advice {
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 8px;
}
.diag-advice ol {
  margin: 8px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--ink-2);
}
.diag-report {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--ink-2);
}
.diag-report textarea {
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical;
  white-space: pre;
  overflow-x: auto;
}

/* Optie plaatsen: keuze tussen plattegrond en lijst */
.pk .mh .pk-view {
  margin-left: auto;
  margin-right: 10px;
  flex: none;
}
.pk-aslist .pk-foot .legend {
  visibility: hidden;
}
.pk-aslist .pk-plan {
  padding-top: 0;
}
.pk-list {
  max-width: 980px;
  margin: 0 auto;
  font-size: 14px;
}
.pk-lhead,
.pk-lr {
  display: grid;
  grid-template-columns: 70px minmax(0, 1.5fr) minmax(0, 1fr) 80px 110px 170px;
  gap: 4px 12px;
  align-items: center;
  padding: 9px 12px;
}
.pk-lhead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2, var(--surface));
  border-bottom: 1px solid var(--line-2);
  padding-top: 10px;
  padding-bottom: 8px;
}
.pk-lh {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pk-lh.on {
  color: var(--ink);
}
.pk-lh i {
  font-style: normal;
  font-size: 9px;
}
.pk-lh.c-bvo,
.pk-lh.c-price,
.pk-lr .c-bvo,
.pk-lr .c-price {
  justify-content: flex-end;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pk-lr {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
}
.pk-lr:hover {
  background: var(--surface);
}
.pk-lr:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.pk-lr.no {
  color: var(--ink-2);
}
.pk-lr.no .c-bn {
  font-weight: 600;
}
.pk-lr.on {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}
.pk-lr .c-bn {
  font-size: 15px;
}
.pk-lr .c-type {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
}
.pk-lr .c-price {
  font-weight: 600;
}
.pk-lr .pk-tag {
  font-size: 11.5px;
  padding: 1px 7px;
}
/* het kaartje: links de feiten (pk-i), rechts wat je ermee kunt (pk-a). Op de plattegrond staan ze onder elkaar. */
.pk-card > .pk-i,
.pk-card > .pk-a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
/* het kaartje onder de gekozen regel: dezelfde inhoud als op de plattegrond, in de breedte */
.pk-card.pk-inline {
  position: static;
  width: auto;
  max-width: none;
  border-radius: 0 0 12px 12px;
  border-top: 0;
  box-shadow: inset 3px 0 0 var(--accent);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 8px 24px;
  padding: 12px 16px 16px;
  margin-bottom: 8px;
}
.pk-card.pk-inline > .pk-ch {
  grid-column: 1 / -1;
}
@media (max-width: 720px) {
  .pk .mh {
    flex-wrap: wrap;
  }
  .pk .mh .pk-view {
    order: 3;
    margin: 8px 0 0;
    width: 100%;
  }
  .pk .mh .pk-view button {
    flex: 1;
  }
  .pk-lhead,
  .pk-lr {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    padding-left: 4px;
    padding-right: 4px;
  }
  .pk-lhead .c-floor,
  .pk-lhead .c-bvo,
  .pk-lhead .c-status {
    display: none;
  }
  .pk-lr .c-bn {
    grid-row: 1 / span 2;
    align-self: start;
  }
  .pk-lr .c-floor,
  .pk-lr .c-bvo {
    grid-column: 2;
    font-size: 12.5px;
    color: var(--ink-2);
    text-align: left;
    justify-content: flex-start;
  }
  .pk-lr .c-floor:empty,
  .pk-lr .c-bvo:empty {
    display: none;
  }
  .pk-lr .c-price {
    grid-column: 3;
    grid-row: 1;
  }
  .pk-lr .c-status {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }
  .pk-card.pk-inline {
    display: flex;
    padding: 12px;
  }
}

/* Inloggen met Google als gewone ingang; het wachtwoord is de noodingang (1.38) */
.login-g {
  justify-content: center;
  padding: 13px 18px;
  font-size: 15.5px;
  text-decoration: none;
}
.login-f {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-pw {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.login-pw summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.login-pw[open] summary {
  margin-bottom: 12px;
}

/* Instellingen: een vinkje met uitleg ernaast */
.fg label.set-tick {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.set-tick input {
  width: auto;
  margin-top: 3px;
  flex: none;
}
.set-tick > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 400;
}
.set-tick b {
  font-weight: 600;
  color: var(--ink);
}

/* Koopovereenkomst buiten de app en wie er in Scrive getekend heeft (1.38) */
.sign-b {
  margin-left: 6px;
}
.kao-ext {
  margin: 0;
}
.sign-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sign-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.sign-h .btn {
  margin-left: auto;
}
.sign-l {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
}
.sign-l li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sign-l li i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  flex: none;
}
.sign-l li.ok i {
  background: var(--ok, #2f8f5b);
  border-color: var(--ok, #2f8f5b);
}
.sign-l .sign-w {
  margin-left: auto;
  color: var(--ink-2);
  text-align: right;
}
.sign-l li.ok .sign-w {
  color: var(--ink);
  font-weight: 600;
}

/* Documenten: de definitieve verkoopstukken uit Google Drive (1.38) */
.stuk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 12px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.stuk-bar > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.doc-n .doc-meta {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-2);
}
.stuk-view {
  display: flex;
  flex-direction: column;
  min-height: 60vh;
}
.stuk-view iframe {
  flex: 1;
  width: 100%;
  min-height: 60vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
/* Documenten op de telefoon: de naam op een eigen regel, de knoppen eronder */
@media (max-width: 640px) {
  .docs .doc-r > label {
    flex: 1 1 100% !important;
    flex-wrap: nowrap;
    align-items: flex-start;
  }
  .docs .doc-r > label input {
    margin-top: 4px;
    flex: none;
  }
  .docs .doc-r > .bdg {
    margin-left: 26px;
  }
  .docs .doc-n {
    overflow-wrap: break-word;
  }
}
