:root {
    color-scheme: light;
    --bg: #f5f6f2;
    --panel: rgba(250, 250, 248, .88);
    --panel-solid: #ffffff;
    --ink: #16201b;
    --muted: #68736c;
    --line: rgba(30, 42, 35, .12);
    --green: #176f4d;
    --green-strong: #0d5639;
    --yellow: #c48916;
    --red: #bf3434;
    --blue: #2366d1;
    --shadow: 0 10px 28px rgba(29, 43, 36, .13);
    --sheet-shadow: 0 16px 44px rgba(25, 31, 28, .18), 0 1px 5px rgba(25, 31, 28, .08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    background: var(--bg);
    color: var(--ink);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.login-screen {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background:
        linear-gradient(110deg, rgba(7, 24, 41, .94), rgba(7, 24, 41, .74) 42%, rgba(7, 24, 41, .38)),
        url("kobis-login-bg.jpg") center right / cover no-repeat;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.login-screen.hidden {
    display: none;
}

.login-screen:not(.hidden) + main {
    display: none;
}

.login-card {
    display: grid;
    gap: 13px;
    width: min(430px, 100%);
    border: 1px solid rgba(255, 255, 255, .68);
    border-radius: 8px;
    padding: 26px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 28px 76px rgba(0, 0, 0, .34);
}

.login-card h1 {
    margin: 0;
    color: #10263f;
    font-size: 30px;
    line-height: 1.08;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(16, 38, 63, .12);
}

.login-brand img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}

.login-brand strong,
.client-login-brand strong {
    display: block;
    color: #143f6b;
    font-size: 24px;
    font-weight: 950;
}

.login-brand small,
.client-login-brand small {
    display: block;
    color: #5f6b7a;
    font-size: 12px;
    font-weight: 900;
}

.login-copy,
.login-footnote {
    margin: 0;
    color: #5f6b7a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.login-card label {
    display: grid;
    gap: 6px;
    color: #263747;
    font-size: 13px;
    font-weight: 900;
}

.login-card input {
    min-height: 40px;
    border: 1px solid #b4bfca;
    border-radius: 4px;
    padding: 0 11px;
    background: linear-gradient(#fff, #f8fafc);
    color: var(--ink);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08);
}

.login-card p:last-child {
    min-height: 18px;
    margin: 0;
    color: var(--red);
    font-size: 13px;
    font-weight: 800;
}

.shell {
    position: relative;
    min-height: 100vh;
}

.map-pane {
    position: fixed;
    inset: 0;
}

.topbar {
    position: absolute;
    z-index: 1800;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
}

.topbar > * {
    pointer-events: auto;
}

.top-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.edit-menu {
    position: relative;
    z-index: 1450;
}

.edit-menu-panel {
    position: fixed;
    z-index: 2050;
    top: 58px;
    right: 12px;
    display: none;
    width: 176px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 10px;
    padding: 7px;
    background: rgba(250, 250, 248, .96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.edit-menu-panel.open {
    display: grid;
    gap: 6px;
}

.edit-menu-panel button {
    min-height: 32px;
    border: 0;
    border-radius: 7px;
    padding: 0 10px;
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
}

.edit-menu-panel button[aria-pressed="true"] {
    background: #e9f7ff;
    color: #145f87;
}

.edit-menu-panel .danger-edit {
    color: #fff;
    background: var(--red);
}

.topbar h1,
.panel h2,
.history h3 {
    margin: 0;
    letter-spacing: 0;
}

.topbar h1 {
    font-size: clamp(22px, 2.5vw, 32px);
    line-height: 1;
}

.eyebrow {
    margin: 0 0 4px;
    color: rgba(22, 32, 27, .52);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.primary-action,
.save-button,
.actions button,
.photo-form button {
    box-sizing: border-box;
    border-color: #0d5f3e #0b5437 #08452d;
    border-style: solid;
    border-width: 1px;
    border-radius: 3px;
    color: #fff;
    background-image: linear-gradient(#21845d, var(--green));
    font-weight: 800;
    min-height: 29px;
    padding: 0 11px;
    box-shadow: rgba(255, 255, 255, .35) 0 1px 0 inset;
    font-size: 12px;
    text-align: center;
    text-overflow: ellipsis;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    white-space: nowrap;
}

.primary-action:hover,
.save-button:hover,
.actions button:hover,
.photo-form button:hover {
    filter: brightness(.98);
}

.primary-action:focus-visible,
.save-button:focus-visible,
.actions button:focus-visible,
.photo-form button:focus-visible {
    border-color: #e0a126;
    box-shadow:
        rgba(255, 255, 255, .35) 0 1px 0 inset,
        rgba(224, 161, 38, .5) 0 0 3px 2px;
    outline: 0;
}

.primary-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.primary-action[aria-pressed="true"] {
    border-color: #164aa1 #123f8b #0f3473;
    background-image: linear-gradient(#3178df, var(--blue));
}

.gps-action[aria-pressed="true"] {
    border-color: #9f2828 #8e2222 #751a1a;
    background-image: linear-gradient(#d94b4b, var(--red));
}

.map-action[aria-pressed="true"] {
    border-color: #253129 #1c261f #111812;
    background-image: linear-gradient(#39483f, var(--ink));
}

.edit-action {
    min-width: 0;
    min-height: 32px;
    padding: 0 9px;
    font-size: 11px;
}

.edit-hidden {
    display: none;
}

.edit-hidden.is-visible {
    display: inline-flex;
}

.edit-action[aria-pressed="true"],
.save-edit-action {
    border-color: #145f87 #104f70 #0c405b;
    background-image: linear-gradient(#217aa8, #145f87);
}

.danger-edit-action {
    border-color: #9f2828 #8e2222 #751a1a;
    background-image: linear-gradient(#d94b4b, var(--red));
}

.cancel-edit-action {
    border-color: #5d6675 #4d5664 #3f4652;
    background-image: linear-gradient(#737d8c, #5d6675);
}

.logout-action {
    border-color: #253129 #1c261f #111812;
    background-image: linear-gradient(#39483f, var(--ink));
}

.primary-action span {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.map {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
}

.legend-panel {
    position: absolute;
    z-index: 1750;
    top: 72px;
    left: 14px;
    width: 330px;
    max-width: calc(100vw - 28px);
    border: 1px solid #9fa2a5;
    background: #ededed;
    box-shadow: 0 10px 28px rgba(17, 24, 39, .24);
    color: #222;
}

.legend-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 8px 10px;
    border-bottom: 1px solid #a7aaad;
    background: linear-gradient(#f4f4f4, #d8d8d8);
}

.legend-panel header span,
.legend-filter > span {
    display: block;
    color: #555;
    font-size: 10px;
    font-weight: 700;
}

.legend-panel header strong {
    display: block;
    font-size: 14px;
}

.legend-panel header button {
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: #777;
    font-size: 22px;
    line-height: 1;
}

.insights-panel {
    position: absolute;
    z-index: 1760;
    top: 72px;
    left: 14px;
    width: 620px;
    max-width: calc(100vw - 28px);
    border: 1px solid #9fa2a5;
    background: #ededed;
    box-shadow: 0 10px 28px rgba(17, 24, 39, .24);
    color: #222;
}

.issues-panel {
    position: fixed;
    z-index: 1760;
    top: 68px;
    left: 10px;
    width: min(380px, calc(100vw - 330px));
    max-height: calc(100vh - 110px);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    border: 1px solid #9fa2a5;
    background: #ededed;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
}

.issues-panel.hidden {
    display: none;
}

.issues-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #b9b9b9;
    background: linear-gradient(#f4f4f4, #cfd2d5);
}

.issues-panel header span,
.issues-meta {
    color: #545c64;
    font-size: 10px;
    font-weight: 800;
}

.issues-panel header strong {
    display: block;
    color: #15191d;
    font-size: 14px;
}

.issues-panel header button {
    width: 25px;
    height: 24px;
    border: 0;
    background: transparent;
    color: #777;
    font-size: 20px;
    font-weight: 900;
}

.issues-meta {
    padding: 7px 10px;
    border-bottom: 1px solid #c6c8ca;
    background: #f6f6f6;
}

.issues-list {
    display: grid;
    gap: 6px;
    overflow: auto;
    padding: 8px;
}

.issue-row {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 2px 8px;
    border: 1px solid #c3c6c9;
    border-left: 5px solid #2366d1;
    border-radius: 3px;
    padding: 7px 8px;
    background: linear-gradient(#fff, #eceff2);
    color: #1f252b;
    text-align: left;
}

.issue-row.urgent {
    border-left-color: #bf3434;
}

.issue-row.blocked {
    border-left-color: #7c3aed;
}

.issue-row strong,
.issue-row span,
.issue-row em,
.issue-row small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.issue-row strong {
    font-size: 12px;
}

.issue-row span {
    color: #374151;
    font-size: 11px;
}

.issue-row em,
.issue-row small {
    color: #5a636d;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
}

.issue-row small {
    grid-column: 1 / -1;
}

.issues-empty {
    margin: 0;
    padding: 10px;
    color: #5a636d;
    font-size: 12px;
    font-weight: 800;
}

.insights-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 8px 10px;
    border-bottom: 1px solid #a7aaad;
    background: linear-gradient(#f4f4f4, #d8d8d8);
}

.insights-panel header span,
.insights-date,
.insights-grid span {
    display: block;
    color: #555;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.insights-panel header strong {
    display: block;
    font-size: 14px;
}

.insights-panel header button {
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: #777;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.insights-date {
    padding: 10px 10px 0;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    padding: 10px;
}

.insights-grid div {
    min-height: 72px;
    padding: 10px;
    border: 1px solid #c8c8c8;
    background: #f7f7f7;
}

.insights-grid strong {
    display: block;
    margin-top: 8px;
    color: #15191d;
    font-size: 28px;
    line-height: 1;
}

.insights-filters {
    display: grid;
    grid-template-columns: 1fr 1fr .8fr auto;
    gap: 6px;
    padding: 0 10px 10px;
    border-bottom: 1px solid #c8c8c8;
}

.insights-filters label {
    display: grid;
    gap: 3px;
    color: #555;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.insights-filters input,
.insights-filters button {
    height: 29px;
    border: 1px solid #aeb4bc;
    border-radius: 3px;
    background: linear-gradient(#fff, #e8eaed);
    color: #15191d;
    font-size: 12px;
}

.insights-filters input {
    min-width: 0;
    padding: 0 7px;
}

.insights-filters button {
    align-self: end;
    padding: 0 10px;
    cursor: pointer;
}

.insights-table {
    max-height: min(42vh, 360px);
    overflow: auto;
    padding: 0 10px 10px;
}

.insights-row {
    display: grid;
    grid-template-columns: minmax(116px, 1.2fr) minmax(72px, .7fr) minmax(72px, .7fr) minmax(96px, .9fr) minmax(102px, .95fr) minmax(88px, .8fr);
    align-items: center;
    min-height: 32px;
    border: 1px solid #c8c8c8;
    border-top: 0;
    background: #f7f7f7;
    font-size: 12px;
}

.insights-row:first-child {
    border-top: 1px solid #c8c8c8;
}

.insights-row span,
.insights-row strong {
    padding: 7px 8px;
    border-left: 1px solid #d7d7d7;
    text-align: right;
}

.insights-row span:first-child,
.insights-row strong:first-child {
    border-left: 0;
    text-align: left;
}

.insights-row-head {
    position: sticky;
    top: 0;
    z-index: 1;
    min-height: 28px;
    background: linear-gradient(#f4f4f4, #dedede);
    color: #555;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.insights-empty {
    padding: 14px 10px;
    border: 1px solid #c8c8c8;
    border-top: 0;
    background: #f7f7f7;
    color: #555;
    font-size: 12px;
}

.legend-progress,
.legend-filter,
.legend-type-list {
    padding: 10px;
}

.legend-progress {
    border-bottom: 1px solid #c8c8c8;
    background: #f7f7f7;
}

.legend-progress > div:first-child,
.legend-type-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.legend-progress strong {
    font-size: 22px;
}

.legend-progress-track,
.legend-mini-track {
    height: 11px;
    overflow: hidden;
    border: 1px solid #a3a7aa;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12);
}

.legend-progress-track i,
.legend-mini-track i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #176f4d, #35a06f);
}

.legend-progress small,
.legend-type-card p {
    display: block;
    margin: 5px 0 0;
    color: #555;
    font-size: 11px;
}

.legend-type-list {
    display: grid;
    gap: 8px;
}

.legend-type-card {
    border: 1px solid #c2c5c8;
    padding: 8px;
    background: #fff;
}

.legend-type-head strong {
    flex: 1;
    font-size: 12px;
}

.legend-type-head b {
    font-size: 12px;
}

.legend-shape {
    width: 15px;
    height: 15px;
    border: 2px solid #111827;
    background: #c48916;
}

.legend-shape.kind-hand {
    border-radius: 999px;
}

.legend-shape.kind-smal {
    transform: rotate(45deg) scale(.82);
}

.legend-filter {
    display: grid;
    gap: 7px;
    border-top: 1px solid #c8c8c8;
    background: #e6e6e6;
}

.status-filter {
    grid-template-columns: 1fr 1fr;
}

.status-filter > span {
    grid-column: 1 / -1;
}

.legend-filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 26px;
    font-size: 12px;
    font-weight: 700;
}

.legend-filter input {
    width: 15px;
    height: 15px;
}

.search-results {
    position: fixed;
    z-index: 3200;
    top: 60px;
    right: 12px;
    width: min(360px, calc(100vw - 56px));
    max-height: min(52vh, 420px);
    overflow: auto;
    border: 1px solid #9fa2a5;
    background: #f2f2f2;
    box-shadow: 0 10px 28px rgba(17, 24, 39, .24);
}

.search-results p,
.search-results button {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-bottom: 1px solid #c6c8ca;
    padding: 7px 10px;
    background: linear-gradient(#ffffff, #edf0f3);
    color: #111820;
    text-align: left;
}

.search-results button {
    display: grid;
    grid-template-columns: minmax(88px, .7fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.search-results button:hover,
.search-results button:focus-visible {
    background: #e8f4ff;
    outline: 0;
}

.search-results strong,
.search-results em {
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.search-results span {
    overflow: hidden;
    color: #56616b;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.maplibregl-ctrl-group {
    border: 0 !important;
    box-shadow: var(--shadow) !important;
}

.maplibregl-ctrl-logo {
    display: none !important;
}

.maplibregl-ctrl-attrib {
    max-width: 28px;
}

.maplibregl-ctrl-attrib:not(.maplibregl-compact) {
    max-width: 28px;
}

.maplibregl-ctrl-attrib.maplibregl-compact {
    min-height: 24px;
    background: transparent;
}

.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner {
    display: none;
}

.maplibregl-ctrl-bottom-left {
    bottom: 10px;
}

.kolk-marker {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-radius: 5px;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .24);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.kolk-marker.html-fallback {
    z-index: 4;
    pointer-events: auto;
    width: 5px;
    height: 5px;
    border-width: 1px;
    border-radius: 0;
    font-size: 0;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .14);
    appearance: none;
    -webkit-appearance: none;
    transform-origin: center center;
    transform: scale(.75);
    transition: opacity .08s linear, box-shadow .08s linear, border-color .08s linear !important;
}

.kolk-marker.html-fallback.is-map-moving {
    opacity: 0;
    pointer-events: none;
    transition: none;
}

.kolk-marker.html-fallback.kind-hand {
    width: 5px;
    height: 5px;
    min-width: 5px;
    max-width: 5px;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
}

.kolk-marker.html-fallback.kind-normaal {
    position: relative;
    width: 5px;
    height: 5px;
    min-width: 5px;
    max-width: 5px;
    aspect-ratio: 1 / 1;
    border-radius: 0;
}

.kolk-marker.html-fallback.kind-smal {
    position: relative;
    width: 6px;
    height: 6px;
    min-width: 6px;
    max-width: 6px;
    border-color: transparent;
    border-radius: 0;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    box-shadow: 0 0 0 1px rgba(17, 24, 39, .42);
}

.kolk-marker.html-fallback.kind-smal.round-todo {
    overflow: visible;
    background: #9bd8ff;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, .35);
}

.kolk-marker.html-fallback.kind-smal.round-todo::after {
    content: "";
    position: absolute;
    inset: 1px;
    background: inherit;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.kolk-marker.html-fallback.kind-smal::before,
.kolk-marker.html-fallback.kind-smal.round-todo::before {
    content: "";
    position: absolute;
    z-index: 2;
    left: 1px;
    right: 1px;
    top: 2px;
    height: 4px;
    background:
        linear-gradient(to bottom,
            rgba(255, 255, 255, .9) 0 1px,
            transparent 1px 3px,
            rgba(255, 255, 255, .9) 3px 4px);
    pointer-events: none;
}

.kolk-marker.html-fallback.kind-smal.round-todo.geleegd::after {
    background: var(--green);
}

.kolk-marker.html-fallback.kind-smal.round-todo.probleem::after {
    background: var(--blue);
}

.kolk-marker.html-fallback.kind-smal.round-todo.niet_bereikbaar::after {
    background: var(--red);
}

.kolk-marker.html-fallback.kind-smal.round-todo.open::after {
    background: var(--yellow);
}

.kolk-marker.html-fallback.kind-smal.selected {
    width: 8px;
    height: 8px;
    min-width: 8px;
    max-width: 8px;
    box-shadow:
        0 0 0 2px #111827,
        0 2px 6px rgba(17, 24, 39, .28);
}

.kolk-marker.html-fallback.kind-smal.selected::after {
    inset: 2px;
}

.kolk-marker.html-fallback.kind-hand.selected,
.kolk-marker.html-fallback.kind-normaal.selected {
    width: 7px;
    height: 7px;
    min-width: 7px;
    max-width: 7px;
}

.kolk-marker.html-fallback.selected {
    transform: scale(.82);
    box-shadow: 0 2px 4px rgba(20, 95, 135, .22);
}

.kolk-marker.round-todo {
    border-color: #9bd8ff;
    box-shadow:
        0 0 0 2px rgba(155, 216, 255, .5),
        0 8px 18px rgba(0, 0, 0, .24);
}

.kolk-marker.open {
    background: var(--yellow);
}

.kolk-marker.kind-normaal {
    color: #facc15;
}

.kolk-marker.kind-machinaal {
    color: transparent;
    border-radius: 4px;
    transform: rotate(45deg);
}

.kolk-marker.html-fallback.kind-machinaal {
    transform: rotate(45deg);
}

.kolk-marker.kind-machinaal,
.kolk-marker.kind-machinaal.selected {
    color: transparent;
}

.kolk-marker.kind-hand {
    color: #06b6d4;
    border-radius: 999px;
}

.kolk-marker.kind-smal {
    color: #facc15;
    width: 10px;
    height: 10px;
    min-width: 10px;
    max-width: 10px;
    border-radius: 0;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.kolk-marker.kind-smal.selected {
    width: 13px;
    height: 13px;
    min-width: 13px;
    max-width: 13px;
}

.kolk-marker.geleegd {
    background: var(--green);
}

.kolk-marker.probleem {
    background: var(--blue);
}

.kolk-marker.niet_bereikbaar {
    background: var(--red);
}

.kolk-marker.kind-smal.open.selected,
.kolk-marker.html-fallback.kind-smal.open.selected {
    background: #145f87;
}

.kolk-marker.kind-smal.geleegd.selected,
.kolk-marker.html-fallback.kind-smal.geleegd.selected {
    background: var(--green);
}

.kolk-marker.kind-smal.probleem.selected,
.kolk-marker.html-fallback.kind-smal.probleem.selected {
    background: var(--blue);
}

.kolk-marker.kind-smal.niet_bereikbaar.selected,
.kolk-marker.html-fallback.kind-smal.niet_bereikbaar.selected {
    background: var(--red);
}

.kolk-marker.edit-draft {
    background: #145f87;
    cursor: grab;
}

.kolk-marker.edit-draft:active {
    cursor: grabbing;
}

.kolk-marker.selected {
    position: relative;
    z-index: 5;
    border-color: #111827;
    background: #145f87;
    color: #fff;
    transform: scale(1.06);
    box-shadow: 0 3px 8px rgba(20, 95, 135, .28);
    animation: none;
}

.kolk-marker.geleegd.selected {
    background: var(--green);
    box-shadow: 0 3px 8px rgba(23, 111, 77, .28);
}

.kolk-marker.probleem.selected {
    background: var(--blue);
    box-shadow: 0 3px 8px rgba(35, 102, 209, .28);
}

.kolk-marker.niet_bereikbaar.selected {
    background: var(--red);
    box-shadow: 0 3px 8px rgba(191, 52, 52, .28);
}

@keyframes selected-kolk-pulse {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.18);
    }
}

.kolk-marker.round-todo {
    border-color: #9bd8ff;
}

.kolk-marker.kind-machinaal.selected {
    transform: rotate(45deg) scale(1.06);
}

.kolk-marker.html-fallback.kind-machinaal.selected {
    transform: rotate(45deg) scale(.82);
}

.user-marker {
    position: relative;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 3px solid #fff;
    border-radius: 999px;
    background: var(--blue);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
}

.user-marker::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #fff;
}

.user-marker::before {
    content: "";
    position: absolute;
    inset: -10px;
    border: 2px solid rgba(35, 102, 209, .35);
    border-radius: 999px;
}

.panel {
    position: absolute;
    z-index: 650;
    right: 12px;
    bottom: 78px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(320px, calc(100vw - 24px));
    height: min(74vh, 690px);
    overflow: auto;
    padding: 6px 8px 10px;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 14px;
    box-shadow: var(--sheet-shadow);
    backdrop-filter: blur(24px) saturate(1.45);
    -webkit-backdrop-filter: blur(24px) saturate(1.45);
    scrollbar-width: thin;
}

.panel-grabber {
    align-self: center;
    width: 34px;
    height: 4px;
    margin: 2px 0 4px;
    border-radius: 999px;
    background: rgba(22, 32, 27, .22);
}

.panel-header {
    position: sticky;
    z-index: 2;
    top: -10px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    margin: 0 -8px;
    padding: 7px 8px 8px;
    background: linear-gradient(180deg, rgba(250, 250, 248, .96), rgba(250, 250, 248, .72));
    backdrop-filter: blur(20px) saturate(1.35);
    -webkit-backdrop-filter: blur(20px) saturate(1.35);
    border-bottom: 1px solid rgba(30, 42, 35, .07);
}

.panel h2 {
    max-width: 190px;
    font-size: 17px;
    line-height: 1.08;
}

.status-pill {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 5px 8px;
    background: rgba(239, 242, 239, .78);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.status-pill.open {
    background: #fff2c6;
    color: #76520f;
}

.status-pill.geleegd {
    background: #dff4e8;
    color: var(--green-strong);
}

.status-pill.probleem {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-pill.niet_bereikbaar {
    background: #fbe0df;
    color: #8d2525;
}

.selected-card {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid rgba(20, 95, 135, .2);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(236, 247, 255, .92));
    box-shadow: 0 8px 18px rgba(20, 95, 135, .12);
}

.selected-card span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.selected-card strong {
    color: #123d5a;
    font-size: 20px;
    line-height: 1;
}

.selected-card small {
    color: var(--ink);
    font-size: 11px;
    font-weight: 800;
}

.selected-card.has-selection {
    border-color: rgba(20, 95, 135, .45);
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(219, 234, 254, .96));
}

.stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(30, 42, 35, .1);
}

.stats div {
    min-height: 46px;
    border: 0;
    border-radius: 0;
    padding: 7px;
    background: rgba(255, 255, 255, .74);
}

.stats strong {
    display: block;
    font-size: 17px;
}

.stats span {
    color: var(--muted);
    font-size: 10px;
}

.gps-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    background: rgba(255, 255, 255, .7);
}

.gps-card div {
    display: grid;
    gap: 3px;
}

.municipality-picker {
    color: var(--muted);
}

.gps-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.gps-card strong {
    font-size: 15px;
}

.hidden-municipality-select {
    display: none;
}

.driver-footer {
    position: fixed;
    z-index: 720;
    right: 10px;
    bottom: 8px;
    left: 10px;
    display: grid;
    grid-template-columns: 92px repeat(10, minmax(104px, 1fr));
    gap: 1px;
    overflow: visible;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 10px;
    background: rgba(30, 42, 35, .12);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .18);
    backdrop-filter: blur(22px) saturate(1.35);
    -webkit-backdrop-filter: blur(22px) saturate(1.35);
    scrollbar-width: none;
}

.status-legend {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.sync-warning {
    color: #bf3434 !important;
}

.status-legend strong {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 9.5px;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 2px;
}

.legend-dot.clean {
    background: var(--green);
}

.legend-dot.issue {
    background: var(--blue);
}

.legend-dot.blocked {
    background: var(--red);
}

.driver-footer::-webkit-scrollbar {
    display: none;
}

.driver-footer > div {
    display: grid;
    align-content: center;
    gap: 2px;
    min-width: 0;
    padding: 6px 10px;
    background: rgba(255, 255, 255, .82);
}

.driver-footer span {
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.driver-footer strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-layer-control {
    position: relative;
    overflow: visible;
    min-width: 92px;
}

.footer-layer-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 100%;
    border: 0;
    padding: 6px 10px;
    background: rgba(255, 255, 255, .82);
    color: var(--ink);
    text-align: center;
}

.footer-layer-toggle .layer-icon {
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.footer-layer-toggle strong {
    overflow: hidden;
    font-size: 11px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-layer-toggle[aria-expanded="true"] {
    background: #f7f0dc;
}

.footer-layer-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 980;
    display: none;
    gap: 5px;
    width: 148px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 10px;
    padding: 6px;
    background: rgba(250, 250, 248, .96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.footer-layer-menu.open {
    display: grid;
}

.footer-layer-menu button {
    min-height: 30px;
    border-color: #d5d9d9 #c6cacc #b7babd;
    border-style: solid;
    border-width: 1px;
    border-radius: 3px;
    background-image: linear-gradient(#ffffff, #edf0f3);
    color: var(--ink);
    font-size: 11px;
    font-weight: 900;
    box-shadow: rgba(255, 255, 255, .6) 0 1px 0 inset;
}

.footer-layer-menu button[aria-pressed="true"] {
    border-color: #0d5f3e #0b5437 #08452d;
    background-image: linear-gradient(#21845d, var(--green));
    color: #fff;
}

body.panel-hidden .panel {
    display: none;
}

.kolk-form,
.report-form,
.photo-form,
.problem-presets,
.extra-actions,
.kolk-type-picker {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, .7);
}

.hidden-kolk-form {
    display: none;
}

.problem-presets > span,
.extra-actions > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.problem-presets > div,
.problem-group > div,
.kolk-type-picker > div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
}

.kolk-type-picker > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kolk-type-picker > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.problem-presets button,
.extra-actions button,
.kolk-type-picker button {
    min-height: 29px;
    border-color: #d5d9d9 #c6cacc #b7babd;
    border-style: solid;
    border-width: 1px;
    border-radius: 3px;
    padding: 0 6px;
    background-image: linear-gradient(#ffffff, #edf0f3);
    color: var(--ink);
    box-shadow: rgba(255, 255, 255, .6) 0 1px 0 inset;
    font-size: 10px;
    font-weight: 800;
    text-align: left;
}

.problem-group {
    border: 1px solid rgba(30, 42, 35, .1);
    border-radius: 5px;
    background: rgba(255, 255, 255, .46);
    overflow: hidden;
}

.problem-group summary {
    min-height: 28px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    border-left: 3px solid var(--yellow);
    color: #34404a;
    background: linear-gradient(#ffffff, #edf0f3);
    box-shadow: rgba(255, 255, 255, .6) 0 1px 0 inset;
    cursor: pointer;
    font-size: 11px;
    font-weight: 950;
    list-style: none;
}

.problem-group summary::-webkit-details-marker {
    display: none;
}

.problem-group summary::after {
    content: "+";
    margin-left: auto;
    color: var(--muted);
    font-weight: 950;
}

.problem-group[open] summary::after {
    content: "-";
}

.problem-group > div {
    padding: 5px;
}

.problem-presets button:hover,
.problem-presets button:focus-visible,
.extra-actions button:hover,
.extra-actions button:focus-visible,
.kolk-type-picker button:hover,
.kolk-type-picker button:focus-visible {
    border-color: rgba(191, 52, 52, .35);
    background-image: linear-gradient(#fff4f4, #f8dddd);
    outline: none;
}

.problem-presets button.selected,
.extra-actions button.selected,
.kolk-type-picker button[aria-pressed="true"] {
    border-color: rgba(191, 52, 52, .78);
    background-image: linear-gradient(#d94b4b, var(--red));
    color: #fff;
}

.kolk-type-picker button[data-kolk-kind="normaal"][aria-pressed="true"] {
    border-color: #c29f0a #ad8d08 #927707;
    background-image: linear-gradient(#fde047, #facc15);
    color: #1f2933;
}

.kolk-type-picker button[data-kolk-kind="hand"][aria-pressed="true"] {
    border-color: #0891b2 #0e7490 #155e75;
    background-image: linear-gradient(#22d3ee, #06b6d4);
}

.kolk-type-picker button[data-kolk-kind="smal"][aria-pressed="true"] {
    border-color: #be185d #9d174d #831843;
    background-image: linear-gradient(#f472b6, #ec4899);
}

.problem-presets button.selected:hover,
.problem-presets button.selected:focus-visible,
.extra-actions button.selected:hover,
.extra-actions button.selected:focus-visible,
.kolk-type-picker button[aria-pressed="true"]:hover,
.kolk-type-picker button[aria-pressed="true"]:focus-visible {
    border-color: rgba(141, 37, 37, .9);
    background-image: linear-gradient(#b63a3a, #8d2525);
}

label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    color: var(--ink);
    outline: none;
    padding: 8px 10px;
    font-size: 12px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(23, 111, 77, .12);
}

textarea {
    resize: vertical;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, .7);
}

#unreachableButton {
    border-color: #b47b0d #9f6d0b #875b08;
    background-image: linear-gradient(#f7c753, var(--yellow));
    color: #1f2933;
}

.approve-button {
    grid-column: 1 / -1;
    background-image: linear-gradient(#21845d, var(--green));
}

.actions button[aria-pressed="true"] {
    transform: translateY(-1px);
    box-shadow:
        rgba(255, 255, 255, .35) 0 1px 0 inset,
        0 0 0 3px rgba(20, 95, 135, .16);
}

button:disabled {
    cursor: not-allowed;
    opacity: .45;
    box-shadow: none;
}

.photo-form button {
    background-image: linear-gradient(#21845d, var(--green));
}

.camera-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.photo-form small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.hidden {
    display: none !important;
}

.history {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, .7);
    min-height: 0;
}

.history h3 {
    font-size: 14px;
}

.history ol {
    display: grid;
    gap: 6px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    min-height: 0;
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.history li {
    border-top: 1px solid rgba(30, 42, 35, .08);
    padding: 7px 0 0;
}

.history-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.history-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    align-items: start;
    margin-top: 3px;
}

.history-row.has-action {
    grid-template-columns: minmax(0, 1fr) auto;
}

.history-row p {
    min-width: 0;
}

.history-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}

.history-info,
.history-delete {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border: 1px solid #b8bcc2;
    border-radius: 3px;
    background: linear-gradient(#f7f8fa, #e7e9ec);
    box-shadow: rgba(255, 255, 255, .6) 0 1px 0 inset;
    color: #8a1f1f;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    position: relative;
}

.history-info {
    color: #254d7a;
    font-size: 14px;
    font-weight: 950;
    font-family: Georgia, serif;
}

.history-delete::before,
.history-delete::after {
    content: "";
    position: absolute;
    left: 7px;
    right: 7px;
    border-radius: 1px;
    background: currentColor;
}

.history-delete::before {
    top: 6px;
    height: 2px;
    box-shadow: 0 -2px 0 currentColor;
}

.history-delete::after {
    top: 10px;
    bottom: 5px;
    border: 1px solid currentColor;
    border-top: 0;
    background: transparent;
}

.history-info:hover,
.history-delete:hover {
    border-color: #a2a6ac #979aa1 #82858a;
    background: linear-gradient(#fff7f7, #f0dddd);
}

.history-info:focus,
.history-delete:focus {
    border-color: #e77600;
    box-shadow: rgba(228, 121, 17, .5) 0 0 3px 2px;
    outline: 0;
}

.history-meta span {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 2px 7px;
    background: rgba(23, 111, 77, .12);
    color: var(--green-strong);
    font-size: 10px;
    font-weight: 900;
}

.history-meta span.inactive {
    background: rgba(93, 102, 117, .12);
    color: #5d6675;
}

.history-meta time {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history time {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.history p {
    margin: 3px 0 0;
    line-height: 1.3;
    font-size: 12px;
}

.history-photo {
    display: block;
    width: 72px;
    height: 54px;
    margin-top: 5px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(30, 42, 35, .12);
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.history-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-info-modal {
    position: fixed;
    z-index: 2650;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(17, 24, 39, .54);
}

.history-info-modal.hidden {
    display: none;
}

.history-info-window {
    width: min(460px, 94vw);
    max-height: min(620px, 88vh);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid #8f9295;
    background: #eeeeee;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .32);
}

.history-info-window header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border-bottom: 1px solid #b2b4b6;
    background: linear-gradient(#f8f8f8, #d4d6d8);
}

.history-info-window header span {
    display: block;
    color: #5b6570;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.history-info-window header strong {
    display: block;
    overflow: hidden;
    color: #111;
    font-size: 15px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-info-window header button {
    width: 30px;
    height: 28px;
    border: 1px solid #a2a6ac;
    border-radius: 3px;
    background-image: linear-gradient(#f7f8fa, #e7e9ec);
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.history-info-window dl {
    margin: 0;
    padding: 10px;
    overflow: auto;
}

.history-info-window dt {
    margin-top: 9px;
    color: #5b6570;
    font-size: 10px;
    font-weight: 950;
    text-transform: uppercase;
}

.history-info-window dt:first-child {
    margin-top: 0;
}

.history-info-window dd {
    margin: 3px 0 0;
    padding: 7px 8px;
    border: 1px solid #c8cbce;
    background: #fff;
    color: #17202a;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.history-info-window dd button {
    border: 0;
    padding: 0;
    background: transparent;
    color: #1557a6;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
}

.photo-viewer {
    position: fixed;
    z-index: 2600;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(17, 24, 39, .72);
}

.photo-viewer.hidden {
    display: none;
}

.photo-viewer-window {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: min(980px, 96vw);
    height: min(760px, 92vh);
    border: 1px solid #8f9295;
    background: #111820;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}

.photo-viewer-window img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    background: #0b0f14;
}

.photo-viewer-window footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 8px 12px;
    background: linear-gradient(#f4f4f4, #c9cbcd);
    color: #15191d;
    font-size: 13px;
    font-weight: 850;
}

.photo-viewer-close,
.photo-viewer-nav {
    position: absolute;
    z-index: 2;
    border: 1px solid #8d9096;
    border-radius: 3px;
    background-image: linear-gradient(#f7f8fa, #e0e3e6);
    color: #111820;
    cursor: pointer;
}

.photo-viewer-close {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 30px;
    font-size: 18px;
    font-weight: 900;
}

.photo-viewer-nav {
    top: 50%;
    width: 38px;
    height: 54px;
    transform: translateY(-50%);
    font-size: 32px;
    line-height: 1;
}

.photo-viewer-nav.previous {
    left: 10px;
}

.photo-viewer-nav.next {
    right: 10px;
}

.photo-viewer-nav:disabled {
    opacity: .35;
    cursor: default;
}

.reason-modal {
    position: fixed;
    inset: 0;
    z-index: 2600;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(16, 25, 35, .42);
}

.reason-card {
    width: min(420px, 100%);
    display: grid;
    gap: 12px;
    border: 1px solid #8f9295;
    border-radius: 4px;
    padding: 14px;
    background: #efefef;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.reason-card-header {
    display: grid;
    gap: 3px;
    padding-bottom: 10px;
    border-bottom: 1px solid #b9b9b9;
}

.reason-card-header span {
    color: #bf3434;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}

.reason-card-header strong {
    font-size: 18px;
}

.reason-card label {
    display: grid;
    gap: 7px;
    color: #34404a;
    font-size: 12px;
    font-weight: 850;
}

.reason-card textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    border: 1px solid #aeb4bc;
    border-radius: 3px;
    padding: 9px 10px;
    background: #fff;
    color: #111;
    font-size: 13px;
}

.reason-card textarea.invalid {
    border-color: #bf3434;
    box-shadow: 0 0 0 2px rgba(191, 52, 52, .18);
}

.message-card p {
    margin: 0;
    color: #25313b;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
}

.reason-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

.reason-actions button {
    min-height: 29px;
    border-color: #adb1b8 #a2a6ac #8d9096;
    border-style: solid;
    border-width: 1px;
    border-radius: 3px;
    padding: 0 11px;
    background-image: linear-gradient(#f7f8fa, #e7e9ec);
    color: #0f1111;
    font-size: 12px;
    font-weight: 850;
}

.reason-actions button[type="submit"] {
    border-color: #0d5f3e #0b5437 #08452d;
    background-image: linear-gradient(#21845d, var(--green));
    color: #fff;
}

.view-only-banner {
    position: fixed;
    z-index: 2100;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    max-width: calc(100% - 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(196, 137, 22, .45);
    border-radius: 10px;
    padding: 8px 10px 8px 14px;
    background: #fff7e6;
    color: #5c4213;
    box-shadow: var(--shadow);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.view-only-banner button {
    min-height: 34px;
    border: 0;
    border-radius: 8px;
    padding: 0 12px;
    background: var(--ink);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 900px) {
    .panel {
        left: 12px;
        right: 12px;
        bottom: 78px;
        width: auto;
        height: min(46vh, 520px);
    }

    .topbar {
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .topbar {
        left: 12px;
        right: 12px;
        top: 12px;
    }

    .primary-action {
        width: 38px;
        min-height: 38px;
        padding: 0;
        justify-content: center;
        overflow: hidden;
        white-space: nowrap;
        font-size: 0;
    }

    .primary-action span {
        margin-left: 0;
        font-size: 11px;
    }

    .top-actions {
        max-width: 126px;
    }

    .panel {
        padding: 10px;
    }

    .driver-footer {
        right: 8px;
        bottom: 8px;
        left: 8px;
        grid-template-columns: 82px repeat(10, minmax(104px, 1fr));
    }

    .driver-footer div {
        min-height: 40px;
        padding: 7px 9px;
    }

    .split,
    .stats {
        grid-template-columns: 1fr;
    }
}

/* Edge marker hardening: keep fallback kolk geometry exact. */
.kolk-marker.html-fallback.kind-normaal,
.kolk-marker.html-fallback.kind-normaal:not(.selected) {
    box-sizing: border-box !important;
    width: 5px !important;
    min-width: 5px !important;
    max-width: 5px !important;
    height: 5px !important;
    min-height: 5px !important;
    max-height: 5px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 0 !important;
    clip-path: none !important;
    padding: 0 !important;
}

.kolk-marker.html-fallback.kind-hand,
.kolk-marker.html-fallback.kind-hand:not(.selected) {
    box-sizing: border-box !important;
    width: 5px !important;
    min-width: 5px !important;
    max-width: 5px !important;
    height: 5px !important;
    min-height: 5px !important;
    max-height: 5px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    clip-path: none !important;
    padding: 0 !important;
}

.kolk-marker.html-fallback.kind-normaal.selected,
.kolk-marker.html-fallback.kind-hand.selected {
    width: 7px !important;
    min-width: 7px !important;
    max-width: 7px !important;
    height: 7px !important;
    min-height: 7px !important;
    max-height: 7px !important;
}

.kolk-marker.html-fallback.kind-normaal::before,
.kolk-marker.html-fallback.kind-hand::before,
.kolk-marker.html-fallback.kind-normaal::after,
.kolk-marker.html-fallback.kind-hand::after {
    content: none !important;
    display: none !important;
}

/* Chauffeursportaal: MapKit/Kikker-achtige werklayout. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.driver-toolbar {
    position: fixed;
    z-index: 1800;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
    padding: 0 26px 0 6px;
    border-bottom: 1px solid #8f9295;
    background:
        linear-gradient(#eeeeee, #c7c9cb 48%, #b4b6b8);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .82),
        0 1px 3px rgba(0, 0, 0, .22);
    pointer-events: auto;
}

.toolbar-actions {
    display: flex;
    align-items: stretch;
    min-width: 0;
    gap: 0;
}

.toolbar-button,
.toolbar-logout {
    position: relative;
    min-width: 66px;
    height: 60px;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, .4);
    border-right: 1px solid rgba(90, 92, 94, .3);
    border-radius: 0;
    padding: 5px 7px 4px;
    background: transparent;
    color: #292d30;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
    white-space: nowrap;
}

.toolbar-button:hover,
.toolbar-button:focus-visible,
.toolbar-button[aria-pressed="true"],
.toolbar-button.is-active {
    background:
        linear-gradient(rgba(255, 255, 255, .58), rgba(255, 255, 255, .08));
    outline: none;
}

.toolbar-button.edit-hidden {
    display: none;
}

.toolbar-button.edit-hidden.is-visible {
    display: grid;
}

.toolbar-button:disabled {
    opacity: .38;
}

#fullMapButton {
    width: 66px;
    min-width: 66px;
    max-width: 66px;
}

.toolbar-button.gps-action[aria-pressed="true"] {
    background:
        linear-gradient(#dff2ff, #a8d4f1);
}

.toolbar-separator {
    width: 1px;
    height: 48px;
    align-self: center;
    margin: 0 4px;
    background: rgba(80, 83, 86, .42);
    box-shadow: 1px 0 0 rgba(255, 255, 255, .55);
}

.toolbar-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
}

.maintenance-icon {
    background:
        repeating-linear-gradient(90deg, #242424 0 5px, #eac21e 5px 10px);
    border: 1px solid #222;
    box-shadow: inset 0 -7px 0 rgba(0, 0, 0, .18);
}

.legend-icon {
    border: 1px solid #bba783;
    background:
        linear-gradient(90deg, rgba(145, 40, 40, .2) 0 50%, transparent 50%),
        repeating-linear-gradient(#fff 0 5px, #f2e8d6 5px 10px);
}

.comment-icon::before,
.issues-icon::before {
    content: "";
    width: 23px;
    height: 18px;
    border: 2px solid #333;
    border-radius: 4px;
    background: linear-gradient(#fff, #e8ecef);
}

.comment-icon::after {
    content: "";
    position: absolute;
    left: 8px;
    bottom: 3px;
    width: 7px;
    height: 7px;
    border-left: 2px solid #333;
    border-bottom: 2px solid #333;
    transform: rotate(-45deg);
    background: #e8ecef;
}

.issues-icon::before {
    width: 22px;
    height: 22px;
    border-width: 3px;
    border-radius: 2px;
    background: transparent;
    transform: rotate(45deg);
}

.issues-icon i {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 15px;
    height: 15px;
    border-radius: 999px;
    background: #d32222;
    color: #fff;
    font-size: 10px;
    font-style: normal;
    line-height: 15px;
    text-shadow: none;
}

.menu-icon::before {
    content: "";
    width: 24px;
    height: 18px;
    border-top: 3px solid #333;
    border-bottom: 3px solid #333;
    background:
        linear-gradient(#333, #333) center / 24px 3px no-repeat;
}

.follow-icon::before {
    content: "";
    width: 25px;
    height: 25px;
    border: 3px solid #1e6b9b;
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 50%, #dc2323 0 4px, #fff 4px 7px, transparent 7px);
}

.add-icon::before,
.move-icon::before,
.type-icon::before,
.save-icon::before,
.delete-icon::before,
.cancel-icon::before {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid #8c9398;
    border-radius: 4px;
    background: linear-gradient(#f7f8fa, #d9dde2);
    color: #1f2933;
    font-size: 17px;
    font-weight: 900;
    box-shadow: rgba(255, 255, 255, .6) 0 1px 0 inset;
}

.add-icon::before { content: "+"; }
.move-icon::before { content: "<>"; font-size: 10px; }
.type-icon::before { content: "T"; }
.save-icon::before { content: "OK"; font-size: 9px; }
.delete-icon::before { content: "x"; }
.cancel-icon::before { content: "-"; }

.toolbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 260px;
}

.toolbar-search input {
    width: min(290px, 24vw);
    height: 26px;
    border: 1px solid #c8cdd2;
    border-radius: 5px;
    padding: 3px 10px;
    background: #fff;
    color: #24282c;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .09);
    font-size: 13px;
}

.toolbar-search input.not-found {
    border-color: #bf3434;
    box-shadow: 0 0 0 2px rgba(191, 52, 52, .22);
}

.toolbar-search input.is-searching {
    border-color: #d0a100;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, .22);
}

.toolbar-logout {
    height: 29px;
    min-width: 74px;
    border: 1px solid #8d9096;
    border-radius: 3px;
    background-image: linear-gradient(#f7f8fa, #e0e3e6);
    font-size: 11px;
}

.map {
    height: calc(100vh - 24px);
    min-height: calc(100vh - 24px);
}

.maplibregl-ctrl-top-right,
.maplibregl-ctrl-top-left {
    top: 64px;
}

.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right {
    bottom: 28px;
}

.maintenance-panel {
    position: fixed;
    z-index: 760;
    top: 60px;
    left: auto;
    right: 0;
    bottom: 24px;
    width: 300px;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: auto;
    padding: 0;
    border: 0;
    border-left: 1px solid #8f9295;
    border-radius: 0;
    background: #d8d8d8;
    box-shadow: -2px 0 4px rgba(0, 0, 0, .16);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    scrollbar-width: thin;
}

.panel-grabber {
    display: none;
}

.maintenance-panel .panel-header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: 26px 1fr 22px;
    gap: 7px;
    align-items: start;
    margin: 0;
    padding: 9px 8px 8px;
    border-bottom: 1px solid #a6a8aa;
    background: #efefef;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.selected-kolk-icon {
    position: relative;
    width: 23px;
    height: 23px;
    border: 2px solid rgba(255, 255, 255, .92);
    border-radius: 4px;
    background: #c48916;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
}

.selected-kolk-icon.kind-hand {
    border-radius: 999px;
}

.selected-kolk-icon.kind-smal {
    width: 23px;
    border-radius: 4px;
    transform: rotate(45deg) scale(.84);
    justify-self: center;
}

.selected-kolk-icon.kind-machinaal {
    border-radius: 3px;
    transform: rotate(45deg) scale(.84);
}

.selected-kolk-icon.status-open {
    background: #c48916;
}

.selected-kolk-icon.status-geleegd {
    background: #176f4d;
}

.selected-kolk-icon.status-probleem {
    background: #2366d1;
}

.selected-kolk-icon.status-niet_bereikbaar {
    background: #bf3434;
}

.selected-kolk-icon::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 2px;
    background: #facc15;
    opacity: .92;
}

.selected-kolk-icon.kind-hand::after {
    border-radius: 999px;
    background: #06b6d4;
}

.selected-kolk-icon.kind-smal::after {
    inset: 6px;
    background: #facc15;
}

.selected-kolk-icon.kind-machinaal::after {
    border-radius: 1px;
    background: #8b5cf6;
}

.maintenance-panel h2 {
    max-width: none;
    color: #111;
    font-size: 13px;
    line-height: 1.1;
    font-weight: 900;
}

.maintenance-panel .panel-header p {
    margin: 2px 0 0;
    color: #222;
    font-size: 10px;
    line-height: 1.25;
    font-weight: 600;
}

.panel-close {
    width: 20px;
    height: 20px;
    border: 0;
    background: transparent;
    color: #b7b7b7;
    font-size: 22px;
    font-weight: 900;
    line-height: 18px;
}

.maintenance-panel .selected-card,
.maintenance-panel .stats,
.maintenance-panel .kolk-type-picker,
.maintenance-panel .actions,
.maintenance-panel .extra-actions,
.maintenance-panel .problem-presets,
.maintenance-panel .report-form,
.maintenance-panel .photo-form,
.maintenance-panel .history {
    margin: 6px 8px 0;
    border: 1px solid #b9b9b9;
    border-radius: 0;
    background: #ededed;
    box-shadow: none;
}

.maintenance-panel .selected-card {
    display: none;
}

.maintenance-panel .stats {
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    overflow: hidden;
    background: #b9b9b9;
}

.maintenance-panel .stats div {
    min-height: 32px;
    padding: 4px 3px;
    background: #efefef;
}

.maintenance-panel .stats strong {
    font-size: 12px;
}

.maintenance-panel .stats span {
    font-size: 8px;
}

.panel-section-title {
    margin: 8px 8px 0;
    border: 1px solid #b9b9b9;
    border-bottom: 0;
    padding: 6px 8px;
    background: #efefef;
    color: #111;
    font-size: 11px;
    font-weight: 700;
}

.maintenance-panel .actions {
    margin-top: 0;
    padding: 7px 8px;
    background: #dedede;
}

.maintenance-submit {
    min-height: 29px;
    display: grid;
    grid-template-columns: 30px 1fr;
    align-items: center;
    gap: 0;
    border-color: #bfc2c5 #aeb2b7 #9da2a8;
    background-image: linear-gradient(#ffffff, #e6e7e9);
    color: #202326;
    font-size: 12px;
    font-weight: 700;
}

.maintenance-submit span {
    width: 27px;
    height: 25px;
    border-right: 1px solid #c3c5c7;
    background:
        radial-gradient(ellipse at center, #e8e8e8 0 7px, #9da2a8 7px 8px, transparent 8px);
}

.maintenance-actions {
    padding: 7px 8px 8px;
}

.maintenance-actions > span,
.report-form label,
.photo-form small,
.kolk-type-picker > span {
    color: #222;
    font-size: 10px;
    font-weight: 700;
}

.maintenance-actions > div,
.kolk-type-picker > div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 6px;
}

.maintenance-actions button {
    min-height: 34px;
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    gap: 0;
    border-color: #c5c8cb #b4b7ba #a1a5aa;
    border-radius: 0;
    padding: 0;
    background-image: linear-gradient(#ffffff, #e8e9eb);
    color: #222;
    box-shadow: rgba(255, 255, 255, .62) 0 1px 0 inset;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.maintenance-actions button > span {
    width: 28px;
    height: 100%;
    border-right: 1px solid #c4c6c8;
    background:
        linear-gradient(#f0f0f0, #dadada);
}

.maintenance-actions button.selected {
    border-color: #9f2828 #8e2222 #751a1a;
    background-image: linear-gradient(#d94b4b, #bf3434);
    color: #fff;
    text-shadow: none;
}

.maintenance-actions button.selected > span {
    background:
        linear-gradient(#c54545, #a92e2e);
    border-right-color: rgba(255, 255, 255, .24);
}

.maintenance-panel textarea {
    min-height: 52px;
    border-radius: 0;
    background: #fff;
}

.maintenance-panel .history {
    margin-bottom: 14px;
    padding: 6px 8px;
    flex: 0 0 auto;
    max-height: 34vh;
    display: flex;
    flex-direction: column;
    min-height: 118px;
}

.maintenance-panel .history h3 {
    font-size: 12px;
}

.maintenance-panel .history ol {
    gap: 4px;
    margin-top: 5px;
    flex: 1 1 auto;
    max-height: none;
}

.maintenance-panel .history li {
    padding-top: 5px;
}

.maintenance-panel .history p,
.maintenance-panel .history time {
    font-size: 11px;
}

.maintenance-panel .history-row.has-action {
    grid-template-columns: minmax(0, 1fr) auto;
}

body.panel-hidden .maintenance-panel {
    display: none;
}

.driver-footer {
    z-index: 900;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 24px;
    height: 24px;
    display: grid;
    grid-template-columns:
        136px
        minmax(132px, 1fr)
        minmax(132px, 1fr)
        minmax(154px, 1.15fr)
        92px
        86px
        106px
        136px
        minmax(128px, .9fr);
    gap: 0;
    overflow-x: auto;
    overflow-y: visible;
    border: 0;
    border-top: 1px solid #9fa2a5;
    border-radius: 0;
    background: #d9d9d9;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.driver-footer > div {
    min-width: 0;
    min-height: 24px;
    display: flex;
    align-items: center;
    align-content: center;
    gap: 4px;
    padding: 2px 6px;
    border-right: 1px solid #a7aaad;
    background: #e9e9e9;
}

.driver-footer span {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #555;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
}

.driver-footer strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #333;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-driver strong,
.footer-nearest strong,
.footer-sync strong {
    flex: 1 1 auto;
}

.footer-counter {
    justify-content: space-between;
}

.footer-counter span {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-counter strong {
    flex: 0 0 auto;
    min-width: 22px;
    text-align: right;
}

.footer-valve span {
    max-width: 96px;
}

.footer-sync span {
    flex: 0 0 auto;
}

.footer-layer-control {
    min-width: 0;
    padding: 0 !important;
}

.footer-layer-toggle {
    justify-content: flex-start;
    min-height: 24px;
    height: 24px;
    gap: 12px;
    border: 0;
    border-right: 1px solid #a7aaad;
    border-radius: 0;
    background: #e9e9e9;
    padding: 0 9px;
}

.footer-layer-toggle .layer-icon {
    display: grid;
    place-items: center;
    width: 14px;
    color: #2d3338;
    font-size: 15px;
}

.footer-layer-menu {
    left: 6px;
    bottom: 30px;
    width: 150px;
    border-radius: 0;
    border-color: #9fa2a5;
    background: #ededed;
}

.status-legend {
    gap: 10px;
}

.status-legend strong {
    font-size: 10px;
}

@media (max-width: 980px) {
    .driver-toolbar {
        height: 52px;
        padding-right: 8px;
        overflow-x: auto;
    }

    .toolbar-button {
        min-width: 56px;
        height: 52px;
        font-size: 9px;
    }

    #fullMapButton {
        width: 56px;
        min-width: 56px;
        max-width: 56px;
    }

    .toolbar-icon {
        width: 24px;
        height: 24px;
    }

    .toolbar-search {
        min-width: 190px;
    }

    .toolbar-search input {
        width: 160px;
    }

    .maintenance-panel {
        top: 52px;
        width: min(300px, 84vw);
    }

    .insights-panel {
        top: 58px;
        width: min(620px, calc(100vw - 20px));
        left: 10px;
    }

    .issues-panel {
        top: 58px;
        width: min(360px, calc(100vw - 318px));
    }

    .driver-footer {
        grid-template-columns: 136px 150px 150px 160px 92px 86px 106px 136px 138px;
        overflow-x: auto;
    }
}

@media (max-width: 620px) {
    .driver-toolbar {
        align-items: stretch;
    }

    .toolbar-search input {
        display: none;
    }

    .maintenance-panel {
        left: auto;
        width: min(292px, 92vw);
    }

    .issues-panel {
        width: min(340px, calc(100vw - 16px));
        left: 8px;
    }

    .insights-filters {
        grid-template-columns: 1fr 1fr;
    }

    .insights-row {
        grid-template-columns: 92px repeat(2, 56px) 76px 82px 68px;
        font-size: 11px;
    }

    .driver-footer {
        grid-template-columns: 132px 146px 146px 154px 92px 86px 106px 136px 138px;
    }
}
