/*
 * Planex administratie - huisstijl bovenop Bootstrap 5.
 * Kleuren afgeleid van planex.be, herwerkt volgens het ontwerp uit Claude Design (okt. 2026):
 * dieper groen, lichte grijsgroene achtergrond, witte kaarten met ruime binnenmarges. Lettertype: Inter.
 * Alle merkkleuren staan in :root; pas ze daar aan.
 */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../vendor/inter/inter-latin.woff2") format("woff2");
}

:root {
    --px-primary: #1f6b57;        /* groen - knoppen, actieve items, links */
    --px-primary-rgb: 31, 107, 87;
    --px-primary-dark: #15503f;
    --px-primary-soft: #e6f1ed;
    --px-accent: #5fd3a8;         /* klein accent (actief menu-item) */
    --px-green: #3f7d1c;          /* succes / betaald */
    --px-green-rgb: 63, 125, 28;
    --px-green-bright: #8fb5a9;   /* ondertitel logo */
    --px-blue: #0f4e91;           /* logoblauw */
    --px-ink: #14201d;            /* titels en tekst */
    --px-text: #14201d;
    --px-text-2: #3e4c48;         /* tweede tekstniveau */
    --px-muted: #5b6b66;          /* secundaire tekst (contrast 5,4:1 op wit) */
    --px-line: #e1e6e3;           /* randen van kaarten */
    --px-line-soft: #edf0ee;      /* scheidingslijnen binnen kaarten */
    --px-line-strong: #d5dbd8;    /* randen van velden en knoppen */
    --px-bg: #f3f5f4;             /* achtergrond app */
    --px-surface-alt: #f8faf9;    /* tabelkoppen, alleen-lezen velden */
    --px-sidebar: #0e2a26;
    --px-sidebar-text: #c9d8d3;
    --px-sidebar-muted: #8fb5a9;
    --px-sidebar-active: #1c443d;
    --px-sidebar-width: 256px;
    --px-radius: 12px;
    --px-radius-sm: 8px;
    --px-danger: #b42318;

    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --bs-body-font-size: .875rem;
    --bs-body-line-height: 1.45;
    --bs-body-color: var(--px-text);
    --bs-body-bg: #fff;
    --bs-emphasis-color: var(--px-ink);
    --bs-primary: var(--px-primary);
    --bs-primary-rgb: var(--px-primary-rgb);
    --bs-success: var(--px-green);
    --bs-success-rgb: var(--px-green-rgb);
    --bs-link-color: var(--px-primary);
    --bs-link-color-rgb: var(--px-primary-rgb);
    --bs-link-hover-color: var(--px-primary-dark);
    --bs-link-hover-color-rgb: 21, 80, 63;
    --bs-border-color: var(--px-line);
    --bs-border-radius: var(--px-radius-sm);
    --bs-border-radius-lg: var(--px-radius);
    --bs-secondary-color: var(--px-muted);
    --bs-tertiary-bg: var(--px-surface-alt);
}

body { font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--px-ink); font-weight: 600; letter-spacing: -.01em; }
.tabular, .table td { font-variant-numeric: tabular-nums; }
a { text-underline-offset: 2px; }

/* ---------- Knoppen ---------- */
.btn { --bs-btn-font-weight: 500; --bs-btn-border-radius: var(--px-radius-sm); --bs-btn-padding-x: 1rem; --bs-btn-padding-y: .5rem; --bs-btn-font-size: .875rem; }
.btn-primary, .btn-success, .btn-danger { --bs-btn-font-weight: 600; }
.btn-sm { --bs-btn-padding-x: .65rem; --bs-btn-padding-y: .3rem; --bs-btn-font-size: .8rem; --bs-btn-border-radius: 7px; }
.btn-lg { --bs-btn-padding-y: .65rem; --bs-btn-font-size: .95rem; }
.btn-ghost { --bs-btn-color: var(--px-text-2); --bs-btn-hover-bg: rgba(20, 32, 29, .06); --bs-btn-hover-color: var(--px-ink); --bs-btn-active-bg: rgba(20, 32, 29, .1); --bs-btn-border-color: transparent; }
.btn-chip {
    --bs-btn-padding-x: .65rem; --bs-btn-padding-y: .2rem; --bs-btn-font-size: .75rem; --bs-btn-border-radius: 999px;
    --bs-btn-color: var(--px-text-2); --bs-btn-bg: #fff; --bs-btn-border-color: var(--px-line-strong);
    --bs-btn-hover-bg: var(--px-primary-soft); --bs-btn-hover-border-color: var(--px-primary); --bs-btn-hover-color: var(--px-primary-dark);
}
.btn-text { --bs-btn-color: var(--px-primary); --bs-btn-hover-color: var(--px-primary-dark); --bs-btn-padding-x: 0; --bs-btn-padding-y: .2rem; --bs-btn-font-weight: 600; --bs-btn-font-size: .8125rem; --bs-btn-border-color: transparent; }
.btn-link { --bs-btn-font-weight: 500; --bs-btn-padding-x: .25rem; }
.btn-primary {
    --bs-btn-bg: var(--px-primary); --bs-btn-border-color: var(--px-primary);
    --bs-btn-hover-bg: var(--px-primary-dark); --bs-btn-hover-border-color: var(--px-primary-dark);
    --bs-btn-active-bg: var(--px-primary-dark); --bs-btn-active-border-color: var(--px-primary-dark);
    --bs-btn-disabled-bg: var(--px-primary); --bs-btn-disabled-border-color: var(--px-primary);
}
.btn-success {
    --bs-btn-bg: var(--px-green); --bs-btn-border-color: var(--px-green);
    --bs-btn-hover-bg: #3c731a; --bs-btn-hover-border-color: #3c731a;
    --bs-btn-active-bg: #3c731a; --bs-btn-active-border-color: #3c731a;
}
.btn-outline-primary {
    --bs-btn-color: var(--px-primary); --bs-btn-border-color: var(--px-primary);
    --bs-btn-hover-bg: var(--px-primary); --bs-btn-hover-border-color: var(--px-primary);
    --bs-btn-active-bg: var(--px-primary-dark); --bs-btn-active-border-color: var(--px-primary-dark);
}
.btn-outline-secondary {
    --bs-btn-color: var(--px-ink); --bs-btn-border-color: var(--px-line-strong); --bs-btn-bg: #fff;
    --bs-btn-hover-bg: var(--px-surface-alt); --bs-btn-hover-color: var(--px-ink); --bs-btn-hover-border-color: #b9c4c0;
    --bs-btn-active-bg: #eef1ef; --bs-btn-active-color: var(--px-ink); --bs-btn-active-border-color: #b9c4c0;
}
.btn-outline-danger { --bs-btn-bg: #fff; }

/* ---------- Formulieren ---------- */
.form-label { font-weight: 500; color: var(--px-ink); font-size: .8125rem; margin-bottom: .375rem; }
.form-control, .form-select {
    border-color: var(--px-line-strong); color: var(--px-ink); border-radius: var(--px-radius-sm);
    padding: .6rem .75rem; font-size: .875rem; min-height: 42px;
}
.form-select { padding-right: 2.25rem; }
.form-control-sm, .form-select-sm { min-height: 32px; padding: .3rem .55rem; font-size: .8125rem; border-radius: 7px; }
.form-select-sm { padding-right: 2rem; }
textarea.form-control { min-height: auto; }
.form-control::placeholder { color: #87938f; }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { background-color: var(--px-surface-alt); color: var(--px-muted); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--px-primary);
    box-shadow: 0 0 0 3px rgba(var(--px-primary-rgb), .15);
}
.form-check-input { border-color: var(--px-line-strong); }
.form-check-input:checked { background-color: var(--px-primary); border-color: var(--px-primary); }
.form-text { color: var(--px-muted); font-size: .75rem; margin-top: .375rem; }
.required-mark { color: var(--px-danger); }
.input-group-text { background: #fff; border-color: var(--px-line-strong); color: var(--px-muted); }
.input-group > .input-group-text:has(+ .form-control) { border-right: 0; padding-right: .25rem; }
.input-group > .input-group-text + .form-control { border-left: 0; padding-left: .5rem; }
.input-group:focus-within > .input-group-text { border-color: var(--px-primary); }
.pagination { --bs-pagination-color: var(--px-primary); --bs-pagination-active-bg: var(--px-primary); --bs-pagination-active-border-color: var(--px-primary); }

.nav-tabs { --bs-nav-tabs-border-color: var(--px-line); --bs-nav-link-color: var(--px-muted); --bs-nav-link-hover-color: var(--px-primary); }
.nav-tabs .nav-link { font-weight: 500; border: 0; border-bottom: 2px solid transparent; padding: .65rem .9rem; }
.nav-tabs .nav-link.active { color: var(--px-ink); font-weight: 600; border-bottom-color: var(--px-primary); background: transparent; }
.nav-pills { --bs-nav-pills-link-active-bg: var(--px-primary); }

/* ---------- Layout ---------- */
body.app-body { background: var(--px-bg); color: var(--px-text); }
.app-shell { display: flex; min-height: 100vh; }

.sidebar { --bs-offcanvas-width: var(--px-sidebar-width); --bs-offcanvas-bg: var(--px-sidebar); background: var(--px-sidebar); color: var(--px-sidebar-text); }
@media (min-width: 992px) {
    .sidebar {
        width: var(--px-sidebar-width); flex: 0 0 var(--px-sidebar-width);
        position: sticky; top: 0; height: 100vh; overflow-y: auto;
        display: flex; flex-direction: column;
    }
    .sidebar.offcanvas-lg { background-color: var(--px-sidebar) !important; }
}
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.1rem .5rem 1.4rem; }
.sidebar-brand a { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.sidebar-emblem { width: 38px; height: 38px; background: #fff; border-radius: 10px; padding: 3px; }
.brand-text { color: #fff; font-weight: 700; font-size: .95rem; letter-spacing: .06em; line-height: 1.15; }
.brand-text small { display: block; font-weight: 500; font-size: .6875rem; letter-spacing: .08em; color: var(--px-sidebar-muted); text-transform: uppercase; }

.sidebar-nav { padding: .75rem .875rem 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; }
.sidebar-heading { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #7fa096; padding: 0 .625rem .4rem; }
.sidebar .nav { gap: 2px; }
.sidebar .nav-link {
    color: var(--px-sidebar-text); font-weight: 500; border-radius: var(--px-radius-sm); padding: .5625rem .625rem;
    display: flex; align-items: center; gap: .625rem;
}
.sidebar .nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar .nav-link.active { background: var(--px-sidebar-active); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--px-accent); }
.sidebar .nav-link .bi { font-size: 1.05rem; width: 1.15rem; text-align: center; }
.sidebar-group-toggle .sidebar-chevron { margin-left: auto; font-size: .75rem !important; transition: transform .15s ease; }
.sidebar-group-toggle[aria-expanded="true"] .sidebar-chevron { transform: rotate(90deg); }
.sidebar-group-toggle[aria-expanded="true"] ~ .sidebar-group-hint { display: none; }
.sidebar-group-hint { font-size: .75rem; color: var(--px-sidebar-muted); padding: .125rem .625rem 0 2.35rem; line-height: 1.35; }
.sidebar-subnav { padding: .25rem 0 0 1.25rem; }
.sidebar-subnav .nav-link { padding: .45rem .625rem; font-size: .8125rem; }

.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; gap: .75rem; min-height: 60px; padding: .625rem 1rem;
    background: #fff; border-bottom: 1px solid var(--px-line);
}
@media (min-width: 992px) { .topbar { padding: .625rem 2rem; } }
.topbar-logo { height: 34px; }
.topbar-crumbs { display: flex; align-items: center; gap: .5rem; margin: 0; padding: 0; list-style: none; font-size: .8125rem; color: var(--px-muted); min-width: 0; }
.topbar-crumbs a { color: var(--px-muted); text-decoration: none; }
.topbar-crumbs a:hover { color: var(--px-primary); }
.topbar-crumbs li:last-child { color: var(--px-ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-user { border-radius: 10px; padding: .25rem .5rem .25rem .25rem; }
.topbar-user:hover { background: var(--px-surface-alt); }
.app-content { padding: 1rem; width: 100%; }
@media (min-width: 992px) { .app-content { padding: 1.75rem 2rem 2.5rem; } }

.skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 2000; background: #fff; padding: .5rem 1rem; }

/* ---------- Componenten ---------- */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-title { font-size: 1.625rem; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.page-subtitle { margin: .375rem 0 0; color: var(--px-muted); }
.eyebrow { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--px-primary); }

.card { --bs-card-border-radius: var(--px-radius); --bs-card-inner-border-radius: calc(var(--px-radius) - 1px); --bs-card-bg: #fff; border: 1px solid var(--px-line); box-shadow: none; }
.card-header { background: #fff; border-bottom: 1px solid var(--px-line-soft); font-weight: 600; color: var(--px-ink); padding: .9rem 1.25rem; font-size: .9375rem; }
.card-body { padding: 1.25rem; }
.card-footer { background: #fff; border-top: 1px solid var(--px-line-soft); padding: .9rem 1.25rem; }
.list-group { --bs-list-group-border-color: var(--px-line-soft); --bs-list-group-color: var(--px-text); }
.list-group-item { padding: .75rem 1.25rem; }

/* Genummerde sectie (formulieren): nummer, titel, ondertitel */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1.125rem 1.5rem; border-bottom: 1px solid var(--px-line-soft); }
.section-head-main { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.section-nr { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--px-primary-soft); color: var(--px-primary); font-weight: 700; font-size: .8125rem; }
.section-title { margin: 0; font-size: 1rem; font-weight: 600; }
.section-sub { display: block; font-size: .8125rem; color: var(--px-muted); }
.section-body { padding: 1.5rem; }
@media (max-width: 575.98px) { .section-head { padding: 1rem; } .section-body { padding: 1rem; } }

.table { --bs-table-color: var(--px-text); margin-bottom: 0; }
.table > thead th {
    font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--px-muted); font-weight: 600;
    background: var(--px-surface-alt); border-bottom: 1px solid var(--px-line);
}
.table > :not(caption) > * > * { padding: .7rem 1.25rem; border-bottom-color: var(--px-line-soft); }
.table-sm > :not(caption) > * > * { padding: .45rem .75rem; }
.row-link { cursor: pointer; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: rgba(var(--px-primary-rgb), .06); }

.badge { font-weight: 600; border-radius: 999px; padding: .35em .65em; }
.status-badge {
    --status-color: var(--px-muted);
    display: inline-flex; align-items: center; gap: .45em; font-weight: 600; font-size: .75rem;
    padding: .25em .7em; border-radius: 999px; white-space: nowrap; color: var(--px-ink);
    background: color-mix(in srgb, var(--status-color) 13%, #fff);
    border: 1px solid color-mix(in srgb, var(--status-color) 30%, #fff);
}
.status-dot { width: .6em; height: .6em; border-radius: 50%; display: inline-block; background: var(--status-color); }

/* Status kiezen als knoppen (radio's), kleur per status uit /css/statuses.css */
.status-picker { display: flex; flex-wrap: wrap; gap: .5rem; }
.status-option { --status-color: var(--px-muted); position: relative; }
.status-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.status-option label {
    display: inline-flex; align-items: center; gap: .5rem; min-height: 38px; padding: 0 .875rem; border-radius: 999px; cursor: pointer;
    font-weight: 500; color: var(--px-ink); background: #fff; border: 1.5px solid var(--px-line-strong);
}
.status-option label:hover { border-color: color-mix(in srgb, var(--status-color) 60%, #fff); }
.status-option input:checked + label { font-weight: 600; border-color: var(--status-color); background: color-mix(in srgb, var(--status-color) 10%, #fff); }
.status-option input:focus-visible + label { box-shadow: 0 0 0 3px rgba(var(--px-primary-rgb), .25); }
.status-option .status-dot { width: 8px; height: 8px; }

/* Veld met een label rechts in het veld (bv. "Automatisch") */
.field-tag { font-size: .6875rem; font-weight: 600; color: var(--px-primary); background: var(--px-primary-soft); border-radius: 999px; padding: .2rem .55rem; white-space: nowrap; }
.input-affix { position: relative; }
.input-affix .form-control { padding-right: 6.5rem; }
.input-affix .field-tag { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.input-strong { font-weight: 600; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.input-suggested { background-color: var(--px-surface-alt); }
.quick-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; margin-top: .5rem; font-size: .75rem; color: var(--px-muted); }

/* Teamleden als lijst met vinkjes */
.member-option { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border: 1px solid var(--px-line); border-radius: 10px; cursor: pointer; margin: 0; }
.member-option:hover { background: var(--px-surface-alt); }
.member-option:has(input:checked) { border-color: color-mix(in srgb, var(--px-primary) 45%, #fff); background: color-mix(in srgb, var(--px-primary) 5%, #fff); }
.member-option .form-check-input { margin: 0; flex-shrink: 0; }
.member-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem; }

/* Samenvatting en controlelijst naast een formulier */
.aside-sticky { position: sticky; top: 84px; }
.aside-label { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--px-muted); }
.summary-title { font-size: 1.0625rem; font-weight: 600; color: var(--px-ink); word-break: break-word; }
.is-placeholder { color: #8a9792 !important; font-weight: inherit; }
.summary-list { display: grid; grid-template-columns: auto 1fr; gap: .625rem .875rem; margin: 0; font-size: .8125rem; }
.summary-list dt { color: var(--px-muted); font-weight: 400; }
.summary-list dd { margin: 0; color: var(--px-ink); word-break: break-word; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .625rem; font-size: .8125rem; }
.checklist li { display: flex; align-items: center; gap: .625rem; color: var(--px-text-2); }
.checklist .bi { font-size: 1rem; }
.checklist .is-done .bi { color: var(--px-primary); }
.checklist .is-missing .bi { color: var(--px-danger); }
.checklist .is-optional .bi { color: #8a9792; }
.progress-thin { height: 6px; border-radius: 999px; background: var(--px-line-soft); overflow: hidden; }
.progress-thin > div { height: 100%; width: 0; background: var(--px-primary); border-radius: 999px; transition: width .25s ease; }
.form-actions-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; background: #fff; border: 1px solid var(--px-line); border-radius: var(--px-radius); }
.color-swatch { width: 1.25rem; height: 1.25rem; border-radius: 50%; display: inline-block; border: 1px solid rgba(0, 0, 0, .15); vertical-align: middle; background: var(--status-color, #ccc); }
.form-control-color { width: 3rem; padding: .25rem; }
.text-overdue, .table .text-overdue { color: #b42318 !important; font-weight: 600; }
.text-due-soon, .table .text-due-soon { color: #a15c07 !important; font-weight: 600; }
.alert { border-radius: 8px; border-width: 1px; }
.alert-warning { --bs-alert-color: #6b3d00; --bs-alert-bg: #fff4dc; --bs-alert-border-color: #f0c770; }
.alert-success { --bs-alert-color: #1f4d0a; --bs-alert-bg: #eaf5df; --bs-alert-border-color: #a8d184; }
.alert-danger { --bs-alert-color: #7a1a12; --bs-alert-bg: #fdecea; --bs-alert-border-color: #f1a9a0; }

.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--px-primary); color: #fff;
    font-weight: 700; font-size: .78rem; flex-shrink: 0; letter-spacing: .02em;
}
.avatar-sm { width: 28px; height: 28px; font-size: .68rem; }
.avatar-md { width: 32px; height: 32px; font-size: .72rem; }

.stat-value { font-size: 1.85rem; font-weight: 700; line-height: 1.1; color: var(--px-ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .78rem; font-weight: 500; color: var(--px-muted); }
.stat-card { border: 0; color: #fff; transition: transform .12s ease, box-shadow .12s ease; }
.stat-card .stat-value, .stat-card .stat-label { color: #fff; }
.stat-card .stat-label { opacity: .9; }
.stat-card-teal { background: var(--px-primary); }
.stat-card-green { background: var(--px-green); }
.stat-card-blue { background: var(--px-blue); }
a.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(12, 26, 28, .18); }

.min-w-0 { min-width: 0; }
[data-autocomplete-menu] { max-height: 300px; overflow-y: auto; }

.empty-state { text-align: center; padding: 2.25rem 1rem; color: var(--px-muted); }
.empty-state .bi { font-size: 2rem; color: #a3afad; display: block; margin-bottom: .5rem; }

.dl-grid { display: grid; grid-template-columns: minmax(110px, 36%) 1fr; gap: .5rem 1rem; margin: 0; }
.dl-grid dt { font-weight: 600; color: var(--px-muted); font-size: .8rem; padding-top: .1rem; }
.dl-grid dd { margin: 0; color: var(--px-ink); word-break: break-word; }

.file-icon { width: 36px; height: 36px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: var(--px-primary-soft); color: var(--px-primary); font-size: 1.1rem; flex-shrink: 0; }
.dropzone { border: 2px dashed var(--px-line-strong); border-radius: var(--px-radius); padding: 1.25rem; text-align: center; background: var(--px-surface-alt); transition: border-color .15s, background .15s; cursor: pointer; }
.dropzone.is-dragover, .dropzone:hover { border-color: var(--px-primary); background: var(--px-primary-soft); }

.vat-result { font-size: .8rem; margin-top: .35rem; }

.step-nr {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .8rem; background: var(--px-surface-alt); border: 1px solid var(--px-line-strong); color: var(--px-muted);
}
.step-nr.done { background: var(--px-green); border-color: var(--px-green); color: #fff; }
.progress { height: 1.1rem; }
.progress-bar { font-size: .7rem; font-weight: 600; transition: width .4s ease; }

/* ---------- Tijdsregistratie ---------- */
.timer-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .4rem .25rem .7rem; border: 1px solid #f1a9a0; background: #fdecea; border-radius: 6px; font-size: .85rem; }
.week-day-total { min-width: 52px; text-align: center; padding: .35rem .5rem; border-radius: 6px; background: var(--px-primary-soft); }
.week-day-total.empty { background: var(--px-surface-alt); color: var(--px-muted); }
.time-col { min-width: 3.5rem; }
.bar-track { height: 6px; background: var(--px-surface-alt); border-radius: 3px; margin-top: .3rem; overflow: hidden; }
.bar-fill { height: 100%; background: var(--px-primary); border-radius: 3px; width: 0; }

/* ---------- Agenda ---------- */
.agenda-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.agenda-head > div { padding: .5rem .6rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #3f4b49; background: var(--px-surface-alt); border-bottom: 1px solid var(--px-line-strong); }
.agenda-cell { min-height: 118px; padding: .35rem .4rem; border-right: 1px solid var(--px-line); border-bottom: 1px solid var(--px-line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.agenda-cell:nth-child(7n) { border-right: 0; }
/* Lege plek in een dag aanklikken = nieuw item op die dag */
.agenda-cell[data-new-event], .agenda-day[data-new-event] { cursor: pointer; }
.agenda-cell[data-new-event] { position: relative; }
.agenda-cell[data-new-event]:hover { background: color-mix(in srgb, var(--px-primary) 5%, #fff); }
.agenda-cell[data-new-event]:hover::after { content: "+"; position: absolute; top: .3rem; right: .5rem; font-weight: 600; line-height: 1; color: var(--px-primary); }
.agenda-day[data-new-event]:hover { background: color-mix(in srgb, var(--px-primary) 6%, #fff); }
.agenda-cell.other-month { background: #f8faf9; }
.agenda-cell.other-month .agenda-daynr { color: #a3afad; }
.agenda-cell.today { background: var(--px-primary-soft); }
.agenda-daynr { font-weight: 700; font-size: .8rem; color: var(--px-ink); text-decoration: none; align-self: flex-start; padding: 0 .3rem; border-radius: 4px; }
.agenda-daynr:hover { background: var(--px-primary); color: #fff; }
.agenda-cell.today .agenda-daynr { background: var(--px-primary); color: #fff; }
.agenda-chip {
    display: block; font-size: .74rem; line-height: 1.35; padding: .15rem .4rem; border-radius: 4px; text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; color: var(--px-ink);
}
.list-group-item .agenda-chip { white-space: normal; font-size: .875rem; padding: .25rem .5rem; }
.agenda-appointment { background: #e3edf7; border-color: var(--px-blue) !important; }
.agenda-deadline { background: #fdecea; border-color: #c0392b !important; }
.agenda-task { background: #eaf5df; border-color: var(--px-green) !important; }
.agenda-chip:hover { filter: brightness(.96); color: var(--px-ink); }
.legend-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; border-left: 3px solid; vertical-align: middle; margin-right: .2rem; }

/* ---------- Taken ---------- */
.task-check {
    width: 22px; height: 22px; border-radius: 5px; border: 2px solid var(--px-line-strong); background: #fff;
    display: inline-flex; align-items: center; justify-content: center; padding: 0; margin-top: .1rem; color: #fff; font-size: .85rem;
}
.task-check:hover { border-color: var(--px-green); }
.task-check.checked { background: var(--px-green); border-color: var(--px-green); }
.task-done .task-title { text-decoration: line-through; color: var(--px-muted); }
.task-highlight { background: #fff8e1; }

.audit-table pre { white-space: pre-wrap; word-break: break-word; font-size: .75rem; }
.debug-trace { max-height: 360px; font-size: .75rem; }

/* ---------- Login ---------- */
.auth-body { min-height: 100vh; background: linear-gradient(150deg, var(--px-sidebar) 0%, var(--px-primary) 60%, #3f7a3a 100%); }
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-card { width: 100%; max-width: 420px; border: 0; border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.auth-logo { width: 200px; max-width: 70%; height: auto; }
.otp-input { letter-spacing: .4em; font-variant-numeric: tabular-nums; }
.qr-code { max-width: 100%; height: auto; }
.setup-steps li::marker { font-weight: 700; color: var(--px-primary); }

@media print {
    .sidebar, .topbar, .btn, .alert { display: none !important; }
    .app-content { padding: 0; }
}
.stat-card-dark { background: var(--px-sidebar); }

/* ---------- Publieke pagina's (ondertekenen) ---------- */
.public-body { background: var(--px-bg); min-height: 100vh; }
.public-header { background: #fff; border-bottom: 1px solid var(--px-line); padding: .75rem 0; }
.public-container { max-width: 980px; }
.public-logo { height: 46px; width: auto; }
.sign-steps { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin: 0; padding: .75rem 1.5rem; border-top: 1px solid var(--px-line); background: var(--px-surface-alt); font-size: .85rem; color: var(--px-muted); }
.sign-steps li { display: flex; align-items: center; gap: .5rem; }
.sign-steps li.current { color: var(--px-ink); font-weight: 600; }
.sign-steps li.done { color: var(--px-green); }
.sign-step-nr { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--px-line-strong); background: #fff; font-size: .75rem; font-weight: 700; }
.sign-steps li.current .sign-step-nr { background: var(--px-primary); border-color: var(--px-primary); color: #fff; }
.sign-steps li.done .sign-step-nr { background: var(--px-green); border-color: var(--px-green); color: #fff; }
.signature-pad { position: relative; border: 2px dashed var(--px-line-strong); border-radius: 8px; background: #fff; height: 180px; touch-action: none; }
.signature-pad canvas { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.signature-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #a3afad; pointer-events: none; font-size: .9rem; }
.signature-pad::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: 28%; border-bottom: 1px solid #d3dbd9; pointer-events: none; }

/* ---------- Documenteditor ---------- */
.editor-sidebar { position: sticky; top: 80px; }
.editor-field-btn { white-space: normal; line-height: 1.25; }
.editor-pages { background: #d9dfdd; padding: 1rem; border-radius: var(--px-radius); }
.editor-page-label { margin: .25rem 0; }
.editor-page { position: relative; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); margin-bottom: 1rem; user-select: none; }
.editor-page img { width: 100%; height: auto; display: block; }
.editor-box {
    position: absolute; border: 1.5px solid var(--px-blue); background: rgba(15, 78, 145, .12); color: var(--px-blue);
    cursor: move; overflow: hidden; line-height: 1.1; touch-action: none; border-radius: 2px;
}
.editor-box.type-signature, .editor-box.type-signer_name, .editor-box.type-signed_date { border-color: #b42318; background: rgba(180, 35, 24, .1); color: #b42318; }
.editor-box.type-checkbox { border-color: var(--px-green); background: rgba(74, 138, 31, .15); color: var(--px-green); }
.editor-box.selected { outline: 2px solid #f0a500; outline-offset: 1px; z-index: 5; }
.editor-box:focus { outline: 2px solid #f0a500; }
.editor-box-label { display: block; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.editor-box-handle { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; background: currentColor; cursor: nwse-resize; }
.template-choice { transition: box-shadow .12s, border-color .12s; }
.template-choice:hover { border-color: var(--px-primary); box-shadow: 0 4px 14px rgba(12, 26, 28, .1); }
.stat-card-danger { background: #b42318; }

/* ---------- Facturen ---------- */
.invoice-lines td { vertical-align: top; }
.invoice-lines textarea { resize: vertical; min-height: 31px; }
@media (min-width: 768px) {
    .invoice-lines textarea { min-width: 180px; }
    .invoice-lines td:nth-child(2) input { min-width: 70px; }
    .invoice-lines td:nth-child(3) select { min-width: 105px; }
    .invoice-lines td:nth-child(4) input { min-width: 90px; }
    .invoice-lines td:nth-child(5) select { min-width: 82px; }
    .invoice-lines td:nth-child(6) { min-width: 90px; }
}
/* Smartphone: elke regel als blok onder elkaar in plaats van een brede tabel */
@media (max-width: 767.98px) {
    .invoice-lines thead { display: none; }
    .invoice-lines, .invoice-lines tbody { display: block; }
    .invoice-lines tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; padding: .75rem 1rem; border-bottom: 1px solid var(--bs-border-color); position: relative; }
    .invoice-lines td { display: block; padding: 0; border: 0; }
    .invoice-lines td:first-child { grid-column: 1 / -1; padding-right: 2rem; }
    .invoice-lines td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--bs-secondary-color); margin-bottom: .15rem; }
    .invoice-lines td[data-line-total] { text-align: left !important; align-self: end; padding-bottom: .3rem; }
    .invoice-lines td:last-child { position: absolute; top: .75rem; right: 1rem; }
}
.invoice-summary { position: sticky; top: 80px; }
.invoice-paper { background: #fff; border: 1px solid var(--px-line); border-radius: var(--px-radius); padding: 2rem; }
