/* Nikola Brussels portal preview.
   House style from nikola-brussels.be refs:
   Poppins, ink #151515, gold #D4B037 / #C9A53B (car cards + favourites),
   white cards, dark bar #080808 (BigMenu). The live main header is a
   translucent white bar; this preview uses the dark menu bar so the
   catalog sits on light cards underneath. */

@font-face {
    font-family: "Poppins";
    src: url("fonts/Poppins-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Poppins";
    src: url("fonts/Poppins-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Poppins";
    src: url("fonts/Poppins-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Poppins";
    src: url("fonts/Poppins-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #f6f6f6;
    --bg-2: #ffffff;
    --ink: #151515;
    --muted: #707070;
    --line: #e8e8e8;
    --gold: #d4b037;
    --gold-deep: #c9a53b;
    --gold-ink: #8a6f1c;
    --tint: #fbf6e7;
    --bar: #080808;
    --ok: #1f7a45;
    --warn: #8a6f1c;
    color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.55 Poppins, Arial, Helvetica, sans-serif;
}
a { color: inherit; }
.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--ink);
    color: #fff;
    padding: 0.4rem 0.7rem;
    z-index: 5;
}
.skip:focus { top: 0.5rem; }

.mast {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    padding: 0.95rem 1.5rem;
    background: var(--bar);
    color: #fff;
}
.mark { text-decoration: none; display: grid; gap: 0.12rem; color: #fff; }
.mark-kicker {
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.mark-name {
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.05;
}
.mark-sub { color: #c8c8c8; font-size: 0.85rem; }
.nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; align-items: center; }
.nav-group { color: rgba(255,255,255,0.55); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 0.25rem; }
.nav a {
    text-decoration: none;
    color: #d8d8d8;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.2rem 0;
}
.nav a.is-on { color: #fff; box-shadow: inset 0 -2px 0 var(--gold); }
.nav a:hover { color: var(--gold); }
.count {
    display: inline-block;
    min-width: 1.25rem;
    text-align: center;
    background: var(--gold);
    color: #111;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0 0.35rem;
}
.nav-out { margin: 0; }
.nav-out button {
    background: none;
    border: 0;
    color: #d8d8d8;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    border-radius: 0;
}
.nav-out button:hover { background: none; color: var(--gold); border-color: transparent; }
.subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.1rem;
    padding: 0.7rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.subnav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.subnav a.is-on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); }
.soon { color: #9a9a9a; cursor: not-allowed; }
.soon small {
    margin-left: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.65rem;
    color: var(--gold-ink);
}
.banner {
    margin: 0;
    padding: 0.55rem 1.5rem;
    background: var(--tint);
    color: var(--gold-ink);
    border-bottom: 1px solid #efe3bc;
    font-size: 0.9rem;
    font-weight: 500;
}
main { padding: 1.6rem 1.5rem 2.5rem; max-width: 1100px; }
h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 0 0 0.85rem;
}
h1::after {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    background: var(--gold);
    margin-top: 0.7rem;
}
h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.45rem; letter-spacing: -0.02em; }
.lead { color: var(--muted); margin: 0 0 0.4rem; }
.flash { padding: 0.7rem 0.9rem; border: 1px solid var(--line); background: #fff; border-radius: 8px; }
.flash-ok { border-color: #b7e0c6; }
.flash-warn { border-color: #efe3bc; background: var(--tint); }
.flash-err { border-color: #f0c2c4; }
.filters, .stack, .panel, .card, .order {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1rem 1.05rem;
}
.filters { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: end; margin: 1rem 0 1.1rem; }
label { display: grid; gap: 0.3rem; font-size: 0.82rem; font-weight: 500; color: var(--muted); letter-spacing: 0.02em; }
input, select, textarea {
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
    border-color: var(--gold);
}
textarea { min-height: 6rem; width: 100%; }
button, .button {
    background: #111;
    color: #fff;
    border: 1px solid #111;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    font: 500 15px/1.2 Poppins, Arial, Helvetica, sans-serif;
    letter-spacing: 0.02em;
    padding: 0.62rem 0.95rem;
}
button:hover, .button:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #111;
}
button.ghost, a.ghost {
    background: #fff;
    color: var(--ink);
    border: 1px solid #e3e3e3;
}
button.ghost:hover, a.ghost:hover {
    background: var(--tint);
    border-color: var(--gold);
    color: #111;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.9rem;
}
.card {
    display: grid;
    gap: 0.35rem;
    align-content: start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.card h2 { font-size: 1.02rem; }
.card a { text-decoration: none; }
.card a:hover { color: var(--gold-ink); }
.meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.tesla-badge {
    display: inline-flex;
    align-items: center;
    background: #111;
    color: #fff;
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(212, 176, 55, 0.85);
}
.demo-tag {
    color: var(--gold-ink);
    background: var(--tint);
    border: 1px solid #efe3bc;
    border-radius: 999px;
    padding: 0.05rem 0.4rem;
    letter-spacing: 0.06em;
}
.price { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.03em; margin: 0.25rem 0; }
.sku { font-family: ui-monospace, "Cascadia Mono", monospace; color: var(--muted); font-size: 0.82rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.8rem; margin: 1rem 0; }
.stat strong { display: block; font-size: 1.6rem; font-weight: 600; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.35rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.narrow { max-width: 32rem; }
.row-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: end; }
.errors { color: #9b1c28; padding-left: 1.1rem; }
.colophon {
    padding: 1.4rem 1.5rem 2rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
    background: #fff;
    font-size: 0.88rem;
}
.todo {
    border-left: 3px solid var(--gold);
    padding-left: 0.7rem;
    color: var(--muted);
}
@media (max-width: 720px) {
    .mast { flex-direction: column; align-items: flex-start; }
    h1 { font-size: 1.65rem; }
    main { padding: 1.2rem 1rem 2rem; }
}


.mark-logo {
    display: block;
    height: 42px;
    width: auto;
    max-width: 200px;
}
.mark { align-items: start; }

.langs { display: inline-flex; gap: 0.45rem; align-items: center; }
.langs a { letter-spacing: 0.08em; font-size: 0.75rem; }
.legend-box { margin: 1rem 0; }
.legend { list-style: none; padding: 0; margin: 0.4rem 0 0.8rem; display: flex; flex-wrap: wrap; gap: 0.45rem 1rem; }
.legend li { display: flex; gap: 0.4rem; align-items: center; }
.code { display: inline-block; border-radius: 999px; padding: 0.12rem 0.5rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.03em; }
.code-tk { background: #1d4e89; color: #fff; }
.code-tk-wait { background: #fff; color: #1d4e89; box-shadow: inset 0 0 0 1px #1d4e89; }
.code-cs { background: #f4c2d0; color: #4a2030; }
.code-cs-wait { background: #fff; color: #8d3d55; box-shadow: inset 0 0 0 1px #e7a0b5; }
.code-unknown { background: #f6e8e8; color: #9b1c28; }
.swatch { display: inline-block; width: 0.85rem; height: 0.85rem; border-radius: 2px; border: 1px solid rgba(0,0,0,0.15); vertical-align: -0.1rem; }
.swatch-light-green { background: #b7e4c7; }
.swatch-dark-green { background: #1b4332; }
.swatch-yellow { background: #ffe66d; }
.origin { display: flex; flex-wrap: wrap; gap: 0.45rem 0.8rem; align-items: center; }
.warn-text { color: #9b1c28; }
.checklist { list-style: none; padding: 0; display: grid; gap: 0.45rem; }
.checklist li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.7rem; }
.checklist li.is-done { background: #f3faf5; }
.checklist form { display: flex; gap: 0.6rem; align-items: center; }
.checklist button { flex: 0 0 auto; }

.app-internal main { width: 100%; max-width: none; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.dash { color: var(--muted); }
.table-wrap { width: 100%; max-width: none; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.dossier-table th, .dossier-table td { padding: 0; }
.dossier-table th { padding: 0.7rem 0.45rem; }
.celllink {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.8rem;
    padding: 0.55rem 0.45rem;
    text-decoration: none;
    color: inherit;
}
.dossier-table tbody tr:hover { background: var(--tint); }
.ref-num { font-weight: 600; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.mark-glyph { font-size: 1.05rem; line-height: 1; }
.flags { display: flex; flex-wrap: wrap; gap: 0.28rem; }
.flag {
    display: inline-block;
    background: #f3f3f3;
    border-radius: 999px;
    padding: 0.08rem 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.dossier-head { margin-bottom: 1rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; }
.dossier-kicker { display: flex; flex-wrap: nowrap; gap: 0.55rem; align-items: center; margin: 0; overflow-x: auto; max-width: 100%; }
.dossier-head h1 {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.2;
    white-space: normal;
}
.dossier-head h1::after { content: none; display: none; width: 0; height: 0; margin: 0; }
.dossier-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.55rem;
    row-gap: 0.2rem;
}
.dossier-vehicle {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 650;
}
.dossier-extra {
    display: block;
    flex: 1 0 100%;
    margin-top: 0.2rem;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.35;
    color: #3a3a3a;
}
.progress-card, .phase, .mail-card, .mail-block {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    margin: 0.8rem 0;
}
.progress-copy { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.45rem; }
.progress-copy span { color: var(--muted); font-size: 0.9rem; }
.dossier-progress { width: 100%; height: 0.6rem; appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: #eee; }
.dossier-progress::-webkit-progress-bar { background: #eee; }
.dossier-progress::-webkit-progress-value { background: var(--gold); }
.dossier-progress::-moz-progress-bar { background: var(--gold); }
.phase-head, .mail-head { display: flex; justify-content: space-between; gap: 0.8rem; align-items: baseline; }
.phase-head h2, .mail-head h3 { margin: 0; }
.phase > summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.85rem;
    cursor: pointer;
}
.phase-title { display: flex; align-items: center; gap: 0.5rem; flex: 1 1 16rem; }
.phase-title h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}
.phase-count { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.phase.is-if { box-shadow: inset 3px 0 0 var(--gold); }

/* Te-koop FIRST: optional import / foreign-purchase group inside the phase list */
.step-group {
    list-style: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.7rem 0.75rem 0.85rem;
    background: #fbfbf8;
    box-shadow: inset 3px 0 0 var(--gold);
}
.step-group.is-na {
    background: #f7f7f7;
    box-shadow: inset 3px 0 0 #c8c8c8;
}
.step-group-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    justify-content: space-between;
}
.step-group-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1 1 12rem;
}
.step-group-title h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}
.step-group .if-note {
    margin-top: 0.35rem;
}
.step-group-na {
    font-style: italic;
    opacity: 0.85;
}
.step-group-steps {
    margin-top: 0.55rem;
}

/* Te-koop: Voertuig klaarzetten — one step + expandable sub-checklist */
.step-klaarzetten {
    padding-bottom: 0.55rem;
}
.step-klaarzetten .klaarzetten-progress {
    display: inline-block;
    margin-left: 0.35rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}
.klaarzetten-details {
    margin: 0.45rem 0 0 2.05rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfbf8;
    padding: 0.35rem 0.55rem 0.55rem;
}
.klaarzetten-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    list-style: none;
    font-weight: 650;
    font-size: 0.92rem;
    padding: 0.25rem 0.15rem;
    color: #222;
}
.klaarzetten-summary::-webkit-details-marker { display: none; }
.klaarzetten-summary::before {
    content: '▸';
    display: inline-block;
    width: 1rem;
    color: var(--muted);
    transition: transform 0.12s ease;
}
.klaarzetten-details[open] > .klaarzetten-summary::before {
    transform: rotate(90deg);
}
.klaarzetten-checklist {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.3rem;
}
.klaarzetten-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.3rem 0.45rem;
    background: #fff;
}
.klaarzetten-item.is-done {
    background: #f3faf5;
    border-color: #d5eadc;
}
.klaarzetten-item .tick {
    gap: 0.55rem;
}
.klaarzetten-item .step-title {
    font-size: 0.95rem;
    font-weight: 600;
}
.next-kz-hint {
    margin: 0.15rem 0 0;
}
.if-note, .step-note { color: var(--muted); font-size: 0.88rem; margin: 0.35rem 0 0; }
.step-helper { display: block; font-size: 0.8rem; font-weight: 500; line-height: 1.35; margin-top: 0.12rem; }
.steps { list-style: none; padding: 0; margin: 0.7rem 0 0; display: grid; gap: 0.45rem; }
.step { border: 1px solid var(--line); border-radius: 10px; padding: 0.45rem 0.55rem; }
.step.is-done { background: #f3faf5; border-color: #d5eadc; }
.step.is-active { background: #e7f7ec; border-color: #b7e0c4; }
.tick { display: flex; gap: 0.7rem; align-items: flex-start; }
.tick-box { position: relative; width: 1.35rem; height: 1.35rem; margin-top: 0.15rem; }
.tick-box input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.tick-box .box { display: block; width: 1.25rem; height: 1.25rem; border: 2px solid #111; border-radius: 4px; background: #fff; }
.tick-box input:checked + .box { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 2px #fff; }
.step.is-active .tick-box input:checked + .box { background: #b6e7c4; border-color: #3e9a5c; box-shadow: inset 0 0 0 2px #fff; }
.step.is-done .tick-box input:checked + .box { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 2px #fff; }
.tick-box input:focus-visible + .box { outline: 2px solid var(--gold); outline-offset: 2px; }
.step-busy { display: block; margin-top: 0.15rem; color: #1f7a3a; font-size: 0.88rem; font-weight: 650; }
.step.is-done .step-busy { color: var(--muted); font-weight: 600; }
.step-copy { display: grid; gap: 0.2rem; flex: 1; }
.step-title { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.3; }
.step.is-next {
    background: #fffaf0;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 176, 55, 0.28);
}
.step.is-active.is-next {
    background: #e7f7ec;
    border-color: #7dcea0;
    box-shadow: 0 0 0 3px rgba(80, 170, 110, 0.22);
}
.next-pill {
    display: inline-block;
    margin-right: 0.45rem;
    background: var(--gold);
    color: #151515;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.16rem 0.5rem;
    vertical-align: 0.12em;
}
.next-action {
    background: linear-gradient(180deg, #fffaf0 0%, #fff 72%);
    border: 1px solid #e6d48a;
    border-radius: 18px;
    padding: 1rem 1.15rem 1.15rem;
    margin: 0.8rem 0;
    box-shadow: 0 10px 28px rgba(212, 176, 55, 0.16);
}
.next-action.is-clear {
    background: #fff;
    border-color: var(--line);
    box-shadow: none;
}
.next-action.is-active {
    background: linear-gradient(180deg, #e7f7ec 0%, #f7fcf8 72%);
    border-color: #7dcea0;
    box-shadow: 0 10px 28px rgba(80, 170, 110, 0.18);
}
.next-action.is-active .next-kicker {
    background: #1f7a3a;
}
.next-action.is-active .next-balloon {
    background: #b6e7c4;
}
.next-action.is-active .next-balloon::after {
    border-color: #b6e7c4 transparent transparent;
}
.next-kicker-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.7rem;
}
.next-busy {
    margin: 0;
    color: #1f7a3a;
    font-size: 0.92rem;
    font-weight: 700;
}
.next-kicker {
    display: inline-block;
    margin: 0;
    background: #151515;
    color: #fff;
    border-radius: 999px;
    padding: 0.18rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.busy-pill {
    display: inline-block;
    margin-right: 0.45rem;
    background: #d8f3e2;
    color: #1f7a3a;
    border: 1px solid #7dcea0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: none;
    border-radius: 999px;
    padding: 0.16rem 0.5rem;
    vertical-align: 0.12em;
}
.tick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.next-tick-actions { margin-top: 0.15rem; }
.step-tick-actions {
    margin: 0.35rem 0 0.15rem 2.05rem;
}
.step-tick-actions button { font-size: 0.9rem; padding: 0.45rem 0.75rem; }
.next-balloon {
    position: relative;
    margin: 0.75rem 0 0.95rem;
    background: var(--gold);
    color: #151515;
    border-radius: 16px;
    padding: 0.85rem 1rem 0.95rem;
}
.next-balloon::after {
    content: "";
    position: absolute;
    left: 1.5rem;
    bottom: -8px;
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: var(--gold) transparent transparent;
}
.next-action h2 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}
.next-balloon h2 { color: #151515; }
.next-phase { margin: 0.25rem 0 0; font-size: 0.95rem; font-weight: 600; }
.next-action.is-clear h2 { margin-top: 0.65rem; font-size: 1.35rem; }
.next-tick { margin-top: 0; }
.next-tick button { font-weight: 700; }
.step-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.actor, .when, .status {
    display: inline-block;
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.actor-team { background: #f3f3f3; }
.actor-grok { background: #e7f0fb; color: #1d4e89; }
.actor-auto { background: var(--tint); color: var(--gold-ink); }
.when-on { background: #e5f6ea; color: var(--ok); }
.when-off { background: #fff; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.party { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.7rem; align-items: end; }
.party button { justify-self: start; }
.mail-to { margin: 0.25rem 0; }
.mail-to span { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; margin-right: 0.35rem; }
.mail-body {
    white-space: pre-wrap;
    background: #fafafa;
    border-radius: 10px;
    padding: 0.8rem;
    margin: 0.6rem 0;
    font-size: 0.92rem;
}
mark.attn { background: #fff3a1; padding: 0 0.15rem; }
.status-none { background: #f3f3f3; }
.status-draft { background: var(--tint); color: var(--gold-ink); }
.status-sent { background: #e5f6ea; color: var(--ok); }

.sold-badge { display: inline-block; border-radius: 999px; padding: 0.12rem 0.5rem; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.sold-light-green { background: #b7e4c7; color: #143024; }
.sold-dark-green { background: #1b4332; color: #fff; }
.sold-yellow { background: #ffe66d; color: #3a3204; }
.dossier-table tr.is-light-green { box-shadow: inset 4px 0 0 #7dcea0; }
.dossier-table tr.is-dark-green { box-shadow: inset 4px 0 0 #1b4332; }
.dossier-table tr.is-yellow { box-shadow: inset 4px 0 0 #e0b400; }
.title-amount { margin-left: 0.45rem; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount-cell { font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dossier-table .status-cell,
.dossier-table .status-cell .celllink {
    text-align: left;
    justify-content: flex-start;
}
.dossier-table th:nth-child(2),
.dossier-table td.status-cell {
    text-align: left;
}
.sale-date-unknown { color: var(--muted); font-style: italic; }

.paid-flow { display: inline-block; margin-left: 0.35rem; background: #1b4332; color: #fff; border-radius: 999px; padding: 0.08rem 0.45rem; font-size: 0.72rem; font-weight: 700; }
.seq-num { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: 0.03em; }
.list-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; margin: 0.9rem 0 0; }
.list-foot-one { grid-template-columns: minmax(0, 1fr); max-width: 22rem; }
.list-foot article { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 0.9rem; }
.list-foot span { display: block; color: var(--muted); font-size: 0.78rem; margin-bottom: 0.25rem; }
.list-foot strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.step.is-paid-in { box-shadow: inset 3px 0 0 #1b4332; }
@media (max-width: 720px) {
    .list-foot { grid-template-columns: 1fr; }
}

.sold-count {
    margin: -0.2rem 0 0.9rem;
    font-size: 1.05rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}
.app-internal .mark { align-items: center; }

.tick-dialog {
    border: 0;
    border-radius: 16px;
    padding: 1.15rem 1.25rem 1.05rem;
    max-width: min(28rem, calc(100vw - 2rem));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}
.tick-dialog::backdrop { background: rgba(8, 8, 8, 0.45); }
.tick-dialog p { margin: 0 0 0.85rem; font-size: 1.05rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.35; }
.tick-dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

.audit-line { display: block; margin-top: 0.25rem; color: #5c5c5c; font-size: 0.85rem; }
.team-table { width: 100%; margin: 1rem 0 1.5rem; }
.team-table th, .team-table td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid #e4e4e4; }
.check-line { display: flex; gap: 0.45rem; align-items: center; }

/* Checklist history stays closed until needed, but the control is easy to find. */
.audit-history {
    margin: 1rem 0;
    padding: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.audit-summary {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
    font-size: 0.9rem;
    font-weight: 700;
}
.audit-summary:hover,
.audit-summary:focus-visible { color: var(--gold-ink); }
.audit-summary::-webkit-details-marker { display: none; }
.audit-summary-icon {
    color: var(--gold-ink);
    font-size: 1.1rem;
    line-height: 1;
}
.audit-summary-title { line-height: 1.2; }
.audit-count { color: var(--muted); font-weight: 600; }
.audit-content {
    margin: 0 1rem 0.85rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border-top: 1px solid var(--line);
}
.audit-list {
    margin: 0.45rem 0 0;
    padding-left: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.audit-item {
    padding: 0.4rem 0.55rem;
    background: #f7f5f0;
    border: 1px solid #efebe3;
    border-radius: 7px;
}
.audit-item-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 0.5rem;
}
.audit-step {
    font-weight: 700;
    color: var(--ink);
    font-size: 0.88rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.audit-action {
    display: inline-block;
    font-weight: 600;
    font-size: 0.72rem;
    line-height: 1.2;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #eee;
    color: #555;
    white-space: nowrap;
}
.audit-action-complete { background: #e8f3ec; color: var(--ok); }
.audit-action-claim,
.audit-action-add { background: var(--tint); color: var(--gold-ink); }
.audit-action-reopen,
.audit-action-cancel,
.audit-action-delete { background: #f0f0f0; color: #666; }
.audit-action-neutral { background: #eee; color: #555; }
.audit-item-meta {
    margin-top: 0.18rem;
    font-size: 0.76rem;
    line-height: 1.35;
    color: var(--muted);
    font-weight: 400;
}

/* ---- Portal entry + customer (buyer) portal ---- */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.entry-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; }
.entry-card h2 { margin: 0; font-size: 1.4rem; letter-spacing: -0.02em; }
.entry-card p { margin: 0; }
.entry-card .button { align-self: flex-start; margin-top: auto; }
.entry-customer { border-top: 4px solid var(--gold); }
.entry-pro { border-top: 4px solid var(--bar); }
.entry-kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; font-weight: 600; color: var(--gold-ink); }
.cust-who { color: #c8c8c8; font-size: 0.9rem; }
.cust-dossier { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.3rem; margin: 1rem 0; }
.cust-head h2 { margin: 0.1rem 0 0.2rem; font-size: 1.5rem; letter-spacing: -0.02em; }
.cust-kicker { margin: 0; color: var(--muted); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; }
.cust-where { background: var(--tint); border: 1px solid #efe3bc; border-radius: 10px; padding: 0.8rem 0.95rem; margin: 0.9rem 0; }
.cust-where p { margin: 0.35rem 0 0; }
.cust-stage { display: inline-block; border-radius: 999px; padding: 0.15rem 0.65rem; font-size: 0.82rem; font-weight: 600; background: #fff; box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold-ink); }
.cust-stage-delivered, .cust-stage-ready { background: var(--ok); color: #fff; box-shadow: none; }
.cust-progress { color: var(--muted); font-size: 0.88rem; }
.cust-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.cust-step { display: flex; align-items: flex-start; gap: 0.75rem; border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.7rem; }
.cust-dot { flex: 0 0 1.5rem; height: 1.5rem; border-radius: 999px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 0.85rem; font-weight: 700; color: #fff; margin-top: 0.1rem; }
.cust-copy { flex: 1; display: grid; gap: 0.1rem; }
.cust-label { font-weight: 600; }
.cust-hint { color: var(--muted); font-size: 0.88rem; }
.cust-state { font-size: 0.8rem; font-weight: 600; color: var(--muted); white-space: nowrap; margin-top: 0.2rem; }
.cust-step.is-done .cust-dot { background: var(--ok); border-color: var(--ok); }
.cust-step.is-done .cust-state { color: var(--ok); }
.cust-step.is-current { border-color: var(--gold); background: var(--tint); }
.cust-step.is-current .cust-dot { border-color: var(--gold); }
.cust-step.is-current .cust-state { color: var(--gold-ink); }
.cust-step.is-upcoming { opacity: 0.75; }
.cust-contact { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1.05rem; }
.cust-contact h2 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.cust-contact p { margin: 0; }

.entry-grid-solo { max-width: 420px; }
.cust-shell { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem 1.5rem; margin: 1rem 0; }
.cust-shell h1, .cust-shell h2 { margin: 0.15rem 0 0.4rem; letter-spacing: -0.02em; }
.cust-congrats { font-size: 1.05rem; font-weight: 600; color: var(--gold-ink); margin: 0.6rem 0 0.4rem; }
.cust-leverbon { margin-top: 1.1rem; padding: 0.9rem 1rem; border: 1px solid #efe3bc; background: var(--tint); border-radius: 10px; }
.cust-leverbon h2, .cust-leverbon h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.cust-leverbon p { margin: 0 0 0.6rem; }

/* Active step claimed by a colleague: only the claimer can Afvinken/Annuleren. */
.tick-box input:disabled + .box { cursor: not-allowed; opacity: 0.7; }
.tick-box input:disabled { cursor: not-allowed; }

/* Te koop list: ref + TK/CS prefix side by side (no Nr/Status/Koper) */
.tekkoop-table .ref-with-prefix {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.dossier-meta-line {
  margin: 0.35rem 0 0;
  color: var(--muted, #666);
  font-size: 0.95rem;
}

/* Klant view detail (customer-safe fields only) */
.klant-fields { margin: 1.1rem 0 0; display: grid; gap: 0.85rem; }
.klant-fields > div { margin: 0; }
.klant-fields dt { margin: 0; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: #667; }
.klant-fields dd { margin: 0.2rem 0 0; font-size: 1.02rem; }
.klant-details { line-height: 1.45; }

/* ---- Klantportaal (staff): purchases + team progress circle ---- */
.kp-detail-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 1.25rem;
  align-items: start;
  margin: 1rem 0 1.5rem;
}
@media (max-width: 820px) {
  .kp-detail-grid { grid-template-columns: 1fr; }
}
.kp-team-progress {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.15rem 1.2rem 1.25rem;
}
.kp-team-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-ink);
}
.kp-team-progress h2 {
  margin: 0.2rem 0 0.85rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.kp-circle-wrap { display: flex; justify-content: center; margin: 0.4rem 0 0.9rem; }
.kp-circle {
  --kp-pct: 0;
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(closest-side, #fff 72%, transparent 73% 100%),
    conic-gradient(var(--gold) calc(var(--kp-pct) * 1%), #ececec 0);
  animation: kp-circle-in 0.9s ease-out both;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}
.kp-circle-value {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--bar);
}
.kp-circle-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
@keyframes kp-circle-in {
  from { filter: saturate(0.6); transform: scale(0.92); opacity: 0.55; }
  to { filter: none; transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .kp-circle { animation: none; }
}
.kp-step-dots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.kp-step-dots li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--muted);
}
.kp-step-dots li.is-done { color: #1a1a1a; font-weight: 600; }
.kp-dot {
  flex: 0 0 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: #fff;
  margin-top: 0.05rem;
}
.kp-step-dots li.is-done .kp-dot {
  background: var(--ok);
  border-color: var(--ok);
}
.kp-customer-panel { margin: 0; }
.kp-type {
  display: inline-block;
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--tint);
  color: var(--gold-ink);
  box-shadow: inset 0 0 0 1px #efe3bc;
}
.kp-type-part { background: #f3f3f3; color: #555; box-shadow: inset 0 0 0 1px #ddd; }
.kp-list-pct {
  --kp-pct: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}
.kp-list-bar {
  width: 3.2rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #eee;
  position: relative;
  overflow: hidden;
}
.kp-list-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--kp-pct) * 1%);
  background: var(--gold);
  border-radius: inherit;
  transition: width 0.6s ease-out;
}


/* Internal footer: Team + Afmelden (not top-nav folders) */
.internal-foot {
  margin-top: 2.5rem;
  padding: 1rem 1.5rem 1.4rem;
  background: var(--bar);
  color: #fff;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
  align-items: center;
  max-width: none;
}
.foot-nav a {
  text-decoration: none;
  color: #d8d8d8;
  font-weight: 500;
}
.foot-nav a:hover { color: var(--gold); }
.foot-nav .nav-out button {
  color: #d8d8d8;
}
.foot-nav .nav-out button:hover { color: var(--gold); }

/* Klantview CTA on Verkocht dossier */
.dossier-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: center;
  margin: 0 0 1rem;
}
.btn-klantview {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  background: var(--gold);
  color: #111 !important;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
.btn-klantview:hover {
  filter: brightness(1.05);
  color: #000 !important;
}




/* Verkocht dossier: title left; subtle tag stack right */
h1.dossier-section-title {
  margin: 0 0 0.85rem;
}
h1.dossier-section-title a {
  color: inherit;
  text-decoration: none;
}
h1.dossier-section-title a:hover {
  color: var(--gold-ink);
}
.dossier-page-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin: 0 0 1rem;
}
.dossier-page-main {
  flex: 1 1 auto;
  min-width: 0;
}
.dossier-page-main .dossier-head {
  margin-bottom: 0;
}
.dossier-side-tags {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  min-width: 7.5rem;
  max-width: 11rem;
  align-self: flex-start;
}
.dossier-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #444;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}
.dossier-tag-progress {
  color: #555;
  font-variant-numeric: tabular-nums;
}
.dossier-tag-klant {
  background: #fff;
  border-color: var(--line);
  color: #444 !important;
  font-weight: 600;
}
.dossier-tag-klant:hover {
  color: var(--gold-ink) !important;
  border-color: #ddd;
}
.dossier-tag-historiek {
  position: relative;
  margin: 0;
}
.dossier-tag-historiek > summary.dossier-tag {
  list-style: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
.dossier-tag-historiek > summary.dossier-tag::-webkit-details-marker { display: none; }
.dossier-tag-ico {
  color: var(--gold-ink);
  font-size: 0.85em;
}
.dossier-tag-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  width: min(24rem, 82vw);
  max-height: 18rem;
  overflow: auto;
  padding: 0.75rem 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  text-align: left;
}
.dossier-tag-ghost {
  color: var(--muted);
  font-weight: 500;
}
@media (max-width: 720px) {
  .dossier-page-bar { flex-direction: column; }
  .dossier-side-tags {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: none;
    width: 100%;
  }
  .dossier-tag-panel { left: 0; right: auto; }
}


/* Second open task under a claimed next action */
.next-action-upcoming {
  margin-top: 0.65rem;
  opacity: 0.96;
  border-style: dashed;
  background: #fafafa;
}
.next-action-upcoming .next-kicker {
  background: #333;
}
.next-action-upcoming .next-balloon {
  background: #fff;
  border: 1px dashed #cfcfcf;
}
.next-action-upcoming .next-balloon::after {
  display: none;
}
.next-action-upcoming h2 {
  font-size: 1.15rem;
}


/* Eigen stap: button clear of the input bar */
.custom-add {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.85rem;
}
.custom-add label {
  display: block;
  width: 100%;
}
.custom-add input[name="label"] {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  box-sizing: border-box;
}
.custom-add button {
  margin-top: 0.15rem;
}

/* Eigen stap: × delete control top-right */
.step.is-custom {
  position: relative;
  padding-right: 2.4rem;
}
.custom-delete {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  margin: 0;
  z-index: 1;
}
.custom-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  box-shadow: none;
}
.custom-delete-btn:hover,
.custom-delete-btn:focus-visible {
  background: #f3f3f3;
  color: #111;
  border: none;
}
.custom-delete-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}


/* Verkocht list: next step chip (dossier-style, compact) */
.next-step-cell {
  min-width: 12rem;
  max-width: 18rem;
}
.list-next {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  background: linear-gradient(180deg, #fffaf0 0%, #fff 85%);
  border: 1px solid #e6d48a;
  border-radius: 12px;
  padding: 0.4rem 0.55rem 0.48rem;
  box-shadow: 0 4px 12px rgba(212, 176, 55, 0.14);
  text-align: left;
}
.list-next.is-active {
  background: linear-gradient(180deg, #e7f7ec 0%, #f7fcf8 85%);
  border-color: #7dcea0;
  box-shadow: 0 4px 12px rgba(80, 170, 110, 0.14);
}
.list-next.is-done {
  background: #fff;
  border-color: var(--line);
  box-shadow: none;
  font-weight: 700;
  color: #1f7a3a;
  padding: 0.35rem 0.55rem;
}
.list-next-kicker {
  display: inline-block;
  background: #151515;
  color: #fff;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
}
.list-next.is-active .list-next-kicker {
  background: #1f7a3a;
}
.list-next-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #151515;
  line-height: 1.25;
}


/* TK/CS as plain letters in lists and dossiers */
.prefix-plain {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: inherit;
}

/* Login: ruimte tussen wachtwoordvak en Aanmelden-knop (2026-10-06) */
form.narrow > button[type="submit"] { margin-top: 1rem; }

/* ---- Verkocht list: filters, search, progress bar, open-since, missing info, mobile cards (2026-10-06) ---- */
.verkocht [hidden] { display: none !important; }
.verkocht-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin: 0 0 0.55rem;
}
.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  max-width: 100%;
}
.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.3rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  color: #3a3a3a;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.seg-btn:hover { background: var(--tint); color: #111; }
.seg-btn.is-on {
  background: var(--bar);
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--gold);
}
.seg-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.seg-onbetaald .seg-label::before,
.seg-betaald .seg-label::before,
.seg-geleverd .seg-label::before {
  content: "";
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.38rem;
  border-radius: 50%;
  vertical-align: 0.02em;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.seg-onbetaald .seg-label::before { background: #b7e4c7; }
.seg-betaald .seg-label::before { background: #1b4332; }
.seg-geleverd .seg-label::before { background: #ffe66d; }
.seg-btn.is-on .seg-label::before { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55); }
.seg-count {
  display: inline-block;
  min-width: 1.45rem;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: #f1f1f1;
  color: #555;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.seg-btn.is-on .seg-count { background: var(--gold); color: #111; }
.verkocht-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 1 27rem;
  min-width: 0;
}
.verkocht-search input[type="search"] {
  flex: 1 1 auto;
  width: 100%; /* compressible: never widens the page on phones */
  min-width: 0;
  min-height: 2.45rem;
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
}
.verkocht-search-btn {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
}
.verkocht-search-btn:focus-visible,
.verkocht-reset:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.verkocht-result {
  margin: 0 0 0.55rem;
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.verkocht-result:empty { margin: 0; min-height: 0; }
.verkocht-reset {
  margin-left: 0.55rem;
  color: var(--gold-ink);
  font-weight: 600;
}
.verkocht-empty {
  margin: 0;
  padding: 1.2rem 1rem;
  color: var(--muted);
  text-align: center;
}
.verkocht-table .celllink:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
  border-radius: 6px;
}

/* Progress: small bar + percentage, "x/total" as small text. <progress> needs no inline style (CSP). */
.list-progress {
  display: grid;
  grid-template-columns: 4.6rem auto;
  align-items: center;
  column-gap: 0.45rem;
  row-gap: 0.05rem;
  min-width: 6.8rem;
}
.list-progress-bar {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 0.45rem;
  border: 0;
  border-radius: 999px;
  background: #ececec;
  color: var(--gold);
  overflow: hidden;
}
.list-progress-bar::-webkit-progress-bar { background: #ececec; border-radius: 999px; }
.list-progress-bar::-webkit-progress-value { background: var(--gold); border-radius: 999px; }
.list-progress-bar::-moz-progress-bar { background: var(--gold); border-radius: 999px; }
.list-progress.is-complete .list-progress-bar { color: #1f7a3a; }
.list-progress.is-complete .list-progress-bar::-webkit-progress-value { background: #1f7a3a; }
.list-progress.is-complete .list-progress-bar::-moz-progress-bar { background: #1f7a3a; }
.list-progress-pct {
  font-weight: 700;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.list-progress-of {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

/* Next step: claimer + how long open. >3 days orange, >7 days red. */
.list-next-age {
  display: inline-block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
}
.list-next-age.age-warn,
.list-next-age.age-late {
  border-radius: 999px;
  padding: 0.02rem 0.45rem;
}
.list-next-age.age-warn { background: #fff0dc; color: #8f4a00; box-shadow: inset 0 0 0 1px #f2c27f; }
.list-next-age.age-late { background: #fde7e7; color: #a3161a; box-shadow: inset 0 0 0 1px #eba3a3; }
.list-next.is-active .list-next-kicker { text-transform: none; letter-spacing: 0.02em; font-size: 0.68rem; }
.list-next.is-warn:not(.is-active) { border-color: #f2c27f; }
.list-next.is-late:not(.is-active) { border-color: #eba3a3; }
.list-next-go { display: none; }

/* Missing data: subtle orange outline, not alarming. */
.missing-tag {
  display: inline-block;
  padding: 0.04rem 0.5rem;
  border: 1px solid #ebbd7c;
  border-radius: 999px;
  background: #fffaf2;
  color: #8f5208;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
}

/* Mobile (< 800px): compact header, scrollable filter buttons, rows become tappable cards. */
@media (max-width: 800px) {
  .app-internal .mast {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
  }
  .app-internal .mark { flex: 0 0 auto; }
  .app-internal .mark-logo { height: 26px; max-width: 96px; }
  .app-internal .nav { flex-wrap: nowrap; gap: 0 0.8rem; justify-content: flex-end; font-size: 0.82rem; letter-spacing: 0; }
  .app-internal .nav a { letter-spacing: 0; white-space: nowrap; }
  .app-internal .nav a,
  .app-internal .nav-out button { padding: 0.45rem 0; }

  .verkocht-tools { flex-direction: column; align-items: stretch; gap: 0.55rem; }
  /* Four filter buttons wrap into a 2 x 2 grid: all visible, large tap targets. */
  .seg {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    border-radius: 14px;
  }
  .seg-btn { justify-content: center; min-height: 2.6rem; padding: 0.35rem 0.6rem; border-radius: 11px; }
  .verkocht-search { flex: 1 1 auto; }
  .verkocht-search input[type="search"] { font-size: 16px; } /* no iOS zoom on focus */

  .verkocht .table-wrap { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .verkocht-table,
  .verkocht-table tbody { display: block; width: 100%; }
  .verkocht-table thead { display: none; } /* cards carry their own labels */
  .verkocht-table tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "nr status prefix"
      "vehicle vehicle ref"
      "buyer buyer buyer"
      "date date amount"
      "progress progress progress"
      "next next next";
    margin: 0 0 0.75rem;
    padding: 0.55rem 0 0.2rem 0.25rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
  }
  .verkocht-table tbody tr:hover { background: #fff; }
  .verkocht-table tbody tr:active { background: var(--tint); }
  .verkocht-table td { display: block; border: 0; padding: 0; min-width: 0; }
  .verkocht-table .celllink { min-height: 0; padding: 0.15rem 0.85rem; }
  .verkocht-table .c-nr { grid-area: nr; }
  .verkocht-table .c-status { grid-area: status; }
  .verkocht-table .c-status .celllink { padding-left: 0; }
  .verkocht-table .c-prefix { grid-area: prefix; }
  .verkocht-table .c-prefix .celllink { justify-content: flex-end; }
  .verkocht-table .c-nr .seq-num { font-size: 1.02rem; }
  .verkocht-table .c-vehicle { grid-area: vehicle; }
  .verkocht-table .c-vehicle .celllink { font-weight: 600; font-size: 1rem; line-height: 1.3; padding-top: 0.35rem; }
  .verkocht-table .c-ref { grid-area: ref; }
  .verkocht-table .c-ref .celllink { justify-content: flex-end; color: var(--muted); font-size: 0.86rem; padding-top: 0.35rem; }
  .verkocht-table .c-buyer { grid-area: buyer; }
  .verkocht-table .c-buyer .celllink { font-size: 0.92rem; }
  .verkocht-table .c-date { grid-area: date; }
  .verkocht-table .c-amount { grid-area: amount; }
  .verkocht-table .c-date .celllink,
  .verkocht-table .c-amount .celllink { font-size: 0.82rem; }
  .verkocht-table .c-amount .celllink { justify-content: flex-end; }
  .verkocht-table .c-date .celllink::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .verkocht-table .c-progress { grid-area: progress; }
  .verkocht-table .c-progress .celllink { padding-top: 0.45rem; }
  .verkocht-table .list-progress { grid-template-columns: minmax(0, 1fr) auto auto; width: 100%; }
  .verkocht-table .list-progress-of { grid-column: auto; font-size: 0.78rem; }
  .verkocht-table .c-next { grid-area: next; }
  .verkocht-table .next-step-cell { min-width: 0; max-width: none; }
  .verkocht-table .c-next .celllink { padding: 0.45rem 0.6rem 0.65rem 0.85rem; gap: 0.25rem; }
  .verkocht-table .c-next .list-next { flex: 1 1 auto; min-width: 0; padding: 0.5rem 0.7rem 0.55rem; }
  .verkocht-table .list-next-go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.6rem;
    color: var(--gold-ink);
    font-size: 1.7rem;
    line-height: 1;
  }
  /* Whole card opens the dossier: the next-step link stretches over the card. */
  .verkocht-table .c-next .celllink::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
  }
  .verkocht-table .c-next .celllink:focus-visible { outline: 0; }
  .verkocht-table .c-next .celllink:focus-visible::after { box-shadow: inset 0 0 0 2px var(--gold); }
}

/* Vehicle abbreviation in list columns (full name in title + for screen readers) (2026-10-06 c) */
.veh-short { white-space: nowrap; }

/* Te koop list on the Verkocht layout: same classes, a few extra cells (2026-10-06 d) */
/* Te koop status (Coming soon / In stock): one neutral grey-outline pill, no colour meaning (2026-10-06 f) */
.sold-badge.stock-pill { background: #fff; color: #4a4a4a; font-weight: 600; box-shadow: inset 0 0 0 1px #cfcfcf; }
.verkocht-table .c-country .celllink { white-space: nowrap; }
@media (max-width: 800px) {
  .seg.seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .verkocht-table.is-tekoop tbody tr {
    grid-template-areas:
      "nr status prefix"
      "vehicle vehicle country"
      "date date amount"
      "progress progress progress"
      "next next next";
  }
  .verkocht-table.is-tekoop .c-nr .ref-num { font-size: 1.02rem; }
  .verkocht-table .c-country { grid-area: country; }
  .verkocht-table .c-country .celllink { justify-content: flex-end; color: var(--muted); font-size: 0.86rem; padding-top: 0.35rem; }
}

/* Staff header: active page = short gold line under the nav item, like the website menu (2026-10-06 e) */
.app-internal .nav a { position: relative; }
.app-internal .nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.3rem;
  width: 1.6rem;
  max-width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--gold); /* #d4b037 */
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.18s ease;
}
.app-internal .nav a.is-current { color: #fff; }
.app-internal .nav a.is-current::after { transform: translateX(-50%) scaleX(1); }
.app-internal .nav a:not(.is-current):hover::after { transform: translateX(-50%) scaleX(0.6); opacity: 0.6; }
.app-internal .nav a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
@media (max-width: 800px) {
  .app-internal .nav a::after { bottom: 0.1rem; width: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .app-internal .nav a::after { transition: none; }
}

/* Manual fills for "aan te vullen" fields (2026-10-06 f) */
.verkocht-table .c-amount .celllink { font-variant-numeric: tabular-nums; white-space: nowrap; }
.verkocht-table .fill-link { position: relative; z-index: 1; } /* above the mobile whole-card link */
.fill-link .missing-tag { cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease; }
.fill-plus {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.15rem; height: 1.15rem; border-radius: 999px;
  border: 1px solid #ebbd7c; color: #8f5208; font-size: 0.8rem; font-weight: 700; line-height: 1;
}
.fill-link:hover .missing-tag,
.fill-link:focus-visible .missing-tag { background: #fff0dc; border-color: #d99a3d; }
.fill-link:hover .fill-plus,
.fill-link:focus-visible .fill-plus { background: #fff0dc; border-color: #d99a3d; }
.manual-val { text-decoration: underline dotted #b9a35a; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.manual-val.has-import { text-decoration-color: #d99a3d; }
.verkocht-table td.has-fill-edit { position: relative; }
.verkocht-table td.has-fill-edit .celllink { padding-right: 1.9rem; }
.fill-edit {
  position: absolute; z-index: 1; right: 0.3rem; top: 1.4rem; transform: translateY(-50%); /* centre of the 2.8rem cell link (cells are top-aligned) */
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; border-radius: 999px;
  color: var(--gold-ink); text-decoration: none; font-size: 0.85rem;
}
.fill-edit:hover, .fill-edit:focus-visible { background: var(--tint); outline: 0; box-shadow: inset 0 0 0 1px var(--gold); }

.fill-page { max-width: 34rem; }
.fill-back { margin: 0 0 0.4rem; font-size: 0.9rem; }
.fill-back a::before { content: "‹ "; }
.fill-context { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; margin: 0.2rem 0 0.8rem; }
.fill-dossier { font-size: 0.88rem; }
.fill-lead { color: var(--muted); margin: 0 0 0.6rem; }
.fill-import { margin: 0 0 0.6rem; padding: 0.45rem 0.7rem; border-radius: 8px; background: #fffaf2; border: 1px solid #f1d6ad; font-size: 0.9rem; }
.fill-form { display: grid; gap: 0.4rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.fill-form label { font-weight: 600; }
.fill-form input[type="text"], .fill-form input[type="date"] { width: 100%; font-size: 1rem; }
.fill-euro { display: flex; align-items: center; gap: 0.45rem; }
.fill-euro input { flex: 1 1 auto; min-width: 0; }
.fill-hint { margin: 0; color: var(--muted); font-size: 0.82rem; }
.fill-error { margin: 0; color: #a3161a; font-weight: 600; font-size: 0.9rem; }
.fill-form input[aria-invalid="true"] { border-color: #d46a6a; box-shadow: 0 0 0 1px #d46a6a; }
.fill-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 0.5rem; }
.fill-clear { margin-top: 0.9rem; }
@media (max-width: 800px) {
  .fill-form input[type="text"], .fill-form input[type="date"] { font-size: 16px; } /* no iOS zoom */
  .fill-actions button { flex: 1 1 auto; min-height: 2.8rem; }
  .verkocht-table td.has-fill-edit .celllink { padding-right: 2.2rem; }
  .fill-edit { top: 50%; }
}

/* Dossier phases: completed = collapsed + green check, current = gold border + label (2026-10-06 f) */
.phase.is-current { border: 2px solid var(--gold); padding: calc(0.9rem - 1px) calc(1rem - 1px); }
.phase.is-complete { background: #fbfdfb; }
.phase.is-complete .phase-title h2 { color: #3d3d3d; }
.phase.is-complete > summary .phase-count,
.step-group.is-complete .step-group-head .phase-count { color: #1f6b3a; }
.phase-state {
  display: inline-flex; align-items: center; gap: 0.3rem;
  border-radius: 999px; padding: 0.12rem 0.55rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap;
}
.phase-state-done { background: #e8f4ec; color: #1f6b3a; }
.phase-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1rem; height: 1rem; border-radius: 999px;
  background: #2e8b57; color: #fff; font-size: 0.68rem; line-height: 1;
}
.phase-state-current { background: var(--gold); color: #1a1a1a; }
.step-group-details > summary { cursor: pointer; list-style: none; }
.step-group-details > summary::-webkit-details-marker { display: none; }
.step-group-details > summary:focus-visible,
.phase > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.step-group.is-current { box-shadow: inset 3px 0 0 var(--gold), 0 0 0 2px var(--gold); }
.step-group.is-complete { background: #f7fbf8; box-shadow: inset 3px 0 0 #2e8b57; }
.klaarzetten-details.is-complete { background: #f7fbf8; }
.klaarzetten-summary .phase-state { margin-left: auto; }
.next-now-kicker { font-weight: 500; }
@media (max-width: 800px) {
  .phase-state { font-size: 0.74rem; }
}

/* ---- Lifecycle Te koop -> Verkocht -> Archief (2026-10-06 g) ---- */
.lc-list-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.lc-list-head { margin-bottom: 0.85rem; }
.lc-list-head h1 { margin-bottom: 0; }
.lc-new-btn { white-space: nowrap; }
.lc-unknown { white-space: nowrap; }
.lc-type-box { margin: 0.8rem 0; padding: 0.85rem 1rem; background: #fffaf2; border: 1px solid #ebbd7c; border-radius: 14px; }
.lc-type-box .warn-text { margin: 0 0 0.5rem; color: #8f5208; }
.lc-type-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.lc-type-choice { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.lc-type-choice legend { font-weight: 600; padding: 0; margin-bottom: 0.3rem; }
.lc-type-choice label { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; min-height: 2.2rem; }
/* Buitenlandse wagen? (2026-10-06): unknown = .lc-type-box prompt; known = one compact line, change via <details>. */
.lc-foreign-box .missing-tag { vertical-align: 1px; }
.lc-foreign-line { margin: 0.6rem 0 0.8rem; padding: 0.45rem 0.9rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 0.92rem; }
.lc-foreign-line > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.55rem; list-style: none; }
.lc-foreign-line > summary::-webkit-details-marker { display: none; }
.lc-foreign-line .step-note { margin: 0; }
.lc-foreign-label { color: var(--muted); }
.lc-foreign-change { margin-left: auto; font-size: 0.82rem; color: var(--muted); text-decoration: underline; }
.lc-foreign-line[open] > summary { margin-bottom: 0.45rem; }
.step-group-prompt a { color: #8f5208; }
.lc-action {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem 1.2rem; flex-wrap: wrap;
  margin: 1.6rem 0 0.8rem; padding: 1rem 1.15rem; background: #fff; border: 1px solid var(--line); border-radius: 18px;
}
.lc-action h2 { margin: 0 0 0.15rem; font-size: 1.1rem; }
.lc-action .lead { margin: 0; max-width: 40rem; }
.lc-action-copy { flex: 1 1 18rem; min-width: 0; }
.lc-action-btn { white-space: nowrap; }
.lc-action-sold { border-color: #e6d48a; background: linear-gradient(180deg, #fffaf0 0%, #fff 80%); }
.lc-action-close { border-color: #d9d9d9; }
.lc-action-reopen { border-style: dashed; }
.lc-tekoop { border-style: dashed; }
.lc-tekoop > summary { flex-wrap: wrap; }
.lc-readonly { background: #f0f0f0; color: #555; }
.lc-sold-line { flex: 1 1 100%; order: 5; font-size: 0.8rem; color: var(--muted); }
.lc-tekoop-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.6rem; }
.lc-tekoop-link { font-size: 0.85rem; color: var(--muted); }
.lc-ro-steps { list-style: none; margin: 0 0 0.8rem; padding: 0; display: grid; gap: 0.2rem; }
.lc-ro-step { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.55rem; padding: 0.35rem 0.1rem; border-bottom: 1px solid #f1f1f1; }
.lc-ro-step:last-child { border-bottom: 0; }
.lc-ro-mark { flex: 0 0 1.1rem; font-weight: 700; color: #9a9a9a; text-align: center; }
.lc-ro-step.is-done > .lc-ro-mark, .lc-ro-subs .is-done > .lc-ro-mark { color: var(--ok); }
.lc-ro-label { flex: 1 1 14rem; min-width: 0; font-size: 0.92rem; }
.lc-ro-step:not(.is-done) > .lc-ro-label { color: #555; }
.lc-ro-who { font-size: 0.76rem; color: var(--muted); }
.lc-ro-subs { list-style: none; flex: 1 1 100%; margin: 0.2rem 0 0 1.65rem; padding: 0; font-size: 0.85rem; display: grid; gap: 0.1rem; }
.lc-sub-h { font-size: 0.9rem; margin: 0.9rem 0 0.4rem; color: #444; }
.lc-page { max-width: 38rem; }
.lc-exists ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.lc-exists p { margin: 0; }
.lc-optional { font-weight: 400; color: var(--muted); }
.lc-form .lc-type-choice { margin-top: 0.5rem; }
.lc-confirm-q { font-weight: 600; margin: 0 0 0.3rem; }
.lc-confirm-list { margin: 0 0 0.6rem; padding-left: 1.15rem; color: #444; font-size: 0.92rem; }
.lc-confirm.is-warning { border-color: #ebbd7c; background: #fffaf2; }
.lc-warning { margin: 0 0 0.4rem; padding: 0.7rem 0.85rem; border-radius: 10px; background: #fff1dc; color: #7a4506; font-weight: 600; border: 1px solid #ebbd7c; }
.lc-open-steps summary { cursor: pointer; font-size: 0.88rem; color: #7a4506; }
.lc-open-steps ul { margin: 0.3rem 0 0.4rem; padding-left: 1.15rem; font-size: 0.88rem; }
.lc-progress-note { font-size: 0.82rem; color: var(--muted); }
.lc-from-flag { font-size: 0.68rem; vertical-align: middle; }
.lc-open-pill, .lc-done-pill { display: inline-block; padding: 0.06rem 0.55rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; white-space: nowrap; }
.lc-open-pill { background: #fff1dc; color: #7a4506; box-shadow: inset 0 0 0 1px #ebbd7c; }
.lc-done-pill { background: #e8f3ec; color: var(--ok); }
.lc-archived-pill { color: #555; }
.lc-closed-box { margin: 0.8rem 0; padding: 0.9rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.lc-closed-line { margin: 0 0 0.5rem; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.lc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.4rem 1rem; margin: 0 0 0.4rem; }
.lc-facts div { min-width: 0; }
.lc-facts dt { font-size: 0.74rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.lc-facts dd { margin: 0; overflow-wrap: anywhere; }
.lc-mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.86em; }
.lc-history { margin-top: 1rem; }
.phase-tag { display: inline-block; margin-right: 0.35rem; padding: 0.08rem 0.42rem; border-radius: 4px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 1px; }
.phase-tag-tekoop { background: #eef3fb; color: #2d4f86; }
.phase-tag-verkocht { background: var(--tint); color: var(--gold-ink); }
.audit-action-lifecycle { background: #111; color: #fff; }
.lc-diag .row-actions form { margin: 0; }
.lc-dist { list-style: none; padding: 0; margin: 0 0 0.6rem; display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font-size: 0.88rem; }
.lc-diag-table { width: 100%; font-size: 0.88rem; }
.verkocht-table.is-archief .c-closer .celllink, .verkocht-table.is-archief .c-date .celllink { white-space: nowrap; color: #444; font-size: 0.88rem; }
.verkocht-table.is-archief .c-open .celllink { justify-content: space-between; gap: 0.4rem; }
@media (max-width: 800px) {
  .verkocht-table.is-archief tbody tr {
    grid-template-areas:
      "nr nr prefix"
      "vehicle vehicle vehicle"
      "buyer buyer buyer"
      "date date date"
      "closer closer closer"
      "open open open";
    padding-bottom: 0.45rem;
  }
  .verkocht-table.is-archief .c-closer { grid-area: closer; }
  .verkocht-table.is-archief .c-date .celllink, .verkocht-table.is-archief .c-closer .celllink { gap: 0.45rem; white-space: normal; }
  .verkocht-table.is-archief .c-closer .celllink { font-size: 0.82rem; }
  .verkocht-table.is-archief .c-closer .celllink::before { content: attr(data-label); color: var(--muted); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }
  /* Admin has 6 header items: let the nav wrap to a second line instead of cutting off Opruimen / Afmelden. */
  .app-internal .nav { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; row-gap: 0; }
  .verkocht-table.is-archief .c-open { grid-area: open; }
  .verkocht-table.is-archief .c-open .celllink { padding-top: 0.35rem; }
  .verkocht-table.is-archief .list-next-go { position: static; }
  .verkocht-table.is-archief .c-open .celllink::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
  .lc-action { flex-direction: column; align-items: stretch; }
  .lc-action-btn { text-align: center; min-height: 2.75rem; display: flex; align-items: center; justify-content: center; }
  .lc-list-head .lc-new-btn { min-height: 2.6rem; display: inline-flex; align-items: center; }
  .lc-type-choice label { min-height: 2.6rem; }
  .lc-form input[type="text"] { font-size: 16px; } /* no iOS zoom */
}

/* Header title "Team portaal" next to the logo (2026-10-06 h). Thin divider, small light caps,
   vertically centred on the logo. Hidden on phones. */
.mast-brand { display: flex; align-items: center; gap: 1rem; flex: 0 0 auto; min-width: 0; }
.mast-title {
    display: inline-block;
    padding: 0.4rem 0 0.4rem 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.24);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}
@media (max-width: 800px) {
  .mast-brand { gap: 0.65rem; }
  .mast-title { padding: 0.3rem 0 0.3rem 0.65rem; font-size: 0.6rem; letter-spacing: 0.16em; }
}
@media (max-width: 560px) {
  .mast-title { display: none; }
}

/* Staff header menus (2026-10-06 h): Te koop + Verkocht stay top-level; "Meer" (Archief / Team / Opruimen)
   and the staff name (Afmelden) are <details> dropdowns: work without JS, no inline CSS/JS (strict CSP).
   internal.js only closes them on outside click / Escape and keeps one open. */
.app-internal .mast { position: relative; z-index: 30; }
.app-internal .nav { flex-wrap: nowrap; align-items: center; gap: 0 1.35rem; }
.nav-menu { position: relative; }
.nav-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
  cursor: pointer;
  color: #d8d8d8;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.2rem 0;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-menu-btn::-webkit-details-marker { display: none; }
.nav-menu-btn::marker { content: ""; }
.nav-menu-btn:hover,
.nav-menu[open] > .nav-menu-btn { color: #fff; }
.nav-menu-btn:hover .nav-chev { color: var(--gold); }
.nav-menu-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.nav-chev {
  display: inline-block;
  width: 0.38rem;
  height: 0.38rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
  opacity: 0.75;
  transition: transform 0.18s ease;
}
.nav-menu[open] > .nav-menu-btn .nav-chev { transform: translateY(0.1rem) rotate(225deg); color: var(--gold); opacity: 1; }
/* "Meer" carries the same short gold line as the links when Archief / Team / Opruimen is open. */
.nav-menu-label { position: relative; }
.nav-more.is-current > .nav-menu-btn { color: #fff; }
.nav-more.is-current .nav-menu-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.3rem;
  width: 1.6rem;
  max-width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transform: translateX(-50%);
}
/* Staff name: quiet pill on the far right. */
.nav-user .nav-menu-btn {
  padding: 0.32rem 0.75rem 0.32rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}
.nav-user .nav-menu-btn:hover,
.nav-user[open] > .nav-menu-btn { border-color: rgba(212, 176, 55, 0.7); }
.nav-user-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
.nav-user-initials { display: none; }
/* Dropdown panel: dark card, right-aligned under its button, above the page. */
.nav-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 1.4rem); /* just below the black bar */
  z-index: 60;
  display: grid;
  gap: 0.1rem;
  min-width: 11.5rem;
  max-width: calc(100vw - 2rem);
  padding: 0.4rem;
  background: var(--bar);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.2);
}
.app-internal .nav .nav-menu-panel a,
.app-internal .nav .nav-menu-panel .nav-out button {
  display: block;
  width: 100%;
  padding: 0.62rem 0.9rem;
  border-radius: 8px;
  color: #d8d8d8;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: left;
  white-space: nowrap;
  background: none;
}
.app-internal .nav .nav-menu-panel a::after { display: none; }
.app-internal .nav .nav-menu-panel a:hover,
.app-internal .nav .nav-menu-panel .nav-out button:hover { color: var(--gold); background: rgba(255, 255, 255, 0.06); }
.app-internal .nav .nav-menu-panel a.is-current { color: #fff; background: rgba(212, 176, 55, 0.14); box-shadow: inset 2px 0 0 var(--gold); }
.app-internal .nav .nav-menu-panel a:focus-visible,
.app-internal .nav .nav-menu-panel .nav-out button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.nav-menu-who {
  display: grid;
  gap: 0.15rem;
  margin: 0 0 0.25rem;
  padding: 0.55rem 0.9rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-menu-who span { color: rgba(255, 255, 255, 0.5); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; }
.nav-menu-who strong { color: #fff; font-weight: 500; white-space: nowrap; }
@media (max-width: 800px) {
  .app-internal .nav { gap: 0 1rem; }
  .app-internal .nav > a,
  .nav-menu-btn { min-height: 2.75rem; display: inline-flex; align-items: center; padding: 0; } /* 44px tap targets */
  .app-internal .mast { padding-top: 0.3rem; padding-bottom: 0.3rem; }
  .app-internal .nav > a::after { bottom: 0.55rem; }
  .nav-more.is-current .nav-menu-label::after { bottom: -0.35rem; width: 1.25rem; }
  .nav-menu-panel { top: calc(100% + 0.6rem); }
  .nav-user .nav-menu-btn { min-height: 2.4rem; padding: 0 0.7rem 0 0.8rem; } /* tablet: slim pill */
}
@media (max-width: 640px) {
  /* Name -> initials in a small ring, so logo + 4 items fit on one row at 360-390px. */
  .nav-user .nav-menu-btn { gap: 0.35rem; min-height: 2.75rem; padding: 0; border: 0; border-radius: 0; }
  .nav-user-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* still the accessible name */
  .nav-user-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #fff;
  }
  .nav-user .nav-menu-btn:hover .nav-user-initials,
  .nav-user[open] .nav-user-initials { border-color: var(--gold); }
}
@media (max-width: 380px) {
  .app-internal .nav { gap: 0 0.75rem; }
  .app-internal .mark-logo { max-width: 84px; height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-chev { transition: none; }
}

/* Checklist dropdowns (klaarzetten, CS, import): sub-items follow the normal step flow (2026-10-06 g) */
.klaarzetten-item.is-active { background: #e7f7ec; border-color: #b7e0c4; }
.klaarzetten-item.is-active .tick-box input:checked + .box { background: #b6e7c4; border-color: #3e9a5c; box-shadow: inset 0 0 0 2px #fff; }
.klaarzetten-item.is-next { background: #fffaf0; border-color: var(--gold); }
.klaarzetten-item.is-active.is-next { background: #e7f7ec; border-color: #7dcea0; }
.klaarzetten-item .step-busy { font-size: 0.82rem; margin-top: 0.05rem; }
.klaarzetten-item .next-pill, .klaarzetten-item .busy-pill { font-size: 0.64rem; }
.sub-tick-actions { margin: 0.3rem 0 0.1rem 1.9rem; }
.sub-tick-actions button { font-size: 0.85rem; padding: 0.35rem 0.65rem; }
.group-tick .box { cursor: default; }
.group-tick.is-checked .box { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 2px #fff; }
.step-group-card.has-next { border-color: var(--gold); }
.step-group-card.is-na:not(.is-done) { background: #f7f7f7; }
.lc-ro-count { color: var(--muted); font-size: 0.8rem; font-weight: 600; margin-left: 0.25rem; }

/* ---- Phones: no horizontal page scroll (2026-10-06 mobilex) ----
   Cause: .dossier-head is a column flex box with align-items:flex-start, so the title <h1> took the
   max-content width of the nowrap vehicle name ("Model Y Premium Long Range AWD" = 449px at 390px wide)
   and iOS widened the layout viewport (grey strip right, title cut off left). Also: the Team table,
   the Historiek popover (82vw from a pill in the middle of the row) and long unbroken step labels. */
/* Safety net: clip (not a scroll container, so position:sticky keeps working); hidden as fallback. */
html, body { overflow-x: hidden; }
@supports (overflow-x: clip) {
  html, body { overflow-x: clip; }
}
/* Very long words / links wrap instead of widening the page (normal text is unaffected). */
body { overflow-wrap: break-word; }
/* Dossier header: children never wider than the column; long words may break. */
.dossier-head > * { max-width: 100%; min-width: 0; }
.dossier-title { min-width: 0; }
.dossier-vehicle, .dossier-extra { overflow-wrap: anywhere; }
/* Desktop: full name; phones (<= 640px): the list's short name (full name = title + accessible name). */
.dossier-vehicle-short { display: none; }
/* Checklist: flex/grid children may shrink; step titles, notes and group/phase headers wrap. */
.steps > *, .klaarzetten-checklist > *, .step-copy, .phase-title, .step-group-title, .lc-action-copy { min-width: 0; }
.step-title, .step-note, .step-helper, .step-busy, .phase-title h2, .step-group-title h3,
.klaarzetten-summary, .next-action h2, .lc-ro-label, .lc-ro-who, .audit-list, .fill-context, .lc-foreign-line summary { overflow-wrap: anywhere; }
/* Own horizontal scroll for tables that do not turn into cards (Team). */
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll.team-table-wrap { margin: 1rem 0 1.5rem; } /* the wrapper takes the table's margins (same spacing as before) */
.team-table-wrap > .team-table { margin: 0; }
@media (max-width: 720px) {
  /* Stacked header: the title wraps instead of an ellipsis; pills wrap below it. */
  .dossier-vehicle { white-space: normal; overflow: visible; text-overflow: clip; }
  .dossier-side-tags { position: relative; min-width: 0; }
  /* Historiek popover: anchored to the full-width pill row, never wider than the screen. */
  .dossier-tag-historiek { position: static; }
  .dossier-tag-panel { left: 0; right: auto; width: 100%; max-width: 24rem; }
}
@media (max-width: 640px) {
  .dossier-vehicle-full {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .dossier-vehicle-short { display: inline; }
}

/* ---- Te koop status badge follows the website (2026-10-06 mobilex) ----
   Coming soon = the existing white pill; Online = subtle green; Optie = gold/amber; Verkocht (website) = soft red.
   Without a website status the badge is the OneDrive stock code as before (In stock / Coming soon). */
.sold-badge.stock-pill.web-online { background: #eef8f1; color: #1f6b36; box-shadow: inset 0 0 0 1px #bfe3cb; }
.sold-badge.stock-pill.web-option { background: #fff4dc; color: #8f5208; box-shadow: inset 0 0 0 1px #ebbd7c; }
.sold-badge.stock-pill.web-sold { background: #fbecee; color: #9b1c28; box-shadow: inset 0 0 0 1px #ecc3c8; }

/* ---- Dossier header: car data line + Verkoper (CS) (2026-10-06 header) ----
   "45.200 km · 03/2024 · Solid Black" under the title; "Verkoper: <naam>" only for CS dossiers.
   Both wrap (long names / colours never widen the page at 390px). */
.dossier-facts {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0;
  margin: -0.15rem 0 0; font-size: 0.9rem; color: #4a4a4a; line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.dossier-fact { min-width: 0; overflow-wrap: anywhere; }
.dossier-fact + .dossier-fact::before { content: "·"; padding: 0 0.45rem; color: var(--muted); }
.dossier-seller {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.45rem;
  margin: 0; font-size: 0.92rem; line-height: 1.4;
}
.dossier-seller-label { color: var(--muted); }
.dossier-seller-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.dossier-seller-name[title] { text-decoration: underline dotted #b9a35a; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.dossier-seller-change { font-size: 0.82rem; color: var(--muted); text-decoration: underline; }
.dossier-seller-change:hover, .dossier-seller-change:focus-visible { color: var(--gold-ink); }
.dossier-seller-fill { display: inline-flex; align-items: center; gap: 0.3rem; text-decoration: none; }
/* Header progress = the list's Voortgang component (.list-progress), replaces the "1 van 15" pill.
   Own wrapper class (.dossier-voortgang): the old .dossier-progress is a fixed-height progress-bar style (height .6rem +
   overflow hidden) and clipped this block. Bar + bold % on one line, "1/15" small under the bar, above Historiek. */
.dossier-side-tags:has(.dossier-voortgang) { min-width: 9.5rem; }
.dossier-voortgang { box-sizing: border-box; width: 100%; min-width: 8.75rem; max-width: 10rem; padding: 0.1rem 0.15rem 0.15rem; overflow: visible; }
.dossier-voortgang .list-progress { grid-template-columns: minmax(4.5rem, 1fr) auto; min-width: 0; width: 100%; }
.dossier-voortgang .list-progress-pct { line-height: 1.2; white-space: nowrap; }
@media (max-width: 720px) {
  /* Pill row: progress first, fixed width, Historiek etc. next to it (wraps when needed). */
  .dossier-side-tags { align-items: center; }
  .dossier-side-tags:has(.dossier-voortgang) { min-width: 0; }
  .dossier-voortgang { flex: 0 0 9.5rem; width: 9.5rem; min-width: 0; padding: 0; }
}
.lc-dup-hint { margin: 0.45rem 0 0; }

/* ---- Stilstand (2026-10-06 header): next open step open > DOSSIER_STALL_DAYS (7) days ----
   Red marker in the normal list position (order stays ref high -> low). Verkocht keeps its payment stripe:
   the red stripe sits right next to it. */
.verkocht-table tbody tr.is-stalled { box-shadow: inset 4px 0 0 #c62828; background: #fff7f7; }
.verkocht-table tbody tr.is-stalled.is-light-green { box-shadow: inset 4px 0 0 #7dcea0, inset 8px 0 0 #c62828; }
.verkocht-table tbody tr.is-stalled.is-dark-green { box-shadow: inset 4px 0 0 #1b4332, inset 8px 0 0 #c62828; }
.verkocht-table tbody tr.is-stalled.is-yellow { box-shadow: inset 4px 0 0 #e0b400, inset 8px 0 0 #c62828; }
.stall-badge {
  display: inline-block; margin: 0 0 0.2rem; padding: 0.05rem 0.5rem; border-radius: 999px;
  background: #c62828; color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap;
}
@media (max-width: 720px) {
  .verkocht-table tbody tr.is-stalled { border-color: #e9a3a3; }
}

/* ---- Snelle notities (2026-10-06 header) ---- */
.notes-box { margin: 0 0 1rem; padding: 0.7rem 0.9rem 0.6rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.notes-title { margin: 0 0 0.45rem; font-size: 0.95rem; font-weight: 650; letter-spacing: 0; }
.notes-count { color: var(--muted); font-weight: 500; }
.notes-form { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0 0 0.5rem; }
.notes-form textarea { flex: 1 1 auto; min-width: 0; min-height: 2.6rem; resize: vertical; font: inherit; font-size: 0.92rem; padding: 0.45rem 0.6rem; }
.notes-form .notes-add { flex: 0 0 auto; }
.notes-empty { margin: 0.1rem 0 0.2rem; }
.notes-list { list-style: none; margin: 0; padding: 0; }
.note-item { padding: 0.45rem 0; border-top: 1px solid var(--line); }
.note-item:first-child { border-top: 0; }
.note-body { margin: 0; font-size: 0.92rem; line-height: 1.4; overflow-wrap: anywhere; }
.note-meta { display: inline; margin: 0; font-size: 0.78rem; color: var(--muted); }
.note-delete { display: inline; margin-left: 0.6rem; font-size: 0.78rem; }
.note-delete[open] { display: block; margin: 0.15rem 0 0; }
.note-delete:not([open]) > summary { display: inline; }
.note-delete > summary { cursor: pointer; color: var(--muted); text-decoration: underline; list-style: none; }
.note-delete > summary::-webkit-details-marker { display: none; }
.note-delete form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; margin-top: 0.25rem; }
.note-delete-go { padding: 0.15rem 0.6rem; font-size: 0.78rem; color: #a3161a; }
@media (max-width: 520px) {
  .notes-form { flex-direction: column; align-items: stretch; }
}

/* "Alles afvinken" at the top of an opened checklist (Klaarzetten, CS, Import; 2026-10-06 alles-afvinken); same button as Afvinken. */
.group-tick-actions { margin: 0.45rem 0 0.15rem; }
.group-tick-actions button { font-size: 0.85rem; padding: 0.4rem 0.7rem; }
/* Open Historiek popover / header menu: iOS Safari then delivers a tap anywhere as a click, so it can close it (internal.js). */
@media (hover: none) {
  html.has-popover body { cursor: pointer; }
}

/* Completed steps as a compact single line (2026-10-06 alles-afvinken): checkbox + title (+ "Voltooid door …" on the
   right when there is room). Description, Team tag, notes and the closed Checklist row are hidden; a click on the
   title (or Enter/Space) shows them again (internal.js toggles .is-expanded). The checkbox still unticks (confirm).
   Open / claimed / next steps keep the full card. Te koop + Verkocht + eigen stappen + group cards. */
ol.steps > li.step.is-done:not(.is-expanded) { padding-top: 0.28rem; padding-bottom: 0.28rem; }
ol.steps > li.step.is-done:not(.is-expanded) .tick { align-items: center; }
ol.steps > li.step.is-done:not(.is-expanded) .step-copy > :not(.step-title):not(.step-busy),
ol.steps > li.step.is-done:not(.is-expanded) > details.klaarzetten-details { display: none; }
ol.steps > li.step.is-done:not(.is-expanded) .step-copy { display: flex; align-items: baseline; gap: 0.6rem; min-width: 0; }
ol.steps > li.step.is-done:not(.is-expanded) .step-title {
  flex: 1 1 auto; min-width: 0; font-size: 0.98rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
ol.steps > li.step.is-done:not(.is-expanded) .step-busy {
  flex: 0 1 auto; max-width: 45%; margin: 0; font-size: 0.75rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
ol.steps > li.step.is-done .step-title[aria-expanded] { cursor: pointer; }
ol.steps > li.step.is-done .step-title[aria-expanded]:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 520px) {
  /* Phone: keep it one line, the name goes (it shows again when the row is opened). */
  ol.steps > li.step.is-done:not(.is-expanded) .step-busy { display: none; }
}

/* Te koop + Verkocht lists: group headers (2026-10-06). "Nog te verwerken" on top, 100 % group collapsed below. */
.dossier-table tbody.list-group-head tr:hover { background: transparent; }
.dossier-table tbody.list-group-head th {
  padding: 0.7rem 0.75rem 0.45rem;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #333;
  background: #fafafa;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.list-group-count { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.list-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.2rem;
  padding: 0.2rem 0.55rem 0.2rem 0.35rem;
  margin: -0.2rem 0 -0.1rem -0.35rem;
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
}
.list-group-toggle:hover { background: var(--tint); }
.list-group-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.list-group-chev {
  width: 0; height: 0;
  border-style: solid;
  border-width: 0.32rem 0 0.32rem 0.45rem;
  border-color: transparent transparent transparent currentColor;
  transition: transform 0.15s ease;
}
.list-group-toggle[aria-expanded="true"] .list-group-chev { transform: rotate(90deg); }
.dossier-table tbody.list-group-head.is-done th { background: #f3f8f4; color: #1f5134; }
@media (max-width: 800px) {
  .verkocht-table tbody.list-group-head tr {
    display: block;
    margin: 0.4rem 0 0.55rem;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }
  .verkocht-table tbody.list-group-head tr:active { background: transparent; }
  .verkocht-table tbody.list-group-head th {
    display: block;
    padding: 0.35rem 0.2rem;
    background: transparent;
    border: 0;
  }
  .verkocht-table tbody.list-group-head.is-done th { background: transparent; }
  .verkocht-table tbody.list-group-head.is-done { margin-top: 1.1rem; }
  .verkocht-table tbody.list-group-head.is-done .list-group-toggle {
    display: flex;
    width: 100%;
    min-height: 2.75rem;
    margin: 0;
    padding: 0.45rem 0.8rem;
    background: #f3f8f4;
    border: 1px solid #d5e8db;
    border-radius: 12px;
  }
}

/* "Voltooid (N)" per dossier block (2026-10-06 voltooid-map): to-dos on top, completed steps collapsed below. */
details.steps-done {
  margin: 0.7rem 0 0;
  border: 1px solid #d5e8db;
  border-radius: 12px;
  background: #f7fbf8;
  padding: 0.15rem 0.6rem;
}
details.steps-done[open] { padding-bottom: 0.6rem; }
.steps-done-summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  font-size: 0.92rem;
  color: #1f5134;
}
.steps-done-summary::-webkit-details-marker { display: none; }
.steps-done-summary::before {
  content: '▸';
  display: inline-block;
  width: 1rem;
  color: #1f5134;
  transition: transform 0.12s ease;
}
details.steps-done[open] > .steps-done-summary::before { transform: rotate(90deg); }
.steps-done-summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.steps-done-count { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
ol.steps.steps-done-list { margin-top: 0.25rem; }
details.steps-done .klaarzetten-summary > span:first-child,
details.steps-done .klaarzetten-summary .phase-count { white-space: nowrap; }
@media (max-width: 520px) {
  details.steps-done { padding-left: 0.4rem; padding-right: 0.4rem; }
  details.steps-done .klaarzetten-details { margin-left: 0.5rem; }
}
