/* ============================================ */
/* MODERN HEADER NAVIGATION */
/* ============================================ */

.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001; /* Above mobile menu */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.modern-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.modern-header__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

/* Logo */
.modern-header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.modern-header__logo:hover {
    transform: scale(1.05);
}

.modern-header__logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
    transition: all 0.3s ease;
}

.modern-header__logo:hover .modern-header__logo-icon {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    transform: translateY(-1px);
}

.modern-header__logo-icon i {
    font-size: 20px;
    color: #fff;
}

.modern-header__logo-content {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.modern-header__logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

.modern-header__logo-domain {
    color: #ff6b6b;
    font-weight: 800;
}

/* Desktop Navigation */
.modern-header__nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.modern-header__link {
    position: relative;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modern-header__link:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
    text-decoration: none;
}

.modern-header__link.active {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.modern-header__link.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #ff6b6b;
    border-radius: 2px;
}

/* Actions */
.modern-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.modern-header__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.modern-header__btn--secondary {
    background: transparent;
    color: #555;
    border: 1.5px solid #e0e0e0;
}

.modern-header__btn--secondary:hover {
    background: #f8f9fa;
    border-color: #d0d0d0;
    color: #333;
    text-decoration: none;
    transform: translateY(-1px);
}

.modern-header__btn--primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.25);
}

.modern-header__btn--primary:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff4444 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.35);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.modern-header__icon {
    flex-shrink: 0;
}

/* User Dropdown */
.modern-header__user {
    position: relative;
}

.modern-header__user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: white;
    border: 1.5px solid #e0e0e0;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modern-header__user-trigger:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.02);
}

.modern-header__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.modern-header__user-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.modern-header__chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.modern-header__chevron.rotate {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.modern-header__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.modern-header__dropdown-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modern-header__dropdown-name {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.modern-header__dropdown-role {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-header__dropdown-links {
    padding: 8px 0;
}

.modern-header__dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.modern-header__dropdown-link:hover {
    background: rgba(255, 107, 107, 0.05);
    color: #ff6b6b;
    text-decoration: none;
}

.modern-header__dropdown-link svg {
    flex-shrink: 0;
}

.modern-header__dropdown-footer {
    padding: 8px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.modern-header__dropdown-link--logout {
    color: #dc3545;
}

.modern-header__dropdown-link--logout:hover {
    background: rgba(220, 53, 69, 0.05);
    color: #c82333;
}

/* Mobile Toggle */
.modern-header__mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.modern-header__hamburger {
    width: 100%;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.modern-header__mobile-toggle.active .modern-header__hamburger:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.modern-header__mobile-toggle.active .modern-header__hamburger:nth-child(2) {
    opacity: 0;
}

.modern-header__mobile-toggle.active .modern-header__hamburger:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu - Hidden on desktop by default */
.modern-header__mobile-menu {
    display: none; /* Hidden on desktop */
}

.modern-header__mobile-nav {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modern-header__mobile-link {
    display: block;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.modern-header__mobile-link:hover {
    background: rgba(255, 107, 107, 0.05);
    color: #ff6b6b;
    text-decoration: none;
}

.modern-header__mobile-link.active {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.modern-header__mobile-link--logout {
    color: #dc3545;
}

.modern-header__mobile-link--logout:hover {
    background: rgba(220, 53, 69, 0.05);
}

.modern-header__mobile-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 12px 0;
}

.modern-header__mobile-actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.modern-header__mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    background: none;
    width: 100%;
}

.modern-header__mobile-btn--secondary {
    background: transparent;
    color: #555;
    border: 1.5px solid #e0e0e0;
}

.modern-header__mobile-btn--secondary:hover {
    background: #f8f9fa;
    border-color: #d0d0d0;
    color: #333;
}

.modern-header__mobile-btn--primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.25);
}

.modern-header__mobile-btn--primary:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff4444 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.35);
    color: white;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* ============================================ */
/* RESPONSIVE BREAKPOINTS */
/* ============================================ */

@media (max-width: 1200px) {
    .modern-header__container {
        padding: 0 30px;
    }

    .modern-header__nav {
        gap: 4px;
    }

    .modern-header__link {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 992px) {
    .modern-header__nav {
        display: none !important;
    }

    .modern-header__actions .modern-header__btn--secondary {
        display: none !important;
    }

    .modern-header__btn-text {
        display: none !important;
    }

    .modern-header__btn {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }

    .modern-header__user-name {
        display: none !important;
    }

    .modern-header__mobile-toggle {
        display: flex !important;
    }

    /* Mobile Menu - Only visible on mobile */
    .modern-header__mobile-menu {
        display: block !important;
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        overflow-y: auto !important;
        z-index: 998 !important; /* Below header */
        transform: translateX(100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        pointer-events: none;
    }

    .modern-header__mobile-menu.active {
        transform: translateX(0) !important;
        pointer-events: auto;
    }
}

@media (max-width: 768px) {
    .modern-header__container {
        padding: 0 20px;
        height: 70px;
    }

    .modern-header__logo-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .modern-header__logo-icon i {
        font-size: 18px;
    }

    .modern-header__logo-text {
        font-size: 20px;
    }

    .modern-header__actions {
        gap: 8px;
    }

    .modern-header__btn {
        width: 40px;
        height: 40px;
    }

    .modern-header__icon {
        width: 20px;
        height: 20px;
    }

    .modern-header__user-trigger {
        padding: 4px;
    }

    .modern-header__avatar {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .modern-header__container {
        padding: 0 16px;
    }
}

/* ============================================ */
/* UTILITY: Add padding to body for fixed header */
/* ============================================ */

body {
    padding-top: 80px;
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
}
