/* ==========================================================================
   TOP HEADER BAR - Harmonieus met Sidebar Chiller Dark Theme
   Aparte header stylesheet voor makkelijker kleurenschema beheer
   ========================================================================== */

/* ---- Top Header Bar ---- */
.top-header {
    background-color: #ffffff;
    border-bottom: 2px solid #e5e7eb;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.5rem;
    min-height: 56px;
    gap: 1rem;
}

/* ---- Left: Breadcrumb & Page Title ---- */
.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.header-page-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.header-breadcrumb {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.header-breadcrumb .breadcrumb {
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    font-size: 0.72rem;
    color: #9ca3af;
}

.header-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    content: '\f105';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.6rem;
    color: #d1d5db;
    padding: 0 0.35rem;
}

.header-breadcrumb .breadcrumb-item a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-breadcrumb .breadcrumb-item a:hover {
    color: #667eea;
}

.header-breadcrumb .breadcrumb-item.active {
    color: #6b7280;
}

.header-page-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Right: Actions ---- */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Search Toggle */
.header-search-wrapper {
    position: relative;
}

.header-search-wrapper .header-search-input {
    width: 0;
    padding: 0;
    border: none;
    background: transparent;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    opacity: 0;
    border-radius: 8px;
    height: 36px;
}

.header-search-wrapper.active .header-search-input {
    width: 200px;
    padding: 0 0.75rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    opacity: 1;
}

.header-search-wrapper.active .header-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Header Button (icon) */
.header-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.header-btn:hover {
    background: #f3f4f6;
    color: #667eea;
    border-color: #667eea;
}

.header-btn .notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid #fff;
}

/* Header User Menu */
.header-user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.header-user-menu:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    text-decoration: none;
    color: inherit;
}

.header-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.header-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-user-chevron {
    font-size: 0.6rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.header-user-menu[aria-expanded="true"] .header-user-chevron {
    transform: rotate(180deg);
}

/* Header Dropdown */
.header-dropdown-menu {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    min-width: 200px;
    margin-top: 0.5rem !important;
}

.header-dropdown-menu .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: #374151;
    transition: all 0.15s ease;
}

.header-dropdown-menu .dropdown-item:hover {
    background: #f3f4f6;
    color: #667eea;
}

.header-dropdown-menu .dropdown-item i {
    width: 1.5rem;
    text-align: center;
    margin-right: 0.5rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

.header-dropdown-menu .dropdown-item:hover i {
    color: #667eea;
}

.header-dropdown-divider {
    border-color: #f3f4f6;
    margin: 0.35rem 0;
}

.header-dropdown-menu .dropdown-item.text-danger:hover {
    background: #fef2f2;
    color: #ef4444;
}

.header-dropdown-menu .dropdown-item.text-danger:hover i {
    color: #ef4444;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .header-inner {
        padding: 0.5rem 0.75rem;
        min-height: 50px;
        padding-left: 56px;
        /* Space for sidebar toggle */
    }

    .header-page-icon {
        display: none;
    }

    .header-breadcrumb .breadcrumb {
        display: none;
    }

    .header-page-title {
        font-size: 0.9rem;
    }

    .header-search-wrapper {
        display: none;
    }

    .header-user-name {
        display: none;
    }

    .header-user-menu {
        padding: 0.15rem;
        border: none;
        background: transparent;
    }

    .header-user-chevron {
        display: none;
    }

    .header-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 0.4rem 0.5rem;
        padding-left: 52px;
    }

    .header-page-title {
        font-size: 0.85rem;
    }
}

/* ---- Desktop adjustments ---- */
@media (min-width: 769px) {
    .header-inner {
        padding: 0.65rem 2rem;
    }
}