/* =============================================================================
   SCZ Productions — Admin CSS
   wwwroot/css/admin.css
   ============================================================================= */

/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
    --primary: #F2A900;
    --primary-dark: #d99800;
    --secondary: #614400;
    --white: #ffffff;
    --dark: #1e1e2e;
    --body-text: #374151;
    --subtle: #6b7280;
    --muted: #9ca3af;
    --border: #e5e7eb;
    --bg-page: #f3f4f6;
    --bg-card: #ffffff;
    --bg-subtle: #f9fafb;
    --radius-card: 12px;
    --radius-btn: 8px;
    --radius-chip: 4px;
    --radius-pill: 999px;
    --shadow-card: 0 1px 4px rgba(0,0,0,0.08);
    --shadow-modal: 0 8px 40px rgba(0,0,0,0.12);
    --font-title: 'Luckiest Guy', cursive;
    --font-body: 'Aptos Display', 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, 'Cascadia Code', monospace;
}

/* ── Fonts TODO: WIJZIGEN ──────────────────────────────────────────────────── */
@font-face {
    font-family: 'Luckiest Guy';
    src: url('../fonts/luckiest-guy.woff2') format('woff2');
}

@font-face {
    font-family: 'Indie Flower';
    src: url('../fonts/indie-flower.woff2') format('woff2');
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
.admin-body {
    font-family: var(--font-body);
    background: var(--bg-page);
    color: var(--body-text);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ── Layout ────────────────────────────────────────────────────────────────── */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg-page);
}

.admin-main {
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
    padding: 2rem;
    background: var(--bg-page);
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.admin-sidebar {
    width: 220px;
    min-width: 220px;
    background: #1e1f26;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.sidebar-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 16px;
    color: #F2A900;
    letter-spacing: .5px;
}

/* Legacy class — wordt nog ergens in admin gebruikt */
.admin-nav-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--primary);
    letter-spacing: 0.04em;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.3);
    padding: 14px 16px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: rgba(255,255,255,.7);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}

    .nav-item:hover {
        background: rgba(255,255,255,.05);
        color: #fff;
    }

    .nav-item.active {
        background: rgba(242,169,0,.12);
        color: #F2A900;
        border-left-color: #F2A900;
        font-weight: 600;
    }

.nav-icon {
    font-size: 15px;
    width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,.07);
}

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 6px;
    color: rgba(255,255,255,.6);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s;
}

    .btn-logout:hover {
        background: rgba(239,68,68,.15);
        color: #f87171;
        border-color: rgba(239,68,68,.3);
    }

/* ── Page wrappers ─────────────────────────────────────────────────────────── */
.admin-page {
    max-width: 1100px;
    padding: 2rem;
}

.admin-page-narrow {
    max-width: 780px;
    padding: 2rem;
}

/* ── Page headers ──────────────────────────────────────────────────────────── */
.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.admin-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 0.25rem;
}

.admin-page-subtitle {
    color: var(--subtle);
    font-size: 0.9rem;
    margin: 0;
}

/* Oud (Gesprek 3 pagina's) */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

    .page-header h1 {
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--dark);
        margin: 0 0 0.25rem;
    }

.page-subtitle {
    color: var(--subtle);
    font-size: 0.9rem;
    margin: 0;
}

.page-header-with-back {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.page-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Kaarten ───────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.admin-form-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
}

/* ── Knoppen ───────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: var(--radius-btn);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, opacity 0.2s;
    text-decoration: none;
}

    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-primary {
    background: var(--primary);
    color: #fff;
}

    .btn-primary:hover:not(:disabled) {
        background: var(--primary-dark);
    }

.btn-secondary {
    background: var(--bg-subtle);
    color: var(--body-text);
    border: 1px solid var(--border);
}

    .btn-secondary:hover:not(:disabled) {
        background: var(--border);
    }

.btn-danger {
    background: #dc2626;
    color: #fff;
}

    .btn-danger:hover:not(:disabled) {
        background: #b91c1c;
    }

.btn-danger-outline {
    background: transparent;
    color: #c0392b;
    border: 2px solid #c0392b;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

    .btn-danger-outline:hover {
        background: #c0392b;
        color: #fff;
    }

.btn-accent {
    background: var(--primary);
    color: var(--secondary);
    border: 2px solid var(--secondary);
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
}

    .btn-accent:hover {
        opacity: 0.85;
    }

.btn-warning {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

    .btn-warning:hover:not(:disabled) {
        background: #fee2e2;
    }

.btn-ghost {
    background: none;
    color: var(--subtle);
    border: 1px solid var(--border);
}

    .btn-ghost:hover:not(:disabled) {
        background: var(--bg-subtle);
    }

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--radius-chip);
    font-size: 0.9rem;
    line-height: 1;
    color: var(--muted);
    transition: color 0.15s, background 0.15s;
}

    .btn-icon:hover {
        color: #ef4444;
    }

.btn-danger-icon {
    color: #c0392b;
}

    .btn-danger-icon:hover {
        background: #fdecea;
    }

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem 0.375rem;
    border-radius: var(--radius-chip);
    transition: background 0.15s;
    line-height: 1;
}

    .icon-btn:hover {
        background: var(--bg-subtle);
    }

    .icon-btn.danger:hover {
        background: #fef2f2;
    }

.back-btn {
    margin-top: 0.3rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    color: var(--body-text);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
}

    .back-btn:hover {
        background: var(--bg-subtle);
    }

/* ── Formulieren ───────────────────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

    .form-group.full-width {
        grid-column: 1 / -1;
    }

    .form-group.divider-above {
        grid-column: 1 / -1;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border);
    }

    .form-label,
    .form-group > label {
        font-size: 0.78rem;
        font-weight: 600;
        color: var(--body-text);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

.required {
    color: #dc2626;
}

/* Gedeelde input-stijl — zowel .form-input/.form-select als .form-control */
.form-input,
.form-select,
.form-textarea,
.form-control {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--dark);
    background: var(--white);
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus,
    .form-control:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(242,169,0,0.15);
    }

    .form-input:disabled,
    .form-input[readonly],
    .form-control:disabled,
    .form-control[readonly] {
        background: var(--bg-subtle);
        cursor: not-allowed;
    }

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-select,
select.form-control {
    appearance: auto;
    cursor: pointer;
}

    select.form-control:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.form-control-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
}

.form-control-readonly {
    background: var(--bg-subtle);
    cursor: not-allowed;
    color: var(--subtle);
    font-weight: 600;
}

/* Formulier grid varianten */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .form-grid,
    .form-row-2,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

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

.form-hint {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 400;
    margin-left: 0.25rem;
}

.form-hint-text,
.field-hint {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0.3rem 0 0 0;
}

.form-sectie-titel {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

/* Speciale veld-layouts */
.huisnummer-row {
    display: flex;
    gap: 8px;
}

    .huisnummer-row .form-control {
        flex: 1;
    }

    .huisnummer-row .huisnummer-toevoeging {
        flex: 0 0 90px;
    }

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .input-with-suffix .form-control {
        flex: 0 0 120px;
    }

.input-suffix {
    font-size: 0.85rem;
    color: var(--muted);
    white-space: nowrap;
}

.input-prefix-wrap {
    position: relative;
}

.input-prefix {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.input-with-prefix {
    padding-left: 1.75rem !important;
}

.form-group-sm .form-control {
    max-width: 160px;
}

/* Labels */
.toggle-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.toggle-label {
    font-size: 0.875rem;
    font-weight: normal;
    color: var(--body-text);
    text-transform: none;
    letter-spacing: 0;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ── Toggle groep (Thuis / Op locatie) ─────────────────────────────────────── */
.toggle-group {
    display: flex;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.toggle-btn {
    background: #fff;
    border: none;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--body-text);
    transition: background 0.15s, color 0.15s;
    font-family: var(--font-body);
}

    .toggle-btn:not(:last-child) {
        border-right: 1px solid #d1d5db;
    }

    .toggle-btn:hover {
        background: var(--bg-subtle);
    }

    .toggle-btn.active {
        background: var(--primary);
        color: var(--secondary);
        font-weight: 600;
    }

/* ── Type-toggle (relatie type multiselect) ────────────────────────────────── */
.type-toggle,
.relatie-type-keuze {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.type-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    background: var(--bg-subtle);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--body-text);
    transition: all 0.15s;
    user-select: none;
}

    .type-check input[type="checkbox"] {
        display: none;
    }

    .type-check:hover {
        background: var(--border);
    }

    .type-check.active {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
        font-weight: 600;
    }

/* ── Periode knoppen ───────────────────────────────────────────────────────── */
.periode-opties {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.periode-btn {
    padding: 0.35rem 0.9rem;
    border: 2px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--body-text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
}

    .periode-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
    }

    .periode-btn.active {
        background: var(--primary);
        border-color: var(--primary);
        color: #fff;
        font-weight: 600;
    }

/* ── Tab-knoppen (filter balk) ─────────────────────────────────────────────── */
.tab-group {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.4rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-subtle);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--body-text);
    transition: all 0.15s;
}

    .tab-btn:hover {
        background: var(--border);
    }

    .tab-btn.active {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }

/* ── Tabbladen (detail pagina's) ───────────────────────────────────────────── */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.6rem 1.25rem;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--subtle);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

    .tab:hover {
        color: var(--dark);
    }

    .tab.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
        font-weight: 600;
    }

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    margin-left: 0.375rem;
    vertical-align: middle;
}

.tab.active .tab-count {
    background: var(--secondary);
}

/* ── Filter balken ─────────────────────────────────────────────────────────── */
.admin-filter-bar,
.filters-bar {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--subtle);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.search-group {
    flex: 1;
    min-width: 180px;
}

    .search-group .search-wrap {
        width: 100%;
    }

.search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--dark);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .search-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(242,169,0,0.15);
    }

/* ── Tabellen ──────────────────────────────────────────────────────────────── */
.table-wrap,
.admin-table-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.data-table,
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

    .data-table thead,
    .admin-table thead {
        background: var(--bg-subtle);
        border-bottom: 1px solid var(--border);
    }

    .data-table th,
    .admin-table th {
        text-align: left;
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--subtle);
    }

        .data-table th.text-right,
        .data-table td.text-right,
        .admin-table th.text-right,
        .admin-table td.text-right {
            text-align: right;
        }

    .data-table td,
    .admin-table td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f3f4f6;
        color: var(--body-text);
        vertical-align: middle;
    }

    .data-table tbody tr:last-child td,
    .admin-table tbody tr:last-child td {
        border-bottom: none;
    }

    .data-table tbody tr:hover,
    .admin-table tbody tr:hover {
        background: #fafafa;
    }

    .data-table .row-inactive {
        opacity: 0.55;
    }

    .data-table tfoot .totaal-rij td {
        background: var(--bg-subtle);
        border-top: 2px solid var(--border);
        font-weight: 600;
    }

.table-row-clickable {
    cursor: pointer;
}

    .table-row-clickable:hover {
        background: #fef9ec !important;
    }

.table-total-row {
    background: var(--bg-subtle);
    border-top: 2px solid var(--border);
    font-size: 0.95rem;
}

    .table-total-row td {
        padding: 0.75rem 1rem;
    }

.table-name-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.15s, color 0.15s;
}

    .table-name-btn:hover {
        color: var(--primary);
        text-decoration-color: var(--primary);
    }

.table-link {
    color: var(--subtle);
    font-size: 0.8rem;
    text-decoration: none;
}

    .table-link:hover {
        color: var(--primary);
    }

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-blue {
    background: #eff6ff;
    color: #1d4ed8;
}

.badge-purple {
    background: #f5f3ff;
    color: #6d28d9;
}

.badge-green {
    background: #f0fdf4;
    color: #15803d;
}

.badge-orange {
    background: #fff7ed;
    color: #c2410c;
}

.badge-gray {
    background: #f3f4f6;
    color: var(--subtle);
}

.badge-info {
    background: #e0f0ff;
    color: #1a6fbd;
    border: 1px solid #b3d4f5;
}

.badge-sm {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
}

/* ── Chips ─────────────────────────────────────────────────────────────────── */
.code-chip {
    font-family: var(--font-mono);
    font-size: 0.775rem;
    background: #f3f4f6;
    color: var(--body-text);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-chip);
    white-space: nowrap;
}

.eenheid-chip {
    font-size: 0.75rem;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-chip);
}

/* ── Meldingen ─────────────────────────────────────────────────────────────── */
.message {
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-btn);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.75rem;
}

.message-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.message-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.message-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-btn);
    font-size: 0.875rem;
}

/* ── Laadindicator ─────────────────────────────────────────────────────────── */
.loading-state {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--subtle);
    padding: 3rem 0;
}

.admin-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 300px;
    color: var(--muted);
    font-size: 14px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

.spinner-small {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Lege staat ────────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--subtle);
    margin: 0 0 1.25rem;
}

/* ── Gevaar zone ───────────────────────────────────────────────────────────── */
.danger-zone {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 1px solid #fee2e2;
    box-shadow: var(--shadow-card);
}

    .danger-zone h3 {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--body-text);
        margin: 0 0 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

.danger-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.danger-hint {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0;
}

/* ── Bevestigingsbanner ────────────────────────────────────────────────────── */
.confirm-banner {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

    .confirm-banner p {
        margin: 0;
        color: #991b1b;
        font-size: 0.9rem;
    }

.confirm-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ── Inline formulier kaart ─────────────────────────────────────────────────── */
.inline-form-card {
    background: var(--bg-subtle);
    border: 1px dashed #d1d5db;
    border-radius: var(--radius-card);
    padding: 1.25rem;
    margin-top: 0.75rem;
}

    .inline-form-card h3 {
        font-size: 1rem;
        font-weight: 600;
        color: var(--dark);
        margin: 0 0 1rem;
    }

/* ── Adressen ──────────────────────────────────────────────────────────────── */
.adres-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

    .adres-card.adres-standaard {
        border-color: var(--primary);
        box-shadow: 0 0 0 1px var(--primary);
    }

.adres-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.adres-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
    margin-right: 0.5rem;
}

.adres-tekst {
    margin: 0;
    font-size: 0.875rem;
    color: var(--subtle);
    line-height: 1.6;
}

.adres-actions {
    display: flex;
    gap: 0.25rem;
}

/* ── Afstand invoer ─────────────────────────────────────────────────────────── */
.afstand-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.afstand-badge {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #92400e;
}

.afstand-invoer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Voorrijkosten breakdown ────────────────────────────────────────────────── */
.voorrijkosten-breakdown {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.breakdown-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--body-text);
    margin: 0 0 0.5rem 0;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #4b5563;
    padding: 0.2rem 0;
}

.breakdown-badge {
    background: var(--primary);
    color: var(--secondary);
    border-radius: 999px;
    padding: 0.1rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 2rem;
    text-align: center;
}

/* ── Werkzaamheden ──────────────────────────────────────────────────────────── */
.werkzaamheid-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.4rem;
}

/* ── Tariefverhoging ────────────────────────────────────────────────────────── */
.tariefverhoging-paneel {
    border-left: 4px solid var(--primary);
}

.tariefverhoging-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff8e1;
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.preview-label {
    color: var(--muted);
}

.preview-waarde {
    font-weight: 700;
    color: var(--secondary);
}

/* ── BTW knoppen (product formulier) ───────────────────────────────────────── */
.btw-options {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.btw-btn {
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-subtle);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--body-text);
    transition: all 0.15s;
    white-space: nowrap;
}

    .btw-btn:hover {
        background: var(--border);
    }

    .btw-btn.active {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }

.btw-custom {
    flex: 1;
    min-width: 80px;
}

/* Prijs incl. rij */
.prijs-incl-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-btn);
    border: 1px solid var(--border);
}

.prijs-incl-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--subtle);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.prijs-incl-waarde {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.prijs-incl-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--muted);
    margin-left: 0.25rem;
}

/* ── Settings grid ──────────────────────────────────────────────────────────── */
.settings-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Logo upload ────────────────────────────────────────────────────────────── */
.logo-upload-area {
    background: var(--bg-subtle);
    border: 2px dashed var(--border);
    border-radius: 10px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
}

.logo-preview {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    padding: 1rem;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.logo-placeholder-icon {
    font-size: 2rem;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--body-text);
    width: 100%;
    transition: background 0.2s;
}

    .upload-btn:hover {
        background: var(--border);
    }

.hidden-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.logo-file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.file-name {
    font-size: 0.8rem;
    color: var(--subtle);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* ── KPI strip ──────────────────────────────────────────────────────────────── */
.kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .kpi-strip {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

    .kpi-card.kpi-positive {
        border-color: #86efac;
        background: #f0fdf4;
    }

    .kpi-card.kpi-negative {
        border-color: #fca5a5;
        background: #fef2f2;
    }

.kpi-label {
    font-size: 0.8rem;
    color: var(--subtle);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

/* ── Rapport secties ────────────────────────────────────────────────────────── */
.rapport-sectie {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.75rem;
}

.rapport-titel {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bg-subtle);
}

/* ── Staafdiagram ───────────────────────────────────────────────────────────── */
.bar-chart-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.bar-row {
    display: grid;
    grid-template-columns: 160px 1fr 100px;
    align-items: center;
    gap: 0.75rem;
}

.bar-label {
    font-size: 0.85rem;
    color: var(--body-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    background: #f3f4f6;
    border-radius: 999px;
    height: 14px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.bar-fill-red {
    background: #ef4444;
}

.bar-fill-blue {
    background: #3b82f6;
}

.bar-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    text-align: right;
}

/* ── Potjesverdeling ────────────────────────────────────────────────────────── */
.potjes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
}

@media (max-width: 900px) {
    .potjes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .potjes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.potje-kaart {
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    border-top: 4px solid transparent;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.potje-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.4rem;
}

.potje-naam {
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
    color: var(--body-text);
}

.potje-pct {
    font-size: 0.75rem;
    color: var(--muted);
    display: block;
    margin: 0.2rem 0 0.6rem;
}

.potje-bedrag {
    font-size: 1.2rem;
    font-weight: 800;
    display: block;
}

.potje-betaalrekening {
    border-top-color: #3b82f6;
}

    .potje-betaalrekening .potje-bedrag {
        color: #3b82f6;
    }

.potje-belasting {
    border-top-color: #ef4444;
}

    .potje-belasting .potje-bedrag {
        color: #ef4444;
    }

.potje-btw {
    border-top-color: #f2a900;
}

    .potje-btw .potje-bedrag {
        color: #a07000;
    }

.potje-reserves {
    border-top-color: #22c55e;
}

    .potje-reserves .potje-bedrag {
        color: #16a34a;
    }

.potje-winst {
    border-top-color: #8b5cf6;
}

    .potje-winst .potje-bedrag {
        color: #7c3aed;
    }

/* ── Not found / utility ────────────────────────────────────────────────────── */
.not-found {
    text-align: center;
    padding: 3rem;
    color: var(--subtle);
}

.font-semibold {
    font-weight: 600;
}

.text-muted {
    color: var(--muted);
    font-style: italic;
}

.text-green {
    color: #16a34a;
}

.text-red {
    color: #dc2626;
}

.text-right {
    text-align: right;
}

.result-count {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--muted);
    text-align: right;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

.btn-group-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* ── Print ──────────────────────────────────────────────────────────────────── */
@media print {
    .no-print,
    .admin-sidebar {
        display: none !important;
    }

    .admin-wrapper,
    .admin-main {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}


/* ── Rich text editor ── */
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    background: var(--bg, #f8f8f8);
    border: 1px solid var(--border, #e0e0e0);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.editor-btn {
    padding: 4px 10px;
    background: #fff;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.4;
    transition: background 0.15s;
}

    .editor-btn:hover {
        background: var(--primary, #F2A900);
        color: #fff;
    }

.editor-sep {
    width: 1px;
    background: var(--border, #e0e0e0);
    margin: 2px 4px;
    align-self: stretch;
}

.editor-content {
    min-height: 320px;
    padding: 16px;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 0 0 8px 8px;
    font-family: 'Aptos Display', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    outline: none;
}

    .editor-content font[face="Luckiest Guy"] {
        font-family: 'Luckiest Guy', cursive;
    }

    .editor-content font[face="Indie Flower"] {
        font-family: 'Indie Flower', cursive;
    }

    .editor-content:focus {
        border-color: var(--primary, #F2A900);
    }

    .editor-content h2 {
        font-size: 1.3rem;
        margin: 1rem 0 0.4rem;
    }

    .editor-content h3 {
        font-size: 1.1rem;
        margin: 0.8rem 0 0.3rem;
    }

    .editor-content ul, .editor-content ol {
        padding-left: 1.4rem;
        margin: 0.5rem 0;
    }

/* Editor acties balk */
.editor-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.editor-actions-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Alert succes */
.alert-succes {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.editor-btn-kleur {
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    min-width: unset;
}

    .editor-btn-kleur:hover {
        transform: scale(1.2);
        background: inherit !important;
    }


/* ------------------------------------------------------------
   Drag & Drop
   ------------------------------------------------------------ */
.drag-handle {
    cursor: grab;
    color: var(--muted, #aaa);
    font-size: 18px;
    padding: 0 8px;
    user-select: none;
}

    .drag-handle:active {
        cursor: grabbing;
    }

tr.drag-over,
.ref-card.drag-over {
    outline: 2px dashed var(--primary, #F2A900);
    background: rgba(242, 169, 0, 0.06);
}

tr.row-inactief td {
    opacity: 0.5;
}

.ref-card-inactief {
    opacity: 0.55;
}

.volgorde-acties {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 16px;
    background: #fffbea;
    border: 1px solid #f5d96a;
    border-radius: 8px;
}

/* ------------------------------------------------------------
   Admin empty state
   ------------------------------------------------------------ */
.admin-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--muted, #888);
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 10px;
    margin-top: 16px;
}

/* ------------------------------------------------------------
   Form helpers
   ------------------------------------------------------------ */
.form-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted, #888);
    margin: 24px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border, #eee);
}

    .form-section-title:first-child {
        margin-top: 0;
    }

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border, #eee);
    flex-wrap: wrap;
}

.mb-2 {
    margin-bottom: 8px;
}

/* ------------------------------------------------------------
   Foto-preview (User Cases)
   ------------------------------------------------------------ */
.foto-preview-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.foto-preview {
    width: 160px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border, #eee);
}

/* ------------------------------------------------------------
   Referenties — kaartgrid (overzichtspagina)
   ------------------------------------------------------------ */
.referenties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.ref-card {
    background: #fff;
    border: 1px solid var(--border, #eee);
    border-radius: 10px;
    padding: 14px;
    transition: box-shadow 0.15s, outline 0.1s;
    cursor: default;
}

    .ref-card:hover {
        box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    }

.ref-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.ref-volgorde {
    font-size: 12px;
    color: var(--muted, #aaa);
    font-weight: 600;
}

.ref-card-body {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.ref-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border, #eee);
    flex-shrink: 0;
}

.ref-avatar-mascotte {
    background: #F2A900;
    padding: 4px;
}

.ref-info {
    flex: 1;
    min-width: 0;
}

.ref-naam {
    font-weight: 700;
    font-size: 14px;
}

.ref-functie {
    font-size: 12px;
    color: var(--muted, #888);
}

.ref-bedrijf {
    font-size: 12px;
    color: #F2A900;
    font-weight: 600;
}

/* ------------------------------------------------------------
   Referenties — voorvertoning (detailpagina)
   ------------------------------------------------------------ */
.ref-preview-kaart {
    background: #fff;
    border: 2px dashed #614400;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.ref-preview-avatar-wrap {
    margin-bottom: 14px;
}

.ref-preview-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #F2A900;
}

.ref-preview-mascotte {
    background: #F2A900;
    padding: 6px;
}

.ref-preview-naam {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 2px;
}

.ref-preview-functie {
    font-size: 13px;
    color: #888;
    margin-bottom: 2px;
}

.ref-preview-bedrijf {
    font-size: 13px;
    color: #F2A900;
    font-weight: 600;
    margin-bottom: 12px;
}

.ref-preview-quote {
    font-family: 'Indie Flower', cursive;
    font-size: 15px;
    color: #444;
    line-height: 1.6;
    font-style: italic;
}
/* Drag handle cel */
.drag-handle-cel {
    cursor: grab;
    color: #ccc;
    font-size: 16px;
    user-select: none;
    text-align: center;
}

    .drag-handle-cel:active {
        cursor: grabbing;
    }

/* Visuele feedback tijdens slepen */
tr.drag-over-row {
    outline: 2px dashed #F2A900;
    background: rgba(242, 169, 0, 0.06) !important;
}

/* Hint-tekst in filterbalk */
.drag-hint {
    font-size: 12px;
    color: #aaa;
    margin-left: auto;
    white-space: nowrap;
}

/* Banner die verschijnt na het herordenen */
.volgorde-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #fffbea;
    border: 1px solid #f5d96a;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    flex-wrap: wrap;
}

/* Kleine knopvariant */
.btn.btn-sm {
    padding: 5px 12px;
    font-size: 13px;
}

/* Two-column grid op de detail-pagina */
.toestemming-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1100px) {
    .toestemming-grid {
        grid-template-columns: 1fr;
    }
}

/* Status-banner bovenaan de detailpagina */
.status-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 2px solid transparent;
}

    .status-banner .status-emoji {
        font-size: 32px;
        line-height: 1;
    }

    .status-banner .status-label {
        font-size: 18px;
        font-weight: 700;
    }

    .status-banner .status-toelichting {
        font-size: 14px;
        color: #555;
        margin-top: 2px;
    }

    .status-banner.status-open {
        background: #f5f5f5;
        border-color: #d0d0d0;
    }

    .status-banner.status-geopend {
        background: #e8f1fb;
        border-color: #4a90d9;
    }

    .status-banner.status-goedgekeurd {
        background: #e8f5e9;
        border-color: #4caf50;
    }

    .status-banner.status-afgewezen {
        background: #fdecea;
        border-color: #d32f2f;
    }

    .status-banner.status-ingetrokken {
        background: #fdecea;
        border-color: #d32f2f;
    }

    .status-banner.status-verlopen {
        background: #f5f5f5;
        border-color: #999;
    }

/* Status-badges (kleine versie) */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

    .status-badge.badge-grijs {
        background: #ececec;
        color: #555;
        border-color: #d0d0d0;
    }

    .status-badge.badge-blauw {
        background: #e8f1fb;
        color: #1565c0;
        border-color: #90caf9;
    }

    .status-badge.badge-groen {
        background: #e8f5e9;
        color: #2e7d32;
        border-color: #a5d6a7;
    }

    .status-badge.badge-rood {
        background: #fdecea;
        color: #c62828;
        border-color: #ef9a9a;
    }

/* Info-rijen (label + value) */
.info-rij {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

    .info-rij:last-child {
        border-bottom: none;
    }

    .info-rij label {
        font-weight: 600;
        color: #666;
    }

    .info-rij.blok {
        display: block;
    }

        .info-rij.blok label {
            display: block;
            margin-bottom: 6px;
        }

.opmerking-blok {
    background: #fafafa;
    border-left: 3px solid #F2A900;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
    color: #444;
    white-space: pre-wrap;
}

    .opmerking-blok.small {
        font-size: 13px;
    }

.ua {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #888;
    word-break: break-all;
}

    .ua.small {
        font-size: 10px;
    }

/* Event-tijdlijn */
.event-tijdlijn {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-rij {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 12px;
    background: #fafafa;
    border-radius: 8px;
}

.event-emoji {
    font-size: 20px;
    line-height: 1;
}

.event-tijd {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* Snapshot-preview (admin) */
.snapshot-preview {
    background: #fafafa;
    border: 1px dashed #d0d0d0;
    border-radius: 8px;
    padding: 16px;
}

.snapshot-row {
    padding: 4px 0;
    font-size: 14px;
    border-bottom: 1px dotted #e8e8e8;
}

    .snapshot-row:last-child {
        border-bottom: none;
    }

.snapshot-foto-mini {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 8px;
    border: 2px solid #F2A900;
}

.snapshot-html {
    margin-top: 6px;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

    .snapshot-html p {
        margin: 6px 0;
    }

/* Link-blok (in detail rechterkolom) */
.link-blok {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    word-break: break-all;
}

    .link-blok code {
        font-size: 12px;
        color: #333;
        font-family: 'Courier New', monospace;
    }

/* Knop full-width */
.btn-secondary.full,
.btn-primary.full,
.btn-danger.full {
    width: 100%;
    display: inline-block;
    text-align: center;
}

/* Card-header met knop ernaast */
.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
    flex-wrap: wrap;
}

/* Compactere admin-table-variant */
.admin-table.compact th,
.admin-table.compact td {
    padding: 8px 10px;
    font-size: 13px;
}

/* Knoppenrij algemeen */
.knoppenrij {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

    .knoppenrij.groot {
        gap: 16px;
    }

        .knoppenrij.groot button {
            flex: 1;
            min-width: 160px;
        }

/* Back-link */
.back-link {
    display: inline-block;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    margin-bottom: 4px;
}

    .back-link:hover {
        color: #F2A900;
    }


.badge-geen-toestemming {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}


/* ════════════════════════════════════════════════════════════════════════════
   ║  MOBILE RESPONSIVE                                                       ║
   ║                                                                          ║
   ║  Breakpoints:                                                            ║
   ║    < 1024px — sidebar wordt horizontale top bar                          ║
   ║    < 768px  — compactere padding, headers stacken, tabellen scrollen     ║
   ║    < 640px  — formulieren één kolom, knoppen full-width, geen iOS-zoom   ║
   ║    < 480px  — extra compact voor smartphones                             ║
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Tablet & klein laptop (< 1024px): Sidebar → top bar ────────────────────── */
@media (max-width: 1023px) {
    /* Algemene layout: kolom in plaats van rij */
    .admin-wrapper {
        flex-direction: column;
    }

    /* Sidebar wordt een top bar */
    .admin-sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        max-height: none;
        position: sticky;
        top: 0;
        z-index: 100;
        overflow: visible;
        /* CSS Grid herschikt brand + uitlog op rij 1, nav op rij 2 */
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 0;
    }

    .sidebar-brand {
        grid-column: 1;
        grid-row: 1;
        padding: 10px 14px;
        border-bottom: none;
    }

    .sidebar-logo {
        width: 28px;
        height: 28px;
    }

    .sidebar-title {
        font-size: 14px;
    }

    .sidebar-footer {
        grid-column: 2;
        grid-row: 1;
        padding: 8px 12px;
        border-top: none;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .btn-logout {
        width: auto;
        padding: 6px 12px;
        font-size: 12px;
        white-space: nowrap;
        gap: 6px;
    }

    /* Nav-balk: horizontaal scrollen */
    .sidebar-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        padding: 0;
        border-top: 1px solid rgba(255,255,255,.07);
        /* Subtiele scrollbar */
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,.2) transparent;
    }

        .sidebar-nav::-webkit-scrollbar {
            height: 4px;
        }

        .sidebar-nav::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,.15);
        }

    /* Sectie-labels verbergen — geen ruimte voor */
    .nav-section-label {
        display: none;
    }

    /* Nav-items: actieve indicator naar onderkant verplaatsen */
    .nav-item {
        padding: 10px 14px;
        font-size: 12px;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        flex-shrink: 0;
        gap: 6px;
    }

        .nav-item.active {
            border-left-color: transparent;
            border-bottom-color: var(--primary);
            background: rgba(242,169,0,.12);
        }
}

/* ── Tablet (< 768px) ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .admin-main {
        padding: 1rem;
    }

    .admin-page,
    .admin-page-narrow {
        padding: 1rem;
        max-width: 100%;
    }

    /* Headers compacter en stacken */
    .admin-page-title,
    .page-header h1 {
        font-size: 1.4rem;
    }

    .admin-page-subtitle,
    .page-subtitle {
        font-size: 0.85rem;
    }

    .admin-page-header,
    .page-header {
        margin-bottom: 1.25rem;
        flex-direction: column;
        align-items: stretch;
    }

    .page-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .page-header-with-back {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
        margin-bottom: 1.25rem;
    }

    .back-btn {
        align-self: flex-start;
    }

    /* Tabellen horizontaal scrollen i.p.v. clippen */
    .table-wrap,
    .admin-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table,
    .admin-table {
        min-width: 560px;
    }

        .data-table th,
        .data-table td,
        .admin-table th,
        .admin-table td {
            padding: 0.6rem 0.75rem;
            font-size: 0.82rem;
        }

    /* Filter-balken: zoekveld full-width, andere filters compact */
    .admin-filter-bar,
    .filters-bar {
        gap: 0.6rem;
        padding: 0.75rem;
    }

    .search-group,
    .search-wrap {
        min-width: 100%;
        width: 100%;
        flex: 1 1 100%;
    }

    /* Detailpagina-tabs: horizontaal scrollen */
    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1.25rem;
    }

    .tab {
        white-space: nowrap;
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    /* Filter-tabs: scrollbar i.p.v. wrap */
    .tab-group {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Kaarten compacter */
    .card,
    .admin-form-card,
    .rapport-sectie {
        padding: 1.1rem;
        border-radius: 10px;
    }

    .danger-zone {
        padding: 1rem 1.1rem;
    }

    /* KPI-strip: kleinere padding */
    .kpi-card {
        padding: 1rem 1.1rem;
    }

    .kpi-value {
        font-size: 1.25rem;
    }
}

/* ── Smartphone (< 640px) ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
    /* Form-grids → één kolom (overal, ook waar !important nodig is) */
    .form-grid,
    .form-row-2,
    .form-row-3,
    .form-grid-two,
    .settings-grid,
    .toestemming-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    /* Form actions: full-width knoppen verticaal */
    .form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

        .form-actions .btn {
            width: 100%;
            justify-content: center;
        }

    /* Inputs: 16px voorkomt iOS-zoom + grotere tap target */
    .form-input,
    .form-select,
    .form-textarea,
    .form-control,
    .search-input {
        font-size: 16px;
    }

    /* Knoppen: minimum touch target 40px */
    .btn {
        min-height: 40px;
    }

    .btn-sm {
        min-height: 32px;
    }

    /* Bar-chart rijen: label boven balk, waarde eronder */
    .bar-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
        padding: 0.25rem 0;
    }

    .bar-value {
        text-align: left;
    }

    /* Info-rijen: label boven value */
    .info-rij {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 10px 0;
    }

        .info-rij label {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

    /* Adres-card: acties onder de header */
    .adres-card {
        padding: 0.85rem 1rem;
    }

    .adres-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .adres-actions {
        align-self: stretch;
        justify-content: flex-end;
    }

    /* Status-banner compact */
    .status-banner {
        padding: 14px 16px;
        gap: 12px;
        flex-wrap: wrap;
    }

        .status-banner .status-emoji {
            font-size: 26px;
        }

        .status-banner .status-label {
            font-size: 16px;
        }

    /* Toggle-groep: full-width */
    .toggle-group {
        width: 100%;
    }

    .toggle-btn {
        flex: 1;
        padding: 0.55rem 0.5rem;
    }

    /* Type-toggle: kaarten naast elkaar uitvullen */
    .type-toggle,
    .relatie-type-keuze {
        width: 100%;
    }

    .type-check {
        flex: 1;
        justify-content: center;
        text-align: center;
        padding: 0.55rem 0.5rem;
    }

    /* BTW knoppen: kunnen wrappen */
    .btw-options {
        flex-wrap: wrap;
    }

    .btw-btn {
        flex: 1 0 auto;
    }

    /* Editor toolbar: grotere tap targets */
    .rte-btn,
    .editor-btn {
        min-width: 32px;
        min-height: 32px;
    }

    /* Editor actiebalk verticaal */
    .editor-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .editor-actions-links {
        justify-content: center;
    }

    /* Bevestigingsbanner verticaal */
    .confirm-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .confirm-actions {
        justify-content: flex-end;
    }

    /* Grote knoppenrij: 1 per regel */
    .knoppenrij.groot button {
        flex: 1 1 100%;
        min-width: 100%;
    }

    /* Snapshot-foto-mini iets kleiner */
    .snapshot-foto-mini {
        width: 60px;
        height: 60px;
    }

    /* Voorrijkosten breakdown rijen mogen wrappen */
    .breakdown-row {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    /* Werkzaamheid-rij wrapt */
    .werkzaamheid-row {
        flex-wrap: wrap;
    }

    /* Tarief preview wrapt */
    .tariefverhoging-preview {
        flex-wrap: wrap;
    }

    /* Huisnummer + toevoeging compact */
    .huisnummer-row {
        gap: 6px;
    }

        .huisnummer-row .huisnummer-toevoeging {
            flex: 0 0 70px;
        }

    /* Filterlabels iets kleiner */
    .filter-label {
        font-size: 0.7rem;
    }

    /* Bar-chart label kleiner */
    .bar-label {
        font-size: 0.8rem;
    }

    /* Card-header-row stackt */
    .card-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    /* Drag-handle in tabel verbergen op telefoon (slepen werkt sowieso lastig) */
    .drag-handle-cel {
        display: none;
    }

    .drag-hint {
        display: none;
    }
}

/* ── Smartphone klein (< 480px) ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .admin-main {
        padding: 0.75rem;
    }
    /* Headers extra compact */
    .admin-page-title,
    .page-header h1 {
        font-size: 1.2rem;
    }

    /* Nav-items op smartphone iets compacter */
    .nav-item {
        padding: 9px 11px;
        font-size: 11px;
        gap: 6px;
    }

    .nav-icon {
        font-size: 13px;
    }

    .sidebar-title {
        font-size: 13px;
    }

    .sidebar-brand {
        padding: 8px 12px;
        gap: 8px;
    }

    .btn-logout {
        padding: 5px 10px;
        font-size: 11px;
    }

    /* Card-titels kleiner */
    .card-title {
        font-size: 0.95rem;
    }

    /* Tabel-cellen compact */
    .data-table th,
    .data-table td,
    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.6rem;
        font-size: 0.78rem;
    }

    /* KPI's */
    .kpi-value {
        font-size: 1.1rem;
    }

    .kpi-label {
        font-size: 0.7rem;
    }

    /* Pagina-padding nog krapper */
    .admin-page,
    .admin-page-narrow {
        padding: 0.75rem;
    }
}
