/* =========================================================
   MangaSocial - Cabeçalho unificado
========================================================= */

.ms-unified-header {

    position: sticky;

    top: 0;

    z-index: 5000;

    width: 100%;

    background:

        linear-gradient(
            180deg,
            rgba(12, 9, 23, .96),
            rgba(10, 8, 19, .92)
        );

    border-bottom:

        1px solid
        rgba(196, 181, 253, .12);

    backdrop-filter:

        blur(16px);

    -webkit-backdrop-filter:

        blur(16px);

    box-shadow:

        0 12px 32px
        rgba(0, 0, 0, .16);

}


.ms-unified-inner {

    width:

        min(
            1480px,
            calc(100% - 32px)
        );

    min-height:

        72px;

    margin:

        0 auto;

    display:

        grid;

    grid-template-columns:

        auto
        1fr
        auto;

    align-items:

        center;

    gap:

        24px;

}


/* =========================
   LOGO
========================= */

.ms-unified-brand {

    display:

        inline-flex;

    align-items:

        center;

    gap:

        9px;

    color:

        #fff;

    text-decoration:

        none;

    font-size:

        21px;

    font-weight:

        900;

    letter-spacing:

        -.03em;

    white-space:

        nowrap;

}


.ms-unified-brand img {

    width:

        34px;

    height:

        34px;

    object-fit:

        contain;

    filter:

        drop-shadow(
            0 0 9px
            rgba(139, 92, 246, .32)
        );

}


.ms-unified-brand span {

    color:

        #c4a7ff;

}


/* =========================
   NAVEGAÇÃO
========================= */

.ms-unified-nav {

    min-width:

        0;

    display:

        flex;

    align-items:

        center;

    justify-content:

        center;

    gap:

        4px;

}


.ms-unified-link,
.ms-unified-more-button,
.ms-unified-icon-button,
.ms-unified-account {

    border:

        1px solid
        transparent;

    border-radius:

        13px;

    transition:

        background .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;

}


.ms-unified-link {

    min-height:

        42px;

    display:

        inline-flex;

    align-items:

        center;

    gap:

        7px;

    padding:

        8px 10px;

    color:

        #ded5ed;

    text-decoration:

        none;

    font-size:

        14px;

    font-weight:

        750;

    white-space:

        nowrap;

}


.ms-unified-link img {

    width:

        20px;

    height:

        20px;

    object-fit:

        contain;

    flex:

        0 0 20px;

    filter:

        drop-shadow(
            0 0 5px
            rgba(139, 92, 246, .24)
        );

}


.ms-unified-link:hover,
.ms-unified-link:focus-visible,
.ms-unified-more-button:hover,
.ms-unified-more-button:focus-visible,
.ms-unified-icon-button:hover,
.ms-unified-icon-button:focus-visible,
.ms-unified-account:hover,
.ms-unified-account:focus-visible {

    background:

        rgba(139, 92, 246, .12);

    border-color:

        rgba(167, 139, 250, .23);

    transform:

        translateY(-1px);

}


.ms-unified-link.is-active {

    color:

        #fff;

    background:

        linear-gradient(
            135deg,
            rgba(124, 58, 237, .22),
            rgba(168, 85, 247, .12)
        );

    border-color:

        rgba(196, 181, 253, .25);

    box-shadow:

        inset
        0 0 18px
        rgba(139, 92, 246, .06);

}


/* =========================
   MENU MAIS
========================= */

.ms-unified-more {

    position:

        relative;

}


.ms-unified-more-button {

    min-height:

        42px;

    display:

        inline-flex;

    align-items:

        center;

    gap:

        7px;

    padding:

        8px 11px;

    color:

        #ded5ed;

    background:

        transparent;

    cursor:

        pointer;

    font:

        inherit;

    font-size:

        14px;

    font-weight:

        750;

}


.ms-unified-more-button::after {

    content:

        "⌄";

    font-size:

        14px;

    opacity:

        .72;

    transition:

        transform .2s ease;

}


.ms-unified-more.is-open
.ms-unified-more-button::after {

    transform:

        rotate(180deg);

}


.ms-unified-menu {

    position:

        absolute;

    top:

        calc(100% + 10px);

    left:

        50%;

    width:

        270px;

    transform:

        translateX(-50%);

    display:

        none;

    grid-template-columns:

        repeat(
            2,
            minmax(0, 1fr)
        );

    gap:

        5px;

    padding:

        9px;

    background:

        rgba(18, 14, 31, .98);

    border:

        1px solid
        rgba(196, 181, 253, .16);

    border-radius:

        18px;

    box-shadow:

        0 24px 60px
        rgba(0, 0, 0, .38);

    backdrop-filter:

        blur(18px);

    -webkit-backdrop-filter:

        blur(18px);

}


.ms-unified-more.is-open
.ms-unified-menu {

    display:

        grid;

}


.ms-unified-menu
.ms-unified-link {

    min-height:

        48px;

    padding:

        8px;

    font-size:

        13px;

}


.ms-unified-menu
.ms-unified-link img {

    width:

        24px;

    height:

        24px;

    flex-basis:

        24px;

}


/* =========================
   AÇÕES
========================= */

.ms-unified-actions {

    display:

        flex;

    align-items:

        center;

    gap:

        8px;

    justify-content:

        flex-end;

}


.ms-unified-icon-button {

    position:

        relative;

    width:

        44px;

    height:

        44px;

    display:

        inline-grid;

    place-items:

        center;

    padding:

        0;

    background:

        rgba(255, 255, 255, .025);

    text-decoration:

        none;

}


.ms-unified-icon-button img {

    width:

        25px;

    height:

        25px;

    object-fit:

        contain;

}


/* =========================
   CONTA
========================= */

.ms-unified-account {

    min-height:

        44px;

    max-width:

        180px;

    display:

        flex;

    align-items:

        center;

    gap:

        9px;

    padding:

        5px 10px
        5px 6px;

    color:

        #fff;

    background:

        rgba(255, 255, 255, .025);

    text-decoration:

        none;

}


.ms-unified-avatar {

    width:

        32px;

    height:

        32px;

    flex:

        0 0 32px;

    object-fit:

        cover;

    border-radius:

        50%;

    border:

        1px solid
        rgba(196, 181, 253, .24);

    background:

        #201833;

}


.ms-unified-account-text {

    min-width:

        0;

    display:

        grid;

    line-height:

        1.1;

}


.ms-unified-account-text strong {

    overflow:

        hidden;

    text-overflow:

        ellipsis;

    white-space:

        nowrap;

    font-size:

        13px;

}


.ms-unified-account-text small {

    color:

        #aa9bbd;

    font-size:

        10px;

}


/* =========================
   MOBILE BUTTON
========================= */

.ms-unified-mobile-toggle {

    display:

        none;

    width:

        44px;

    height:

        44px;

    padding:

        0;

    place-items:

        center;

    color:

        #fff;

    background:

        rgba(255, 255, 255, .035);

    border:

        1px solid
        rgba(196, 181, 253, .14);

    border-radius:

        13px;

    font-size:

        23px;

    cursor:

        pointer;

}


/* =========================
   BADGE DE NOTIFICAÇÃO
========================= */

.ms-unified-icon-button
:is(
    .notification-badge,
    .notifications-badge,
    [data-notification-count]
) {

    position:

        absolute !important;

    right:

        -3px !important;

    top:

        -4px !important;

}


/* =========================
   ESCONDER HEADER ANTIGO
========================= */

body.ms-unified-ready
> header:not(.ms-unified-header) {

    display:

        none !important;

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .ms-unified-inner {

        grid-template-columns:

            auto
            auto
            1fr;

        min-height:

            64px;

    }


    .ms-unified-mobile-toggle {

        display:

            grid;

    }


    .ms-unified-nav {

        position:

            absolute;

        left:

            16px;

        right:

            16px;

        top:

            calc(100% + 8px);

        display:

            none;

        padding:

            10px;

        justify-content:

            stretch;

        background:

            rgba(17, 13, 30, .985);

        border:

            1px solid
            rgba(196, 181, 253, .17);

        border-radius:

            20px;

        box-shadow:

            0 25px 60px
            rgba(0, 0, 0, .42);

        backdrop-filter:

            blur(18px);

        -webkit-backdrop-filter:

            blur(18px);

    }


    .ms-unified-header.is-mobile-open
    .ms-unified-nav {

        display:

            grid;

        grid-template-columns:

            repeat(
                2,
                minmax(0, 1fr)
            );

    }


    .ms-unified-link,
    .ms-unified-more-button {

        width:

            100%;

        justify-content:

            flex-start;

    }


    .ms-unified-more {

        position:

            static;

    }


    .ms-unified-more-button {

        display:

            none;

    }


    .ms-unified-menu {

        position:

            static;

        width:

            auto;

        grid-column:

            1 / -1;

        display:

            grid;

        grid-template-columns:

            repeat(
                2,
                minmax(0, 1fr)
            );

        padding:

            0;

        background:

            transparent;

        border:

            0;

        box-shadow:

            none;

        transform:

            none;

    }


    .ms-unified-actions {

        justify-self:

            end;

    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 620px) {

    .ms-unified-inner {

        width:

            min(
                100% - 18px,
                1480px
            );

        gap:

            8px;

    }


    .ms-unified-brand {

        font-size:

            17px;

    }


    .ms-unified-brand img {

        width:

            30px;

        height:

            30px;

    }


    .ms-unified-header.is-mobile-open
    .ms-unified-nav {

        grid-template-columns:

            1fr;

        left:

            9px;

        right:

            9px;

        max-height:

            calc(
                100vh - 82px
            );

        overflow:

            auto;

    }


    .ms-unified-menu {

        grid-template-columns:

            1fr;

    }


    .ms-unified-account {

        width:

            44px;

        padding:

            5px;

        justify-content:

            center;

    }


    .ms-unified-account-text {

        display:

            none;

    }


    .ms-unified-actions {

        gap:

            5px;

    }


    .ms-unified-icon-button,
    .ms-unified-account,
    .ms-unified-mobile-toggle {

        width:

            40px;

        height:

            40px;

    }


    .ms-unified-avatar {

        width:

            29px;

        height:

            29px;

        flex-basis:

            29px;

    }

}
/* =====================================================
   AÇÕES DO CABEÇALHO - VERSÃO ATUAL
   sino | painel | perfil
===================================================== */

html body
.ms-unified-header
.ms-unified-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    gap: 10px !important;

    width: auto !important;

    flex-shrink: 0 !important;

    white-space: nowrap !important;
}


/* =========================================
   BOTÕES SOMENTE COM ÍCONE
========================================= */

html body
.ms-unified-header
.ms-unified-icon-button {

    position: relative !important;

    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;

    height: 46px !important;

    flex: 0 0 46px !important;

    padding: 3px !important;

    display: inline-grid !important;
    place-items: center !important;

    overflow: hidden !important;

    /*
       impede textos como "Notificações"
       de aparecerem dentro do botão
    */
    font-size: 0 !important;
    line-height: 0 !important;

    color: transparent !important;

    text-indent: 0 !important;
}


/* imagem normal dos botões */

html body
.ms-unified-header
.ms-unified-icon-button > img {

    display: block !important;

    width: 32px !important;
    height: 32px !important;

    max-width: 32px !important;
    max-height: 32px !important;

    object-fit: contain !important;

    visibility: visible !important;
    opacity: 1 !important;
}


/* =========================================
   ÍCONE DO PAINEL
========================================= */

html body
.ms-unified-header
[data-admin-link].ms-unified-icon-button > img {

    width: 40px !important;
    height: 40px !important;

    max-width: 40px !important;
    max-height: 40px !important;

    object-fit: contain !important;
}


/* =========================================
   CONTADOR DE NOTIFICAÇÕES
========================================= */

html body
.ms-unified-header
.ms-unified-icon-button
.notification-badge,

html body
.ms-unified-header
.ms-unified-icon-button
.notifications-badge,

html body
.ms-unified-header
.ms-unified-icon-button
[data-notification-count] {

    font-size: 10px !important;
    line-height: 18px !important;

    color: white !important;

    text-indent: 0 !important;
}


/* =========================================
   PERFIL
========================================= */

html body
.ms-unified-header
.ms-unified-account {

    flex: 0 0 auto !important;

    min-width: 110px !important;
    max-width: 180px !important;

    margin-left: 2px !important;

    overflow: hidden !important;
}


/* avatar */

html body
.ms-unified-header
.ms-unified-avatar {

    width: 34px !important;
    height: 34px !important;

    min-width: 34px !important;

    flex: 0 0 34px !important;

    object-fit: cover !important;
}


/* =====================================================
   MANGASOCIAL - ELEMENTOS OCULTOS

   Evita que regras como display:inline-grid!important
   tornem visível um botão com atributo hidden.
===================================================== */

.ms-unified-header [hidden] {
    display: none !important;
}
/* ==============================================
   SEGURANÇA VISUAL DO PAINEL
============================================== */

.ms-unified-header [data-admin-link] {
    display: none !important;
}

.ms-unified-header [data-admin-link].is-admin-authorized {
    display: inline-grid !important;
}
/* =====================================================
   CORREÇÃO DEFINITIVA - PAINEL ADMIN
===================================================== */

/* escondido enquanto NÃO houver autorização */
html body
.ms-unified-header
a.ms-unified-icon-button[data-admin-link][hidden] {
    display: none !important;
}

/* escondido por padrão */
html body
.ms-unified-header
a.ms-unified-icon-button[data-admin-link]:not(.is-admin-authorized) {
    display: none !important;
}

/* aparece somente autorizado */
html body
.ms-unified-header
a.ms-unified-icon-button[data-admin-link].is-admin-authorized {
    display: inline-grid !important;
}

/* =========================================================
   MANGASOCIAL - BREAKPOINT FINAL DO CABEÇALHO
   Mantém layout desktop em notebooks/telas com escala 125%.
========================================================= */

@media (min-width: 701px) {

    html body
    .ms-unified-header
    .ms-unified-mobile-toggle {
        display: none !important;
    }

    html body
    .ms-unified-header
    .ms-unified-inner {
        grid-template-columns:
            auto
            1fr
            auto !important;

        grid-template-rows:
            auto !important;

        align-items:
            center !important;

        min-height:
            72px !important;
    }

    html body
    .ms-unified-header
    .ms-unified-brand {
        grid-column:
            1 !important;

        grid-row:
            1 !important;
    }

    html body
    .ms-unified-header
    .ms-unified-nav {
        grid-column:
            2 !important;

        grid-row:
            1 !important;

        position:
            static !important;

        display:
            flex !important;

        width:
            auto !important;

        max-height:
            none !important;

        overflow:
            visible !important;

        background:
            transparent !important;

        border:
            0 !important;

        box-shadow:
            none !important;

        transform:
            none !important;
    }

    html body
    .ms-unified-header
    .ms-unified-actions {
        grid-column:
            3 !important;

        grid-row:
            1 !important;

        justify-self:
            end !important;

        display:
            flex !important;

        align-items:
            center !important;

        flex-wrap:
            nowrap !important;
    }

    html body
    .ms-unified-header
    .ms-unified-menu {
        position:
            absolute !important;
    }
}

/* mobile real */
@media (max-width: 700px) {

    html body
    .ms-unified-header
    .ms-unified-mobile-toggle {
        display:
            grid !important;
    }
}


/* =========================================================
   MANGASOCIAL_HEADER_MOBILE_FINAL_V2
   Cabeçalho mobile definitivo do MangaSocial
========================================================= */

@media (max-width: 700px) {

    html body .ms-unified-header {
        width: 100% !important;
        min-height: 64px !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 99990 !important;
    }

    html body
    .ms-unified-header
    .ms-unified-inner {

        width: 100% !important;
        max-width: none !important;

        min-height: 64px !important;

        padding:
            9px
            12px !important;

        display: grid !important;

        grid-template-columns:
            minmax(0, 1fr)
            auto
            auto !important;

        grid-template-rows:
            auto !important;

        align-items: center !important;

        gap: 7px !important;

        position: relative !important;
    }


    /* LOGO */

    html body
    .ms-unified-header
    .ms-unified-brand {

        grid-column: 1 !important;
        grid-row: 1 !important;

        justify-self: start !important;

        min-width: 0 !important;

        margin: 0 !important;
    }


    /* AÇÕES */

    html body
    .ms-unified-header
    .ms-unified-actions {

        grid-column: 2 !important;
        grid-row: 1 !important;

        display: flex !important;

        align-items: center !important;
        justify-content: flex-end !important;

        justify-self: end !important;

        gap: 5px !important;

        width: auto !important;

        margin: 0 !important;
    }


    /* CONTA */

    html body
    .ms-unified-header
    .ms-unified-account {

        width: 42px !important;
        height: 42px !important;

        min-width: 42px !important;

        display: grid !important;

        place-items: center !important;

        padding: 0 !important;
        margin: 0 !important;

        border-radius: 50% !important;
    }

    html body
    .ms-unified-header
    .ms-unified-account-text {

        display: none !important;
    }

    html body
    .ms-unified-header
    .ms-unified-avatar {

        width: 36px !important;
        height: 36px !important;

        min-width: 36px !important;

        display: block !important;

        object-fit: cover !important;

        border-radius: 50% !important;
    }


    /* ÍCONES */

    html body
    .ms-unified-header
    .ms-unified-icon-button {

        width: 42px !important;
        height: 42px !important;

        min-width: 42px !important;

        padding: 8px !important;

        display: grid !important;

        place-items: center !important;
    }

    html body
    .ms-unified-header
    .ms-unified-icon-button img {

        width: 25px !important;
        height: 25px !important;

        object-fit: contain !important;
    }


    /* HAMBÚRGUER */

    html body
    .ms-unified-header
    .ms-unified-mobile-toggle {

        grid-column: 3 !important;
        grid-row: 1 !important;

        display: grid !important;

        place-items: center !important;

        width: 44px !important;
        height: 44px !important;

        min-width: 44px !important;

        margin: 0 !important;
        padding: 0 !important;

        justify-self: end !important;
    }


    /* NAVEGAÇÃO FECHADA */

    html body
    .ms-unified-header
    .ms-unified-nav {

        position: absolute !important;

        top: calc(100% + 7px) !important;

        left: 10px !important;
        right: 10px !important;

        width: auto !important;

        display: none !important;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            ) !important;

        gap: 8px !important;

        padding: 10px !important;

        margin: 0 !important;

        background:
            rgba(
                16,
                12,
                29,
                .98
            ) !important;

        border:
            1px solid
            rgba(
                196,
                181,
                253,
                .18
            ) !important;

        border-radius: 16px !important;

        box-shadow:
            0 22px 55px
            rgba(
                0,
                0,
                0,
                .45
            ) !important;

        z-index: 100000 !important;
    }


    /* NAVEGAÇÃO ABERTA */

    html body
    .ms-unified-header.is-mobile-open
    .ms-unified-nav {

        display: grid !important;
    }


    /* LINKS */

    html body
    .ms-unified-header
    .ms-unified-link {

        width: 100% !important;

        min-width: 0 !important;

        min-height: 48px !important;

        box-sizing: border-box !important;

        margin: 0 !important;
    }


    /* MAIS */

    html body
    .ms-unified-header
    .ms-unified-more {

        display: contents !important;
    }

    html body
    .ms-unified-header
    .ms-unified-more-button {

        display: none !important;
    }

    html body
    .ms-unified-header
    .ms-unified-menu {

        position: static !important;

        display: grid !important;

        grid-column:
            1 / -1 !important;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            ) !important;

        gap: 8px !important;

        width: auto !important;

        max-width: none !important;

        padding: 0 !important;
        margin: 0 !important;

        background: transparent !important;

        border: 0 !important;

        box-shadow: none !important;

        transform: none !important;
    }
}


/* celulares pequenos */

@media (max-width: 430px) {

    html body
    .ms-unified-header
    .ms-unified-inner {

        padding:
            8px
            9px !important;

        gap: 5px !important;
    }

    html body
    .ms-unified-header
    .ms-unified-nav {

        left: 7px !important;
        right: 7px !important;

        grid-template-columns:
            1fr !important;
    }

    html body
    .ms-unified-header
    .ms-unified-menu {

        grid-template-columns:
            1fr !important;
    }
}

