/* Dashboard Viewer Styles - Modern Interactive Dashboard */

/* === Layout === */
.dashboard-body {
    background: var(--rws-grijs-bg);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 140px);
    max-width: 100%;
}

/* === Sidebar === */
.dashboard-sidebar {
    background: var(--rws-wit);
    border-right: 1px solid var(--rws-grijs-rand);
    padding: var(--space-lg);
    position: sticky;
    top: 0;
    height: calc(100vh - 140px);
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--rws-grijs-rand);
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rws-donkerblauw);
    margin: 0;
}

.reset-filters-btn {
    background: none;
    border: none;
    color: var(--rws-hemelblauw);
    font-size: 0.875rem;
    cursor: pointer;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.reset-filters-btn:hover {
    background: var(--rws-grijs-bg);
}

/* === Search Box === */
.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--rws-grijs-tekst);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--rws-grijs-rand);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: var(--font-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--rws-hemelblauw);
    box-shadow: 0 0 0 3px rgba(0, 123, 199, 0.1);
}

.search-input::placeholder {
    color: var(--rws-grijs-tekst);
}

/* === Sidebar Sections === */
.sidebar-section {
    margin-bottom: var(--space-lg);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--rws-grijs-tekst);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 var(--space-md);
}

.sidebar-title svg {
    width: 16px;
    height: 16px;
}

/* === Filter Checkboxes === */
.filter-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}

.filter-checkbox:hover {
    background: var(--rws-grijs-bg);
}

.filter-checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--rws-grijs-rand);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.filter-checkbox input:checked + .checkmark {
    background: var(--rws-hemelblauw);
    border-color: var(--rws-hemelblauw);
}

.filter-checkbox input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-label {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--rws-zwart);
}

.filter-count {
    background: var(--rws-grijs-bg);
    color: var(--rws-grijs-tekst);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 100px;
    font-weight: 500;
}

/* === Tag Cloud === */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.tag-item {
    background: var(--rws-grijs-bg);
    color: var(--rws-donkerblauw);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.tag-item:hover {
    background: var(--rws-hemelblauw);
    color: white;
}

.tag-item.active {
    background: var(--rws-donkerblauw);
    color: white;
}

/* === Sidebar Stats === */
.sidebar-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--rws-grijs-bg);
    border-radius: var(--radius-md);
    margin-top: auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--rws-hemelblauw);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--rws-grijs-tekst);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Main Content === */
.dashboard-content {
    padding: var(--space-lg);
    background: var(--rws-grijs-bg);
}

/* === Top Bar === */
.content-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.topbar-left h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--rws-donkerblauw);
    margin: 0 0 var(--space-xs);
}

.results-count {
    font-size: 0.875rem;
    color: var(--rws-grijs-tekst);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* === View Toggle === */
.view-toggle {
    display: flex;
    background: var(--rws-wit);
    border-radius: var(--radius-md);
    padding: 4px;
    box-shadow: var(--shadow-sm);
}

.view-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--rws-grijs-tekst);
    transition: all 0.2s;
}

.view-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.view-btn:hover {
    color: var(--rws-donkerblauw);
}

.view-btn.active {
    background: var(--rws-hemelblauw);
    color: white;
}

/* === Sort Select === */
.sort-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--rws-grijs-rand);
    border-radius: var(--radius-md);
    background: var(--rws-wit);
    font-size: 0.875rem;
    font-family: var(--font-primary);
    color: var(--rws-donkerblauw);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23154273' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

/* === Active Filters === */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    min-height: 32px;
}

.active-filter {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--rws-hemelblauw);
    color: white;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.8125rem;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.active-filter button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    display: flex;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.active-filter button:hover {
    opacity: 1;
}

.active-filter button svg {
    width: 14px;
    height: 14px;
}

/* === Grid View === */
.projects-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.project-card-viewer {
    background: var(--rws-wit);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    animation: cardFadeIn 0.3s ease;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-card-viewer:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-image {
    height: 180px;
    background: linear-gradient(135deg, var(--rws-hemelblauw), var(--rws-donkerblauw));
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-status {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-status.actief { background: #dcfce7; color: #166534; }
.card-status.afgerond { background: #dbeafe; color: #1e40af; }
.card-status.gepland { background: #fef3c7; color: #92400e; }
.card-status.in-ontwikkeling { background: #f3e8ff; color: #7c3aed; }
.card-status.in-uitvoering { background: #ffedd5; color: #c2410c; }

.card-icon {
    position: absolute;
    bottom: var(--space-md);
    left: var(--space-md);
    width: 48px;
    height: 48px;
    background: var(--rws-wit);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--rws-hemelblauw);
}

.card-body {
    padding: var(--space-lg);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--rws-donkerblauw);
    margin: 0 0 var(--space-sm);
    line-height: 1.3;
}

.card-description {
    font-size: 0.9375rem;
    color: var(--rws-grijs-tekst);
    line-height: 1.5;
    margin: 0 0 var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    padding-top: 10px;
}

.card-tag {
    background: var(--rws-grijs-bg);
    color: var(--rws-lintblauw);
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* === List View === */
.projects-list-view {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.project-list-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: var(--space-lg);
    background: var(--rws-wit);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.project-list-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.list-icon {
    width: 44px;
    height: 44px;
    background: var(--rws-grijs-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-icon svg {
    width: 22px;
    height: 22px;
    color: var(--rws-hemelblauw);
}

.list-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rws-donkerblauw);
    margin: 0 0 4px;
}

.list-content p {
    font-size: 0.875rem;
    color: var(--rws-grijs-tekst);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-tags {
    display: flex;
    gap: var(--space-xs);
}

.list-status {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* === Kanban View === */
.projects-kanban-view {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    align-items: start;
}

.kanban-column {
    background: var(--rws-wit);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    min-height: 400px;
}

.kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--rws-grijs-rand);
}

.kanban-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--rws-donkerblauw);
    margin: 0;
}

.kanban-count {
    background: var(--rws-grijs-bg);
    color: var(--rws-grijs-tekst);
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.kanban-card {
    background: var(--rws-grijs-bg);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid var(--rws-hemelblauw);
}

.kanban-card:hover {
    background: var(--rws-grijs-licht);
    transform: translateX(2px);
}

.kanban-card h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rws-donkerblauw);
    margin: 0 0 var(--space-xs);
    line-height: 1.3;
}

.kanban-card p {
    font-size: 0.8125rem;
    color: var(--rws-grijs-tekst);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === Detail Panel === */
.detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 480px;
    height: 100vh;
    background: var(--rws-wit);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.detail-panel.visible {
    transform: translateX(0);
}

.detail-header {
    position: sticky;
    top: 0;
    background: var(--rws-wit);
    padding: var(--space-md);
    border-bottom: 1px solid var(--rws-grijs-rand);
    display: flex;
    justify-content: flex-end;
    z-index: 1;
}

.close-panel {
    background: var(--rws-grijs-bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-panel:hover {
    background: var(--rws-grijs-rand);
}

.close-panel svg {
    width: 20px;
    height: 20px;
    color: var(--rws-donkerblauw);
}

.detail-content {
    padding: var(--space-xl);
}

.detail-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, var(--rws-hemelblauw), var(--rws-donkerblauw));
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-image svg {
    width: 64px;
    height: 64px;
    color: white;
    opacity: 0.5;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rws-donkerblauw);
    margin: 0 0 var(--space-md);
    line-height: 1.3;
}

.detail-status {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.detail-section {
    margin-bottom: var(--space-xl);
}

.detail-section h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--rws-grijs-tekst);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 var(--space-sm);
}

.detail-section p {
    font-size: 1rem;
    color: var(--rws-zwart);
    line-height: 1.7;
    margin: 0;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.detail-tag {
    background: var(--rws-grijs-bg);
    color: var(--rws-lintblauw);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
}

.detail-cta {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--rws-grijs-rand);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--rws-hemelblauw);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--rws-donkerblauw);
    text-decoration: none;
}

/* === No Results === */
.no-results {
    text-align: center;
    padding: var(--space-2xl);
    background: var(--rws-wit);
    border-radius: var(--radius-lg);
}

.no-results svg {
    width: 80px;
    height: 80px;
    color: var(--rws-grijs-rand);
    margin-bottom: var(--space-lg);
}

.no-results h3 {
    font-size: 1.25rem;
    color: var(--rws-donkerblauw);
    margin: 0 0 var(--space-sm);
}

.no-results p {
    color: var(--rws-grijs-tekst);
    margin: 0 0 var(--space-lg);
}

/* === Overlay === */
.panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.panel-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* === Utilities === */
.hidden {
    display: none !important;
}

/* === Responsive === */
@media (max-width: 1200px) {
    .projects-kanban-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: fixed;
        left: -300px;
        top: 140px;
        width: 280px;
        height: calc(100vh - 140px);
        z-index: 100;
        transition: left 0.3s ease;
    }

    .dashboard-sidebar.open {
        left: 0;
    }

    .detail-panel {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .content-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .projects-grid-view {
        grid-template-columns: 1fr;
    }

    .projects-kanban-view {
        grid-template-columns: 1fr;
    }

    .project-list-item {
        grid-template-columns: auto 1fr;
        gap: var(--space-md);
    }

    .list-tags,
    .list-status {
        display: none;
    }
}

@media (max-width: 480px) {
    .dashboard-content {
        padding: var(--space-md);
    }

    .topbar-left h1 {
        font-size: 1.5rem;
    }

    .view-toggle {
        display: none;
    }
}
