/* ==========================================
   TWO-LEVEL HEADER FOR LOGGED-IN USERS
   ========================================== */

/* Compact Public Nav (Top Level) - 40px */
.compact-public-nav {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    height: 40px;
    position: sticky;
    top: 0;
    z-index: 1040;
    transition: all 0.3s ease;
}

/* Compact nav scrolled state (optional - can add scroll behavior) */
.compact-public-nav.scrolled {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Currency Selector in Compact Nav */
.currency-selector {
    display: flex;
    align-items: center;
}

.currency-dropdown {
    padding: 4px 10px;
    border: 1px solid rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.9);
    color: #495057;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.currency-dropdown:hover {
    background: white;
    border-color: rgba(0,0,0,0.25);
}

.currency-dropdown:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.compact-public-nav .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.compact-public-nav .nav {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.compact-public-nav .nav-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.8rem;
    padding: 8px 12px;
    transition: all 0.2s ease;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.compact-public-nav .nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.compact-public-nav .nav-link i {
    font-size: 0.85rem;
}

.compact-public-nav .brand-text {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Main User Dashboard Nav (Primary Level) - 60px */
.user-dashboard-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    height: 60px;
    position: sticky;
    top: 40px;
    z-index: 1030;
    transition: all 0.3s ease;
}

.user-dashboard-nav .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-dashboard-nav .navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-dashboard-nav .navbar-brand i {
    color: #ef4444;
    font-size: 1.4rem;
}

.user-dashboard-nav .nav-center {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.user-dashboard-nav .nav-item-main {
    position: relative;
}

.user-dashboard-nav .nav-link-main {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.user-dashboard-nav .nav-link-main:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.user-dashboard-nav .nav-link-main.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.user-dashboard-nav .nav-link-main i {
    font-size: 1rem;
}

.user-dashboard-nav .nav-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.user-dashboard-nav .nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.user-dashboard-nav .notification-icon {
    position: relative;
    color: #6c757d;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: none;
    border: none;
}

.user-dashboard-nav .notification-icon:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.user-dashboard-nav .notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    padding: 2px 4px;
    border-radius: 8px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

/* Notification Dropdown Menu */
.notification-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    min-width: 380px;
    max-width: 400px;
    display: none;
    z-index: 1050;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.notification-dropdown-menu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.notification-dropdown-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notification-dropdown-header h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.mark-all-read {
    color: white;
    font-size: 0.85rem;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.mark-all-read:hover {
    opacity: 1;
    text-decoration: underline;
}

.notification-dropdown-body {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
}

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

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

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.notification-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.notification-info {
    background: #dbeafe;
    color: #3b82f6;
}

.notification-success {
    background: #d1fae5;
    color: #10b981;
}

.notification-warning {
    background: #fef3c7;
    color: #f59e0b;
}

.notification-error {
    background: #fee2e2;
    color: #ef4444;
}

.notification-match {
    background: #fce7f3;
    color: #ec4899;
}

.notification-message {
    background: #e0e7ff;
    color: #6366f1;
}

.notification-event {
    background: #dbeafe;
    color: #3b82f6;
}

.notification-application {
    background: #f3e8ff;
    color: #a855f7;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
    margin-bottom: 4px;
}

.notification-text {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.notification-empty {
    padding: 60px 20px;
    text-align: center;
    color: #9ca3af;
}

.notification-empty i {
    opacity: 0.3;
    color: #d1d5db;
}

.notification-empty p {
    margin-top: 15px;
    color: #6b7280;
}

.notification-dropdown-footer {
    padding: 12px 20px;
    text-align: center;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.notification-dropdown-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.notification-dropdown-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.user-dashboard-nav .user-profile-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.user-dashboard-nav .user-profile-dropdown:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: #667eea;
}

.user-dashboard-nav .user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a202c;
}

.user-dashboard-nav .user-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
}

/* Navigation Dropdown Styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .fa-chevron-down {
    transition: transform 0.3s ease;
}

.nav-dropdown.active .fa-chevron-down {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    min-width: 200px;
    padding: 8px 0;
    display: none;
    z-index: 1050;
    border: 1px solid #e5e7eb;
}

.nav-dropdown-menu.show {
    display: block;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.nav-dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    text-decoration: none;
}

.nav-dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
}

/* Dropdown Menu */
.user-profile-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 250px;
    padding: 12px 0;
    display: none;
    z-index: 1050;
}

.user-profile-dropdown-menu.show {
    display: block;
}

.user-profile-dropdown-menu .dropdown-item {
    padding: 10px 20px;
    color: #4a5568;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.user-profile-dropdown-menu .dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.user-profile-dropdown-menu .dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.user-profile-dropdown-menu .dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #667eea;
    cursor: pointer;
    padding: 8px;
}

/* Responsive Design */
@media (max-width: 992px) {
    /* Hide compact public nav on mobile */
    .compact-public-nav {
        display: none;
    }
    
    .user-dashboard-nav {
        top: 0;
    }
    
    .user-dashboard-nav .nav-center {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        padding: 10px 0;
    }
    
    .user-dashboard-nav .nav-center.mobile-active {
        display: flex;
    }
    
    .user-dashboard-nav .nav-link-main {
        width: 100%;
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .user-dashboard-nav .nav-link-main.active {
        border-left-color: #667eea;
        border-bottom-color: transparent;
    }
    
    /* Mobile dropdown styling */
    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background: #f9fafb;
    }
    
    .nav-dropdown-item {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .user-dashboard-nav .user-name {
        display: none;
    }
}

@media (max-width: 576px) {
    .user-dashboard-nav .navbar-brand {
        font-size: 1.1rem;
    }
    
    .user-dashboard-nav .notification-icon {
        font-size: 1.1rem;
    }
    
    .user-profile-dropdown-menu {
        min-width: 220px;
    }
}

/* Hide default navbar when two-level is active */
body.two-level-header .navbar.navbar-expand-lg {
    display: none;
}

/* Hide old quick nav when two-level header is active */
body.two-level-header .quick-nav-bar {
    display: none !important;
}

/* Adjust main content padding for two-level header */
body.two-level-header {
    padding-top: 0 !important;
}

/* Ensure proper spacing for main content below two-level header */
body.two-level-header .container-fluid:first-of-type,
body.two-level-header .container:first-of-type {
    margin-top: 20px;
}

