/* ==========================================================================
   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;
    }
}

/* ================================================
   Notification System Styles
   ================================================ */

/* Notification wrapper - relative for dropdown positioning */
.notification-wrapper {
    position: relative;
}

/* Notification badge (count) */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
    line-height: 1;
    z-index: 2;
    animation: notifBadgePulse 2s ease-in-out infinite;
}

@keyframes notifBadgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Notification dropdown panel */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-height: 520px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    z-index: 1050;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.notification-dropdown.show {
    display: flex;
    animation: notifDropdownIn 0.2s ease-out;
}

@keyframes notifDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dropdown header */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f3f4f6;
}

.notification-header h6 {
    font-size: 0.9rem;
    color: #111827;
}

.notification-header-actions {
    display: flex;
    gap: 4px;
}

.notification-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.notification-action-btn:hover {
    background: #e5e7eb;
    color: #667eea;
}

/* Tabs */
.notification-tabs {
    display: flex;
    gap: 2px;
    padding: 8px 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.notification-tab {
    padding: 6px 14px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #9ca3af;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}

.notification-tab:hover {
    color: #667eea;
}

.notification-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Notification list (scrollable area) */
.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 360px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.notification-list::-webkit-scrollbar {
    width: 4px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

/* Loading & empty states */
.notification-loading,
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    color: #9ca3af;
    gap: 8px;
}

.notification-loading i,
.notification-empty i {
    font-size: 1.5rem;
}

.notification-empty p {
    margin: 0;
    font-size: 0.85rem;
}

/* Notification item */
.notification-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f9fafb;
    transition: background 0.15s, opacity 0.3s, transform 0.3s;
    position: relative;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item.notification-unread {
    background: #f0f5ff;
}

.notification-item.notification-unread:hover {
    background: #e8eeff;
}

/* Priority indicator (left border) */
.notification-item.priority-hoog {
    border-left: 3px solid #f59e0b;
}

.notification-item.priority-urgent {
    border-left: 3px solid #ef4444;
}

.notification-item.priority-normaal {
    border-left: 3px solid transparent;
}

.notification-item.priority-laag {
    border-left: 3px solid transparent;
}

/* Item icon */
.notification-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.notification-unread .notification-item-icon {
    background: #e0e7ff;
    color: #667eea;
}

/* Item content */
.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-unread .notification-item-title {
    color: #1e40af;
}

.notification-item-text {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item-meta {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    align-items: center;
}

.notification-item-time {
    font-size: 0.7rem;
    color: #9ca3af;
}

.notification-item-time i {
    margin-right: 3px;
}

.notification-item-type {
    font-size: 0.65rem;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* Item actions */
.notification-item-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.notification-item:hover .notification-item-actions {
    opacity: 1;
}

.notif-mark-read,
.notif-delete {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.15s;
}

.notif-mark-read {
    background: #ecfdf5;
    color: #059669;
}

.notif-mark-read:hover {
    background: #d1fae5;
}

.notif-delete {
    background: #fef2f2;
    color: #dc2626;
}

.notif-delete:hover {
    background: #fee2e2;
}

/* Dropdown footer */
.notification-footer {
    padding: 10px 16px;
    border-top: 1px solid #f3f4f6;
    text-align: center;
}

.notification-footer a {
    font-size: 0.8rem;
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
}

.notification-footer a:hover {
    text-decoration: underline;
}

/* ================================================
   Notifications Full Page Styles
   ================================================ */

.notification-page-list {
    border-radius: 0 0 0.5rem 0.5rem;
    overflow: hidden;
}

.notification-page-item {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s, opacity 0.3s, transform 0.3s;
    align-items: flex-start;
}

.notification-page-item:last-child {
    border-bottom: none;
}

.notification-page-item:hover {
    background: #f9fafb;
}

.notification-page-item.unread {
    background: #f0f5ff;
}

.notification-page-item.unread:hover {
    background: #e8eeff;
}

.notification-page-indicator {
    width: 4px;
    min-height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
    align-self: stretch;
}

.notification-page-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.notification-page-item.unread .notification-page-icon {
    background: #e0e7ff;
    color: #667eea;
}

.notification-page-text {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ---- Responsive (Notifications) ---- */
@media (max-width: 768px) {
    .notification-dropdown {
        width: calc(100vw - 20px);
        right: -60px;
    }

    .notification-item-actions {
        opacity: 1;
    }

    .notification-page-item {
        padding: 12px 14px;
    }

    .notification-page-indicator {
        display: none;
    }
}