/* SJ Solutions — CSS crítico (anti-FOUC no refresh). Carregar logo após styles.css */

body.sj-app-shell:not(.task-login) #layout {
    flex-wrap: wrap;
    align-content: stretch;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #f8fafc;
}

body.sj-app-shell:not(.task-login) #sj-topbar {
    flex: 0 0 100%;
    width: 100%;
    order: -10;
    display: flex;
    align-items: center;
    height: 60px;
    min-height: 60px;
    background: #991b1b;
    color: #fff;
}

body.sj-app-shell:not(.task-login) #layout-menu,
body.sj-app-shell:not(.task-login) #layout-sidebar,
body.sj-app-shell:not(.task-login) #layout-list,
body.sj-app-shell:not(.task-login) #layout-content {
    height: calc(100dvh - 60px);
    max-height: calc(100dvh - 60px);
    min-height: 0;
}

@media screen and (max-width: 768px) {
    body.sj-app-shell:not(.task-login) #sj-topbar {
        height: 52px;
        min-height: 52px;
    }

    body.sj-app-shell:not(.task-login) #layout-menu.sj-layout-menu:not(.popover) {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        flex: 0 0 0 !important;
        border: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.sj-app-shell:not(.task-login) #layout-sidebar,
    body.sj-app-shell:not(.task-login) #layout-list,
    body.sj-app-shell:not(.task-login) #layout-content {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        height: calc(100dvh - 52px);
        max-height: calc(100dvh - 52px);
    }
}

@media screen and (min-width: 1025px) {
    body.sj-app-shell #layout-menu.sj-layout-menu {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        overflow: hidden;
    }
}

body.sj-app-shell.task-mail #layout-sidebar {
    background: #f1f5f9 !important;
}

body.sj-app-shell #layout-list .searchbar,
body.sj-app-shell #layout-sidebar,
body.sj-app-shell #layout-list,
body.sj-app-shell #layout-content {
    background: #fff;
}

.sj-topbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.sj-topbar__logo-img {
    flex-shrink: 0;
}

.sj-topbar__logo-img--horizontal {
    width: auto;
    height: 40px;
    max-width: min(200px, 38vw);
    object-fit: contain;
}

.sj-topbar__editorial {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sj-topbar__company {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.sj-topbar__links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}

.sj-topbar__link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}
