/* ── Pill badges (actietype in tabel) ────────────────────── */
.pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.pill-ok {
    background: var(--success-bg);
    color: var(--success);
}

.pill-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.pill-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.pill-info {
    background: var(--info-bg);
    color: var(--info);
}

.pill-default {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* ── Tabel cellen styling ────────────────────────────────── */
.route-code {
    font-weight: 700;
    color: var(--gray-800);
    margin-right: 0.2rem;
}

.route-name {
    font-size: 0.72rem;
    color: var(--gray-400);
}

.client-name {
    display: block;
    color: var(--gray-800);
    font-weight: 500;
}

.client-first {
    display: block;
    font-size: 0.68rem;
    color: var(--gray-400);
}

.time-diff {
    white-space: nowrap;
}

.arrow {
    color: var(--brand-orange);
    font-size: 0.75rem;
    font-weight: 700;
}

.zorgtype-label {
    font-size: 0.7rem;
    color: var(--gray-400);
    line-height: 1.3;
    max-width: 180px;
    display: inline-block;
}

/* ── Sync status ─────────────────────────────────────────── */
.sync-ok {
    color: var(--success);
    font-size: 0.72rem;
    font-weight: 600;
}

.sync-nok {
    color: var(--danger);
    font-size: 0.72rem;
    font-weight: 600;
}

/* ── Route section (per route tab) ───────────────────────── */
.route-section {
    margin-bottom: 1.25rem;
}

.route-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    margin-bottom: 0.3rem;
    border-bottom: 2px solid var(--brand-orange-light);
}

.route-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
}

.route-count {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 400;
}

/* ── Log container ────────────────────────────────────────── */
.log-container {
    background: var(--gray-900);
    border-radius: var(--radius);
    padding: 0.85rem;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 1.25rem;
}

.log-container pre {
    color: var(--gray-300);
    font-family: "Cascadia Code", "Fira Code", "Consolas", monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    max-width: 700px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.15rem;
    font-size: 0.85rem;
}

.form-hint {
    display: block;
    font-size: 0.76rem;
    color: var(--gray-500);
    margin-bottom: 0.35rem;
    line-height: 1.45;
    font-weight: 400;
}

.form-hint strong {
    color: var(--gray-700);
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--gray-800);
    background: white;
    transition: border-color 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(247, 148, 55, 0.15);
}

.form-input-indent {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
    width: calc(100% - 1.5rem);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.radio-label:hover {
    border-color: var(--brand-orange);
    background: var(--brand-orange-light);
}

.radio-label input[type="radio"] {
    margin-top: 0.25rem;
}

.radio-label span {
    display: flex;
    flex-direction: column;
}

.radio-label small {
    color: var(--gray-500);
    font-size: 0.78rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gray-200);
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.82rem;
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border: 1px solid #fbbf24;
}

.alert-danger {
    background: var(--danger-bg);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background: var(--info-bg);
    color: #155e75;
    border: 1px solid var(--info);
}

/* ── Empty state ──────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-state h2 {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 1.25rem;
}

.empty-state-small {
    text-align: center;
    padding: 1.5rem;
    color: var(--gray-400);
    font-size: 0.85rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 1rem;
    color: var(--gray-400);
    font-size: 0.72rem;
}

/* ── Helpers ──────────────────────────────────────────────── */
.text-muted { color: var(--gray-400); }
.text-danger { color: var(--danger); }

h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
}

/* ── Filter row (dropdown kolom-filters) ─────────────────── */
/* `sticky` en niet `relative`, en dat is geen smaak maar een reparatie.
 *
 * `_setStickyFilterTop()` in run_detail.html zet op elke filtercel
 * `top = <hoogte van de kolomkop>`. Bij `relative` verschuift die regel de cel
 * simpelweg omlaag: er ontstond een witte band van drieëndertig pixels tussen de
 * kolomkop en de filterrij, en de filterrij plakte helemaal niet. De functie deed
 * dus het omgekeerde van wat zijn naam belooft.
 *
 * Met `sticky` betekent dezelfde `top` wél wat er bedoeld was: de filterrij blijft
 * onder de plakkende kolomkop staan terwijl je door dertienhonderd regels scrolt.
 * `z-index` lager dan de 10 van de kop, zodat die er bij het ontmoeten overheen gaat.
 *
 * Zonder die `top` — op Verbruik en Facturen, die de gedeelde filter-table.js
 * gebruiken — is `top` afwezig en gedraagt `sticky` zich als voorheen. */
.filter-row td {
    background: var(--gray-800);
    padding: 0.2rem 0.3rem !important;
    border-bottom: none !important;
    position: sticky;
    z-index: 9;
}

/* Filter-knop in header */
.col-filter-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.18rem 0.35rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    font-size: 0.65rem;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}

.col-filter-btn:hover {
    background: var(--gray-600);
    border-color: var(--brand-orange);
    color: white;
}

.col-filter-btn.has-filter {
    background: var(--brand-orange);
    color: white;
    border-color: var(--brand-orange);
}

.col-filter-arrow {
    margin-left: 0.3rem;
    font-size: 0.55rem;
}

/* Dropdown panel — fixed zodat het niet wordt afgeknipt door table-scroll */
.col-filter-dropdown {
    position: fixed;
    min-width: 220px;
    max-width: 300px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    z-index: 1000;
    display: none;
}

.col-filter-dropdown.open {
    display: block;
}

.col-filter-search {
    display: block;
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: none;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.78rem;
    color: var(--gray-800);
    outline: none;
    font-family: inherit;
}

.col-filter-search::placeholder {
    color: var(--gray-400);
}

.col-filter-search:focus {
    border-bottom-color: var(--brand-orange);
}

.col-filter-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.col-filter-action-btn {
    font-size: 0.68rem;
    color: var(--brand-orange);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    font-weight: 600;
}

.col-filter-action-btn:hover {
    text-decoration: underline;
}

.col-filter-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.2rem 0;
}

.col-filter-option {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-700);
    cursor: pointer;
    transition: background 0.1s;
}

.col-filter-option:hover {
    background: var(--gray-50);
}

.col-filter-option input[type="checkbox"] {
    accent-color: var(--brand-orange);
}

.col-filter-option.hidden {
    display: none;
}

