.profile-header {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    background-color: white;
    .top-menu-container {
        padding: 0 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
    }
    .user-menu-container {
        margin-left: auto;
        padding-left: 0;
        min-width: 0;
    }
    .admin-menu-container {
        flex: 0 0 auto;
        justify-content: flex-end;
        margin-left: 0;
        margin-right: 12px;
        .top-menu > div > a,
        .top-menu > div.active > a {
            color: #c62828 !important;
        }
        .top-menu > div > a i {
            color: #c62828;
        }
    }
    .fa {
        font-size: 1.2em;
    }
    .logo {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #00447a;
        height: 100%;
        padding: 0 20px;
        flex-shrink: 1;
    }
    .top-menu {
        display: flex;
        align-items: stretch;
        gap: 20px;
        white-space: nowrap;
        height: 100%;
        border-bottom: 0;
        position: relative;
        &::before {
            content: "";
            position: absolute;
            left: 50%;
            width: calc(100% + 24px);
            transform: translateX(-50%);
            bottom: 0;
            height: 3px;
            background: #cfe3fb;
        }
        > div,
        > a {
            position: relative;
            display: inline-flex;
            align-items: center;
            padding-bottom: 3px;
            flex: 0 0 auto;
        }
        > div > a,
        > a {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            text-decoration: none;
            color: #00447a;
            line-height: 1.2;
        }
        > div.active {
            a {
                color: #003f74;
            }
            &::after {
                content: "";
                position: absolute;
                left: 50%;
                width: calc(100% + 12px);
                transform: translateX(-50%);
                bottom: 0;
                height: 3px;
                background: linear-gradient(
                    to right,
                    rgba(63, 111, 163, 0) 0%,
                    rgba(63, 111, 163, 0.9) 6px,
                    rgba(63, 111, 163, 0.9) calc(100% - 6px),
                    rgba(63, 111, 163, 0) 100%
                );
            }
        }
    }

    .top-menu-icon {
        font-size: 18px;
        line-height: 1;
    }
    
    .profile-identity {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        font-size: 80%;
        color: #00447a;
    }
    .profile-header-lang {
       display: flex;
       align-items: center;
    }
}

.mobile-menu-toggle,
.mobile-menu-drawer,
.mobile-menu-backdrop {
    display: none;
}

.profile-header-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 0;
    object-fit: cover;
    flex-shrink: 0;
}

@media (max-width: 400px) {
    .profile-header {
        font-size: 10px!important;
    }
    .top-menu-container {
        padding: 0 5px;
    }
}

@media (max-width: 576px) {
    .profile-header {
        font-size: 12px;
        .top-menu-container {
            padding: 0 8px;
        }
        .top-menu {
            gap: 10px;
        }
        .logo {
            height: 50px;
            padding: 0 10px;
            img {
                height: 40px;
            }
        }
    }
    .admin-menu-container {
        a {
            span {
                display: none;
            }
        }
    }
}

@media (max-width: 768px) {
    .profile-header {
        position: relative;
        overflow-x: clip;
        overflow-y: visible;
        z-index: 3500;
    }
    .profile-header > .admin-menu-container {
        display: none;
    }
    .profile-header > .user-menu-container {
        display: block;
        padding: 0;
        margin-left: auto;
    }
    .profile-header > .user-menu-container > .top-menu {
        display: none;
    }
    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        border: 0;
        background: transparent;
        color: #00447a;
        width: 44px;
        height: 44px;
        border-radius: 6px;
    }
    .mobile-menu-toggle .material-symbols-outlined {
        font-size: 26px;
        line-height: 1;
    }
    .mobile-menu-backdrop {
        display: block;
        position: absolute;
        top: 0;
        left: auto;
        right: 0;
        width: 100%;
        height: 100dvh;
        background: rgba(0, 0, 0, 0.35);
        z-index: 3900;
    }
    .mobile-menu-drawer {
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        width: min(88vw, 340px);
        height: 100dvh;
        background: #ffffff;
        box-shadow: -2px 0 14px rgba(0, 0, 0, 0.2);
        z-index: 4000;
        transform: translateX(100%);
        transition: transform 0.2s ease;
    }
    .mobile-menu-drawer.open {
        transform: translateX(0);
    }
    .mobile-menu-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 14px;
        border-bottom: 1px solid #e4edf6;
        color: #003f74;
        font-weight: 600;
    }
    .mobile-menu-user-name {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: calc(100% - 48px);
        color: #003f74;
        text-transform: uppercase;
        font-size: 14px;
        line-height: 1.2;
    }
    .mobile-menu-user {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        flex: 1 1 auto;
    }
    .mobile-menu-user-avatar {
        width: 24px;
        height: 24px;
        border-radius: 0;
        object-fit: cover;
        flex-shrink: 0;
    }
    .mobile-menu-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        background: transparent;
        color: #00447a;
        width: 36px;
        height: 36px;
        border-radius: 6px;
    }
    .mobile-menu-drawer-items {
        display: flex;
        flex-direction: column;
        padding: 8px 0;
        height: calc(100dvh - 56px);
        overflow: hidden;
    }
    .mobile-menu-drawer-items a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 16px;
        color: #00447a;
        text-decoration: none;
        font-size: clamp(17px, 4.6vw, 20px);
        line-height: 1.35;
        order: 1;
    }
    .mobile-menu-drawer-items a.mobile-admin-link {
        color: #c62828;
        order: 2;
    }
    .mobile-menu-drawer-items a:not(.mobile-admin-link) {
        text-transform: uppercase;
    }
    .mobile-menu-drawer-items a.mobile-admin-link .fa,
    .mobile-menu-drawer-items a.mobile-admin-link .material-symbols-outlined {
        color: #c62828;
    }
    .mobile-menu-drawer-items a.mobile-admin-start {
        margin-top: auto;
        padding-top: 18px;
        border-top: 1px solid #e4edf6;
    }
    .mobile-menu-drawer-items .fa,
    .mobile-menu-drawer-items .material-symbols-outlined {
        width: 24px;
        text-align: center;
        font-size: clamp(21px, 5vw, 24px);
        line-height: 1;
    }
    .mobile-menu-drawer-items a:hover {
        background: #f5f9ff;
        text-decoration: none !important;
    }
    .mobile-menu-drawer-items a:focus,
    .mobile-menu-drawer-items a:active,
    .mobile-menu-drawer-items a:hover .material-symbols-outlined,
    .mobile-menu-drawer-items a:hover span,
    .mobile-menu-drawer-items a:hover i {
        text-decoration: none !important;
    }
    .base-menu {
        display: none!important;
    }
}

@media (max-width: 992px) {
    .profile-header {
        .top-menu {
            gap: 12px;
            font-size: 13px;
        }
        .top-menu-icon {
            font-size: 16px;
        }
        .admin-menu-container {
            margin-right: 6px;
        }
    }
}