:root {
    --sf-primary: #3b82f6;
    --sf-gradient: linear-gradient(135deg, #4f46e5 0%, #3b82f6 50%, #10b981 100%);
    --radius-xxl: 24px;
    --glass: rgba(255, 255, 255, 0.75);
}

.logo-box {
    width: 35px;
    height: 35px;
    background: var(--sf-gradient);
    border-radius: 10px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
}

.logo-text {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: #3b82f6;
}

.sf-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 1.5px;
    margin-bottom: 0px;
}

.custom-dropdown .e-input {
    font-weight: 700 !important;
    font-size: 0.9rem !important;
}

/* Avatar */
.user-avatar-active {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--sf-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    cursor: pointer;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.sf-action-btn {
    color: #64748b !important;
    transition: all 0.3s !important;
}

.sf-action-btn:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #3b82f6 !important;
    transform: translateY(-2px);
}

.dark-mode .sf-action-btn {
    color: #94a3b8 !important;
}

.hover-bg:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .hover-bg:hover {
    background: rgba(255, 255, 255, 0.05);
}

.cursor-pointer {
    cursor: pointer;
}

.divider-vertical {
    width: 1px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
    align-self: center;
}

.dark-mode .divider-vertical {
    background: rgba(255, 255, 255, 0.1);
}

/* Header Glass Design */
.header-glass {
    position: relative;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    border: 2px solid #ffffff;
    z-index: 10;
}

.dark-mode .header-glass {
    border-color: rgba(255, 255, 255, 0.05);
}

.menu-toggle-btn {
    transition: all 0.2s;
    border: 1px solid transparent;
}

.menu-toggle-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.badge-dot-sf {
    width: 14px;
    height: 14px;
    background: #ef4444;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    right: 8px;
    border: 3px solid white;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

@media (max-width: 768px) {
    .header-glass {
        flex-direction: column;
        padding: 15px !important;
        align-items: stretch !important;
    }

    .header-glass>.d-flex:first-child {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding-bottom: 15px;
        margin-bottom: 10px;
    }

    .logo-area {
        border-right: none !important;
        width: 100%;
        justify-content: center;
    }

    .context-item {
        width: 100%;
    }

    .custom-dropdown {
        width: 100% !important;
    }

    .divider-vertical {
        display: none;
    }

    .header-glass>.d-flex:last-child {
        justify-content: center;
        overflow-x: auto;
        padding: 5px 0;
    }
}

/* Lista do dropdown de unidade/ano costuma montar em body; z-index alto evita ficar atrás das abas. */
body .e-popup-open.e-popup.e-ddl,
body .e-popup.e-ddl-popup,
body > .e-dropdownbase.e-popup {
    z-index: 12050 !important;
}