/*
 * SmitPlan application styles. Plain CSS (Propshaft).
 */

[hidden] { display: none !important; }

:root {
  --navy: #1a1a2e;
  --navy-soft: #2a2a45;
  --accent: #e8743b;
  --accent-dark: #c95d29;
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #e4e7ec;
  --bg: #f6f7f9;
  --card: #ffffff;
  --green: #1f9d57;
  --green-bg: #e8f5e9;
  --red: #d13438;
  --red-bg: #fdecec;
  --yellow-bg: #fff9c4;
  --gold: #d69a3c;
  --gold-light: #eecf96;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
  --st-ingepland-bg: #fff4e5;
  --st-ingepland-line: #f0b25c;
  --st-klaar_gezet-bg: #e6f6ec;
  --st-klaar_gezet-line: #4cae7d;
  --st-opgehaald-bg: #e8f0fe;
  --st-opgehaald-line: #5b8def;
  --st-compleet-bg: #eef0f3;
  --st-compleet-line: #b7bfc9;
  --st-gefactureerd-bg: #23272f;
  --st-gefactureerd-line: #23272f;
  --st-gefactureerd-ink: #e7e9ee;
}

* { box-sizing: border-box; }

html:has(body.compact) { font-size: 13px; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

main { max-width: 2100px; margin: 0 auto; padding: 1.5rem; }

h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 0; }
.muted { color: var(--muted); margin: .25rem 0 0; font-size: .9rem; }

/* Buttons */
.button {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600; font-size: .9rem;
  padding: .55rem .9rem; border-radius: 8px; text-decoration: none; line-height: 1;
}
.button:hover { background: var(--accent-dark); }
.button--ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.button--ghost:hover { background: rgba(232, 116, 59, .08); }
.button--sm { font-size: .8rem; padding: .4rem .65rem; }
.button--xs { font-size: .74rem; padding: .32rem .5rem; border-radius: 6px; }
form.button_to { display: inline; }

/* Page header */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: .6rem; flex-wrap: wrap;
}
.page-actions { display: flex; align-items: flex-start; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
.page-actions .button_to { display: inline-flex; margin: 0; }
.page-actions .button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-height: 28px; }
.page-actions .button:not(.button--ghost) { border: 1px solid transparent; }

/* Sync status */
.sync-status { display: inline-flex; align-items: center; }
.sync-status__message { font-size: .75rem; color: var(--muted); }
.sync-status__message--error { color: var(--red); }

/* Cockpit */
.cockpit { display: grid; gap: 1rem; }
.week-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem 1.1rem; border-left: 4px solid var(--green);
}
.week-card--shortage { border-left-color: var(--red); }
.week-card__head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.week-card__title { color: var(--navy); letter-spacing: .03em; }
.week-card__range { color: var(--muted); font-size: .9rem; flex: 1; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: .85rem 0; }
.stats--5 { grid-template-columns: repeat(5, 1fr); }
.stats--6 { grid-template-columns: repeat(6, 1fr); }
.stat {
  background: var(--bg); border-radius: 8px; padding: .55rem .7rem;
  display: flex; flex-direction: column; gap: .15rem;
}
.stat__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stat__value { font-size: 1.15rem; font-weight: 700; }
.stat--positive { background: var(--green-bg); } .stat--positive .stat__value { color: var(--green); }
.stat--negative { background: var(--red-bg); } .stat--negative .stat__value { color: var(--red); }

table.deals { width: 100%; border-collapse: collapse; font-size: .9rem; }
.deals th, .deals td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); }
.deals th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.deals .num { text-align: right; font-variant-numeric: tabular-nums; }
.deals__row--indicative { background: var(--yellow-bg); }
.deals__missing { color: var(--muted); font-style: italic; font-size: .82rem; }
.deals__m2-src { color: var(--muted); cursor: help; }
.deals__day-split { display: inline; margin-left: .25rem; font-size: .68rem; font-weight: 400; color: var(--muted); white-space: nowrap; }
.deals__row--continuation td:first-child { box-shadow: inset 3px 0 0 var(--line); }
.deals__dagen { white-space: nowrap; }
.deals__vervolg { display: inline-block; margin-left: .25rem; font-size: .58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 .35rem; vertical-align: middle; }
.deals__week-share { display: inline; margin-left: .25rem; font-size: .64rem; color: var(--muted); white-space: nowrap; }
.deals__customer { color: var(--navy); font-weight: 600; text-decoration: none; }
.deals__customer:hover { text-decoration: underline; }
.deals__rubrieken > summary { display: flex; align-items: baseline; gap: .3rem; cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; list-style: none; }
.deals__rubrieken > summary::-webkit-details-marker { display: none; }
.deals__rubrieken > summary::before {
  content: "\25B8"; flex: 0 0 auto; align-self: center;
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--card); color: var(--muted); font-size: .8rem; line-height: 1;
}
.deals__rubrieken > summary:hover::before { border-color: var(--accent); color: var(--accent); }
.deals__rubrieken[open] > summary::before { content: "\25BE"; }
.deals__rubriek-first { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deals__rubriek-meer { flex: 0 0 auto; font-size: .64rem; font-weight: 700; color: var(--accent-dark);
  background: var(--bg); border-radius: 999px; padding: 0 .3rem; }
.deals__rubrieken[open] > summary { margin-bottom: .15rem; }
.deals__rubrieken:not([open]) .deals__rubriek-item { display: none; }
.deals__rubriek-item { display: block; }
.deals__rubriek-item + .deals__rubriek-item { margin-top: .1rem; }
.deals__rubriek-qty { margin-left: .35rem; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.deal-contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.deal-contact { display: flex; flex-direction: column; gap: .15rem; }
.deal-day { margin: 1rem 0 .35rem; font-size: .92rem; color: var(--navy); }

/* Schouwstatus (cockpit): wit = moet nog, blauw = geschouwd, rood = hoeft niet */
.schouw-toggle__form { display: inline; }
.schouw-toggle { border: 1px solid var(--line); border-radius: 999px; font-size: .72rem; font-weight: 600;
  padding: .18rem .6rem; cursor: pointer; white-space: nowrap; transition: transform .06s; }
.schouw-toggle:active { transform: scale(.96); }
.schouw--moet_nog { background: #fff; color: var(--muted); }
.schouw--geschouwd { background: #e8eefb; color: #234b9c; border-color: #b9cdf3; }
.schouw--hoeft_niet { background: var(--red-bg); color: var(--red); border-color: #f2b8ba; }
.cockpit-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 10px; }
.cockpit-toolbar .search-field { margin: 0; flex: 1 1 640px; }
.cockpit-toolbar .schouw-legend { flex: 0 1 auto; }
.schouw-legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0; }
.schouw-legend__item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.schouw-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); display: inline-block; }
.schouw-dot.schouw--geschouwd { background: #3060c0; }
.schouw-dot.schouw--hoeft_niet { background: var(--red); }
.schouw-legend__hint { font-size: 12px; color: var(--muted); font-style: italic; }

/* Beschikbaarheid bewerken (cockpit week card) */
.week-avail { margin: .35rem 0 .85rem; }
.week-avail summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  color: var(--accent); font-weight: 600; font-size: .82rem; }
.week-avail__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px 14px; margin-top: .6rem; }
.week-avail__row { display: flex; align-items: center; gap: 8px; margin: 0; }
.week-avail__name { flex: 1; font-size: .82rem; }
.week-avail__input { width: 72px; padding: .3rem .45rem; border: 1px solid var(--line); border-radius: 6px;
  font-size: .85rem; text-align: right; }
.week-avail__row.is-overridden .week-avail__input { border-color: var(--accent); background: #fdeee7; font-weight: 600; }
.week-avail__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 116, 59, .15); }
.week-avail__hint { font-size: .75rem; color: var(--muted); margin: .5rem 0 0; }

/* Cockpit compacter v1.0 */
.deals th, .deals td { padding: .22rem .45rem; }
.deal-note__input { min-height: 1.7rem; height: 1.7rem; overflow: hidden; }
.deal-note__input:focus { height: 5.5rem; overflow: auto; }
.deal-note__input--empty { border-color: transparent; border-bottom: 1px dashed var(--line); border-radius: 0; background: transparent; }
.deal-note__input--empty:hover, .deal-note__input--empty:focus { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.schouw-details { position: relative; }
.schouw-summary { list-style: none; cursor: pointer; display: inline-block; padding: .18rem .55rem;
  border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.schouw-summary::-webkit-details-marker { display: none; }
.schouw-details__body { position: absolute; z-index: 30; top: 100%; left: 0; margin-top: 4px; padding: .55rem;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  display: flex; flex-direction: column; gap: .4rem; min-width: 220px; }
.column-picker { position: relative; }
.column-picker__menu { position: absolute; z-index: 40; right: 0; margin-top: 4px; padding: .55rem .7rem;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  display: flex; flex-direction: column; gap: .3rem; white-space: nowrap; }
.column-picker__item { display: flex; gap: .45rem; align-items: center; font-size: .85rem; }
.deals { width: auto; margin: 0 auto; min-width: 60%; }
.uren-override__input { border-color: transparent; background: transparent; }
.uren-override__input:hover, .uren-override__input:focus { border-color: var(--line); background: #fff; }
.uren-override__input.is-manual { border-color: var(--accent); }
.uren-manual { margin-left: .15rem; }
.week-avail__grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 10px; }
.week-avail__name { flex: 0 1 auto; }
.week-avail__row.is-zero .week-avail__name { color: var(--muted); }
.week-avail__row.is-zero .week-avail__input { opacity: .55; }

/* Uren-override in de cockpit-dealtabel */
.deals__uren { white-space: nowrap; }
.uren-override { display: inline; margin: 0; }
.uren-override__input { width: 52px; padding: .15rem .3rem; border: 1px solid transparent; border-radius: 6px;
  font-size: .82rem; text-align: right; font-variant-numeric: tabular-nums; background: transparent; }
.uren-override__input:hover, .uren-override__input:focus { border-color: var(--line); background: #fff; }
.uren-override__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 116, 59, .15); }
.uren-override__input.is-manual { border-color: var(--accent); background: #fdeee7; font-weight: 700; }
.uren-manual { display: inline; margin-left: .25rem; font-size: .64rem; color: var(--accent-dark); font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; }

/* Staffelbeheer */
.staffel-groups { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.staffel-group, .staffel-unrecognized { background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.staffel-unrecognized { border-left: 4px solid var(--accent); }
.staffel-section__title { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--navy); margin-bottom: .5rem; }
.staffel-table td { vertical-align: middle; }
.staffel-table tr.is-unlinked { background: rgba(209, 52, 56, .07); }
.consumption-rules__legacy-name { display: block; color: var(--red); font-size: .82rem; }
.staffel-del { background: transparent; border: 0; color: var(--muted); font-size: 1rem; cursor: pointer;
  padding: .1rem .4rem; border-radius: 6px; }
.staffel-del:hover { color: var(--red); background: var(--red-bg); }
.staffel-add td { padding-top: .6rem; }
.staffel-map { display: flex; gap: 10px; align-items: center; margin: .4rem 0; }
.staffel-map__name { flex: 1; font-weight: 600; }
.staffel-map__select { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; }
.staffel-map--new { margin-top: .75rem; }
.staffel-map--new .field__input { flex: 1; }
.staffel-newgroup { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: .5rem; }
.staffel-newgroup .field__input { max-width: 240px; }
.pr-table select, .pr-table input[type=number] { padding: .3rem .45rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.pr-sku { font-size: .78rem; }
.pr-day { width: 4rem; text-align: right; }
.pr-threshold { display: flex; gap: 6px; align-items: center; }
.pr-threshold-value { width: 5rem; }
.pr-inline-check { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; }
.pr-rubriek--in { font-size: .78rem; font-weight: 600; color: var(--green, #157347); }
.pr-rubriek--out { font-size: .78rem; color: var(--muted); }
/* Bijlagen (foto's & bestanden) */
.wo-attachments { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wo-attachments__item { position: relative; display: flex; flex-direction: column; gap: 4px; }
.wo-attachments__thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.wo-attachments__file { display: inline-flex; align-items: center; gap: 6px; padding: .45rem .6rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; font-size: .8rem;
  color: var(--ink); text-decoration: none; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wo-attachments__delform { position: absolute; top: -6px; right: -6px; margin: 0; }
.wo-attachments__del { width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--navy);
  color: #fff; font-size: .75rem; line-height: 1; cursor: pointer; }
.wo-attachments__del:hover { background: var(--red); }
.wo-attachments__input { font-size: .82rem; }
.wo-attachments__note-form { width: 96px; }
.wo-attachments__note { width: 100%; box-sizing: border-box; font-size: .72rem; padding: .25rem .4rem;
  border: 1px solid var(--line); border-radius: 6px; font-family: inherit; resize: vertical; }
.wo-attachments__note-text { font-size: .72rem; margin: 0; max-width: 96px; }
.wo-editor__section--loose { margin: 0 18px 12px; }

.bon-fotos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.bon-fotos__thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.bon-fotos__file { display: inline-flex; align-items: center; gap: 6px; padding: .5rem .65rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-size: .82rem;
  color: var(--ink); text-decoration: none; }
.bon-fotos__add { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.bon-fotos__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.bon-schouw-form__m2, .bon-schouw-form__notes { width: 100%; padding: .6rem .7rem; border: 1px solid var(--line);
  border-radius: 8px; font-size: .95rem; font-family: inherit; }
.bon-schouw-result { font-size: 1.05rem; }

/* Schouwbon plannen vanuit de cockpit */
.schouw-bon { display: inline; margin-left: .3rem; font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.schouw-plan { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 0 .3rem; vertical-align: middle; }
.schouw-plan__date { padding: .18rem .3rem; border: 1px solid var(--line); border-radius: 6px; font-size: .72rem; color: var(--ink); }
.schouw-plan__btn { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 6px;
  font-size: .68rem; font-weight: 600; padding: .2rem .45rem; cursor: pointer; white-space: nowrap; }
.schouw-plan__btn:hover { border-color: var(--accent); color: var(--accent); }

/* Vakman historie-tijdlijn (afgeronde bonnen) */
.vakman-historie { margin-top: 28px; }
.vakman-historie__title { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 2px 12px; }
.vakman-historie__title::before { content: ""; width: 18px; height: 3px; border-radius: 2px;
  background: linear-gradient(to right, var(--navy-soft), var(--line)); }
.vakman-historie__lijn { position: relative; padding-left: 22px; }
.vakman-historie__lijn::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; border-radius: 1px; background: linear-gradient(to bottom, var(--gold-light), var(--line)); }
.historie-item { position: relative; margin-bottom: 14px; }
.historie-item__dot { position: absolute; left: -21px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--gold); box-shadow: 0 0 0 2px #fff; }
.historie-item__datum { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.bon-card--done { opacity: .82; }
.bon-card--done .bon-card__client { color: #3f4450; }
.vakman-actueel__leeg { padding: 10px 2px 0; }

/* Medewerkersbeheer */
.emp-new { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem 1.1rem; margin-bottom: 1.25rem; }
.emp-new__title { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .75rem; }
.emp-new__form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.emp-new__form .field { margin-bottom: 0; }
.field--check { flex-direction: row; align-items: center; gap: .45rem; padding-bottom: .55rem; }
.emp-table { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.emp-table td { vertical-align: middle; }
.emp-name { margin: 0; }
.emp-name__input { width: 100%; min-width: 140px; padding: .3rem .45rem; border: 1px solid var(--line); border-radius: 6px; }
.emp-hours { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.emp-hours__input { width: 70px; padding: .3rem .45rem; border: 1px solid var(--line); border-radius: 6px; text-align: right; }
.emp-type { margin: 0; }
.emp-type .field--check { padding-bottom: 0; }
.emp-row--inactive td { color: var(--muted); }
.pill--zzp { background: #efeafa; color: #7a5bb0; }
.emp-new__grow { flex: 1 1 220px; }
.emp-new__grow .field__input { width: 100%; }
.emp-new__roles { border: 0; padding: 0; margin: 0; display: flex; gap: 14px; align-items: center; padding-bottom: .55rem; }
.emp-new__roles legend { float: left; margin-right: 4px; padding-bottom: .35rem; }
.emp-new__roles .field--check { padding-bottom: 0; display: inline-flex; align-items: center; gap: .35rem; }
.emp-login__email { display: block; font-size: .85rem; }
.emp-login__roles { display: inline-flex; gap: 10px; margin: 2px 0; font-size: .8rem; color: var(--muted); }
.emp-login__role { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.emp-login__actions { display: inline-flex; gap: 6px; margin-top: 4px; }
.emp-login__actions form { margin: 0; }
.emp-login__form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.field__input--sm { width: 180px; padding: .3rem .45rem; border: 1px solid var(--line); border-radius: 6px; }

/* Schouwing↔uitvoering-koppeling op de kaart */
.wo-card__jump { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--accent-dark);
  background: transparent; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.wo-card__jump:hover { text-decoration: underline; }
/* Doelkaart van een sprong (#wo-…): even oplichten */
.wo-card.is-target { animation: wo-target 2.4s ease-out 1; }
@keyframes wo-target {
  0% { box-shadow: 0 0 0 4px var(--accent); }
  70% { box-shadow: 0 0 0 4px var(--accent); }
  100% { box-shadow: none; }
}

/* Schouwen te plannen (planbord) */
.pb-schouw__list { display: flex; flex-direction: column; gap: 8px; }
.pb-schouw__pager { display: flex; gap: 14px; align-items: center; justify-content: center;
  padding-top: .6rem; font-size: .85rem; }
.pb-schouw__pager a { color: var(--accent-dark); font-weight: 600; text-decoration: none; }
.pb-schouw__pager a:hover { text-decoration: underline; }
.pb-schouw__item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .6rem; }
.pb-schouw__deal { flex: 1 1 200px; font-size: .88rem; font-weight: 600; }
.wo-card__delete { border: 0; background: transparent; color: var(--red); cursor: pointer;
  font-size: .8rem; padding: 0 2px; }

/* Meekijk-banner ("inloggen als") */
.impersonation-banner { display: flex; justify-content: center; align-items: center; gap: 12px;
  background: var(--yellow-bg); color: var(--ink); border-bottom: 1px solid var(--line);
  padding: .45rem .75rem; font-size: .9rem; }
.impersonation-banner form { margin: 0; }
.impersonation-banner__stop { padding: .25rem .6rem; border: 1px solid var(--ink); border-radius: 6px;
  background: transparent; font-weight: 600; cursor: pointer; }

/* Simple auth/landing welcome */
.welcome { max-width: 28rem; margin: 4rem auto; background: var(--card); padding: 2rem;
  border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.welcome h1 { color: var(--navy); margin-bottom: .5rem; }

/* Planboard */
.planboard-scroll { overflow: auto; margin: 0 -1.5rem; }
table.planboard { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); }
.planboard th, .planboard td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  vertical-align: top; }
.planboard tr > *:last-child { border-right: 0; }
.planboard tbody tr:last-child > * { border-bottom: 0; }
.planboard thead th { background: var(--navy); color: #fff; padding: .5rem; font-size: .85rem; font-weight: 600; }
.planboard__corner { width: 150px; }
.planboard__emp { background: var(--bg); padding: .5rem .6rem; font-weight: 600; text-align: left; white-space: nowrap; }
.planboard__cell { min-width: 150px; height: 64px; padding: .35rem; }
.planboard__cell:hover { background: #fafbfc; }

.tray { margin-top: 1.25rem; background: var(--card); border: 1px dashed var(--accent); border-radius: var(--radius); padding: .85rem 1rem; }
.tray__title { color: var(--navy); margin-bottom: .5rem; font-size: 1rem; }
.tray__list { display: flex; flex-wrap: wrap; gap: .5rem; min-height: 48px; }

.wo-card { position: relative; background: #fff; border: 1px solid var(--line); border-left-width: 4px; border-radius: 6px; padding: .4rem .85rem .4rem .55rem; margin-bottom: .35rem; cursor: grab; box-shadow: var(--shadow); }
.wo-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: .25rem; }
.wo-card__copyform { margin: 0; }
.wo-card__copy { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 5px; font-size: .62rem; font-weight: 600; padding: .12rem .32rem; cursor: pointer; line-height: 1.2; }
.wo-card__copy:hover { border-color: var(--accent); color: var(--accent); }
.wo-card__vakmannen { display: inline-block; font-size: .66rem; font-weight: 700; color: var(--accent-dark); background: rgba(232, 116, 59, .12); border-radius: 4px; padding: .06rem .35rem; }
.wo-card__span { display: inline-flex; align-items: center; gap: 3px; font-size: .66rem; font-weight: 700; color: var(--navy); background: rgba(31, 51, 82, .1); border-radius: 4px; padding: .06rem .35rem; }
.wo-card__spangrip { position: absolute; top: 0; right: 0; width: 9px; height: 100%; cursor: col-resize; z-index: 1; }
.wo-card__spangrip::after { content: ""; position: absolute; top: 50%; right: 3px; transform: translateY(-50%); width: 3px; height: 55%; max-height: 26px; border-radius: 2px; background: var(--navy); opacity: .28; }
.wo-card__spangrip:hover::after { opacity: .6; }
.wo-card__actions { position: relative; z-index: 2; }
.planboard__cell.is-span-target { outline: 2px dashed var(--navy); outline-offset: -2px; background: rgba(31, 51, 82, .08); }
.wo-card:active { cursor: grabbing; }
.wo-card__title { display: block; font-weight: 600; font-size: .82rem; }
.wo-card__floordot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; border: 1px solid rgba(0,0,0,.15); background: var(--floor); }
.wo-card__meta { display: flex; flex-wrap: wrap; gap: .5rem; color: var(--muted); font-size: .72rem; margin-top: .1rem; }
.wo-card--st-concept, .wo-card--st-ingepland { background: var(--st-ingepland-bg); border-color: var(--st-ingepland-line); }
.wo-card--st-klaar_gezet { background: var(--st-klaar_gezet-bg); border-color: var(--st-klaar_gezet-line); }
.wo-card--st-opgehaald { background: var(--st-opgehaald-bg); border-color: var(--st-opgehaald-line); }
.wo-card--st-compleet { background: var(--st-compleet-bg); border-color: var(--st-compleet-line); }
.wo-card--st-gefactureerd { background: var(--st-gefactureerd-bg); border-color: var(--st-gefactureerd-line); color: var(--st-gefactureerd-ink); }
.wo-card--st-gefactureerd .wo-card__title, .wo-card--st-gefactureerd .wo-card__meta { color: var(--st-gefactureerd-ink); }
.pill--concept { background: #fff4e5; color: #9a6008; }
.pill--ingepland { background: #fff4e5; color: #9a6008; }
.pill--klaar_gezet { background: var(--green-bg); color: var(--green); }
.pill--opgehaald { background: #e8f0fe; color: #234b9c; }
.pill--compleet { background: #eef0f3; color: #515967; }
.pill--gefactureerd { background: #23272f; color: #e7e9ee; }
.wo-card .pill { display: inline-block; }
.wo-card__type { display: inline-block; font-size: .64rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--navy); background: #e8eefb;
  border-radius: 4px; padding: .12rem .4rem; }

/* App bar (signed-in chrome) */
.app-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--navy); color: #fff; padding: .6rem 1.25rem;
  position: sticky; top: 0; z-index: 35; }
.app-bar__brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; }
.app-bar__swirl { width: 26px; height: 26px; object-fit: contain; }
.app-bar__word { font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; letter-spacing: .01em; color: #fff; }
.app-bar__word span { color: #9aa1b5; }
.app-bar__nav { display: flex; align-items: center; gap: 1rem; }
.app-bar__nav a { color: #dfe3ea; text-decoration: none; font-size: .9rem; font-weight: 600; }
.app-bar__nav a:hover { color: #fff; }
.app-bar__logout { background: transparent; border: 1px solid rgba(255, 255, 255, .35); color: #fff; border-radius: 8px; padding: .35rem .7rem; font-size: .82rem; font-weight: 600; cursor: pointer; }
.app-bar__logout:hover { background: rgba(255, 255, 255, .12); }

/* Flash */
.flash { padding: .6rem .9rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.flash--notice { background: var(--green-bg); color: var(--green); }
.flash--alert { background: var(--red-bg); color: var(--red); }
.editor-flash .flash { margin: 0 0 .8rem; }

/* Forms */
.field { margin-bottom: .9rem; display: flex; flex-direction: column; gap: .3rem; }
.field label { font-size: .82rem; font-weight: 600; }
.form input[type=email], .form input[type=password], .form input[type=text] {
  width: 100%; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; font-size: .95rem; background: #fff;
}
.form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 116, 59, .15); }
.button--block { width: 100%; padding: .7rem; font-size: .95rem; margin-top: .25rem; }

/* Auth pages */
.auth { display: flex; justify-content: center; padding-top: 2.5rem; }
.auth__card { width: 100%; max-width: 24rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.auth__logo { display: block; width: min(240px, 70%); margin: 0 auto 1.25rem; }
.auth__title { color: var(--navy); margin: .25rem 0 1.25rem; text-align: center; }
.auth__foot { margin-top: 1rem; font-size: .88rem; }
.auth__foot a { color: var(--accent); text-decoration: none; }
.auth__foot a:hover { text-decoration: underline; }
.home-links { display: flex; gap: .5rem; margin: 1rem 0; justify-content: center; }

/* ---- Vakman mobile app ---- */
.vakman-body { background: var(--bg); }
.vakman-main { max-width: 640px; margin: 0 auto; padding: 16px 16px 144px; }
.vakman-head h1 { font-size: 1.4rem; margin: 8px 0 16px; }
.vakman-empty { padding: 48px 24px; text-align: center; }
.vakman-empty__swirl { width: 84px; height: 84px; object-fit: contain; opacity: .45; margin-bottom: 12px; }
.vakman-empty__title { font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.floor--lava { --floor: #3060c0; --floor-bg: #e8eefb; }
.floor--pu { --floor: #0f9d76; --floor-bg: #e3f6ef; }
.floor--sleuven { --floor: #c8891f; --floor-bg: #fbf0da; }
.floor--cire { --floor: #7a5bb0; --floor-bg: #efeafa; }
.floor--none { --floor: #8a8f9c; --floor-bg: #eef0f3; }

.vakman-topbar { display: flex; align-items: center; gap: 12px;
  background: linear-gradient(120deg, var(--navy) 55%, var(--navy-soft)); color: #fff;
  margin: -16px -16px 16px; padding: 14px 16px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(to right, var(--gold), rgba(224, 169, 78, .15)) 1; }
.vakman-topbar__swirl { width: 38px; height: 38px; object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .35)); }
.vakman-topbar__txt { flex: 1; min-width: 0; }
.vakman-topbar__hi { font-size: 12px; color: #b9bccb; }
.vakman-topbar__name { font-size: 19px; font-weight: 600; }
.vakman-avatar { width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #5c430f;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }

.vakman-daygroup { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 2px 9px; }
.vakman-daygroup::before { content: ""; width: 18px; height: 3px; border-radius: 2px;
  background: linear-gradient(to right, var(--gold), var(--gold-light)); }
.bon-card { display: flex; gap: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 12px rgba(16, 24, 40, .07);
  text-decoration: none; color: var(--ink); overflow: hidden; margin-bottom: 12px;
  transition: transform .12s, box-shadow .12s; }
.bon-card:active { transform: scale(.985); }
@media (hover: hover) { .bon-card:hover { box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 8px 20px rgba(16, 24, 40, .11); } }
.bon-card__bar { width: 4px; background: var(--floor); flex: 0 0 4px; }
.bon-card__body { flex: 1; min-width: 0; padding: 13px 14px; }
.bon-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bon-card__client { font-weight: 600; font-size: 15px; }
.bon-card__status { white-space: nowrap; flex: 0 0 auto; }
.bon-card__meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.bon-card__floor { color: var(--floor); }

.vakman-nav { position: fixed; inset: auto 0 0 0; display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(16, 24, 40, .06);
  padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.vakman-nav__tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 58px; text-decoration: none; color: var(--muted); transition: color .12s; }
.vakman-nav__tab.is-active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px;
  border-radius: 0 0 3px 3px; background: linear-gradient(to right, var(--accent), var(--gold)); }
.vakman-nav__label { font-size: 11px; }
.vakman-nav__tab.is-active { color: var(--accent); }
.vakman-nav__tab.is-disabled { opacity: .38; }
.icon { display: inline-block; vertical-align: -.15em; }

.pill { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--green-bg); color: var(--green); white-space: nowrap; }
.pill--ftr { background: var(--green-bg); color: var(--green); }
.survey-proposal { margin: .6rem 0; }
.survey-proposal__heading { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 0 0 .3rem; }
.survey-proposal__table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.survey-proposal__table th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; text-align: left; padding: 0 .4rem .2rem 0; }
.survey-proposal__table td { padding: .3rem .4rem .3rem 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; vertical-align: top; }
.survey-proposal__table .survey-proposal__pick { width: 4.5rem; }
.survey-proposal__table th.num, .survey-proposal__table td.num { width: 5.5rem; }
.survey-proposal__subhead td { color: var(--muted); font-size: .78rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.survey-proposal__addition .survey-proposal__select { display: block; margin-top: .2rem; }
.survey-proposal__table .num { text-align: right; }
.survey-proposal__diff--changed { color: var(--accent); font-weight: 600; }
.survey-proposal__input { width: 5.5rem; text-align: right; padding: .15rem .3rem; border: 1px solid var(--line); border-radius: 6px; font-size: .82rem; font-variant-numeric: tabular-nums; }
.survey-proposal__select { width: 100%; max-width: 20rem; padding: .15rem .3rem; border: 1px solid var(--line); border-radius: 6px; font-size: .8rem; }
.survey-proposal__processed { font-size: .82rem; color: var(--green); margin: 0 0 .4rem; }
.survey-proposal__skipped { font-size: .82rem; color: var(--red); font-weight: 600; margin: 0 0 .2rem; }
.survey-proposal__signal { font-size: .82rem; color: var(--muted, #666); margin: .4rem 0 0; }
.schouw-raise__signal { font-size: .85rem; color: var(--muted, #666); margin: .2rem 0 0; }
.survey-proposal__substrate { display: block; font-size: .85rem; margin: .5rem 0 0; }
.settings-nav { display: flex; gap: .35rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.settings-nav__tab { padding: .45rem .8rem; font-size: .85rem; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; }
.settings-nav__tab.is-active { color: var(--navy); font-weight: 600; border-bottom-color: var(--accent); }
.piklijst { list-style: none; padding: 0; margin: 0 0 .8rem; }
.piklijst__warning { display: flex; align-items: flex-start; gap: .45rem; padding: .7rem .8rem; margin: 0 0 .8rem;
  border: 1px solid #efb49a; border-radius: 8px; background: #fdeee7; color: var(--accent-dark); font-size: .86rem; font-weight: 600; }
.piklijst__warning .icon { flex: 0 0 auto; margin-top: .05rem; }
.piklijst__dag { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: .9rem 0 .3rem; }
.piklijst__form { display: flex; align-items: center; gap: .55rem; }
.piklijst__item { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.piklijst__item.is-af .piklijst__label { text-decoration: line-through; color: var(--muted); }
.piklijst__label { flex: 1; }
.piklijst__amount { font-weight: 600; white-space: nowrap; }
.piklijst__bron { font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; background: var(--line);
  border-radius: 4px; padding: .1rem .35rem; color: var(--muted); }
.piklijst-link { float: right; }
.project-row--excluded td { opacity: .55; }
.project-row--excluded .project-exclude { opacity: 1; }
.project-exclude__label { font-size: .72rem; color: var(--muted); display: inline-flex; gap: .25rem; align-items: center; margin-left: .4rem; }
.piklijst { list-style: none; padding: 0; margin: 0 0 .8rem; }
.piklijst__dag { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: .9rem 0 .3rem; }
.piklijst__form { display: flex; align-items: center; gap: .55rem; }
.piklijst__item { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.piklijst__item.is-af .piklijst__label { text-decoration: line-through; color: var(--muted); }
.piklijst__label { flex: 1; }
.piklijst__amount { font-weight: 600; white-space: nowrap; }
.piklijst__bron { font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; background: var(--line);
  border-radius: 4px; padding: .1rem .35rem; color: var(--muted); }
.piklijst-link { float: right; }
.schouw-plint-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .4rem; flex-wrap: wrap; }
.schouw-plint-row__name { flex: 1 1 100%; font-size: .9rem; }
.schouw-plint-row__meters { max-width: 9rem; }
.schouw-plint-row__soort { flex: 1; }
.survey-proposal__skipped-list { font-size: .82rem; color: var(--red); margin: 0 0 .6rem; padding-left: 1.1rem; }
.survey-proposal__remarks { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; margin: .8rem 0 .7rem; background: var(--bg); }
.survey-proposal__remarks-heading { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin: 0 0 .3rem; font-weight: 600; }
.survey-proposal__remarks p { margin: 0 0 .5rem; font-size: .88rem; }
.survey-proposal__note { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--muted); margin: 0; }
.survey-proposal__hint { font-size: .78rem; color: var(--muted); margin: .3rem 0 0; }
.survey-proposal__unmatched { font-size: .82rem; color: var(--muted); margin: .4rem 0 0; }
.pill--eigen-klus { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.pill--complaint_no_cost { background: #eef2fb; color: var(--navy); }
.pill--small_repair { background: #fff4e5; color: #9a6008; }
.pill--large_repair { background: #fdecec; color: var(--red); }
.pill--dark { background: #2a3550; color: #8fd6a9; }
.pill--muted { background: #eef0f3; color: #515967; }

.vakman-subbar { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; margin: -16px -16px 14px; padding: 14px 16px; }
.vakman-subbar__back { color: #fff; display: flex; }
.vakman-subbar__title { flex: 1; min-width: 0; }
.vakman-subbar__name { font-size: 16px; font-weight: 600; }
.vakman-subbar__sub { font-size: 12px; color: #b9bccb; }

.bon-hero { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--floor); border-radius: 0 14px 14px 0; padding: 14px; margin-bottom: 12px; }
.bon-hero::after { content: ""; position: absolute; right: -26px; top: -26px; width: 130px; height: 130px;
  background: url("/assets/smitfloor-swirl-6060bb28.png") no-repeat center / contain; opacity: .07; pointer-events: none; }
.bon-hero > * { position: relative; z-index: 1; }
.bon-hero__floor { font-weight: 600; color: var(--floor); }
.bon-hero__meta { display: flex; gap: 14px; color: var(--muted); font-size: 13px; margin: 5px 0 13px; }
.bon-actions { display: flex; gap: 10px; }
.bon-action { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px; border-radius: 10px; font-weight: 600; font-size: 14px; text-decoration: none; }
.bon-action--nav { background: var(--accent); color: #fff; }
.bon-action--call { background: #fff; color: var(--accent); border: 1px solid var(--accent); }

.bon-section { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 12px; }
.bon-section h2 { font-size: 11px; color: var(--muted); margin: 0 0 10px; }
.bon-section h3 { font-size: 10px; font-weight: 600; color: var(--muted); margin: 16px 0 8px; }
.bon-section h3:first-of-type { margin-top: 0; }
.bon-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; padding: 3px 0; }
.bon-row__ic { color: var(--accent); }
.bon-instruction { line-height: 1.55; }
.bon-artikelen { list-style: none; margin: 0; padding: 0; }
.bon-artikel { padding: 8px 0; border-top: 1px solid #f0f1f4; }
.bon-artikel:first-child { border-top: 0; }
.bon-artikel__naam { font-weight: 600; }
.bon-artikel__specs { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 13px; margin-top: 2px; }
.bon-artikel__notitie { margin-top: 2px; }

.filter-list-item { display: none; }
.filter-list-item.is-visible { display: block; }

.profit-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.profit-table th, .profit-table td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); font-weight: 400; }
.profit-table th { color: var(--muted); }
.profit-table td { text-align: right; font-variant-numeric: tabular-nums; }
.profit-table tr:last-child th, .profit-table tr:last-child td { border-bottom: 0; }
.profit-table__emphasis th, .profit-table__emphasis td { color: var(--navy); font-weight: 700; }

.bon-teammate { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.bon-teammate.is-self { background: #fdeee7; }
.bon-teammate__av { width: 28px; height: 28px; border-radius: 50%; background: #dfe2e7; color: #4a4f5c;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.bon-teammate.is-self .bon-teammate__av { background: var(--accent); color: #fff; }
.bon-teammate__name { flex: 1; font-size: 13.5px; }
.bon-teammate.is-self .bon-teammate__name { font-weight: 600; color: var(--accent-dark); }
.bon-teammate__day { font-size: 12px; color: var(--muted); }

.vakman-logout { margin-top: 14px; }
.vakman-brandfoot { text-align: center; padding: 28px 0 8px; }
.vakman-brandfoot__logo { width: min(200px, 60%); opacity: .85; }

.wo-card__push, .wo-card__pull { font-size: .72rem; padding: 2px 8px; border-radius: 6px;
  border: 0; cursor: pointer; margin-top: 4px; }
.wo-card__push { background: var(--green-bg); color: var(--green); }
.wo-card__pull { background: var(--yellow-bg); color: var(--accent-dark); }
.wo-card__pushform { display: inline; }

/* ---- Planboard command center ---- */
.cap-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.cap-chip { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 5px 12px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cap-chip__label { font-size: 11px; color: var(--muted); }
.cap-chip__value { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cap-chip--ok { border-left: 3px solid var(--green); }
.cap-chip--over { border-left: 3px solid var(--red); }
.cap-chip--over .cap-chip__value { color: var(--red); }

.pb-focus .pb-searchrow, .pb-focus .cap-chips, .pb-focus .pb-aanvragen { display: none; }
.pb-focus .page-head h1, .pb-focus .page-head .muted,
.pb-focus .page-head .week-note--readonly, .pb-focus .sync-status { display: none; }
.pb-focus main { padding-top: .5rem; }
.pb-focus .page-head { margin-bottom: .35rem; }
.pb-focustoggle { margin-left: auto; }
.pb-vakmanfilter__menu { position: relative; }
.pb-vakmanfilter__count { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 8px;
  background: var(--navy); color: #fff; font-size: .68rem; font-variant-numeric: tabular-nums; }
.pb-vakmanfilter__panel { position: absolute; left: 0; top: 110%; z-index: 30; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px; width: 260px; max-height: 60vh;
  overflow-y: auto; box-shadow: 0 8px 24px rgba(16, 24, 40, .12); display: grid; gap: 6px; }
.pb-vakmanfilter__item { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.pb-searchrow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; margin-bottom: .55rem; }
.pb-searchrow > * { margin-bottom: 0; }
.pb-searchrow .search-field { flex: 1 1 420px; }
.pb-controls { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
.pb-controls > * { margin-bottom: 0; }
.pb-controls .pb-legend { flex: 1 1 320px; min-width: 0; }
.pb-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 14px; }
.pb-legend__item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.pb-legend__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--floor); }
.pb-statuslegend { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pb-legend__chip { padding: 1px 8px; border-radius: 10px; font-size: .72rem; border: 1px solid transparent; }
.pb-bulk__bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pb-bulk__selectall { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.wo-card__select { position: absolute; right: 6px; bottom: 4px; display: inline-flex; z-index: 4; }
.pb-calendar { position: relative; }
.pb-calendar summary { list-style: none; cursor: pointer; }
.pb-calendar summary::-webkit-details-marker { display: none; }
.pb-calendar__panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 300px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 10px; }
.pb-calendar__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pb-calendar__monthnav { color: var(--accent-dark); font-weight: 700; text-decoration: none; padding: 2px 8px; }
.pb-calendar__grid { display: grid; grid-template-columns: 48px repeat(7, 1fr); gap: 4px; align-items: center; }
.pb-calendar__week { color: var(--accent-dark); font-size: .74rem; font-weight: 700; text-decoration: none; }
.pb-calendar__week.is-current { color: #fff; background: var(--accent); border-radius: 4px; padding: 2px 4px; }
.pb-calendar__day { text-align: center; font-size: .76rem; color: var(--ink); }
.pb-calendar__day.is-muted { color: var(--muted); opacity: .55; }

.planboard__emp { min-width: 150px; }
.planboard__draghandle { float: right; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--muted);
  cursor: grab; font-size: .75rem; line-height: 1; padding: 3px 5px; }
.planboard__draghandle:active { cursor: grabbing; }
.planboard__emp-name { display: block; font-weight: 600; }
.cap-bar { display: block; height: 5px; border-radius: 3px; background: var(--line); margin: .3rem 0 .15rem; overflow: hidden; }
.cap-bar__fill { display: block; height: 100%; background: var(--green); }
.cap-bar--tight .cap-bar__fill { background: #c8891f; }
.cap-bar--over .cap-bar__fill { background: var(--red); }
.planboard__emp-hours { font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.planboard__day { text-align: left; }
.planboard__day-label { display: inline; }
.planboard__day-count { font-size: .68rem; opacity: .7; font-weight: 400; margin-left: .4rem; }
.planboard__day.is-today, .planboard__cell.is-today { background: rgba(232, 116, 59, .06); }
.planboard thead th.is-today { background: var(--accent); }

/* ---- Dag-tijdlijn op de werkbon-kaart (06:00-18:00, duur slepen) ---- */
.wo-card { padding-bottom: .45rem; }
.wo-tijdlijn { position: relative; height: 14px; margin: .45rem 0 0; border-radius: 4px;
  background: var(--bg) repeating-linear-gradient(to right,
    transparent 0, transparent calc(100% / 12 - 1px),
    var(--line) calc(100% / 12 - 1px), var(--line) calc(100% / 12));
  touch-action: none; overflow: visible; }
.wo-tijdlijn.js-resize { cursor: ew-resize; }
.wo-tijdlijn__fill { position: absolute; top: 2px; bottom: 2px; border-radius: 3px;
  background: var(--floor); opacity: .85; transition: none; pointer-events: none; }
.wo-tijdlijn.is-empty .wo-tijdlijn__fill { opacity: 0; }
/* Vulling met action = blok verschuiven; start-handle sleept de starttijd. */
.wo-tijdlijn__fill[data-action] { pointer-events: auto; cursor: grab; }
.wo-tijdlijn__fill[data-action]:active { cursor: grabbing; }
.wo-tijdlijn__handle--start[data-action] { pointer-events: auto; cursor: ew-resize; }
.wo-tijdlijn__handle { position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 3;
  width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 2.5px solid var(--floor);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .3); pointer-events: none; transition: transform .1s; }
.wo-card:hover .wo-tijdlijn__handle, .wo-card.is-resizing .wo-tijdlijn__handle { transform: translate(-50%, -50%) scale(1.25); }
.wo-tijdlijn.is-empty .wo-tijdlijn__handle { background: var(--bg); border-color: var(--muted); }
.wo-tijdlijn__chip { position: absolute; bottom: calc(100% + 5px); transform: translateX(-50%); z-index: 6;
  background: var(--navy); color: #fff; font-size: .72rem; font-weight: 700; white-space: nowrap;
  border-radius: 6px; padding: .18rem .5rem; pointer-events: none;
  font-variant-numeric: tabular-nums; box-shadow: var(--shadow); }
.wo-tijdlijn__chip::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: var(--navy); }
.wo-card.is-resizing { box-shadow: 0 0 0 2px var(--floor); z-index: 5; }
.wo-card.is-locked .wo-tijdlijn { opacity: .6; }
.wo-card.is-overlap { box-shadow: 0 0 0 2px var(--red); }
.wo-card__overlap { color: var(--red); font-size: .72rem; font-weight: 700; letter-spacing: .02em; }

.wo-card.is-locked { cursor: default; }
.wo-card.is-locked .wo-card__meta, .wo-card.is-locked .wo-card__title { opacity: .75; }
.wo-editor__locked { display: flex; align-items: center; gap: 12px; justify-content: space-between;
  margin: 10px 18px 0; background: #e8eefb; color: #234b9c; font-size: .85rem;
  padding: .6rem .75rem; border-radius: 8px; }
.wo-editor__locked p { margin: 0; display: flex; align-items: center; gap: 6px; }
.wo-editor__release { margin: 0 18px 12px; }
.wo-editor :is(select, input, textarea):disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }

/* ---- Werkbon-editor (zijpaneel op het planbord) ---- */
.wo-card__title { color: var(--ink); text-decoration: none; }
.wo-card__title:hover { color: var(--accent-dark); text-decoration: underline; }

.wo-editor { position: fixed; inset: 0; z-index: 40; }
.wo-editor__backdrop { position: absolute; inset: 0; background: rgba(16, 24, 40, .45); }
.wo-editor__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 96vw);
  background: var(--bg); box-shadow: -8px 0 30px rgba(16, 24, 40, .25);
  display: flex; flex-direction: column; overflow-y: auto;
  animation: wo-editor-in .15s ease-out; }
@keyframes wo-editor-in { from { opacity: 0; } to { opacity: 1; } }

.wo-editor__head { display: flex; align-items: flex-start; gap: 10px; position: sticky; top: 0; z-index: 2;
  background: var(--navy); color: #fff; padding: 16px 18px; border-left: 4px solid var(--floor); }
.wo-editor__title { font-size: 1.05rem; margin: 0; }
.wo-editor__sub { font-size: .78rem; color: #b9bccb; margin: 2px 0 0; }
.wo-editor__head > div { flex: 1; min-width: 0; }
.wo-editor__close { background: transparent; border: 0; color: #b9bccb; cursor: pointer; padding: 4px; }
.wo-editor__close:hover { color: #fff; }

.wo-editor__saved { display: flex; align-items: center; gap: 6px; margin: 10px 18px 0;
  background: var(--green-bg); color: var(--green); font-weight: 600; font-size: .85rem;
  padding: .5rem .75rem; border-radius: 8px; }
.wo-editor__errors { margin: 10px 18px 0; background: var(--red-bg); color: var(--red);
  font-size: .85rem; padding: .5rem .75rem; border-radius: 8px; }
.wo-editor__errors p { margin: .15rem 0; }

.wo-editor__schouw { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 10px 18px 0; background: var(--bg); font-size: .85rem;
  padding: .5rem .75rem; border-radius: 8px; }
.wo-editor__schouw .wo-editor__hint { margin: 0; }
.wo-editor__schouw-form { margin: 0; }
.wo-editor__schouw-planned { display: flex; align-items: center; gap: 6px; margin: 0;
  color: var(--green); font-weight: 600; }
.wo-editor__schouw-link { color: var(--green); }

.wo-editor__form { display: flex; flex-direction: column; padding: 12px 18px 18px; gap: 12px; }
.wo-editor__section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.wo-editor__heading { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 10px; }
.wo-editor__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wo-editor__grid .field { margin-bottom: 0; }
.field--wide { grid-column: 1 / -1; }
.field__label { font-size: .78rem; font-weight: 600; color: var(--ink); }
.field__input, .wo-editor select, .wo-editor input[type=text], .wo-editor input[type=date], .wo-editor input[type=time], .wo-editor textarea {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px;
  font-size: .9rem; background: #fff; font-family: inherit; }
.wo-editor :is(select, input, textarea):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 116, 59, .15); }
.wo-editor__omschrijving { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; line-height: 1.5; }
.wo-editor__hint { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .78rem; margin: 8px 0 0; }
.wo-editor__hubspot { font-size: .82rem; margin: 0 0 10px; }
.wo-editor__source { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: #e8eefb; color: #234b9c; border-radius: 4px; padding: .1rem .35rem; margin-right: .35rem; }
.wo-editor__warning { font-size: .8rem; color: var(--accent-dark); background: #fdeee7; border-radius: 8px; padding: .45rem .6rem; margin: 8px 0 0; }
.wo-editor__relaties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wo-editor__relatie { display: flex; flex-direction: column; gap: 2px; font-size: .85rem;
  background: var(--bg); border-radius: 8px; padding: .6rem .7rem; }
.wo-editor__relatie-label { display: flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.wo-editor__footer { display: flex; gap: 10px; padding-bottom: 6px; }
.wo-editor__combobox-hint { font-size: .78rem; color: var(--muted); margin: 6px 0 0; }
.wo-editor__combobox-results { max-height: 220px; overflow-y: auto; margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.wo-editor__combobox-item { width: 100%; padding: .4rem .6rem; border: 0; border-radius: 6px;
  background: none; text-align: left; font-size: .85rem; font-family: inherit; cursor: pointer; }
.wo-editor__combobox-item:hover, .wo-editor__combobox-item:focus { background: var(--bg); outline: none; }
.wo-editor__combobox-category { font-size: .72rem; margin-left: .4rem; }

/* ---- Vakman uren klokken ---- */
.bon-timer { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.bon-start { flex: 1; display: block; width: 100%; padding: 16px; border: 0; border-radius: 12px;
  background: var(--green); color: #fff; font-size: 1.1rem; font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.bon-start--stop { background: var(--red); }
.bon-timer__elapsed { font-variant-numeric: tabular-nums; font-size: 1.3rem; font-weight: 700; color: var(--ink); }

.uren-list { list-style: none; margin: 0 0 8px; padding: 0; }
.uren-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid #f0f1f4; }
.uren-row:first-child { border-top: 0; }
.uren-row__day { color: var(--muted); font-size: 13px; }
.uren-row__hours { font-weight: 600; }
.uren-row__edit summary { cursor: pointer; font-weight: 600; list-style: none; }
.uren-form { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.uren-form input { padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.uren-form button, .uren-del { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.uren-total { font-weight: 700; text-align: right; }
.uren-manual summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-top: 8px; }
.bon-verzenden { margin-top: 16px; }

.week-hint { display: inline-flex; align-items: center; gap: 6px; }
.week-hint__label { font-size: .75rem; color: var(--muted); white-space: nowrap; min-width: 2.6em; min-height: 1em; }
.field .week-hint { display: flex; }
.field .week-hint input { flex: 1; }

.week-note { margin: 0 0 .85rem; }
.week-note__input { width: 100%; padding: .45rem .6rem; border: 1px dashed var(--line); border-radius: 8px; font-size: .85rem; }
.week-note--filled .week-note__input { border: 1px solid var(--red); background: #fdeaea; color: var(--red); font-weight: 700; }
.week-note--readonly { color: var(--red); font-weight: 700; margin: .2rem 0 0; }
.emp-history { display: block; font-size: .72rem; max-width: 220px; margin-bottom: .3rem; }
.assistant-frame { display: block; width: 100%; height: calc(100vh - 140px); border: 0; border-radius: 12px; background: #fff; }
.vakman-main .assistant-frame { height: calc(100vh - 130px); border-radius: 0; }

.pb-absence { position: relative; background: repeating-linear-gradient(45deg, #f1f2f5, #f1f2f5 6px, #e7e9ee 6px, #e7e9ee 12px); border: 1px solid #d4d8df; border-radius: 6px; padding: 4px 22px 4px 6px; margin-bottom: 4px; font-size: .74rem; color: #4a5361; }
.pb-absence__label { display: block; font-weight: 600; }
.pb-absence__window { color: #6b7482; }
.pb-absence__deleteform { position: absolute; top: 2px; right: 2px; }
.pb-absence__delete { border: 0; background: none; cursor: pointer; color: #8a93a2; font-size: .8rem; }
.pb-absence-add { position: relative; }
.pb-absence-add__panel { position: absolute; right: 0; top: 110%; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; width: 260px; box-shadow: 0 8px 24px rgba(16, 24, 40, .12); display: grid; gap: 8px; }

.verlof-form { display: grid; gap: 8px; margin-bottom: 12px; }
.verlof-list { display: grid; gap: 6px; }
.verlof-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .85rem; }
.pill--verlof-aangevraagd { background: #fff4e5; color: #9a6008; }
.pill--verlof-goedgekeurd { background: #e6f6ec; color: #188554; }
.pill--verlof-afgewezen { background: #f1f2f5; color: #6b7482; }

.pb-aanvragen { background: #fff8ed; border: 1px solid #f0b25c; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.pb-aanvragen__item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; font-size: .88rem; }
.pb-aanvragen__actions { display: flex; gap: 6px; }

/* Werkbonnen table */
.wo-filters { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.wo-filters__line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wo-filters__q { flex: 1 1 320px; max-width: 460px; }
.wo-filters__select { flex: 0 0 auto; width: auto; }
.wo-filters__periode { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; }
.wo-filters__date { width: auto; padding: 3px 6px; font-size: .74rem; }
.wo-filters__chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px 2px 7px; background: var(--card);
}
.wo-filters__chip.is-on { border-color: var(--accent); color: var(--accent-dark); font-weight: 600; }
.wo-filters__chip input { margin: 0; }
.wo-table th a { color: inherit; text-decoration: none; }
.wo-table th a:hover { text-decoration: underline; }
.wo-table__th--sorted a { color: var(--ink); }
.wo-table td { vertical-align: top; }
.wo-table__totals td { font-weight: 600; border-top: 2px solid var(--border, #ddd); }
.projects__totals td { font-weight: 600; border-top: 2px solid var(--border, #ddd); }
.wo-table__acties { white-space: nowrap; }
.wo-row__description { max-width: 340px; color: var(--muted); font-size: .82rem; }

/* Verlof filters — compact one-row bar */
.verlof-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 14px; }
.verlof-filters .field { margin-bottom: 0; gap: .2rem; }
.verlof-filters .field__input { padding: .32rem .45rem; font-size: .82rem; }

/* Klantpagina: datum, tijd en status per werkbon in de regel zelf */
.deal-planning form { display: inline; }
.deal-planning .field__input { padding: .25rem .4rem; font-size: .82rem; }
.deal-planning__date { width: 140px; }
.deal-planning__time { width: 104px; }
.deal-planning__status { width: 140px; }
.deal-planning__times { white-space: nowrap; }
.deal-planning__times .deal-planning__time + .deal-planning__time { margin-left: .25rem; }
.deal-planning__locked { display: block; font-size: .74rem; }
.verlof-filters .field--check { flex-direction: row; align-items: center; padding-bottom: 0; align-self: center; }
.verlof-filters input[type=number] { width: 4.5rem; }
.verlof-filters .button { align-self: center; }
.verlof-approve { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.verlof-approve__bijzonder { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; white-space: nowrap; color: var(--muted); }
.wo-row--st-concept, .wo-row--st-ingepland { background: var(--st-ingepland-bg); }
.wo-row--st-klaar_gezet { background: var(--st-klaar_gezet-bg); }
.wo-row--st-opgehaald { background: var(--st-opgehaald-bg); }
.wo-row--st-compleet { background: var(--st-compleet-bg); }
.wo-row--st-gefactureerd { background: var(--st-gefactureerd-bg); color: var(--st-gefactureerd-ink); }
.wo-row--st-gefactureerd a, .wo-row--st-gefactureerd .wo-row__description { color: var(--st-gefactureerd-ink); }

.search-field { display: flex; gap: .5rem; align-items: center; margin: 0 0 .55rem; }
.search-field__input { flex: 1 1 520px; max-width: 1040px; }
.search-summary { margin: 0 0 .85rem; font-size: .85rem; }
.pb-search { margin-bottom: .85rem; }
.pb-search__jump { font-weight: 600; }
.pb-klantfilter { display: flex; gap: .5rem; align-items: center; margin: 0 0 .7rem; }
.pb-klantfilter__label { font-size: .82rem; color: var(--muted); }
.pb-klantfilter__select { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; max-width: 340px; }

/* Nacalculatie: Instellingen + Prijzenlijst */
.settings-form { max-width: 560px; margin: 1rem 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; }
.settings-form__errors { padding: .7rem 1rem; background: var(--red-bg, #fdecea); color: var(--red, #b42318);
  font-size: .85rem; border-bottom: 1px solid var(--line); }
.settings-form__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.settings-form__row label { color: var(--navy); font-weight: 500; font-size: .9rem; }
.settings-form__field { display: inline-flex; align-items: center; gap: .4rem; }
.settings-form__prefix { color: var(--muted); font-size: .9rem; }
.settings-form__field input { width: 96px; text-align: right; padding: .4rem .5rem; border: 1px solid var(--line);
  border-radius: 6px; font-variant-numeric: tabular-nums; font-size: .9rem; }
.settings-form__field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,116,59,.15); }
.settings-form__unit { color: var(--muted); font-size: .8rem; min-width: 56px; }
.settings-form__actions { padding: .85rem 1rem; }

.materials__category { color: var(--navy); font-size: .95rem; margin: 1.4rem 0 .4rem; letter-spacing: .01em; }
table.materials { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: .5rem; table-layout: fixed; }
.materials th, .materials td { text-align: left; padding: .4rem .55rem; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.materials th { color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; }
.materials .num { text-align: right; font-variant-numeric: tabular-nums; }
.materials__name { color: var(--navy); font-weight: 500; }
.materials tbody tr:hover { background: var(--bg); }
.materials th:nth-child(1), .materials td:nth-child(1) { width: 22%; }
.materials th:nth-child(2), .materials td:nth-child(2) { width: 11%; }
.materials th:nth-child(3), .materials td:nth-child(3) { width: 12%; }
.materials th:nth-child(4), .materials td:nth-child(4) { width: 7%; }
.materials th:nth-child(5), .materials td:nth-child(5) { width: 12%; }
.materials th:nth-child(6), .materials td:nth-child(6) { width: 10%; }
.materials th:nth-child(7), .materials td:nth-child(7) { width: 12%; }
.materials th:nth-child(8), .materials td:nth-child(8) { width: 14%; }

/* Nacalculatie: project profit section */
.profit-table { width: 100%; max-width: 640px; border-collapse: collapse; margin: .25rem 0 1rem; }
.profit-table th, .profit-table td { padding: .45rem .5rem; border-bottom: 1px solid var(--line); }
.profit-table th { text-align: left; font-weight: 400; color: var(--navy); font-size: .9rem; }
.profit-table td { text-align: right; font-variant-numeric: tabular-nums; color: var(--navy); white-space: nowrap; }
.profit-table__emphasis th, .profit-table__emphasis td { font-weight: 700; }
.post-calculation__breakdown summary { cursor: pointer; list-style: none; }
.post-calculation__breakdown summary::-webkit-details-marker { display: none; }
.post-calculation__breakdown-list { list-style: none; margin: .4rem 0 0; padding: 0; text-align: left; font-weight: 400; font-size: .82rem; color: var(--muted); white-space: normal; }
.post-calculation__breakdown-list li { padding: .15rem 0; }
.post-calculation__small-material td { color: var(--muted); }
.post-calculation__travel td { display: flex; justify-content: flex-end; align-items: center; gap: .6rem; flex-wrap: wrap; }
.post-calculation__travel-form { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .8rem; }
.post-calculation__input { width: 62px; text-align: right; padding: .25rem .4rem; border: 1px solid var(--line); border-radius: 6px; font-variant-numeric: tabular-nums; font-size: .85rem; }
.post-calculation__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 116, 59, .15); }
.post-calculation__extra-form { display: flex; justify-content: flex-end; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
.post-calculation__extra-form input { padding: .25rem .4rem; border: 1px solid var(--line); border-radius: 6px; font-size: .85rem; }
.post-calculation__extra-delete { display: inline; margin-left: .3rem; }
.post-calculation__input--euro { width: 82px; }
.post-calculation__materials-heading { font-size: .92rem; color: var(--navy); margin: 1.1rem 0 .35rem; }
table.post-calculation__materials { width: 100%; max-width: 640px; border-collapse: collapse; font-size: .88rem; }
.post-calculation__materials th, .post-calculation__materials td { padding: .35rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.post-calculation__materials th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.post-calculation__materials .num { text-align: right; font-variant-numeric: tabular-nums; }
.post-calculation__materials-form, .post-calculation__materials-delete { display: inline; }
.post-calculation__materials-new { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .7rem; max-width: 640px; }
.post-calculation__materials-new select, .post-calculation__materials-new input { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; font-size: .88rem; background: #fff; }
.post-calculation__materials-new select { min-width: 220px; }
.post-calculation__materials-new input { width: 110px; }
.post-calculation__prefill { margin-top: .7rem; }
.materials td.num input[type=number] { width: 100%; text-align: right; padding: .3rem .45rem; border: 1px solid var(--line);
  border-radius: 6px; font-variant-numeric: tabular-nums; font-size: .88rem; }
.materials td.num input[type=number]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,116,59,.15); }
.materials__actions { display: flex; flex-direction: row; justify-content: flex-end; gap: .4rem; flex-wrap: nowrap; }
.materials__actions .button { white-space: nowrap; }
.material-delete { display: inline; }
.material-new { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0 1.5rem;
  padding: .8rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.material-new input { padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; font-size: .88rem; }
.material-new input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,116,59,.15); }
.material-new input[type=text] { min-width: 160px; }
.material-new input[type=number] { width: 120px; }
.deals__notitie { min-width: 12rem; }
.deal-note__input {
  width: 100%;
  resize: vertical;
  font: inherit;
}

/* Schouwformulier (§9, feedback 6.2/6.3) */
.schouwformulier__heading { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--navy); margin: 18px 0 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.schouwformulier__heading:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.schouwformulier__subheading { font-size: .85rem; font-weight: 600; margin: 10px 0 6px; }
.schouwformulier__header { margin-bottom: 6px; }
.schouw-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.schouw-kv:last-of-type { border-bottom: 0; }
.schouw-kv__label { color: var(--muted); }
.schouw-kv__value { font-weight: 600; text-align: right; }
.schouw-context__meer > summary { cursor: pointer; color: var(--accent); font-size: .85rem; padding: .5rem 0; }

.schouwformulier__section { margin-top: 6px; }
.schouwformulier__hint { font-size: .82rem; margin: 0 0 12px; }
.schouw-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 10px 0 14px; }
.schouw-tab { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  font: inherit; font-size: .88rem; font-weight: 600; padding: 10px 6px; cursor: pointer; }
.schouw-tab--current { color: var(--navy); border-bottom-color: var(--accent); }
.schouw-check { padding-bottom: 6px; border-bottom: 1px dashed var(--line); margin-bottom: 12px; }
.schouw-check:last-of-type { border-bottom: 0; }
.schouw-check .schouw-radio-group { margin-bottom: 6px; }
.schouw-check .schouw-radio { display: inline-flex; margin-right: 14px; }
.schouw-radio-group, .schouw-checkbox-group { border: 0; margin: 0 0 14px; padding: 0; }
.schouw-radio-group legend, .schouw-checkbox-group legend { font-size: .82rem; font-weight: 600; color: var(--ink); padding: 0 0 6px; width: 100%; }
.schouw-radio, .schouw-checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: .88rem; padding: 4px 0; cursor: pointer; }
.schouw-radio input, .schouw-checkbox input { margin-top: 3px; flex: 0 0 auto; }
.schouw-hulptekst { font-size: .78rem; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 8px 10px; margin: 0 0 8px; }

.schouw-metrage-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.schouw-metrage-row { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px;
  padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.schouw-metrage-row .field { margin-bottom: 0; }
.schouw-metrage-row--invalid { border-color: var(--red); background: var(--red-bg); }
.schouw-metrage-row__error { display: none; grid-column: 1 / -1; margin: 0; color: var(--red); font-size: 13px; font-weight: 600; }
.schouw-metrage-row--invalid .schouw-metrage-row__error { display: block; }
.schouw-metrage__remove { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  border: 0; background: var(--navy); color: #fff; font-size: .8rem; line-height: 1; cursor: pointer; }
.schouw-metrage__remove:hover { background: var(--red); }
.schouw-metrage__add { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--accent);
  background: transparent; color: var(--accent); border-radius: 8px; padding: .45rem .8rem; font-size: .85rem;
  font-weight: 600; cursor: pointer; margin-bottom: 16px; }
.schouw-metrage__add:hover { background: rgba(232, 116, 59, .08); }

.wo-card__note { display: block; font-size: .74rem; color: var(--muted); font-style: italic;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.planboard__emp-sub { display: block; font-size: .7rem; color: var(--muted); }
.emp-new__types { border: 0; padding: 0; min-width: 0; }
.emp-new__types legend { padding: 0; }
.emp-new__types-options { display: flex; gap: 14px; align-items: center; padding-top: .25rem; }
.emp-new__types .field--check { padding-bottom: 0; white-space: nowrap; }
.emp-type { display: flex; flex-direction: column; gap: 1px; margin: 0; }
.emp-type .field--check { padding-bottom: 0; white-space: nowrap; font-size: .82rem; font-weight: 400; }
.emp-rate { margin: 4px 0 0; }
.emp-rate__select { font-size: .82rem; padding: 2px 4px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.emp-city__input { width: 100%; min-width: 7rem; font-size: .85rem; padding: 4px 6px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.planboard__emp-sub--unset { color: var(--red); }
.wo-card__uren { font-weight: 600; color: var(--ink); white-space: nowrap; }
.wo-card__afwijking { color: var(--gold); display: inline-flex; align-items: center; }
.wo-card__volg-hubspot { display: inline; }
.wo-card__volg-hubspot-btn {
  background: transparent; border: 0; padding: 0; cursor: pointer;
  color: var(--accent-dark); font-size: .68rem; font-weight: 700; text-decoration: underline;
}
.wo-editor__toegang { font-weight: 600; font-size: .85rem; margin: 0 0 6px; }
.wo-editor__memo {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: .5rem .65rem; font-size: .82rem; color: var(--muted); white-space: pre-wrap;
}

.wo-actuals__subheading { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin: 14px 0 8px; }
.wo-actuals__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 0; border-top: 1px solid #f0f1f4; }
.wo-actuals__row:first-child { border-top: 0; }
.wo-actuals__name { font-weight: 600; min-width: 8rem; }
.wo-actuals__edit summary { cursor: pointer; font-weight: 600; list-style: none; }
.wo-actuals__none { color: var(--muted); }
.wo-actuals__form { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; }
.wo-actuals__input { width: 5rem; }
.correction-note { display: block; flex-basis: 100%; font-size: .74rem; }
.day-planning__new > summary { cursor: pointer; color: var(--accent); font-size: .8rem; padding: 4px 0; }
.wo-actuals__form--new { padding-top: 8px; border-top: 1px solid #f0f1f4; }

.wo-card__badges { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .35rem; margin-top: .2rem; }
.wo-card__actions form { display: inline-flex; margin: 0; }
.wo-card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.25; }
.wo-card__note { display: inline; font-style: italic; }

/* De bulk-checkbox staat absoluut rechtsonder; alleen de tijdlijn moet eromheen,
   de tekst erboven mag de volle breedte gebruiken. */
.wo-tijdlijn { margin-right: 26px; }

/* De vakman-kolom blijft staan terwijl de dagen eronderdoor schuiven. Sticky werkt
   alleen op th/td, niet op thead of tr, en valt om bij border-collapse: collapse:
   samengevouwen randen horen bij de tabel en reizen niet mee met de cel. */
/* Boven alles wat een kaart kan opwerpen: knoppen (2), tijdlijn-handles (3),
   de bulk-checkbox (4), een kaart tijdens resizen (5) en de tijdchip (6). */
.planboard__corner, .planboard__emp { position: sticky; left: 0; z-index: 10; }
.planboard__emp { background: var(--bg); }

.planboard thead th { position: sticky; top: 0; z-index: 12; }
.planboard thead .planboard__corner { z-index: 13; }
.planboard__cell { min-width: 240px; }

.deal-planning__typeselect { padding: .15rem .3rem; font-size: .78rem; max-width: 130px; }

.form-grid { display: grid; gap: 12px; margin: 1rem 0; }
.form-grid__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form-grid__note .field__input { min-height: 150px; resize: vertical; }
.form-grid .button { justify-self: start; }

.complaints__row--stale td { background: rgba(232, 116, 59, .10); }
.complaints__row--stale td:first-child { box-shadow: inset 3px 0 0 var(--red); }

.post-calculation__contract-warning { color: var(--red); font-size: .82rem; }

/* Fotogalerij */
.gallery { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.gallery::backdrop { background: rgba(16, 24, 40, .82); }
.gallery__frame { display: flex; align-items: center; gap: 10px; }
.gallery__image { max-width: 82vw; max-height: 82vh; object-fit: contain; border-radius: 10px; background: #fff; }
.gallery__nav { border: 0; background: rgba(255, 255, 255, .9); color: var(--navy); font-size: 2rem; line-height: 1;
  width: 44px; height: 64px; border-radius: 10px; cursor: pointer; }
.gallery__nav:hover { background: #fff; }
.gallery__bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px;
  color: #fff; font-size: .8rem; }
.gallery__caption { color: rgba(255, 255, 255, .75); }

/* Projectenoverzicht */
.stat.projects__kpi { display: grid; grid-template-columns: 1fr auto; align-items: baseline;
  padding: .3rem .6rem; gap: 0 .5rem; }
.projects__kpi .stat__label { font-size: .64rem; }
.projects__kpi .stat__value { font-size: .95rem; text-align: right; }
.projects__kpi .stat__note { grid-column: 1 / -1; font-size: .6rem; }
.projects__pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.projects__bookingpill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .72rem;
  border: 1px solid var(--line); white-space: nowrap; }
.projects__bookingpill--complete { background: rgba(34, 160, 92, .10); border-color: rgba(34, 160, 92, .35); }
.projects__bookingpill--material-missing,
.projects__bookingpill--labour-missing { background: rgba(232, 116, 59, .10); border-color: rgba(232, 116, 59, .40); }
.projects__bookingpill--nothing-booked { color: var(--muted); }
.stat__note { font-size: .64rem; color: var(--muted); }
.projects__empty { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.projects__empty p { margin: 0; }

.settings-link { margin-top: 1.25rem; }

.rates-table__heading { color: var(--navy); font-size: .95rem; margin: 1.6rem 0 .4rem; letter-spacing: .01em; }
table.rates-table { width: 100%; max-width: 860px; border-collapse: collapse; font-size: .9rem; margin-bottom: .6rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rates-table th, .rates-table td { text-align: left; padding: .5rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rates-table tbody tr:last-child th, .rates-table tbody tr:last-child td { border-bottom: 0; }
.rates-table th { color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; }
.rates-table td:first-child { color: var(--navy); font-weight: 500; }
.rates-table tbody tr:hover { background: var(--bg); }
.rates-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rates-table__actions, .rates-table__actions-head { width: 7rem; text-align: right; }
.rates-table__actions form { margin: 0; }

.rates-select, .rates-table select, .rates-table__new select {
  width: 11rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: #fff;
  color: var(--navy); font-size: .88rem; font-family: inherit; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='1.6' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .6rem center; background-size: .7rem;
  padding-right: 1.9rem; }
.rates-table select:focus, .rates-table__new select:focus, .rates-table input:focus, .rates-table__new input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,116,59,.15); }
.rates-table form { margin: 0; }
.rates-table input[type=number], .rates-table__new input[type=number] { width: 6.5rem; text-align: right; padding: .35rem .5rem; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; font-variant-numeric: tabular-nums; font-size: .88rem; }

.rates-table__new { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; padding: .7rem .8rem;
  max-width: 860px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.rates-table__new input[type=text] { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px;
  font-size: .88rem; min-width: 14rem; }

.post-calculation__prefills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.settings-form__section { padding: 1.4rem 1rem .9rem; border-bottom: 1px solid var(--line); background: var(--bg); }
.settings-form__heading { margin: 0; font-size: .95rem; color: var(--navy); letter-spacing: .01em; }
.settings-form__hint { margin: .3rem 0 0; font-size: .82rem; }

.pb-warning { border: 0; border-radius: 10px; padding: 18px 20px; max-width: 420px; box-shadow: 0 8px 30px rgb(0 0 0 / .18); }
.pb-warning::backdrop { background: rgb(0 0 0 / .35); }
.pb-warning__text { margin: 0 0 14px; font-size: .92rem; }
.pb-warning__actions { display: flex; justify-content: flex-end; gap: 8px; }
.wo-card__condition { color: var(--danger, #b3261e); font-size: 11px; font-weight: 600; }

.pc-lines { width: 100%; border-collapse: collapse; font-size: .85rem; }
.pc-lines th, .pc-lines td { padding: .3rem .35rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.pc-lines th { color: var(--muted); font-weight: 400; }
.pc-lines td.pc-lines__net, .pc-lines td.pc-lines__packages, .pc-lines td.pc-lines__purchase, .pc-lines td.pc-lines__sale,
.pc-lines td.pc-lines__margin, .pc-lines td.pc-lines__per_m2 { text-align: right; font-variant-numeric: tabular-nums; }
.pc-lines .field__input { width: auto; min-width: 4.5rem; }
.pc-lines .pc-lines__pct { width: 4.5rem; }
.pc-lines__usage .field__input { width: 5.5rem; }
.pc-lines__handle { cursor: grab; color: var(--muted); user-select: none; }
.pc-lines tr.is-unpriced { background: rgba(209, 52, 56, .07); }
.pc-lines__missing { display: block; font-size: .75rem; color: #d13438; }
.pc-lines__add { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .5rem 0 1rem; }
.pc-lines tr.is-additional { background: rgba(47, 110, 186, .07); }
.pc-provisional { margin-top: 1rem; padding: .75rem; border: 1px dashed #c77d00; border-radius: 6px; background: rgba(199, 125, 0, .06); }
.pc-provisional h3 { margin-top: 0; color: #8a5600; }
.pc-totals__quote { width: 8rem; }
.pc-totals__insight { white-space: normal; text-align: left; color: var(--muted); }
.pc-labor__input { width: 6rem; }
.pc-labor__signal { margin-left: .5rem; padding: .1rem .4rem; border-radius: 4px; background: rgba(209, 52, 56, .12); color: #9b1c1c; font-size: .8rem; }
.pc-labor__missing { color: #9b1c1c; font-size: .85rem; }
.pc-labor__days { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.pc-labor__days ul { margin: .25rem 0 0 1rem; padding: 0; }
.pc-labor__pricing { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.pc-travel__factors { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin: .25rem 0 .75rem; font-size: .85rem; }
.pc-travel__factors label { display: flex; gap: .35rem; align-items: center; }
.pc-travel__input { width: 5.5rem; }
.deal-quote-phase { margin: .5rem 0 1rem; padding: .6rem .8rem; border-left: 3px solid #c77d00; background: rgba(199, 125, 0, .07); font-size: .9rem; }
.rates-table tr.is-stale { background: rgba(199, 125, 0, .07); }
.rates-table tr.is-stale td:last-child { color: #8a5600; }
