.sidebar-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 12px;
    margin-bottom: 6px;
    min-width: 0;
    flex-shrink: 0;
}

.sidebar-header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 0;
    overflow: hidden;
}

.sidebar-header-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.sidebar-header-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.sidebar-header-greeting {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-header-name {
    font-size: 14px;
    color: white;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-header-icons {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Topo quando a sidebar está recolhida: avatar, sino, engrenagem (nessa ordem) */
.sidebar-header-icons-only {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
    margin-bottom: 4px;
    min-width: 0;
    flex-shrink: 0;
}

.sidebar-header-icons-only .sidebar-header-img-narrow {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.sidebar-header-icon {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 14px;
}

.sidebar-header-icon:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-header-icon-bell {
    position: relative;
}

.sidebar-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #fff;
    color: #5B8BB5;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Mobile: header mais compacto para o drawer caber na altura sem cortar o footer */
@media (max-width: 768px) {
    .sidebar-header {
        gap: 6px;
        padding: 8px 10px;
        margin-bottom: 4px;
    }

    .sidebar-header-img {
        width: 28px;
        height: 28px;
    }

    .sidebar-header-greeting {
        font-size: 11px;
    }

    .sidebar-header-name {
        font-size: 13px;
    }

    .sidebar-header-icons {
        gap: 4px;
    }

    .sidebar-header-icons-only {
        gap: 4px;
        padding: 8px 0;
        margin-bottom: 2px;
    }

    .sidebar-header-icons-only .sidebar-header-img-narrow {
        width: 28px;
        height: 28px;
    }

    .sidebar-header-icon {
        width: 26px;
        height: 26px;
        border-radius: 6px;
        font-size: 12px;
    }

    .sidebar-badge {
        min-width: 14px;
        height: 14px;
        padding: 0 3px;
        font-size: 9px;
        top: -2px;
        right: -2px;
    }
}

/* Telas altas (ex.: 1440p): header e ícones mais confortáveis */
@media (min-height: 1100px) {
    .sidebar-header {
        gap: 10px;
        padding: 16px 14px;
        margin-bottom: 8px;
    }

    .sidebar-header-img {
        width: 40px;
        height: 40px;
    }

    .sidebar-header-greeting {
        font-size: 13px;
    }

    .sidebar-header-name {
        font-size: 14px;
    }

    .sidebar-header-icons {
        gap: 8px;
    }

    .sidebar-header-icons-only {
        gap: 8px;
        padding: 14px 0;
        margin-bottom: 6px;
    }

    .sidebar-header-icons-only .sidebar-header-img-narrow {
        width: 40px;
        height: 40px;
    }

    .sidebar-header-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        font-size: 16px;
    }

    .sidebar-badge {
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        font-size: 11px;
        top: -4px;
        right: -4px;
    }
}
