/* Topo global do dashboard */
.app-topbar {
    margin-bottom: 0.6rem;
    margin-top: calc(-1 * env(safe-area-inset-top, 0px) - 1px);
    border: none;
    border-radius: 0 0 0px 0px; /* 0 0 16px 16px; */
    padding: calc(env(safe-area-inset-top, 0px) + 0.44rem + 1px) 0.45rem 0.44rem 0.45rem !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--app-header-bg);
    box-shadow: none;
    gap: 0.35rem;
    min-height: 0;
}

#main-layout {
    background: var(--pico-background-color);
}

#main-content {
    background: var(--pico-background-color) !important;
}

.app-topbar-main {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
}

.app-topbar-logo-link {
    display: block;
    line-height: 0;
}

.app-topbar-logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 0px solid rgba(255, 255, 255, 0.65);
    background: url('../img/logo.png') center / contain no-repeat;
    flex-shrink: 0;
}

.app-topbar-text {
    min-width: 0;
}

.app-topbar-text strong {
    color: #ffffff;
    display: block;
    font-size: 1.10rem;
    line-height: 0.98;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-topbar-text small {
    color: rgba(255, 255, 255, 0.9);
    display: block;
    margin-top: 0.02rem;
    font-size: 0.80rem;
    line-height: 0.98;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.app-topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.7);
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.top-avatar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

#top-nav,
#top-nav li {
    margin: 0;
    list-style: none;
}

#top-nav {
    padding: 0;
}

#top-nav > li {
    padding: 0 !important;
    display: flex;
    align-items: center;
}

#top-nav details.dropdown {
    display: flex;
    align-items: center;
}

#top-nav details.dropdown summary::after {
    display: none;
}

#top-nav details.dropdown summary {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
}

.app-topbar ul,
.app-topbar li,
.app-topbar summary {
    margin: 0;
}

.app-topbar ul,
.app-topbar li {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#top-nav details.dropdown summary.avatar-menu-trigger {
    padding: 0;
    border: none;
    background: transparent;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#top-nav details.dropdown summary i {
    width: 20px;
    height: 20px;
}

#top-nav details.dropdown summary.avatar-menu-trigger::marker,
#top-nav details.dropdown summary.avatar-menu-trigger::-webkit-details-marker {
    display: none;
}

#top-nav details.dropdown ul {
    left: auto;
    right: 0;
}

#top-nav details.dropdown ul li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 340px) {
    .app-topbar-logo {
        width: 28px;
        height: 28px;
    }

    .app-topbar-text strong {
        font-size: 0.9rem;
    }

    .app-topbar-text small {
        font-size: 0.64rem;
    }

    .app-topbar-avatar {
        width: 26px;
        height: 26px;
    }
}
