        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background:
                radial-gradient(circle at top left, rgba(37, 99, 235, 0.14) 0%, rgba(37, 99, 235, 0) 28%),
                linear-gradient(180deg, #f4f7fb 0%, #eef3f8 100%);
            color: #0f172a;
            min-height: 100vh;
        }

        .app-shell {
            display: flex;
            min-height: 100vh;
        }

        .app-sidebar {
            width: 280px;
            flex: 0 0 280px;
            display: flex;
            flex-direction: column;
            gap: 18px;
            padding: 24px 18px 18px;
            background: linear-gradient(180deg, #0f172a 0%, #162033 100%);
            border-right: 1px solid rgba(148, 163, 184, 0.18);
            box-shadow: 18px 0 40px rgba(15, 23, 42, 0.16);
            position: sticky;
            top: 0;
            height: 100vh;
            z-index: 20;
            transition: width 0.28s ease, flex-basis 0.28s ease, padding 0.28s ease, box-shadow 0.28s ease;
        }

        .sidebar-toggle {
            width: 40px;
            height: 40px;
            margin-left: auto;
            border: none;
            border-radius: 12px;
            background: rgba(255,255,255,0.08);
            color: #e2e8f0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.18s ease, transform 0.28s ease;
        }

        .sidebar-toggle:hover {
            background: rgba(59, 130, 246, 0.2);
        }

        .sidebar-toggle i {
            font-size: 18px;
            transition: transform 0.28s ease;
        }

        .sidebar-brand {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 8px 10px 16px;
            border-bottom: 1px solid rgba(148, 163, 184, 0.16);
        }

        .sidebar-brand-logo {
            width: 46px;
            height: 46px;
            border-radius: 14px;
            background: rgba(255,255,255,0.08);
            object-fit: cover;
            padding: 7px;
            flex: 0 0 46px;
        }

        .sidebar-brand-text {
            min-width: 0;
            transition: opacity 0.18s ease, transform 0.18s ease;
        }

        .sidebar-brand-title {
            color: #f8fafc;
            font-size: 16px;
            font-weight: 800;
            letter-spacing: 0.01em;
        }

        .sidebar-brand-subtitle {
            color: #94a3b8;
            font-size: 12px;
            margin-top: 2px;
        }

        .sidebar-nav {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .sidebar-nav-title {
            padding: 4px 12px 8px;
            color: #64748b;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            transition: opacity 0.18s ease, transform 0.18s ease;
        }

        .sidebar-link {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            border-radius: 14px;
            color: #cbd5e1;
            text-decoration: none;
            transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
        }

        .sidebar-link:hover {
            background: rgba(59, 130, 246, 0.14);
            color: #ffffff;
            text-decoration: none;
            transform: translateX(2px);
        }

        .sidebar-link.active {
            background: linear-gradient(135deg, rgba(37, 99, 235, 0.28) 0%, rgba(14, 165, 233, 0.22) 100%);
            color: #ffffff;
            box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.18);
        }

        .sidebar-link.disabled {
            color: #94a3b8;
            opacity: 0.9;
        }

        .sidebar-link i {
            font-size: 16px;
            width: 18px;
            text-align: center;
        }

        .sidebar-link-label {
            font-size: 14px;
            font-weight: 700;
            transition: opacity 0.18s ease, transform 0.18s ease;
        }

        .sidebar-profile {
            margin-top: auto;
            padding-top: 14px;
            border-top: 1px solid rgba(148, 163, 184, 0.16);
        }

        .sidebar-avatar {
            width: 34px;
            height: 34px;
            border-radius: 999px;
            background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
            color: #fff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 800;
            flex: 0 0 34px;
        }

        .sidebar-profile-name,
        .sidebar-profile-role {
            display: block;
            transition: opacity 0.18s ease, transform 0.18s ease;
        }

        .sidebar-profile-name {
            font-size: 14px;
            font-weight: 700;
        }

        .sidebar-profile-role {
            font-size: 12px;
            color: #94a3b8;
        }

        .sidebar-profile-toggle {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            border: none;
            border-radius: 16px;
            background: rgba(255,255,255,0.06);
            color: #f8fafc;
            text-align: left;
        }

        .sidebar-profile-toggle::after {
            margin-left: auto;
        }

        .sidebar-profile-toggle:hover,
        .sidebar-profile-toggle:focus {
            background: rgba(255,255,255,0.1);
            color: #ffffff;
        }

        .sidebar-avatar {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
            color: #ffffff;
            font-size: 14px;
            font-weight: 800;
            flex: 0 0 38px;
        }

        .sidebar-profile-name {
            font-size: 14px;
            font-weight: 700;
            color: #f8fafc;
        }

        .sidebar-profile-role {
            font-size: 12px;
            color: #94a3b8;
        }

        .sidebar-profile-menu {
            width: 100%;
            margin-top: 8px !important;
            border: none;
            border-radius: 14px;
            padding: 8px;
            background: #ffffff;
            box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
        }

        .sidebar-profile-menu .dropdown-item {
            border-radius: 10px;
            padding: 10px 12px;
            font-size: 14px;
            font-weight: 600;
            color: #1e293b;
        }

        .sidebar-profile-menu .dropdown-item:hover {
            background: #eff6ff;
            color: #1d4ed8;
        }

        .page-main {
            flex: 1 1 auto;
            min-width: 0;
            padding: 18px;
            transition: padding 0.28s ease;
        }

        body.sidebar-collapsed .app-sidebar {
            width: 92px;
            flex-basis: 92px;
            padding-left: 12px;
            padding-right: 12px;
            box-shadow: 10px 0 28px rgba(15, 23, 42, 0.14);
        }

        body.sidebar-collapsed .sidebar-toggle i {
            transform: rotate(180deg);
        }

        body.sidebar-collapsed .sidebar-brand {
            justify-content: center;
            padding-left: 0;
            padding-right: 0;
        }

        body.sidebar-collapsed .sidebar-brand-text,
        body.sidebar-collapsed .sidebar-nav-title,
        body.sidebar-collapsed .sidebar-link-label,
        body.sidebar-collapsed .sidebar-profile-name,
        body.sidebar-collapsed .sidebar-profile-role {
            opacity: 0;
            transform: translateX(-8px);
            pointer-events: none;
            width: 0;
            overflow: hidden;
        }

        body.sidebar-collapsed .sidebar-nav {
            align-items: center;
        }

        body.sidebar-collapsed .sidebar-link {
            justify-content: center;
            padding-left: 0;
            padding-right: 0;
            width: 52px;
        }

        body.sidebar-collapsed .sidebar-link i {
            margin: 0;
            width: auto;
        }

        body.sidebar-collapsed .sidebar-profile-toggle {
            justify-content: center;
            padding-left: 0;
            padding-right: 0;
        }

        .page-section {
            scroll-margin-top: 18px;
        }

        .placeholder-panel {
            margin-top: 24px;
            padding: 22px 24px;
            border-radius: 22px;
            background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
            border: 1px solid #dbe4ef;
            box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
        }

        .placeholder-panel-title {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 20px;
            font-weight: 800;
            color: #0f172a;
        }

        .placeholder-panel-title i {
            color: #2563eb;
        }

        .placeholder-panel-text {
            margin-top: 10px;
            color: #475569;
            line-height: 1.6;
        }

        .makelaar-table-shell {
            margin-top: 18px;
            overflow-x: auto;
            border-radius: 18px;
            border: 1px solid #dbe4ef;
            background: #ffffff;
        }

        .makelaar-table {
            width: 100%;
            border-collapse: collapse;
            table-layout: auto;
        }

        .makelaar-table thead th {
            background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
            color: #475569;
            font-size: 12px;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .makelaar-table td:first-child {
            font-weight: 700;
            color: #0f172a;
        }
        
        h1 {
            color: #333;
            margin-bottom: 20px;
            font-size: 28px;
            padding: 0 10px;
        }

        .dashboard-hero {
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            padding: 24px 28px;
            margin-bottom: 20px;
            border-radius: 20px;
            background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 48%, #f59e0b 100%);
            box-shadow: 0 22px 45px rgba(15, 23, 42, 0.18);
        }

        .dashboard-hero::after {
            content: '';
            position: absolute;
            right: -40px;
            bottom: -70px;
            width: 260px;
            height: 260px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 72%);
            pointer-events: none;
        }

        .dashboard-hero-main {
            position: relative;
            z-index: 1;
            display: flex;
            align-items: center;
            gap: 18px;
            min-width: 0;
        }

        .dashboard-logo {
            width: 72px;
            height: 72px;
            flex: 0 0 72px;
            object-fit: cover;
            border-radius: 18px;
            background: rgba(255,255,255,0.14);
            padding: 10px;
            box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
        }

        .dashboard-title-block {
            min-width: 0;
        }

        .dashboard-eyebrow {
            display: inline-flex;
            align-items: center;
            padding: 6px 10px;
            margin-bottom: 10px;
            border-radius: 999px;
            background: rgba(255,255,255,0.12);
            color: #dbeafe;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .dashboard-title {
            margin: 0;
            padding: 0;
            color: #fff;
            font-size: 32px;
            line-height: 1.05;
        }

        .dashboard-subtitle {
            margin: 8px 0 0;
            color: rgba(239, 246, 255, 0.92);
            font-size: 15px;
            max-width: 760px;
        }

        .dashboard-hero-stats {
            position: relative;
            z-index: 1;
            display: grid;
            grid-template-columns: repeat(4, minmax(88px, 1fr));
            gap: 12px;
            min-width: 420px;
        }

        .dashboard-stat {
            padding: 14px 16px;
            border-radius: 16px;
            background: rgba(255,255,255,0.12);
            backdrop-filter: blur(8px);
            box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
        }

        .dashboard-stat-label {
            color: rgba(226, 232, 240, 0.78);
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .dashboard-stat-value {
            margin-top: 6px;
            color: #fff;
            font-size: 26px;
            font-weight: 800;
            line-height: 1;
        }

        @media (max-width: 980px) {
            .dashboard-hero {
                flex-direction: column;
                align-items: stretch;
            }

            .dashboard-hero-stats {
                min-width: 0;
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .dashboard-title {
                font-size: 28px;
            }
        }
        
        .filters-section {
            background: white;
            border-radius: 18px;
            box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
            padding: 20px;
            margin-bottom: 20px;
            position: relative;
        }

        .filters-toolbar {
            display: flex;
            gap: 12px;
            align-items: flex-start;
            justify-content: space-between;
            flex-wrap: wrap;
            margin-top: 14px;
        }

        .filter-launchers {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            flex: 1;
            min-width: 0;
        }

        .filter-launcher {
            display: inline-flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            min-height: 44px;
            padding: 10px 14px;
            border: 1px solid #cbd5e1;
            border-radius: 12px;
            background: #fff;
            color: #0f172a;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.18s ease;
            max-width: 280px;
        }

        .filter-launcher:hover,
        .filter-launcher.is-open {
            border-color: #93c5fd;
            background: #eff6ff;
        }

        .filter-launcher.has-selection {
            border-color: #2563eb;
            background: #dbeafe;
            color: #0b4dbb;
        }

        .filter-launcher-text {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .filter-launcher-icon {
            flex-shrink: 0;
            color: #2563eb;
            font-size: 13px;
        }

        .all-filters-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            background: #1976d2;
            color: white;
            border: 1px solid #1976d2;
            border-radius: 12px;
            padding: 10px 18px;
            min-height: 48px;
            font-size: 14px;
            font-weight: 700;
            box-shadow: 0 10px 24px rgba(25, 118, 210, 0.22);
        }

        .all-filters-btn:hover {
            background: #1565c0;
        }

        .all-filters-btn-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            line-height: 1;
        }

        .all-filters-btn-text {
            white-space: nowrap;
        }

        .inline-filter-popup {
            position: absolute;
            top: 0;
            left: 0;
            z-index: 20;
            width: min(420px, calc(100% - 40px));
            padding-bottom: 6px;
        }

        .inline-filter-popup.hidden,
        .filters-overlay.hidden,
        .filters-bank {
            display: none;
        }

        .inline-filter-popup-panel {
            background: #fff;
            border: 1px solid #dbe4f0;
            border-radius: 16px;
            box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
            padding: 16px;
        }

        .filters-overlay {
            position: fixed;
            inset: 0;
            z-index: 1050;
            background: rgba(15, 23, 42, 0.42);
            padding: 28px 20px;
            overflow-y: auto;
        }

        .filters-overlay-dialog {
            width: min(920px, 100%);
            margin: 0 auto;
            background: #fff;
            border-radius: 20px;
            box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            max-height: calc(100vh - 56px);
        }

        .filters-overlay-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 16px;
            padding: 20px 24px 14px;
            border-bottom: 1px solid #e2e8f0;
            background: #fff;
            flex-shrink: 0;
        }

        .filters-overlay-titlebar {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .filters-overlay-title {
            font-size: 22px;
            font-weight: 700;
            color: #0f172a;
        }

        .filters-overlay-count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 28px;
            height: 28px;
            padding: 0 8px;
            border-radius: 999px;
            background: #0b6fcf;
            color: #fff;
            font-size: 14px;
            font-weight: 700;
        }

        .filters-overlay-close {
            background: transparent;
            border: none;
            color: #2563eb;
            font-weight: 700;
            cursor: pointer;
        }

        .filters-overlay-summary {
            padding: 16px 24px 18px;
            border-bottom: 1px solid #e2e8f0;
            background: #fff;
            flex-shrink: 0;
        }

        .active-filter-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            min-height: 28px;
        }

        .active-filter-chip {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 7px 12px;
            background: #e0f2fe;
            color: #0b4dbb;
            border-radius: 4px;
            border: none;
            cursor: pointer;
            font-size: 14px;
        }

        .active-filter-chip-remove {
            font-size: 18px;
            line-height: 1;
        }

        .active-filter-empty {
            color: #64748b;
            font-size: 14px;
        }

        .clear-all-filters-link {
            margin-top: 14px;
            padding: 0;
            border: none;
            background: transparent;
            color: #0b6fcf;
            font-size: 14px;
            cursor: pointer;
        }

        .filters-overlay-body {
            display: grid;
            grid-template-columns: 1fr;
            gap: 16px;
            padding: 20px 24px;
            overflow-y: auto;
        }

        .filters-overlay-footer {
            padding: 16px 24px 24px;
            background: #fff;
            border-top: 1px solid #e2e8f0;
            flex-shrink: 0;
        }

        .results-apply-button {
            width: 100%;
            min-height: 52px;
            border: none;
            border-radius: 14px;
            background: #0b6fcf;
            color: #fff;
            font-size: 18px;
            font-weight: 700;
            cursor: pointer;
        }

        .filter-card {
            border: 1px solid #e2e8f0;
            border-radius: 16px;
            padding: 16px;
            background: #fff;
        }

        .filter-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 12px;
        }

        .filter-card-title {
            font-weight: 700;
            font-size: 15px;
            color: #334155;
        }
        
        .filter-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .filter-group select,
        .filter-group input {
            padding: 10px 12px;
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            font-size: 14px;
        }
        
        .filter-group select[multiple] {
            min-height: 180px;
        }

        .filter-native-select {
            position: absolute;
            width: 1px;
            height: 1px;
            opacity: 0;
            pointer-events: none;
        }

        .custom-multi-list {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .custom-multi-list.is-collapsed .custom-multi-option-collapsed {
            display: none;
        }

        .custom-single-list {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .custom-multi-option {
            display: grid;
            grid-template-columns: 20px minmax(0, 1fr) auto;
            align-items: center;
            gap: 12px;
            width: 100%;
            padding: 6px 0;
            border: none;
            background: transparent;
            text-align: left;
            color: #1e293b;
            cursor: pointer;
        }

        .custom-multi-option-check {
            width: 20px;
            height: 20px;
            border-radius: 4px;
            border: 1.5px solid #0b6fcf;
            background: #fff;
            position: relative;
        }

        .custom-multi-option.is-selected .custom-multi-option-check {
            background: #0b6fcf;
        }

        .custom-multi-option.is-selected .custom-multi-option-check::after {
            content: '';
            position: absolute;
            left: 6px;
            top: 2px;
            width: 5px;
            height: 10px;
            border: solid #fff;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

        .custom-multi-option-label {
            min-width: 0;
            font-size: 14px;
        }

        .custom-multi-option-count {
            color: #475569;
            font-size: 14px;
        }

        .filter-expand-toggle {
            margin-top: 6px;
            padding: 0;
            border: none;
            background: transparent;
            color: #0b6fcf;
            font-size: 14px;
            text-align: left;
            cursor: pointer;
            align-self: flex-start;
        }

        .custom-single-option {
            display: grid;
            grid-template-columns: 20px minmax(0, 1fr) auto;
            align-items: center;
            gap: 12px;
            width: 100%;
            padding: 6px 0;
            border: none;
            background: transparent;
            text-align: left;
            color: #1e293b;
            cursor: pointer;
        }

        .custom-single-option-check {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: 1.5px solid #0b6fcf;
            background: #fff;
            position: relative;
        }

        .custom-single-option.is-selected .custom-single-option-check::after {
            content: '';
            position: absolute;
            inset: 4px;
            border-radius: 50%;
            background: #0b6fcf;
        }

        .custom-single-option-label {
            min-width: 0;
            font-size: 14px;
        }

        .custom-single-option-count {
            color: #475569;
            font-size: 14px;
        }

        .filter-clear-button {
            margin-top: 14px;
            padding: 0;
            border: none;
            background: transparent;
            color: #0b6fcf;
            font-size: 14px;
            text-align: left;
            cursor: pointer;
            align-self: flex-start;
        }
        
        .range-inputs {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        
        .range-inputs input {
            flex: 1;
            max-width: 100px;
        }
        
        .range-inputs span {
            color: #999;
        }
        
        .range-slider {
            margin-top: 10px;
        }
        
        .range-slider input[type="range"] {
            width: 100%;
        }
        
        .range-values {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            color: #666;
            margin-top: 5px;
        }
        
        .filter-actions {
            display: flex;
            gap: 10px;
            margin-top: 15px;
        }
        
        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
        }
        
        .btn-primary {
            background: #1976d2;
            color: white;
        }
        
        .btn-primary:hover {
            background: #1565c0;
        }
        
        .btn-secondary {
            background: #e0e0e0;
            color: #333;
        }
        
        .btn-secondary:hover {
            background: #d0d0d0;
        }
        
        .filter-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 20px;
            gap: 14px;
            flex-wrap: wrap;
        }

        .filter-actions-buttons {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .page-footer {
            margin: 28px 10px 8px;
            color: #6b7280;
            font-size: 12px;
            text-align: center;
        }

        .toggle-group {
            display: flex;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
        }

        .toggle-group label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
        }

        .toggle-group span {
            font-weight: 600;
        }

        .kpi-section {
            display: none;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 14px;
            margin-bottom: 20px;
        }

        .kpi-section.visible {
            display: grid;
        }

        .kpi-card {
            position: relative;
            overflow: hidden;
            background: linear-gradient(155deg, #ffffff 0%, #f7fbff 58%, #eef5fb 100%);
            border: 1px solid #d9e4f0;
            border-radius: 18px;
            padding: 18px 18px 16px;
            box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
        }

        .kpi-card::before {
            content: '';
            position: absolute;
            inset: -35% auto auto 55%;
            width: 150px;
            height: 150px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(255,255,255,0.65) 0%, rgba(255,255,255,0) 70%);
            pointer-events: none;
        }

        .kpi-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 14px;
        }

        .kpi-icon {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            color: white;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
        }

        .kpi-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 10px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            background: rgba(19, 34, 56, 0.06);
            color: #48607c;
        }

        .kpi-label {
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 0.02em;
            text-transform: uppercase;
            color: #5f6b7a;
            margin-bottom: 8px;
        }

        .kpi-value {
            font-size: 30px;
            font-weight: 800;
            line-height: 1.1;
            color: #132238;
        }

        .kpi-subtitle {
            margin-top: 8px;
            font-size: 13px;
            color: #607086;
        }

        .kpi-meter {
            height: 8px;
            border-radius: 999px;
            background: rgba(19, 34, 56, 0.08);
            overflow: hidden;
            margin-top: 14px;
        }

        .kpi-meter-fill {
            height: 100%;
            width: 0%;
            border-radius: inherit;
            transition: width 0.25s ease;
        }

        .kpi-note {
            margin-top: 10px;
            font-size: 12px;
            font-weight: 600;
            color: #5d7088;
        }

        .kpi-card--gold .kpi-icon,
        .kpi-card--gold .kpi-meter-fill {
            background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
        }

        .kpi-card--blue .kpi-icon,
        .kpi-card--blue .kpi-meter-fill {
            background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
        }

        .kpi-card--emerald .kpi-icon,
        .kpi-card--emerald .kpi-meter-fill {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        }

        .kpi-card--rose .kpi-icon,
        .kpi-card--rose .kpi-meter-fill {
            background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
        }

        .kpi-card--slate .kpi-icon,
        .kpi-card--slate .kpi-meter-fill {
            background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
        }
        
        .container {
            display: flex;
            gap: 10px;
            max-width: 100%;
            margin: 0;
            align-items: flex-start;
        }
        
        .tables-section {
            flex: 0 0 65%;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        body.map-hidden.chart-hidden .tables-section {
            flex: 1 1 100%;
        }
        
        .map-section,
        .chart-section {
            flex: 0 0 35%;
            min-width: 0;
        }

        body.map-hidden .map-section {
            display: none;
        }

        body.chart-hidden .chart-section {
            display: none;
        }
        
        .table-container {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        
        .table-header {
            padding: 15px 20px;
            font-weight: 600;
            font-size: 18px;
            border-bottom: 2px solid #e0e0e0;
        }
        
        .table-header.beschikbaar {
            background: #e8f5e9;
            color: #2e7d32;
        }
        
        .table-header.onderhandeling {
            background: #fff3e0;
            color: #e65100;
        }
        
        .table-header.verkocht {
            background: #ffebee;
            color: #c62828;
        }
        
        .table-header.referentie {
            background: #e3f2fd;
            color: #1565c0;
            border: 2px solid #1976d2;
        }

        .table-header.activiteiten {
            background: #eef2ff;
            color: #3730a3;
        }

        #reference-table-container {
            display: none;
        }

        #activities-table-container {
            display: none;
        }

        .activities-table-shell {
            position: relative;
            background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
        }

        .activities-scroll {
            max-height: 345px;
            overflow-y: auto;
            overflow-x: auto;
            scrollbar-width: thin;
            scrollbar-color: #94a3b8 #e2e8f0;
        }

        .activities-scroll::-webkit-scrollbar {
            width: 10px;
            height: 10px;
        }

        .activities-scroll::-webkit-scrollbar-track {
            background: #e2e8f0;
        }

        .activities-scroll::-webkit-scrollbar-thumb {
            background: #94a3b8;
            border-radius: 999px;
            border: 2px solid #e2e8f0;
        }

        .activities-table th:nth-child(1),
        .activities-table td:nth-child(1) {
            width: 140px;
        }

        .activities-table th:nth-child(2),
        .activities-table td:nth-child(2) {
            width: 280px;
        }

        .activities-table thead th {
            background: linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
            color: #475569;
            font-size: 12px;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .activity-row {
            border-left: 4px solid transparent;
        }

        .activity-row-publication {
            border-left-color: #2563eb;
        }

        .activity-row-republication {
            border-left-color: #0f766e;
        }

        .activity-row-price_change {
            border-left-color: #d97706;
        }

        .activity-row-status_change {
            border-left-color: #7c3aed;
        }

        .activity-row-sale {
            border-left-color: #059669;
        }

        .activity-row td {
            vertical-align: middle;
            padding-top: 12px;
            padding-bottom: 12px;
        }

        .activity-date-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 112px;
            padding: 6px 10px;
            border-radius: 999px;
            background: #e2e8f0;
            color: #334155;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.02em;
        }

        .activity-house-cell {
            display: flex;
            align-items: center;
            min-height: 36px;
        }

        .activity-house-name {
            font-weight: 700;
            color: #0f172a;
            line-height: 1.35;
        }

        .activity-description-cell {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .activity-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 5px 10px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .activity-badge-publication {
            background: #dbeafe;
            color: #1d4ed8;
        }

        .activity-badge-republication {
            background: #ccfbf1;
            color: #0f766e;
        }

        .activity-badge-price_change {
            background: #fef3c7;
            color: #b45309;
        }

        .activity-badge-status_change {
            background: #ede9fe;
            color: #6d28d9;
        }

        .activity-badge-sale {
            background: #d1fae5;
            color: #047857;
        }

        .activity-description-text {
            color: #1e293b;
            font-weight: 600;
            line-height: 1.45;
        }

        #activities-empty-state {
            display: none;
            margin: 0;
            border-top: 1px solid #e5e7eb;
            border-radius: 0;
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
            table-layout: fixed;
        }
        
        .table-container {
            overflow-x: auto;
            max-width: 100%;
        }
        
        th {
            background: #f5f5f5;
            padding: 12px 8px;
            text-align: left;
            font-weight: 600;
            font-size: 13px;
            color: #666;
            border-bottom: 1px solid #e0e0e0;
            white-space: nowrap;
            cursor: pointer;
            user-select: none;
            position: relative;
        }
        
        th:hover {
            background: #eeeeee;
        }
        
        th.sorted-asc::after {
            content: ' ▲';
            font-size: 10px;
            color: #1976d2;
        }
        
        th.sorted-desc::after {
            content: ' ▼';
            font-size: 10px;
            color: #1976d2;
        }
        
        td {
            padding: 10px 8px;
            border-bottom: 1px solid #f0f0f0;
            font-size: 13px;
        }
        
        tr {
            cursor: pointer;
            transition: background-color 0.2s;
        }
        
        tr:hover {
            background: #fafafa;
        }
        
        tr.selected {
            background: #e3f2fd !important;
            box-shadow: inset 0 0 0 2px #1976d2;
        }

        tr.related-selected {
            background: #f1f8ff !important;
            box-shadow: inset 0 0 0 1px rgba(25, 118, 210, 0.35);
        }
        
        a {
            color: #1976d2;
            text-decoration: none;
        }
        
        a:hover {
            text-decoration: underline;
        }
        
        .energy-label {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 4px;
            font-weight: 700;
            font-size: 12px;
            text-align: center;
            min-width: 35px;
            color: white;
            text-shadow: 0 1px 2px rgba(0,0,0,0.2);
        }
        
        .energy-label.A-plus-plus-plus-plus { background: #0a5f0a; }
        .energy-label.A-plus-plus-plus { background: #0d7a0d; }
        .energy-label.A-plus-plus { background: #1ba943; }
        .energy-label.A-plus { background: #2db84e; }
        .energy-label.A { background: #4cce5f; }
        .energy-label.B { background: #7ed956; }
        .energy-label.C { background: #f9c74f; color: #333; }
        .energy-label.D { background: #f3a82e; color: #333; }
        .energy-label.E { background: #f08030; }
        .energy-label.F { background: #ee5a24; }
        .energy-label.G { background: #c62828; }
        
        .price {
            font-weight: 600;
            color: #333;
        }

        .price-with-change {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .price-change-indicator {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #fff4e5;
            color: #b45309;
        }

        .price-change-indicator svg {
            width: 12px;
            height: 12px;
            stroke: currentColor;
            fill: none;
            stroke-width: 1.6;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .price-change-indicator.down {
            background: #ffebee;
            color: #c62828;
        }

        .price-change-indicator.up {
            background: #e8f5e9;
            color: #2e7d32;
        }
        
        #map {
            height: 600px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        #band-chart {
            width: 100%;
            height: clamp(340px, 58vh, 640px) !important;
            max-height: 640px !important;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            padding: 12px;
            display: block;
        }
        
        .map-title,
        .chart-title {
            background: white;
            padding: 15px 20px;
            border-radius: 8px 8px 0 0;
            font-weight: 600;
            font-size: 18px;
            color: #333;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .count {
            font-weight: normal;
            opacity: 0.7;
            margin-left: 8px;
        }
        
        .empty-state {
            padding: 20px;
            text-align: center;
            color: #999;
            font-style: italic;
        }
        
        /* Map controls styling */
        .map-title,
        .chart-title {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 15px;
        }
        
        .map-title-text,
        .chart-title-text {
            flex: 0 0 auto;
        }
        
        .map-controls,
        .chart-controls {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            margin-left: auto;
        }
        
        .map-control,
        .chart-control {
            display: flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap;
        }
        
        .map-control label,
        .chart-control label {
            font-weight: normal;
            font-size: 14px;
        }
        
        .map-control select,
        .chart-control select {
            padding: 6px 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 13px;
            background: white;
        }

        .chart-line-toggles {
            display: flex;
            gap: 14px;
            flex-wrap: wrap;
            width: 100%;
        }

        .chart-line-toggles label {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            color: #444;
            cursor: pointer;
        }
        
        /* Responsive design for different screen sizes */
        @media (max-width: 1400px) {
            .app-shell {
                flex-direction: column;
            }

            .sidebar-toggle {
                display: none;
            }

            .app-sidebar {
                width: 100%;
                height: auto;
                position: static;
                border-right: none;
                border-bottom: 1px solid rgba(148, 163, 184, 0.18);
                box-shadow: none;
            }

            body.sidebar-collapsed .app-sidebar {
                width: 100%;
                flex-basis: auto;
                padding-left: 18px;
                padding-right: 18px;
                box-shadow: none;
            }

            body.sidebar-collapsed .sidebar-brand-text,
            body.sidebar-collapsed .sidebar-nav-title,
            body.sidebar-collapsed .sidebar-link-label,
            body.sidebar-collapsed .sidebar-profile-name,
            body.sidebar-collapsed .sidebar-profile-role {
                opacity: 1;
                transform: none;
                pointer-events: auto;
                width: auto;
                overflow: visible;
            }

            body.sidebar-collapsed .sidebar-nav {
                align-items: stretch;
            }

            body.sidebar-collapsed .sidebar-link {
                justify-content: flex-start;
                width: auto;
                padding-left: 14px;
                padding-right: 14px;
            }

            body.sidebar-collapsed .sidebar-profile-toggle {
                justify-content: flex-start;
                padding-left: 12px;
                padding-right: 12px;
            }

            .page-main {
                padding-top: 14px;
            }

            .container {
                flex-direction: column;
            }
            
            .tables-section {
                flex: 1 1 100%;
            }
            
            .map-section,
            .chart-section {
                flex: 1 1 100%;
                position: static;
                margin-top: 20px;
            }
            
            #map {
                height: 500px;
            }

            #band-chart {
                height: clamp(320px, 55vh, 560px) !important;
                max-height: 560px !important;
            }
        }

        @media (max-width: 780px) {
            .app-sidebar {
                padding: 18px 14px 14px;
            }

            .sidebar-brand {
                padding-left: 6px;
                padding-right: 6px;
            }

            .sidebar-profile-toggle {
                padding-left: 12px;
                padding-right: 12px;
            }

            .page-main {
                padding: 14px;
            }

            .filters-section {
                padding: 16px;
            }

            .filters-toolbar {
                flex-direction: column;
            }

            .filter-launchers {
                width: 100%;
            }

            .filter-launcher,
            .all-filters-btn {
                width: 100%;
                max-width: none;
            }

            .inline-filter-popup {
                left: 16px;
                width: calc(100% - 32px);
            }

            .filters-overlay {
                padding: 12px;
            }

            .filters-overlay-dialog {
                max-height: calc(100vh - 24px);
            }

            .filters-overlay-header,
            .filters-overlay-summary,
            .filters-overlay-body,
            .filters-overlay-footer {
                padding-left: 18px;
                padding-right: 18px;
            }

            .filter-actions {
                flex-direction: column;
                align-items: stretch;
            }

            .filter-actions-buttons {
                width: 100%;
            }
        }
        
        @media (min-width: 1401px) and (max-width: 1920px) {
            .tables-section {
                flex: 0 0 60%;
                min-width: 0;
            }
            
            .map-section,
            .chart-section {
                flex: 0 0 40%;
                min-width: 0;
            }
        }
        
        @media (min-width: 1921px) {
            .tables-section {
                flex: 0 0 65%;
                min-width: 0;
            }
            
            .map-section,
            .chart-section {
                flex: 0 0 35%;
                min-width: 0;
            }
            
            #map {
                height: 800px;
            }

            #band-chart {
                height: clamp(360px, 60vh, 680px) !important;
                max-height: 680px !important;
            }
        }
        
        /* Fix for sticky positioning on larger screens */
        @media (min-width: 1401px) {
            .map-section {
                position: sticky;
                top: 20px;
                height: fit-content;
                max-height: calc(100vh - 40px);
            }

            .chart-section {
                position: static;
                top: auto;
                height: auto;
                max-height: none;
            }
        }
        
        /* Fix for map controls wrapping on medium screens */
        @media (max-width: 2242px) {
            .map-controls,
            .chart-controls {
                margin-left: 0;
                width: 100%;
                margin-top: 10px;
            }
            
            .map-title,
            .chart-title {
                flex-direction: column;
                align-items: flex-start;
            }
        }
        
        /* Smaller controls on very narrow map sections */
        @media (max-width: 1600px) {
            .map-control label,
            .chart-control label {
                font-size: 12px;
            }
            
            .map-control select,
            .chart-control select {
                font-size: 12px;
                padding: 5px 8px;
            }
            
            /* Make tables more compact */
            th {
                padding: 10px 6px;
                font-size: 12px;
            }
            
            td {
                padding: 8px 6px;
                font-size: 12px;
            }
            
            .table-header {
                padding: 12px 15px;
                font-size: 16px;
            }
        }
        
        @media (max-width: 1400px) {
            /* Even more compact for smaller screens */
            th {
                padding: 8px 5px;
                font-size: 11px;
            }
            
            td {
                padding: 6px 5px;
                font-size: 11px;
            }
            
            .table-header {
                padding: 10px 12px;
                font-size: 15px;
            }
            
            /* Wrap long text in cells */
            td {
                max-width: 150px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
            
            /* Allow address cells to wrap */
            td:first-child {
                white-space: normal;
                max-width: 200px;
            }
        }
        
        @media (max-width: 768px) {
            /* Mobile: very compact tables */
            th {
                padding: 6px 4px;
                font-size: 10px;
            }
            
            td {
                padding: 5px 4px;
                font-size: 10px;
                max-width: 100px;
            }
            
            .table-header {
                padding: 8px 10px;
                font-size: 14px;
            }
            
            /* Hide some less important columns on mobile */
            th:nth-child(n+15), td:nth-child(n+15) {
                display: none;
            }
        }
        
        /* Print styles for PDF/Print */
        @media print {
            .app-sidebar,
            .placeholder-panel {
                display: none !important;
            }

            .dashboard-hero {
                background: #fff !important;
                box-shadow: none !important;
                border: 1px solid #ddd !important;
            }

            .dashboard-eyebrow,
            .dashboard-title,
            .dashboard-subtitle,
            .dashboard-stat-label,
            .dashboard-stat-value {
                color: #111 !important;
            }

            .dashboard-logo,
            .dashboard-stat {
                background: #fff !important;
                box-shadow: none !important;
                border: 1px solid #ddd !important;
            }

            body {
                background: white;
                padding: 0;
                margin: 0;
            }

            .page-main {
                padding: 0;
            }
            
            /* Hide filters and interactive elements */
            .filters-section,
            .filter-actions,
            .map-controls,
            .chart-controls,
            #show-reference {
                display: none !important;
            }
            
            h1 {
                font-size: 20px;
                margin: 10px 0;
                padding: 0;
                page-break-after: avoid;
            }
            
            /* Adjust container for print */
            .container {
                display: block;
                max-width: 100%;
            }
            
            /* Map on first page */
            .map-section {
                width: 100%;
                page-break-after: always;
                margin-bottom: 20px;
            }

            .chart-section {
                width: 100%;
                page-break-after: always;
                margin-bottom: 20px;
            }
            
            .map-title {
                font-size: 16px;
                padding: 10px;
                page-break-after: avoid;
            }
            
            #map {
                height: 500px !important;
                width: 100%;
                page-break-inside: avoid;
            }

            #band-chart {
                height: 500px !important;
                width: 100%;
                page-break-inside: avoid;
            }
            
            /* Tables section */
            .tables-section {
                width: 100%;
            }
            
            /* Each table on new page, except reference and first regular table */
            .table-container {
                page-break-before: always;
                page-break-inside: avoid;
                margin-bottom: 20px;
                box-shadow: none;
            }
            
            /* Reference table: no page break before, allow it to stay with next table */
            #reference-table-container {
                page-break-before: auto;
            }
            
            /* First non-reference table (beschikbaar) can stay on same page as reference */
            .tables-section > .table-container:nth-child(2) {
                page-break-before: auto;
            }
            
            .table-header {
                padding: 8px 10px;
                font-size: 14px;
                page-break-after: avoid;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
            }
            
            /* Compact table styling for print */
            table {
                font-size: 9px;
                page-break-inside: auto;
            }
            
            thead {
                display: table-header-group;
            }
            
            tr {
                page-break-inside: avoid;
                page-break-after: auto;
            }
            
            th {
                padding: 6px 4px;
                font-size: 9px;
                background: #f5f5f5 !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
            }
            
            td {
                padding: 5px 4px;
                font-size: 8px;
                border-bottom: 1px solid #e0e0e0;
            }
            
            /* Hide interactive elements in tables */
            th::after {
                display: none;
            }
            
            /* Keep energy label colors */
            .energy-label {
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
            }
            
            /* Remove hover effects */
            tr:hover {
                background: transparent;
            }
            
            tr.selected {
                background: transparent !important;
                box-shadow: none !important;
            }

            tr.related-selected {
                background: transparent !important;
                box-shadow: none !important;
            }
            
            /* Compact links */
            a {
                color: #000;
                text-decoration: none;
            }
            
            /* Show reference table if checkbox is checked (controlled by JS class) */
            body:not(.show-reference-print) #reference-table-container {
                display: none !important;
            }
            
            body.show-reference-print #reference-table-container {
                display: block !important;
                page-break-before: auto;
                page-break-after: avoid;
            }
            
            /* Keep conditional formatting colors */
            td[style*="background"] {
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
            }
        }
